Skip to main content
European CommissionEBSI European Blockchain

DID Registry API

OpenAPI documentation

did get <url>

Command to GET in the DID Registry API. All endpoints are open to the public.

Parameters:

  • url: Path to get.

Examples:

did get /identifiers
did get /identifiers?controller=did:ebsi:zkqR9GCLrLYbkubAjuqQZAz
did get /identifiers/did:ebsi:zkqR9GCLrLYbkubAjuqQZAz

did (build-)insertDidDocument <did> <baseDocument> <publicKey> <notBefore> <notAfter> <vMethodId>

Command to insert a new DID document. The JWT is set in the headers.

Use the build- prefix to call the API helper to build the transaction. If this prefix is not set then the command will perform the following steps:

  • call did build-insertDidDocument to build an unsigned transaction.
  • call compute signTransaction to sign the transaction with the user defined in using user.
  • call did sendSignedTransaction to send the transaction signed.
  • call view transactionInfo to see relevant data for this transaction.

Parameters:

  • did (optional): DID to insert. By default it uses the did defined in the command using user.
  • baseDocument (optional): JSON document containing the context.
  • publicKey (optional): Public key for the ES256K key.
  • notBefore (optional): Time where the key is valid.
  • notAfter (optional): Time where the key expires (5 years by default).
  • vMethodId (optional): Verification Method ID. By default it is the thumbprint of the public key.

Examples:

did insertDidDocument
did insertDidDocument did:ebsi:zkqR9GCLrLYbkubAjuqQZAz

did (build-)updateBaseDocument <did> <baseDocument>

Command to update the base document of a DID document. Use the build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • baseDocument: JSON document containing the context.

did (build-)addController <did> <controller>

Command to add a controller to a DID document. Use build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • controller: DID of the new controller.

did (build-)revokeController <did> <controller>

Command to remove a controller from a DID document. Use build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • controller: DID of the controller to removed.

did (build-)addVerificationMethod <did> <publicKeyOrAlg> <vMethodId>

Command to add a verification method to a DID document. Use build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • publicKeyOrAlg: Public key in hex format for ES256K or JWT format for other algorithms. You can also specify the algorithm and the app will take the corresponding key from the data of the loaded user.
  • vMethodId (optional): Verification method ID. If it is not defined it is taken from the keys of the loaded user.

Examples:

did addVerificationMethod user.did ES256

did (build-)addVerificationRelationship <did> <name> <vMethodIdOrAlg> <notBefore> <notAfter>

Command to add a verification relationship to a DID document. Use build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • name: Name of the relationship ("authentication", "assertionMethod", "keyAgreement","capabilityInvocation", or "capabilityDelegation").
  • vMethodIdOrAlg: Verification Method ID. You can also specify the algorithm and the app will take the corresponding ID from the loaded user.
  • notBefore (optional): Time where the relationship becomes valid. By default it uses the actual time.
  • notAfter (optional): Time where the relationship becomes invalid. By default it uses 5 years in the future.

Examples:

did addVerificationRelationship user.did assertionMethod ES256

did (build-)revokeVerificationMethod <did> <vMethodIdOrAlg> <notAfter>

Command to revoke a verification method and remove the corresponding relationships. Use build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • vMethodIdOrAlg: Verification Method ID. You can also specify the algorithm and the app will take the corresponding ID from the loaded user.
  • notAfter: Time in the past where the verification method id should be revoked. By default it uses the actual time.

did (build-)expireVerificationMethod <did> <vMethodIdOrAlg> <notAfter>

Command to expire a verification method and remove the corresponding relationships. Use build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • vMethodIdOrAlg: Verification Method ID. You can also specify the algorithm and the app will take the corresponding ID from the loaded user.
  • notAfter: Time in the future where the verification method id should be expired.

did (build-)rollVerificationMethod <did> <publicKeyOrAlg> <notBefore> <notAfter> <oldVMethodId> <duration> <vMethodId>

Command to roll a verification method, that is, revoke a key and change it for another one. Use build- prefix to just call the API helper without signing the transaction.

Parameters:

  • did: DID to update.
  • publicKeyOrAlg: Public key in hex format for ES256K or JWT format for other algorithms. You can also specify the algorithm and the app will take the corresponding key from the data of the loaded user.
  • notBefore: Time where the new key becomes valid.
  • notAfter: Time where the new key becomes invalid.
  • oldVMethodId: ID of the verification method that will be revoked.
  • duration: Transition time where both keys are valid.
  • vMethodId: New verification method ID.

did (build-)addService <did> <service>

Command to add a service to the DID document.

Parameters:

  • did: DID to update.
  • service: JSON object with the new service.

did (build-)revokeService <did> <serviceId>

Command to add a service to the DID document.

Parameters:

  • did: DID to update.
  • serviceId: service ID.

did sendSignedTransaction <unsignedTransaction> <signedTransaction>

Command to send a signed transaction to the DID Registry. The JWT is set in the headers. It's also possible to load the parameters from the saved variables by referencing the names.

Parameters:

  • unsignedTransaction: JSON with the unsigned transaction.
  • signedTransaction: Signed transaction in raw format.

Examples:

did sendSignedTransaction {"from":"0x6b...} 0xf9022...
did sendSignedTransaction utx sgntx