Skip to content

intents_get

GET
/intents/{intent_id}
curl --request GET \
--url https://example.com/intents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0

Get a stored intent by its ID.

intent_id
required

Unique identifier for an intent, assigned by the caller.

string format: uuid

Intent ID

Intent found

Media type application/json

Intent signed by the user.

The signature is over the JCS (JSON Canonicalization Scheme, RFC 8785) serialization of the intent. The intent must therefore be serialized with JCS and signed, for instance as follows in Typescript.

import canonicalize from "canonicalize";

const jcs = canonicalize(json_intent)
const bytes = new TextEncoder().encode(jcs)
const signed = signer.signBytes(bytes)
object
intent
required

The intent that is being signed.

object
attrs

Attribute values that parameterize the policy.

In JSON, omit this field instead of putting "attrs": null.

object
fields
required
object
key
additional properties
id
required

Unique identifier for this intent.

string format: uuid
policy_id
required

ID of the policy that defines the rules for fulfilling this intent.

string
signature
required
One of:

Ed25519 signature

object
Ed25519
required

Ed25519 signature

object
pub_key
required

The [PubKey] of the signer

string
signature
required

The [Signature]

string
Example generated
{
"intent": {
"attrs": {
"fields": {
"additionalProperty": "example"
}
},
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"policy_id": "example"
},
"signature": {
"Ed25519": {
"pub_key": "example",
"signature": "example"
}
}
}

Intent not found

Media type application/json
object
message
required
string
Example generated
{
"message": "example"
}

Internal error

Media type application/json
object
message
required
string
Example generated
{
"message": "example"
}