# Agent

## GET /public/did

> This endpoint facilitates the retrieval of a DID document id.

```json
{"openapi":"3.0.0","info":{"title":"Identity Issuer Backend Documentation","version":"dev"},"servers":[{"url":"{hostname}","description":"Issuer Backend REST API Server","variables":{"hostname":{"default":"https://identity.nchainplatform.com/products/web/$IDENTITY_ENV_ID/issuer/api"}}}],"paths":{"/public/did":{"get":{"operationId":"AgentPublicController_getDid","summary":"","description":"This endpoint facilitates the retrieval of a DID document id.","parameters":[],"responses":{"200":{"description":"","content":{"text/plain":{}}},"503":{"description":"The service is unavailable"}},"tags":["Agent"]}}}}
```

## GET /public/getStatus

> Returns all the information needed to see the status of the services running

```json
{"openapi":"3.0.0","info":{"title":"Identity Issuer Backend Documentation","version":"dev"},"servers":[{"url":"{hostname}","description":"Issuer Backend REST API Server","variables":{"hostname":{"default":"https://identity.nchainplatform.com/products/web/$IDENTITY_ENV_ID/issuer/api"}}}],"paths":{"/public/getStatus":{"get":{"operationId":"AgentPublicController_getStatus","summary":"","description":"Returns all the information needed to see the status of the services running","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetStatusDetailDto"}}}},"503":{"description":"The service is unavailable"}},"tags":["Agent"]}}},"components":{"schemas":{"GetStatusDetailDto":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/GetStatusEnum"},"did":{"$ref":"#/components/schemas/GetStatusDidDto"},"started":{"type":"string","description":"Agent started date with timestamp in ISO"},"timestamp":{"type":"string","description":"Current date with timestamp in ISO"},"version":{"$ref":"#/components/schemas/GetStatusVersionDto"}},"required":["state","did","started","timestamp","version"]},"GetStatusEnum":{"type":"string","description":"What state is the Agent in","enum":["starting","running","did_resolving"]},"GetStatusDidDto":{"type":"object","properties":{"did":{"type":"string","description":"Primary did the api is working with"},"ready":{"type":"boolean","description":"Is the DID ready to use"},"controller":{"type":"string","description":"Controller in use"},"resolver":{"type":"string","description":"Resolver in use"}},"required":["did","ready","controller","resolver"]},"GetStatusVersionDto":{"type":"object","properties":{"version":{"type":"string","description":"Current version of the application"},"commit":{"type":"string","description":"Commit hash of the version"},"development":{"type":"boolean","description":"Defines if the current version is a development build"},"buildTime":{"type":"string","description":"Date of build date with timestamp in ISO"}},"required":["version","commit","development","buildTime"]}}}}
```

## Retrieve information about credential types and configurations

> Endpoint facilitates the retrieval of a list of credentials that can be issued based \
> on the provided \`correlationId\`. This endpoint expects the \`correlationId\` to be passed as \
> a path parameter. Upon receiving a request, the server searches for JSON files located in the \
> \`/dev/oid4vci\_metadata\` directory, matching the \`correlationId\` with the \`correlationId\` property in the JSON files.\
> It also returns metadata, which has fields \`credential\_issuer\` (tells web address where issuer is located) and \`credential\_endpoint\` \
> (tells web address endpoint where credential can be claimed). It also returns \`display\` object and \`credential\_supplier\_config\`object.\
> \`display\` field \`name\` will be displayed in wallet app as Authority Name when accepting a credential. Object \`credential\_supplier\_config\` returns\
> all templates and mappings for the credential supplier.

```json
{"openapi":"3.0.0","info":{"title":"Identity Issuer Backend Documentation","version":"dev"},"servers":[{"url":"{hostname}","description":"Issuer Backend REST API Server","variables":{"hostname":{"default":"https://identity.nchainplatform.com/products/web/$IDENTITY_ENV_ID/issuer/api"}}}],"paths":{"/public/{correlationId}/.well-known/openid-credential-issuer":{"get":{"operationId":"AgentPublicWellKnownController_getWellKnownOpenidCredentialIssuer","summary":"Retrieve information about credential types and configurations","description":"Endpoint facilitates the retrieval of a list of credentials that can be issued based \non the provided `correlationId`. This endpoint expects the `correlationId` to be passed as \na path parameter. Upon receiving a request, the server searches for JSON files located in the \n`/dev/oid4vci_metadata` directory, matching the `correlationId` with the `correlationId` property in the JSON files.\nIt also returns metadata, which has fields `credential_issuer` (tells web address where issuer is located) and `credential_endpoint` \n(tells web address endpoint where credential can be claimed). It also returns `display` object and `credential_supplier_config`object.\n`display` field `name` will be displayed in wallet app as Authority Name when accepting a credential. Object `credential_supplier_config` returns\nall templates and mappings for the credential supplier.","parameters":[{"name":"correlationId","required":true,"in":"path","description":"Defines a organisation which is defined as a correlationId. Must be a value the Issuer is working with! ","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WellKnownOpenidCredentialIssuerDetailDto"}}}},"404":{"description":""},"500":{"description":""}},"tags":["Agent"]}}},"components":{"schemas":{"WellKnownOpenidCredentialIssuerDetailDto":{"type":"object","properties":{"credential_issuer":{"type":"string","description":"The issuer url"},"credential_endpoint":{"type":"string","description":"Credential endpoint url"},"token_endpoint":{"type":"string","description":"Token endpoint url"},"display":{"type":"array","items":{"$ref":"#/components/schemas/WellKnownOpenidCredentialIssuerDisplayDto"}},"credential_configurations_supported":{"type":"object","description":"A collection of credentials the Issuer supports","additionalProperties":{"$ref":"#/components/schemas/WellKnownOpenidCredentialIssuerCredentialConfigurationSupportedDto"}},"credential_supplier_config":{"$ref":"#/components/schemas/WellKnownOpenidCredentialIssuerCredentialSupplierConfigDto"}}},"WellKnownOpenidCredentialIssuerDisplayDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"background_image":{"description":"The background image info","nullable":true,"allOf":[{"$ref":"#/components/schemas/ImageInfoDto"}]}}},"ImageInfoDto":{"type":"object","properties":{"url":{"type":"string","description":"The url for the image to use"},"alt_text":{"type":"string","description":"The alternative text of the image","nullable":true}}},"WellKnownOpenidCredentialIssuerCredentialConfigurationSupportedDto":{"type":"object","properties":{"display":{"type":"array","items":{"type":"array"}},"order":{"description":"Tells the order of credentialSubjects.","type":"array","items":{"type":"string"}},"format":{"type":"string","description":"The format of the credential this is."},"cryptographic_binding_methods_supported":{"description":"Specifies the cryptographic DID methods it supports","type":"array","items":{"type":"string"}},"credential_signing_alg_values_supported":{"description":"Specifies the signing algorithm supported","type":"array","items":{"type":"string"}},"credential_definition":{"description":"Credential definition metadata","allOf":[{"$ref":"#/components/schemas/WellKnownOpenidCredentialIssuerCredentialConfigurationDefinitionDto"}]}}},"WellKnownOpenidCredentialIssuerCredentialConfigurationDefinitionDto":{"type":"object","properties":{"type":{"description":"The types this credential is using","type":"array","items":{"type":"string"}},"credentialSubject":{"type":"object","description":"The credential subject definitions","additionalProperties":{"$ref":"#/components/schemas/WellKnownOpenidCredentialIssuerCredentialConfigurationDefinitionItemDto"}}}},"WellKnownOpenidCredentialIssuerCredentialConfigurationDefinitionItemDto":{"type":"object","properties":{"value_type":{"type":"string","description":"The type of the value this claim should be. Generally its `string`, but in the future could also be `number`, maybe `boolean`, etc. "},"mandatory":{"type":"boolean","description":"Is this claim required to be present at credential offer creation?"},"display":{"type":"array","items":{"$ref":"#/components/schemas/NameAndLocaleDto"}},"format":{"$ref":"#/components/schemas/StringFormat"},"minLength":{"type":"number","description":"Specifies an optional minimum length of the claim string value, if the `value_type` is \"string\"."},"maxLength":{"type":"number","description":"Specifies an optional maximum length of the claim string value, if the `value_type` is \"string\"."},"pattern":{"type":"string","description":"Specifies an optional regex pattern that the claim string value must match, if the `value_type` is \"string\"."},"patternDescription":{"type":"string","description":"Human readable description of the regex pattern. Can be used to explain the pattern."},"enum":{"description":"Specifies an optional list of valid string values for the claim, if the `value_type` is \"string\".","type":"array","items":{"type":"string"}},"minDate":{"type":"string","description":"Specifies an optional minimum date of the claim string value, if the `value_type` is \"string\"."},"maxDate":{"type":"string","description":"Specifies an optional maximum date of the claim string value, if the `value_type` is \"string\"."},"min":{"type":"number","description":"Specifies an optional minimum value of claim number value, if the `value_type` is \"number\"."},"max":{"type":"number","description":"Specifies an optional maximum value of claim number value, if the `value_type` is \"number\"."}}},"NameAndLocaleDto":{"type":"object","properties":{"name":{"type":"string"},"locale":{"type":"string"}}},"StringFormat":{"type":"string","description":"Underlying format of the \"string\" `value_type`, to enhance validation.","enum":["date","date-time","email","uuid","byte"]},"WellKnownOpenidCredentialIssuerCredentialSupplierConfigDto":{"type":"object","properties":{"templates_base_dir":{"type":"string","description":"The templates base directory this issuer will use."},"template_mappings":{"description":"The templates mappings","type":"array","items":{"$ref":"#/components/schemas/WellKnownOpenidCredentialIssuerCredentialConfigurationDefinitionDto"}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.teranode.group/tng-identity-documentation/tng-identity-issuers/issuer-api/api-documentation/agent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
