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:
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
- 200
{- "scope": {
- "scope": {
- "scopeId": "string",
- "specificationId": "string",
- "owners": [
- {
- "address": "string",
- "role": "PARTY_TYPE_UNSPECIFIED",
- "optional": true
}
], - "dataAccess": [
- "string"
], - "valueOwnerAddress": "string",
- "requirePartyRollup": true
}, - "scopeIdInfo": {
- "scopeId": "string",
- "scopeIdPrefix": "string",
- "scopeIdScopeUuid": "string",
- "scopeAddr": "string",
- "scopeUuid": "string"
}, - "scopeSpecIdInfo": {
- "scopeSpecId": "string",
- "scopeSpecIdPrefix": "string",
- "scopeSpecIdScopeSpecUuid": "string",
- "scopeSpecAddr": "string",
- "scopeSpecUuid": "string"
}
}, - "sessions": [
- {
- "session": {
- "sessionId": "string",
- "specificationId": "string",
- "parties": [
- {
- "address": "string",
- "role": "PARTY_TYPE_UNSPECIFIED",
- "optional": true
}
], - "name": "string",
- "context": "string",
- "audit": {
- "createdDate": "2023-01-15T01:30:15.01Z",
- "createdBy": "string",
- "updatedDate": "2023-01-15T01:30:15.01Z",
- "updatedBy": "string",
- "version": 0,
- "message": "string"
}
}, - "sessionIdInfo": {
- "sessionId": "string",
- "sessionIdPrefix": "string",
- "sessionIdScopeUuid": "string",
- "sessionIdSessionUuid": "string",
- "sessionAddr": "string",
- "sessionUuid": "string",
- "scopeIdInfo": {
- "scopeId": "string",
- "scopeIdPrefix": "string",
- "scopeIdScopeUuid": "string",
- "scopeAddr": "string",
- "scopeUuid": "string"
}
}, - "contractSpecIdInfo": {
- "contractSpecId": "string",
- "contractSpecIdPrefix": "string",
- "contractSpecIdContractSpecUuid": "string",
- "contractSpecAddr": "string",
- "contractSpecUuid": "string"
}
}
], - "records": [
- {
- "record": {
- "name": "string",
- "sessionId": "string",
- "process": {
- "name": "string",
- "method": "string",
- "address": "string"
}, - "inputs": [
- {
- "name": "string",
- "typeName": "string",
- "status": "RECORD_INPUT_STATUS_UNSPECIFIED",
- "hash": "string"
}
], - "outputs": [
- {
- "hash": "string",
- "status": "RESULT_STATUS_UNSPECIFIED"
}
], - "specificationId": "string"
}, - "recordIdInfo": {
- "recordId": "string",
- "recordIdPrefix": "string",
- "recordIdScopeUuid": "string",
- "recordIdHashedName": "string",
- "recordAddr": "string",
- "scopeIdInfo": {
- "scopeId": "string",
- "scopeIdPrefix": "string",
- "scopeIdScopeUuid": "string",
- "scopeAddr": "string",
- "scopeUuid": "string"
}
}, - "recordSpecIdInfo": {
- "recordSpecId": "string",
- "recordSpecIdPrefix": "string",
- "recordSpecIdContractSpecUuid": "string",
- "recordSpecIdHashedName": "string",
- "recordSpecAddr": "string",
- "contractSpecIdInfo": {
- "contractSpecId": "string",
- "contractSpecIdPrefix": "string",
- "contractSpecIdContractSpecUuid": "string",
- "contractSpecAddr": "string",
- "contractSpecUuid": "string"
}
}
}
], - "request": {
- "scopeId": "string",
- "sessionId": "string",
- "recordAddr": "string",
- "recordName": "string",
- "includeScope": true,
- "includeRecords": true,
- "excludeIdInfo": true,
- "includeRequest": true
}
}SessionsAll
SessionsAll retrieves all sessions.
Authorizations:
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
- 200
{- "sessions": [
- {
- "session": {
- "sessionId": "string",
- "specificationId": "string",
- "parties": [
- {
- "address": "string",
- "role": "PARTY_TYPE_UNSPECIFIED",
- "optional": true
}
], - "name": "string",
- "context": "string",
- "audit": {
- "createdDate": "2023-01-15T01:30:15.01Z",
- "createdBy": "string",
- "updatedDate": "2023-01-15T01:30:15.01Z",
- "updatedBy": "string",
- "version": 0,
- "message": "string"
}
}, - "sessionIdInfo": {
- "sessionId": "string",
- "sessionIdPrefix": "string",
- "sessionIdScopeUuid": "string",
- "sessionIdSessionUuid": "string",
- "sessionAddr": "string",
- "sessionUuid": "string",
- "scopeIdInfo": {
- "scopeId": "string",
- "scopeIdPrefix": "string",
- "scopeIdScopeUuid": "string",
- "scopeAddr": "string",
- "scopeUuid": "string"
}
}, - "contractSpecIdInfo": {
- "contractSpecId": "string",
- "contractSpecIdPrefix": "string",
- "contractSpecIdContractSpecUuid": "string",
- "contractSpecAddr": "string",
- "contractSpecUuid": "string"
}
}
], - "request": {
- "excludeIdInfo": true,
- "includeRequest": true,
- "pagination": {
- "key": "string",
- "offset": 0,
- "limit": 0,
- "countTotal": true,
- "reverse": true
}
}, - "pagination": {
- "nextKey": "string",
- "total": 0
}
}Create session
Authorizations:
path Parameters
required | string or string (ScopeSpecificationId) Scope specification identifier |
Request Body schema: application/jsonrequired
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
- Payload
{- "party": {
- "address": "tp1tledwnl9zsgcqynmjzmp8f3j25l0rj7hvx4g22",
- "role": "PARTY_TYPE_OWNER"
}, - "scope": {
- "data_access": [
- "tp1tledwnl9zsgcqynmjzmp8f3j25l0rj7hvx4g22",
- "tp1dpqhlfd6uwaezmv8skm47d95yn6pfv7ngg8lgp"
], - "value_owner_address": "tp1tledwnl9zsgcqynmjzmp8f3j25l0rj7hvx4g22",
- "usd_mills": 10000
}, - "records": {
- "personal_info": {
- "name": "George Castanza",
- "age": "31"
}, - "address": "Manhattan, New York",
- "occupation": {
- "employer": "Vandelay Industries",
- "title": "Importer/exporter"
}, - "credit_report": {
- "type_url": "/provlabs.protos.experian.CreditReport",
- "value": "cHJvdG9idWYgbWVzc2FnZSBieXRlcw=="
}
}, - "public_records": {
- "is_over_50": false
}, - "uuid": "3d8de57d-bda1-4635-a377-3d9a8a5c3fca"
}Response samples
- 201
- 400
- 401
- 404
{- "tx_hash": "3ea1b237f303455d1e7c04fc128168cf9a6b903759b8b06bc05315e9333da1ae",
- "height": 18621389,
- "uuid": "2dccded0-f546-4519-8468-4aeaba91552b",
- "scope_uuid": "3d8de57d-bda1-4635-a377-3d9a8a5c3fca"
}