truvity (1.0.0)
Download OpenAPI specification:Download
Truvity Platform API.
Import credential
Import credential's resource.
Authorizations:
query Parameters
blob_id required | string <uuid> (BlobID) Take a look to documentation about #/components/schemas/BlobID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Request Body schema: application/vnd.truvity.credential+merge-patch+json;version=1required
Import credential's resource.
If labels
or annotations
are omitted in an import request, the default empty object ({}
) will be used.
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 201
- 400
- 401
- 403
- 404
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Search for credentials
Take a look at GET with body payload
- no resources created: Returns all credentials matching the query passed as request input payload.
Authorizations:
Request Body schema: application/jsonrequired
Search credentials' resources.
Array of objects (CredentialFilter) [ 1 .. 4 ] items Filter for the credentials' resources. | |
Array of objects (CredentialSort) <= 4 items Sort of the credentials' resources. |
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "filter": [
- {
- "annotations": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "created_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "data": {
- "has_proof": { },
- "valid_from": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "valid_until": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}
}, - "deleted_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "etag": {
- "operator": "EQUAL",
- "value": "string"
}, - "id": {
- "operator": "EQUAL",
- "value": "a860a344-d7b2-406e-828e-8d442f23f344"
}, - "labels": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "modified_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "revision": {
- "operator": "EQUAL",
- "value": 2147483647
}
}
], - "sort": [
- {
- "field": "ID",
- "order": "ASC"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 415
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Upload credential's blob
Upload of credential's blob.
Authorizations:
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Credentials.CredentialUpload( context.TODO(), &sdkgo.CredentialUploadRequest{}, )
Response samples
- 200
- 201
- 400
- 401
- 403
- 500
- default
{- "blob_id": "8249af2f-dd23-416e-b9c4-6cb13a792190",
- "timeout": 1,
}
Read the latest revision of the credential
Read the latest revision of the credential's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Credentials.CredentialLatest( context.TODO(), "id", &sdkgo.CredentialLatestRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Update credential
Update credential's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
query Parameters
blob_id | string <uuid> (BlobID) Take a look to documentation about #/components/schemas/BlobID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Request Body schema: application/vnd.truvity.credential+merge-patch+json;version=1required
Create or update credential's resource.
If labels
or annotations
are omitted in an create request, the default empty object ({}
) will be used.
If labels
or annotations
are omitted in an update request, the current values remain untouched. Providing specific values updates the resoruce accordingly, while an empty object ({}
) for either field clears its stored data.
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Delete credential
Delete credential's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) err := client.Credentials.CredentialDelete( context.TODO(), "id", &sdkgo.CredentialDeleteRequest{ IfMatch: "If-Match", }, )
Response samples
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "status": 100,
- "title": "string",
- "type": "/bad-request/body-content",
- "content_type": "string",
- "detail": "string",
- "instance": "../dictionary"
}
Issue credential
Issue credential's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Request Body schema: application/vnd.truvity.credential+merge-patch+json;version=1required
Issue credential's resource.
If labels
or annotations
are omitted in an issue request, the default empty object ({}
) will be used.
required | object (CredentialIssue) A request to issue a verifiable credential. Terminology. |
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "data": {
- "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Restore credential
Restore credential's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Credentials.CredentialRestore( context.TODO(), "id", &sdkgo.CredentialRestoreRequest{ IfMatch: "If-Match", }, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Read credential's history
History of the credentials' resources.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Credentials.CredentialHistory( context.TODO(), "id", &sdkgo.CredentialHistoryRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Read the specific version of the credential
Read the specific version of the credential's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
revision required | integer <int32> (Revision) [ 1 .. 999999 ] We could refer to the specific version of the resource. Take a look to documentation about #/components/schemas/Revision. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Credentials.CredentialRevision( context.TODO(), "id", 1, &sdkgo.CredentialRevisionRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Download credential's blob
Download of credential's blob.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
revision required | integer <int32> (Revision) [ 1 .. 999999 ] We could refer to the specific version of the resource. Take a look to documentation about #/components/schemas/Revision. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Credentials.CredentialDownload( context.TODO(), "string", 1, &sdkgo.CredentialDownloadRequest{ IfNoneMatch: "string", }, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
"string"
Verify credential
Verify a verifiable credential.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Credentials.CredentialVerify( context.TODO(), "id", )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "verified": true
}
Create file
Create file's resource.
Authorizations:
query Parameters
blob_id required | string <uuid> (BlobID) Take a look to documentation about #/components/schemas/BlobID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Request Body schema: application/vnd.truvity.file+merge-patch+json;version=1required
Create or update file's resource.
If labels
or annotations
are omitted in an create request, the default empty object ({}
) will be used.
If labels
or annotations
are omitted in an update request, the current values remain untouched. Providing specific values updates the resoruce accordingly, while an empty object ({}
) for either field clears its stored data.
required | object (File) A file object that can be used to upload a file. |
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "data": {
- "filename": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 201
- 400
- 401
- 403
- 404
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "content_type": "string",
- "filename": "string",
- "filesize": 1,
- "multihash": "string"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Search for files
Take a look at GET with body payload
- no resources created: Returns all files matching the query passed as request input payload.
Authorizations:
Request Body schema: application/jsonrequired
Search files' resources.
Array of objects (FileFilter) [ 1 .. 4 ] items Filter for the files' resources. | |
Array of objects (FileSort) <= 4 items Sort of the files' resources. |
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "filter": [
- {
- "annotations": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "created_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "data": {
- "filename": {
- "operator": "EQUAL",
- "value": "string"
}
}, - "deleted_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "etag": {
- "operator": "EQUAL",
- "value": "string"
}, - "id": {
- "operator": "EQUAL",
- "value": "a860a344-d7b2-406e-828e-8d442f23f344"
}, - "labels": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "modified_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "revision": {
- "operator": "EQUAL",
- "value": 2147483647
}
}
], - "sort": [
- {
- "field": "ID",
- "order": "ASC"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 415
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "filename": "string"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Upload file's blob
Upload of file's blob.
Authorizations:
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Files.FileUpload( context.TODO(), &sdkgo.FileUploadRequest{}, )
Response samples
- 200
- 201
- 400
- 401
- 403
- 500
- default
{- "blob_id": "8249af2f-dd23-416e-b9c4-6cb13a792190",
- "timeout": 1,
}
Read the latest revision of the file
Read the latest revision of the file's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Files.FileLatest( context.TODO(), "id", &sdkgo.FileLatestRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "filename": "string"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Update file
Update file's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
query Parameters
blob_id | string <uuid> (BlobID) Take a look to documentation about #/components/schemas/BlobID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Request Body schema: application/vnd.truvity.file+merge-patch+json;version=1required
Create or update file's resource.
If labels
or annotations
are omitted in an create request, the default empty object ({}
) will be used.
If labels
or annotations
are omitted in an update request, the current values remain untouched. Providing specific values updates the resoruce accordingly, while an empty object ({}
) for either field clears its stored data.
required | object (File) A file object that can be used to upload a file. |
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "data": {
- "filename": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "content_type": "string",
- "filename": "string",
- "filesize": 1,
- "multihash": "string"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Delete file
Delete file's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) err := client.Files.FileDelete( context.TODO(), "id", &sdkgo.FileDeleteRequest{ IfMatch: "If-Match", }, )
Response samples
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "status": 100,
- "title": "string",
- "type": "/bad-request/body-content",
- "content_type": "string",
- "detail": "string",
- "instance": "../dictionary"
}
Restore file
Restore file's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Files.FileRestore( context.TODO(), "id", &sdkgo.FileRestoreRequest{ IfMatch: "If-Match", }, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "filename": "string"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Read file's history
History of the files' resources.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Files.FileHistory( context.TODO(), "id", &sdkgo.FileHistoryRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "filename": "string"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Read the specific version of the file
Read the specific version of the file's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
revision required | integer <int32> (Revision) [ 1 .. 999999 ] We could refer to the specific version of the resource. Take a look to documentation about #/components/schemas/Revision. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Files.FileRevision( context.TODO(), "id", 1, &sdkgo.FileRevisionRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "filename": "string"
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Download file's blob
Download of file's blob.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
revision required | integer <int32> (Revision) [ 1 .. 999999 ] We could refer to the specific version of the resource. Take a look to documentation about #/components/schemas/Revision. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Files.FileDownload( context.TODO(), "string", 1, &sdkgo.FileDownloadRequest{ IfNoneMatch: "string", }, )
Response samples
- 400
- 401
- 403
- 404
- 500
- default
{- "status": 100,
- "title": "string",
- "type": "/bad-request/body-content",
- "content_type": "string",
- "detail": "string",
- "instance": "../dictionary"
}
Generate key
Generate key's resource.
You could use KeyGenerate, if you want to rely to generated by Truvity key-pairs for CredentialIssue and PresentationIssue. Remember, that you do not have any option to get private key by Truvity API, you could only use it
Truvity | JWX - KeyType | JWX - Curve | FIPS | SEC2 | OpenSSL | AWS KMS |
---|---|---|---|---|---|---|
ED25519 | OKP | Ed25519 | ed25519 | |||
P256 | EC | P-256 | P-256 | secp256r1 | prime256v1 | ECC_NIST_P256 |
P384 | EC | P-384 | P-384 | secp384r1 | secp384r1 | ECC_NIST_P384 |
SECP256K1 | EC | secp256k1 | secp256k1 | secp256k1 | ECC_SECG_P256K1 |
Useful third-party documentation:
Authorizations:
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Request Body schema: application/vnd.truvity.key+merge-patch+json;version=1required
Generate key's resource.
If labels
or annotations
are omitted in an generate request, the default empty object ({}
) will be used.
required | object (KeyGenerate) Generate the assymetrical key. |
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "data": {
- "spec": "ED25519"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 201
- 400
- 401
- 403
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Import key
Import key's resource.
You could use KeyGenerate, if you want to rely to generated by Truvity key-pairs for CredentialIssue and PresentationIssue. Remember, that you do not have any option to get private key by Truvity API, you could only use it
If you prefer to keep private key, then you need to generate it manually. To use manually generated key CredentialIssue and PresentationIssue you need to import it.
To generate key-pair you have two options
- OpenSSL - OpenSSL commands
- JWX tool - https://github.com/lestrrat-go/jwx/blob/main/cmd/jwx/README.md
How to install JWX
- Download & Install Golang - https://go.dev/doc/install
- Clone & Build & Install github.com/lestrrat-go/jwx
git clone https://github.com/lestrrat-go/jwx cd jwx/cmd/jwx go install -tags=jwx_es256k,jwx_secp256k1_pem .
- Verify that you correctly install everything
➜ jwx --help NAME: jwx - Tools for various JWE/JWK/JWS/JWT operations USAGE: jwx [global options] command [command options] [arguments...] COMMANDS: jwa List available algorithms and types jwe Work with JWE messages jwk Work with JWK and JWK sets jws Work with JWS messages help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --help, -h show help
How generate private key by jwx
(output format JWK)
# ED25519
jwx jwx generate --type OKP --curve Ed25519
# P256
jwx jwx generate --type EC --curve P-256
# P384
jwx jwx generate --type EC --curve P-384
# SECP256K1
jwx jwx generate --type EC --curve secp256k1
How to generate public key from private key by jwx
(input format - JWK, output format - JWK)
jwx jwk format -I json -O json - <(pathfile with private key in JWK format)
How to generate private key by OpenSSL (output format PEM - PKCS#8)
# ED25519
openssl genpkey -algorithm ed25519 | openssl pkcs8 -nocrypt -topk8
# P256
openssl ecparam -name prime256v1 -noout -genkey | openssl pkcs8 -nocrypt -topk8
# P384
openssl ecparam -name secp384r1 -noout -genkey | openssl pkcs8 -nocrypt -topk8
# SECP256K1
openssl ecparam -name secp256k1 -noout -genkey | openssl pkcs8 -nocrypt -topk8
How to transform existing private key to PKCS8 format by OpenSSL (input format PEM, output format - PEM PCKS#8)
openssl pkcs8 -nocrypt -topk8 <(pathfile with private key in PEM format)
How to transform private key to public key by OpenSSL (input format PEM, output format - PEM PKIX)
openssl pkey -pubout <(pathfile with private key in PKCS8 format)
Useful third-party documentation:
Authorizations:
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Request Body schema: application/vnd.truvity.key+merge-patch+json;version=1required
Import key's resource.
If labels
or annotations
are omitted in an import request, the default empty object ({}
) will be used.
required | KeyImportPrivateEC (string) or KeyImportPrivatePKCS8 (string) or KeyImportPrivateJWK (string) (KeyImportPrivate) Private key. Supported formats:
|
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "data": "-----BEGIN EC PRIVATE KEY-----\nMIGkAgEBBDBFFFnxnAX/kHeXe3g3mHEBTrGxD6WRyeH00FdzenriKZM5r1//lFA/\nmbfRZzsc+WOgBwYFK4EEACKhZANiAASbYZ57eYR4paYy4eJJSp4KuyqVYAcYb5jy\nTgWgSEmNWX3MOmMajcnQutABwvU2zsrcUZTCWZUnOem6gExZTrxbVgjEYXHy6yPb\ndxHSaJEbAalnHe1CHHwLIbwmBfoESeY=\n-----END EC PRIVATE KEY-----\n",
- "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 201
- 400
- 401
- 403
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Search for keys
Take a look at GET with body payload
- no resources created: Returns all keys matching the query passed as request input payload.
Authorizations:
Request Body schema: application/jsonrequired
Search keys' resources.
Array of objects (KeyFilter) [ 1 .. 4 ] items Filter for the keys' resources. | |
Array of objects (KeySort) <= 4 items Sort of the keys' resources. |
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "filter": [
- {
- "annotations": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "created_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "data": {
- "public": {
- "pem": {
- "operator": "EQUAL",
- "value": "string"
}
}, - "spec": {
- "operator": "EQUAL",
- "value": "string"
}
}, - "deleted_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "etag": {
- "operator": "EQUAL",
- "value": "string"
}, - "id": {
- "operator": "EQUAL",
- "value": "a860a344-d7b2-406e-828e-8d442f23f344"
}, - "labels": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "modified_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "revision": {
- "operator": "EQUAL",
- "value": 2147483647
}
}
], - "sort": [
- {
- "field": "ID",
- "order": "ASC"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 415
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Read the latest revision of the key
Read the latest revision of the key's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Keys.KeyLatest( context.TODO(), "id", &sdkgo.KeyLatestRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Update key
Update key's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Request Body schema: application/vnd.truvity.key+merge-patch+json;version=1required
Create or update key's resource.
If labels
or annotations
are omitted in an create request, the default empty object ({}
) will be used.
If labels
or annotations
are omitted in an update request, the current values remain untouched. Providing specific values updates the resoruce accordingly, while an empty object ({}
) for either field clears its stored data.
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Delete key
Delete key's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) err := client.Keys.KeyDelete( context.TODO(), "id", &sdkgo.KeyDeleteRequest{ IfMatch: "If-Match", }, )
Response samples
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "status": 100,
- "title": "string",
- "type": "/bad-request/body-content",
- "content_type": "string",
- "detail": "string",
- "instance": "../dictionary"
}
Restore key
Restore key's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Keys.KeyRestore( context.TODO(), "id", &sdkgo.KeyRestoreRequest{ IfMatch: "If-Match", }, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Read key's history
History of the keys' resources.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Keys.KeyHistory( context.TODO(), "id", &sdkgo.KeyHistoryRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Read the specific version of the key
Read the specific version of the key's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
revision required | integer <int32> (Revision) [ 1 .. 999999 ] We could refer to the specific version of the resource. Take a look to documentation about #/components/schemas/Revision. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Keys.KeyRevision( context.TODO(), "id", 1, &sdkgo.KeyRevisionRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "spec": "ED25519",
- "public": {
- "jwk": {
- "crv": "P-384",
- "kty": "EC",
- "x": "m2Gee3mEeKWmMuHiSUqeCrsqlWAHGG-Y8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K",
- "y": "3FGUwlmVJznpuoBMWU68W1YIxGFx8usj23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm"
}, - "pem": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEm2Gee3mEeKWmMuHiSUqeCrsqlWAHGG+Y\n8k4FoEhJjVl9zDpjGo3J0LrQAcL1Ns7K3FGUwlmVJznpuoBMWU68W1YIxGFx8usj\n23cR0miRGwGpZx3tQhx8CyG8JgX6BEnm\n-----END PUBLIC KEY-----"
}
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Import presentation
Import presentation's resource.
Authorizations:
query Parameters
blob_id required | string <uuid> (BlobID) Take a look to documentation about #/components/schemas/BlobID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Request Body schema: application/vnd.truvity.presentation+merge-patch+json;version=1required
Import presentation's resource.
If labels
or annotations
are omitted in an import request, the default empty object ({}
) will be used.
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 201
- 400
- 401
- 403
- 404
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Search for presentations
Take a look at GET with body payload
- no resources created: Returns all presentations matching the query passed as request input payload.
Authorizations:
Request Body schema: application/jsonrequired
Search presentations' resources.
Array of objects (PresentationFilter) [ 1 .. 4 ] items Filter for the presentations' resources. | |
Array of objects (PresentationSort) <= 4 items Sort of the presentations' resources. |
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "filter": [
- {
- "annotations": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "created_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "deleted_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "etag": {
- "operator": "EQUAL",
- "value": "string"
}, - "id": {
- "operator": "EQUAL",
- "value": "a860a344-d7b2-406e-828e-8d442f23f344"
}, - "labels": [
- {
- "operator": "EQUAL",
- "key": "string",
- "value": "string"
}
], - "modified_at": {
- "operator": "GREATER_THAN",
- "value": "2019-08-24T14:15:22Z"
}, - "revision": {
- "operator": "EQUAL",
- "value": 2147483647
}
}
], - "sort": [
- {
- "field": "ID",
- "order": "ASC"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 415
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Upload presentation's blob
Upload of presentation's blob.
Authorizations:
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Presentations.PresentationUpload( context.TODO(), &sdkgo.PresentationUploadRequest{}, )
Response samples
- 200
- 201
- 400
- 401
- 403
- 500
- default
{- "blob_id": "8249af2f-dd23-416e-b9c4-6cb13a792190",
- "timeout": 1,
}
Read the latest revision of the presentation
Read the latest revision of the presentation's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Presentations.PresentationLatest( context.TODO(), "id", &sdkgo.PresentationLatestRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Update presentation
Update presentation's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
query Parameters
blob_id | string <uuid> (BlobID) Take a look to documentation about #/components/schemas/BlobID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Request Body schema: application/vnd.truvity.presentation+merge-patch+json;version=1required
Create or update presentation's resource.
If labels
or annotations
are omitted in an create request, the default empty object ({}
) will be used.
If labels
or annotations
are omitted in an update request, the current values remain untouched. Providing specific values updates the resoruce accordingly, while an empty object ({}
) for either field clears its stored data.
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Delete presentation
Delete presentation's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) err := client.Presentations.PresentationDelete( context.TODO(), "id", &sdkgo.PresentationDeleteRequest{ IfMatch: "If-Match", }, )
Response samples
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "status": 100,
- "title": "string",
- "type": "/bad-request/body-content",
- "content_type": "string",
- "detail": "string",
- "instance": "../dictionary"
}
Issue presentation
Issue presentation's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Request Body schema: application/vnd.truvity.presentation+merge-patch+json;version=1required
Issue presentation's resource.
If labels
or annotations
are omitted in an issue request, the default empty object ({}
) will be used.
required | object (PresentationIssue) A request to issue a verifiable presentation. Terminology. |
object (Annotations) Inspired by
| |
object (Labels) Inspired by
|
Responses
Request samples
- Payload
- Go
- Python
- TypeScript
{- "data": {
- "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "labels": {
- "property1": "string",
- "property2": "string"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 415
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Restore presentation
Restore presentation's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
Idempotency-Key | string [ 32 .. 256 ] characters ^[a-zA-Z0-9-]{32,256}$ Example: 7da7a728-f910-11e6-942a-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The Idempotency-Key is a free identifier created by the client to identify a request. It is used by the service to identify repeated request to ensure idempotent behavior by sending the same (or a similar) response without executing the request a second time. Clients should be careful as any subsequent requests with the same key may return the same response without further check. Thus, it is recommended to use a UUID version 4 (random) or any other random string with enough entropy to avoid collisions. Keys expire after 24 hours. Clients are responsible to stay within this limit, if they require idempotent behavior. See [API Guideline Rule #181][api-230] for further details. [api-230]: https://opensource.zalando.com/restful-api-guidelines/#230. |
If-Match required | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-Match header field is used to declare a list of identifiers that are required to match the current resource version identifier in at least one position as a pre-condition for executing the request on the server side. This behavior is used to validate and reject optimistic updates, by checking if the resource version a consumer has based his changes on is outdated on arrival of the change request to prevent lost updates. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.1 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Presentations.PresentationRestore( context.TODO(), "id", &sdkgo.PresentationRestoreRequest{ IfMatch: "If-Match", }, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 412
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Read presentation's history
History of the presentations' resources.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Presentations.PresentationHistory( context.TODO(), "id", &sdkgo.PresentationHistoryRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "items": [
- {
- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
]
}
Read the specific version of the presentation
Read the specific version of the presentation's resource.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
revision required | integer <int32> (Revision) [ 1 .. 999999 ] We could refer to the specific version of the resource. Take a look to documentation about #/components/schemas/Revision. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Presentations.PresentationRevision( context.TODO(), "id", 1, &sdkgo.PresentationRevisionRequest{}, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "kind": {
- "name": "string",
- "version": 1
}, - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "revision": 1,
- "created_at": "2019-08-24T14:15:22Z",
- "modified_at": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "annotations": {
- "property1": "string",
- "property2": "string"
}, - "etag": "string",
- "data": {
- "type": [
- "string"
], - "verifiable_credential": [
- {
- "type": [
- "string"
], - "data_model": {
- "flavor_name": "VC1_1",
- "expirationDate": "2019-08-24T14:15:22Z",
- "issuanceDate": "2019-08-24T14:15:22Z",
- "type": [
- "string"
]
}, - "has_proof": true,
- "valid_from": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24T14:15:22Z"
}
], - "has_proof": true,
}, - "deleted_at": "2019-08-24T14:15:22Z"
}
Download presentation's blob
Download of presentation's blob.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
revision required | integer <int32> (Revision) [ 1 .. 999999 ] We could refer to the specific version of the resource. Take a look to documentation about #/components/schemas/Revision. |
header Parameters
If-None-Match | string Example: 5db68c06-1a68-11e9-8341-68f728c1ba70 From Zalando RESTful API Guidelines - models/headers-1.0.0.yaml. The If-None-Match header field is used to declare a list of identifiers that are required to fail matching all the current resource version identifiers as a pre-condition for executing the request on the server side. This is especially used in conjunction with an * (asterix) that is matching all possible resource identifiers to ensure the initial creation of a resource. Other use cases are possible but rare. If the pre-condition fails the server will respond with status code 412 (Precondition Failed). See RFC 9110 Section 13.1.2 as well as [API Guideline Rule #182][api-182] for further details. [api-182]: https://opensource.zalando.com/restful-api-guidelines/#182. |
Responses
Request samples
- Go
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgo "github.com/truvity/sdk-go" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Presentations.PresentationDownload( context.TODO(), "string", 1, &sdkgo.PresentationDownloadRequest{ IfNoneMatch: "string", }, )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
"string"
Verify presentation
Verify a verifiable presentation.
Authorizations:
path Parameters
id required | string <uuid> (ResourceID) Take a look to documentation about #/components/schemas/ResourceID. |
Responses
Request samples
- Go
- Python
- TypeScript
import ( context "context" option "github.com/truvity/sdk-go/option" sdkgoclient "github.com/truvity/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "<YOUR_ApiKey>", ), ) response, err := client.Presentations.PresentationVerify( context.TODO(), "id", )
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
- default
{- "verified": true
}