Guides
Ecosystems
Create a policy

How to create policies

Ecosystem policies configure roles and permissions that apply to participants within the Ecosystem. For example, participant X can act as an issuer and issue valid credentials of type X, Y and Z.

Ecosystems have separate policies for issuers and verifiers.

Create an Issuer Policy

Request

Make a request of the following structure to create a new Issuer's Policy:

HTTP
POST /v1/ecosystems/{ecosystemId}/participants/{participantId}/issuer/credentials
  • ecosystemId : Policies are created within a specific ecosystem. Use the ecosystem unique id obtained when you created the ecosystem.
  • participantId : The identifier of the issuer you wish to add to the ecosystem Issuer's Policy. Use the unique id obtained when you created the participant.

Request body

JSON
{
    "credentialId": "599bf148-d711-405a-a20b-9c8a87ac8850"
}
  • credentialId : A credential type identifier. The issuer will be able to issue credential of this type that are valid in the ecosystem. Use the unique id obtained when you configured the credential type.

Response

JSON
{
    "id": "599bf148-d711-405a-a20b-9c8a87ac8850",
    "ecosystemId": "87880d7e-a4d0-462e-8383-3f1e5e16865d",
    "profile": "compact",
    "type": "DriverLicence",
    "name": "Driver's Licence"
}

Policies for large ecosystems are expected to be large. To maintain API performance, only the relevant information is returned in the response:

  • If the request adds an issuer with credential types in the request body, these credential types are returned in the response.
  • If the request simply adds an issuer to the policy, an empty response is returned.

Create a Verifier Policy

Request

Make a request of the following structure to create a new Verifier's Policy:

HTTP
POST /v1/ecosystems/{ecosystemId}/participants/{participantId}/verifier/credentials
  • ecosystemId : Policies are created within a specific ecosystem. Use the ecosystem unique id obtained when you created the ecosystem.
  • participantId : The identifier of the verifier you wish to add to the ecosystem Verifier's Policy. Use the unique id obtained when you created the participant.

Request body

JSON
{
    "credentialId": "599bf148-d711-405a-a20b-9c8a87ac8850"
}
  • credentialId : A credential type identifier. The verifier will be able to create verification requests for this credential type which will be valid in the ecosystem. Use the unique id obtained when you configured the credential type.

Response

JSON
{
    "id": "599bf148-d711-405a-a20b-9c8a87ac8850",
    "ecosystemId": "87880d7e-a4d0-462e-8383-3f1e5e16865d",
    "profile": "compact",
    "type": "DriverLicence",
    "name": "Driver's Licence"
}

Policies for large ecosystems are expected to be large. To maintain API performance, only the relevant information is returned in the response:

  • If the request adds a verifier with credential types in the request body, these credential types are returned in the response.
  • If the request simply adds a verifier to the policy, an empty response is returned.