Skip to main content

Sessions

Assetmanager Sessions (v1.0.0)

Download OpenAPI specification:Download

API Documentation for Assetmanager Sessions

Sessions

Sessions searches for sessions.

The scope_id can either be scope uuid, e.g. 91978ba2-5f35-459a-86a7-feca1b0512e0 or a scope address, e.g. scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel. Similarly, the session_id can either be a uuid or session address, e.g. session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr. The record_addr, if provided, must be a bech32 record address, e.g. record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3.

  • If only a scope_id is provided, all sessions in that scope are returned.
  • If only a session_id is provided, it must be an address, and that single session is returned.
  • If the session_id is a uuid, then either a scope_id or record_addr must also be provided, and that single session is returned.
  • If only a record_addr is provided, the session containing that record will be returned.
  • If a record_name is provided then either a scope_id, session_id as an address, or record_addr must also be provided, and the session containing that record will be returned.

A bad request is returned if:

  • The session_id is a uuid and is provided without a scope_id or record_addr.
  • A record_name is provided without any way to identify the scope (e.g. a scope_id, a session_id as an address, or a record_addr).
  • Two or more of scope_id, session_id as an address, and record_addr are provided and don't all refer to the same scope.
  • A record_addr (or scope_id and record_name) is provided with a session_id and that session does not contain such a record.
  • A record_addr and record_name are both provided, but reference different records.

By default, the scope and records are not included. Set include_scope and/or include_records to true to include the scope and/or records.

Authorizations:
bearerAuth
path Parameters
record_addr
required
string (record_addr)

record_addr is a bech32 record address, e.g. record1q2ge0zaztu65tx5x5llv5xc9ztsw42dq2jdvmdazuwzcaddhh8gmu3mcze3.

query Parameters
scopeId
string (scope_id)

scope_id can either be a uuid, e.g. 91978ba2-5f35-459a-86a7-feca1b0512e0 or a bech32 scope address, e.g. scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel.

sessionId
string (session_id)

session_id can either be a uuid, e.g. 5803f8bc-6067-4eb5-951f-2121671c2ec0 or a bech32 session address, e.g. session1qxge0zaztu65tx5x5llv5xc9zts9sqlch3sxwn44j50jzgt8rshvqyfrjcr. This can only be a uuid if a scope_id is also provided.

recordName
string (record_name)

record_name is the name of the record to find the session for in the provided scope.

includeScope
boolean (include_scope)

include_scope is a flag for whether to include the scope containing these sessions in the response.

includeRecords
boolean (include_records)

include_records is a flag for whether to include the records of these sessions in the response.

excludeIdInfo
boolean (exclude_id_info)

exclude_id_info is a flag for whether to exclude the id info from the response.

includeRequest
boolean (include_request)

include_request is a flag for whether to include this request in your result.

Responses

Response samples

Content type
application/json
{
  • "scope": {
    },
  • "sessions": [
    ],
  • "records": [
    ],
  • "request": {
    }
}

SessionsAll

SessionsAll retrieves all sessions.

Authorizations:
bearerAuth
query Parameters
excludeIdInfo
boolean (exclude_id_info)

exclude_id_info is a flag for whether to exclude the id info from the response.

includeRequest
boolean (include_request)

include_request is a flag for whether to include this request in your result.

pagination.key
string <byte> (key)

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offset
integer or string <int64> (offset)

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limit
integer or string <int64> (limit)

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.countTotal
boolean (count_total)

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverse
boolean (reverse)

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Responses

Response samples

Content type
application/json
{
  • "sessions": [
    ],
  • "request": {
    },
  • "pagination": {
    }
}

Create session

Authorizations:
BearerAuth
path Parameters
required
string or string (ScopeSpecificationId)

Scope specification identifier

Request Body schema: application/json
required

Create a session to alter a scope's records

required
object (Party)

Party responsible for this session

object

Record keys map to Provenance Metadata Records. Values are typeful with a few types supported natively. Values are base64 encoded and persisted directly on-chain. IMPORTANT: sensitive data, or large blobs, should not be stored on chain in a plaintext encoding.

object

Record keys map to Provenance Metadata Records. Values are typeful with a few types supported natively.

null or CreateScope (object)
uuid
string <uuid>

Unique identifier for this scope on chain, randomly generated when not provided

Responses

Request samples

Content type
application/json
{
  • "party": {
    },
  • "scope": {
    },
  • "records": {
    },
  • "public_records": {
    },
  • "uuid": "3d8de57d-bda1-4635-a377-3d9a8a5c3fca"
}

Response samples

Content type
application/json
{
  • "tx_hash": "3ea1b237f303455d1e7c04fc128168cf9a6b903759b8b06bc05315e9333da1ae",
  • "height": 18621389,
  • "uuid": "2dccded0-f546-4519-8468-4aeaba91552b",
  • "scope_uuid": "3d8de57d-bda1-4635-a377-3d9a8a5c3fca"
}