Skip to main content

Truvity Platform API. (0.28.6)

Download OpenAPI specification:Download

Truvity Platform API.

API Key

The API to manage Truvity API's keys.

Create a new API key.

Create a new API key resource.

Authorizations:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.api-key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Search for API Keys.

Search for API Keys with extended filters capabilities.

Authorizations:
ApiKey
Request Body schema: application/json
required
Array of objects or null (ApiKeyFilter) <= 4 items

The filter to apply to the search.

Array of objects or null (ApiKeySort) <= 4 items

The sort order to apply to the search.

Responses

Request samples

Content type
application/json
{
  • "filter": [
    ],
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get the latest version of API Key.

Get the latest version of API Key.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.ApiKeys.ApiKeyLatest(
	context.TODO(),
	"id",
	&sdkgo.ApiKeyLatestRequest{},
)

Response samples

Content type
application/vnd.truvity.api-key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Update API Key.

Update API Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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/json
required
object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.api-key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Delete API Key.

Delete API Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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.ApiKeys.ApiKeyDelete(
	context.TODO(),
	"id",
	&sdkgo.ApiKeyDeleteRequest{
		IfMatch: "If-Match",
	},
)

Response samples

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Restore API Key.

Restore API Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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.ApiKeys.ApiKeyRestore(
	context.TODO(),
	"id",
	&sdkgo.ApiKeyRestoreRequest{
		IfMatch: "If-Match",
	},
)

Response samples

Content type
application/vnd.truvity.api-key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Read API Key's history.

History of the API Key's resources.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.ApiKeys.ApiKeyHistory(
	context.TODO(),
	"id",
	&sdkgo.ApiKeyHistoryRequest{},
)

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Read the specific version of the API Key.

Read the specific version of the API Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.ApiKeys.ApiKeyRevision(
	context.TODO(),
	"id",
	1,
	&sdkgo.ApiKeyRevisionRequest{},
)

Response samples

Content type
application/json
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Credential

The API to manage Verifiable Credentials.

Import Credential.

Import a Verifiable Credential.

Authorizations:
ApiKey
query Parameters
blob_id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.credential+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Search for Credentials.

Search for Credentials with extended filters capabilities.

Authorizations:
ApiKey
Request Body schema: application/json
required
Array of objects or null (CredentialFilter) <= 4 items

The filter to apply to the search.

Array of objects or null (CredentialSort) <= 4 items

The sort order to apply to the search.

Responses

Request samples

Content type
application/json
{
  • "filter": [
    ],
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Upload Credential's blob.

The upload Credential's blob operation.

Authorizations:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

Content type
application/json
{
  • "blob_id": "8249af2f-dd23-416e-b9c4-6cb13a792190",
  • "timeout": 1,
  • "upload_uri": "http://example.com"
}

Get the latest version of Credential.

Get the latest version of Credential.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/vnd.truvity.credential+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Delete Credential.

Delete Credential's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Restore Credential.

Restore Credential's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/vnd.truvity.credential+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Read Credential's history.

History of the Credential's resources.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "items": [
    ]
}

Read the specific version of the Credential.

Read the specific version of the Credential's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Download of Credential's blob.

Download of Credential's blob.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Response samples

Content type
application/vc+ld+json
"string"

Verify Credential.

Verify a Verifiable Credential.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "verified": true
}

Desk

The API to manage DID Documents and to receive DIDComm messages.

Get DID-Document.

Get DID-Document for did:web Method Specification.

path Parameters
tenant_id
required
string <uuid>

The ID of the tenant.

header Parameters
If-None-Match
string

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

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.Desk.DidDocumentGet(
	context.TODO(),
	"tenant_id",
	&sdkgo.DidDocumentGetRequest{},
)

Response samples

Content type
application/did+ld+json
{
  • "@context": [
    ],
  • "id": "strings",
  • "verificationMethod": [
    ],
  • "authentication": [
    ],
  • "assertionMethod": [
    ],
  • "service": []
}

Receive DIDComm Message.

Receive DIDComm Message.

path Parameters
tenant_id
required
string <uuid>

The ID of the tenant.

Request Body schema: application/didcomm-signed+json
required
string <binary> <application/octet-stream>

Responses

Request samples

Content type
application/didcomm-signed+json
"string"

Response samples

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

DIDComm Message

The API to manage DIDComm messages.

Search for DIDComm Messages.

Search for DIDComm Messages with extended filters capabilities.

Authorizations:
ApiKey
Request Body schema: application/json
required
Array of objects or null (DidcommMessageFilter) <= 4 items

The filter to apply to the search.

Array of objects or null (DidcommMessageSort) <= 4 items

The sort order to apply to the search.

Responses

Request samples

Content type
application/json
{
  • "filter": [
    ],
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Send a DIDComm Message.

Send a DIDComm Message to a recipient.

Authorizations:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
required
object (DIDCommMessageSend)

The request to send a DIDComm message.

object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.didcomm-message+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Get the latest version of DIDComm Message.

Get the latest version of DIDComm Message.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.DidcommMessages.DidcommMessageLatest(
	context.TODO(),
	"id",
	&sdkgo.DidcommMessageLatestRequest{},
)

Response samples

Content type
application/vnd.truvity.didcomm-message+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Delete DIDComm Message.

Delete DIDComm Message's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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.DidcommMessages.DidcommMessageDelete(
	context.TODO(),
	"id",
	&sdkgo.DidcommMessageDeleteRequest{
		IfMatch: "If-Match",
	},
)

Response samples

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Restore DIDComm Message.

Restore DIDComm Message's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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.DidcommMessages.DidcommMessageRestore(
	context.TODO(),
	"id",
	&sdkgo.DidcommMessageRestoreRequest{
		IfMatch: "If-Match",
	},
)

Response samples

Content type
application/vnd.truvity.didcomm-message+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Read DIDComm Message's history.

History of the DIDComm Message's resources.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.DidcommMessages.DidcommMessageHistory(
	context.TODO(),
	"id",
	&sdkgo.DidcommMessageHistoryRequest{},
)

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Read the specific version of the DIDComm Message.

Read the specific version of the DIDComm Message's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.DidcommMessages.DidcommMessageRevision(
	context.TODO(),
	"id",
	1,
	&sdkgo.DidcommMessageRevisionRequest{},
)

Response samples

Content type
application/json
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

DIDs

The API to manage DID Documents.

Return the tenant's DID(did:web) document.

Return the tenant's DID(did:web) document. Comparing to DIDDocumentGet endpoint, this one returns the tenant's DID(did:web) document for the authenticated tenant only.

Authorizations:
ApiKey
header Parameters
If-None-Match
string

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

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.Dids.DidDocumentSelfGet(
	context.TODO(),
	&sdkgo.DidDocumentSelfGetRequest{},
)

Response samples

Content type
application/did+ld+json
{
  • "@context": [
    ],
  • "id": "strings",
  • "verificationMethod": [
    ],
  • "authentication": [
    ],
  • "assertionMethod": [
    ],
  • "service": []
}

Draft

The API to manage Drafts.

Create Draft.

Create Draft's resource.

Authorizations:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
required
object (DraftCreate)

The schema for creating a draft.

object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.draft+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Search for Drafts.

Search for Drafts with extended filters capabilities.

Authorizations:
ApiKey
Request Body schema: application/json
required
Array of objects or null (DraftFilter) <= 4 items

The filter to apply to the search.

Array of objects or null (DraftSort) <= 4 items

The sort order to apply to the search.

Responses

Request samples

Content type
application/json
{
  • "filter": [
    ],
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get the latest version of Draft.

Get the latest version of Draft.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.Drafts.DraftLatest(
	context.TODO(),
	"id",
	&sdkgo.DraftLatestRequest{},
)

Response samples

Content type
application/vnd.truvity.draft+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Update Draft.

Update Draft's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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/json
required
required
object (DraftCreate)

The schema for creating a draft.

object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.draft+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Delete Draft.

Delete Draft's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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.Drafts.DraftDelete(
	context.TODO(),
	"id",
	&sdkgo.DraftDeleteRequest{
		IfMatch: "If-Match",
	},
)

Response samples

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Restore Draft.

Restore Draft's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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.Drafts.DraftRestore(
	context.TODO(),
	"id",
	&sdkgo.DraftRestoreRequest{
		IfMatch: "If-Match",
	},
)

Response samples

Content type
application/vnd.truvity.draft+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Read Draft's history.

History of the Draft's resources.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.Drafts.DraftHistory(
	context.TODO(),
	"id",
	&sdkgo.DraftHistoryRequest{},
)

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Read the specific version of the Draft.

Read the specific version of the Draft's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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.Drafts.DraftRevision(
	context.TODO(),
	"id",
	1,
	&sdkgo.DraftRevisionRequest{},
)

Response samples

Content type
application/json
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Export Draft.

Generate an unsigned Verifiable Credential in JSON-LD format from a Draft.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

Request Body schema: application/json
required
issuer
required
string <uri>

The URI of the credential issuer.

valid_from
string <date-time>

The date and time the issued credential is valid from.

valid_until
string <date-time>

The date and time the issued credential is valid until.

Responses

Request samples

Content type
application/json
{
  • "issuer": "http://example.com",
  • "valid_from": "2019-08-24T14:15:22Z",
  • "valid_until": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/vc+ld+json
"string"

Issue a Verifiable Credential from Draft.

It's a handy call that wraps the following:

  1. Exporting Draft.
  2. Signing the exported Draft.
  3. Importing the signed Credential.
Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

Request Body schema: application/json
required
key_id
required
string <uuid>

The ID of the key to sign the credential.

did_method
string
Default: "web"
Enum: "key" "web"

The DID method to use for the issuer DID.

issuer
string <uri>

The URI of the credential issuer.

valid_from
string <date-time>

The date and time the issued credential is valid from.

valid_until
string <date-time>

The date and time the issued credential is valid until.

Responses

Request samples

Content type
application/json
{
  • "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5",
  • "did_method": "key",
  • "issuer": "http://example.com",
  • "valid_from": "2019-08-24T14:15:22Z",
  • "valid_until": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/vnd.truvity.credential+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

File

The API to manage files.

Create File.

Create File's resource.

Authorizations:
ApiKey
query Parameters
blob_id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
required
object (FileData)

The data to create a file.

object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.file+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Search for Files.

Search for Files with extended filters capabilities.

Authorizations:
ApiKey
Request Body schema: application/json
required
Array of objects or null (FileFilter) <= 4 items

The filter to apply to the search.

Array of objects or null (FileSort) <= 4 items

The sort order to apply to the search.

Responses

Request samples

Content type
application/json
{
  • "filter": [
    ],
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Upload File's blob.

The upload File's blob operation.

Authorizations:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

Content type
application/json
{
  • "blob_id": "8249af2f-dd23-416e-b9c4-6cb13a792190",
  • "timeout": 1,
  • "upload_uri": "http://example.com"
}

Get the latest version of File.

Get the latest version of File.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/vnd.truvity.file+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Update File.

Update File's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

query Parameters
blob_id
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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/json
required
required
object (FileData)

The data to create a file.

object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.file+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Delete File.

Delete File's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Restore File.

Restore File's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/vnd.truvity.file+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Read File's history.

History of the File's resources.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "items": [
    ]
}

Read the specific version of the File.

Read the specific version of the File's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Download of File's blob.

Download of File's blob.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Response samples

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

GDPR

The Truvity's Admin Panel API.

Create a request to support.

Create a request to support.

Authorizations:
ApiKey
Request Body schema: application/json
required
message
required
string non-empty

The message of the support request.

type
required
string
Enum: "DATA_DUMP" "DELETION" "OTHER" "RECTIFICATION"

The type of the support request.

Responses

Request samples

Content type
application/json
{
  • "message": "string",
  • "type": "DATA_DUMP"
}

Response samples

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Key

The API to manage cryptographical asymmetrical keys.

Generate a new cryptographic key pair.

Generate a new cryptographic key pair.

Authorizations:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
required
object (KeyGenerate)

The Key generation request.

object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Import a cryptographic key pair

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

  1. OpenSSL - OpenSSL commands
  2. JWX tool - https://github.com/lestrrat-go/jwx/blob/main/cmd/jwx/README.md

How to install JWX

  1. Download & Install Golang - https://go.dev/doc/install
  2. 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 .
    
  3. 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

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

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:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
required
KeySecretEC (string) or KeySecretPKCS8 (string) or KeySecretJWK (string)

Import secret key. Supported formats:

  • PEM-encoded PKCS#8
  • PEM-encoded EC
  • JWK format .
object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "data": "-----BEGIN EC PRIVATE KEY-----\nMIGkAgEBBDBFFFnxnAX/kHeXe3g3mHEBTrGxD6WRyeH00FdzenriKZM5r1//lFA/\nmbfRZzsc+WOgBwYFK4EEACKhZANiAASbYZ57eYR4paYy4eJJSp4KuyqVYAcYb5jy\nTgWgSEmNWX3MOmMajcnQutABwvU2zsrcUZTCWZUnOem6gExZTrxbVgjEYXHy6yPb\ndxHSaJEbAalnHe1CHHwLIbwmBfoESeY=\n-----END EC PRIVATE KEY-----",
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Search for Keys.

Search for Keys with extended filters capabilities.

Authorizations:
ApiKey
Request Body schema: application/json
required
Array of objects or null (KeyFilter) <= 4 items

The filter to apply to the search.

Array of objects or null (KeySort) <= 4 items

The sort order to apply to the search.

Responses

Request samples

Content type
application/json
{
  • "filter": [
    ],
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get the latest version of Key.

Get the latest version of Key.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/vnd.truvity.key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Update Key.

Update Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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/json
required
object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Delete Key.

Delete Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Sign an unsigned Credential.

Sign a JSON-LD representation of an unsigned Credential.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

query Parameters
did_method
string
Default: "web"
Enum: "key" "web"

All supported DID methods. Default is "web".

Request Body schema: application/json
required
string <binary> <base64> <application/octet-stream>

The unsigned credential to sign.

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/vc+ld+json
"string"

Sign DIDComm Message Plaintext.

Sign DIDComm Message Plaintext.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

query Parameters
did_method
string
Default: "web"
Enum: "key" "web"

All supported DID methods. Default is "web".

Request Body schema: application/json
required
string <binary> <base64> <application/octet-stream>

The DIDCOMMMessage to sign.

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/didcomm-signed+json
"string"

Sign an unsigned Presentation.

Sign a JSON-LD representation of an unsigned Presentation.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

query Parameters
did_method
string
Default: "web"
Enum: "key" "web"

All supported DID methods. Default is "web".

Request Body schema: application/json
required
string <binary> <base64> <application/octet-stream>

The unsigned presentation to sign.

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/vp+ld+json
"string"

Restore Key.

Restore Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/vnd.truvity.key+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Read Key's history.

History of the Key's resources.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "items": [
    ]
}

Read the specific version of the Key.

Read the specific version of the Key's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {
    },
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Presentation

The API to manage Verifiable Presentations.

Export Presentation.

Generate an unsigned Verifiable Presentation in JSON-LD format from a list of Credentials.

Authorizations:
ApiKey
Request Body schema: application/json
required
holder
required
string <uri>

Just regular URI according to RFC 3986. Examples: url: - https://example.com/ - https://example.com/some/path urn: - urn:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18 - urn:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18/some/path did: - did:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18 - did:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18/some/path .

credential_ids
required
Array of strings <uuid> [ 1 .. 64 ] items [ items <uuid > ]
composition_type
required
string
Value: "EMBED"

Responses

Request samples

Content type
application/json
{
  • "holder": "http://example.com",
  • "credential_ids": [
    ],
  • "composition_type": "EMBED"
}

Response samples

Content type
application/vp+ld+json
"string"

Import Presentation.

Import a Verifiable Presentation.

Authorizations:
ApiKey
query Parameters
blob_id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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/json
required
object

The annotations of the resource.

object

The labels of the resource.

Responses

Request samples

Content type
application/json
{
  • "annotations": {
    },
  • "labels": {
    }
}

Response samples

Content type
application/vnd.truvity.presentation+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Issue Presentation.

It's a handy call that wraps the following:

  1. Exporting an unsigned JSON-LD representation of a Verifiable Presentation.
  2. Signing the created unsigned Presentation.
  3. Importing the signed Presentation.
Authorizations:
ApiKey
Request Body schema: application/json
required
key_id
required
string <uuid>

The ID of the key to sign the credential.

credential_ids
required
Array of strings <uuid> [ 1 .. 64 ] items [ items <uuid > ]
composition_type
required
string
Value: "EMBED"
did_method
string
Default: "web"
Enum: "key" "web"

All supported DID methods. Default is "web".

holder
string <uri>

Just regular URI according to RFC 3986. Examples: url: - https://example.com/ - https://example.com/some/path urn: - urn:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18 - urn:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18/some/path did: - did:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18 - did:uuid:dd1edaad-a160-44d8-931f-1afc27d31b18/some/path .

Responses

Request samples

Content type
application/json
{
  • "key_id": "1e779c8a-6786-4c89-b7c3-a6666f5fd6b5",
  • "credential_ids": [
    ],
  • "composition_type": "EMBED",
  • "did_method": "key",
  • "holder": "http://example.com"
}

Response samples

Content type
application/vnd.truvity.presentation+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Search for Presentations.

Search for Presentations with extended filters capabilities.

Authorizations:
ApiKey
Request Body schema: application/json
required
Array of objects or null (PresentationFilter) <= 4 items

The filter to apply to the search.

Array of objects or null (PresentationSort) <= 4 items

The sort order to apply to the search.

Responses

Request samples

Content type
application/json
{
  • "filter": [
    ],
  • "sort": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Upload Presentation's blob.

The upload Presentation's blob operation.

Authorizations:
ApiKey
header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

Content type
application/json
{
  • "blob_id": "8249af2f-dd23-416e-b9c4-6cb13a792190",
  • "timeout": 1,
  • "upload_uri": "http://example.com"
}

Get the latest version of Presentation.

Get the latest version of Presentation.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/vnd.truvity.presentation+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Delete Presentation.

Delete Presentation's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/problem+json
Example
{
  • "type": "/bad-request",
  • "title": "string",
  • "status": 100,
  • "detail": "string",
  • "errors": [
    ],
  • "instance": "http://example.com"
}

Restore Presentation.

Restore Presentation's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The primary and unique identifier of the resource (inside tenant) according to RFC 4122.

header Parameters
Idempotency-Key
string [ 32 .. 256 ] characters [a-zA-Z0-9-]{32,256}

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

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

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

Content type
application/vnd.truvity.presentation+json;version=1
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Read Presentation's history.

History of the Presentation's resources.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "items": [
    ]
}

Read the specific version of the Presentation.

Read the specific version of the Presentation's resource.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "kind": {
    },
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "etag": "string",
  • "revision": 1,
  • "created_at": "2019-08-24T14:15:22Z",
  • "modified_at": "2019-08-24T14:15:22Z",
  • "annotations": {
    },
  • "labels": {
    },
  • "data": {},
  • "deleted_at": "2019-08-24T14:15:22Z"
}

Download of Presentation's blob.

Download of Presentation's blob.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

revision
required
integer <int32> [ 1 .. 999999 ]

The revision of the resource.

header Parameters
If-None-Match
string

The ETag of the latest version of the resource.

Responses

Response samples

Content type
application/vp+ld+json
"string"

Verify Presentation.

Verify a Verifiable Presentation.

Authorizations:
ApiKey
path Parameters
id
required
string <uuid>

The ID of the resource.

Responses

Request samples

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

Content type
application/json
{
  • "verified": true
}