Unbound CASP API v1.0.1904
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Unbound’s Crypto Asset Security Platform ("CASP") provides the advanced technology and the architecture to secure crypto asset transactions. The crypto asset solution contains the CASP service and different end points (humans or BOTs).
CASP provides the framework to create Accounts, which hold multiple Vaults where secrets are stored. Access control is managed by the Quorum Policy for all of the Participants.
For information about using these APIs, see the Unbound CASP Developers Guide, or the API references:
For more information about CASP, see:
- Unbound CASP Release Notes - information about CASP APIs.
- Unbound CASP Participant SDK - information about the client-side SDK.
- Unbound CASP FAQ - Frequently asked questions.
- Unbound CASP User Guide - contains system requirements, installation instructions, and more.
For more information about the BIP standards, see:
- BIP32 - HD wallets - information about the BIP32 standard for hierarchical deterministic wallets.
- BIP44 - multi-account wallets - information about the BIP44 standard for multi-account hierarchy for deterministic wallets.
- SLIP44 - coin types - defines the index values for the coin types.
Email: Unbound Tech Support Web: Unbound Tech Support
Getting Started
Refer to the General API Information section in the Unbound CASP Developers Guide
Get CASP service status
Code samples
var headers = {
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/status',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/status \
-H 'Accept: application/json'
GET /casp/api/v1.0/mng/status
Verifies that the service is healthy and operational
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
withDetails | query | boolean | false | Include system details |
Example responses
200 Response
{
"version": "string",
"ukc": {
"healthy": true,
"errorMessage": "string"
},
"db": {
"healthy": true,
"errorMessage": "string",
"schemaVersion": "string"
},
"nativeCrypto": {
"healthy": true,
"errorMessage": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
500 | Internal Server Error | Get status failed, the service is not operational | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» version | string | true | none | none |
» ukc | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
» db | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
»» schemaVersion | string | false | none | CASP schema version |
» nativeCrypto | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Reload CASP configuration
Code samples
var headers = {
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/reloadconfig',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/reloadconfig \
-H 'Accept: application/json'
POST /casp/api/v1.0/mng/reloadconfig
Read "casp.conf" file and reload configuration
Example responses
200 Response
{
"version": "string",
"ukc": {
"healthy": true,
"errorMessage": "string"
},
"db": {
"healthy": true,
"errorMessage": "string",
"schemaVersion": "string"
},
"nativeCrypto": {
"healthy": true,
"errorMessage": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
420 | Unknown | Too many requests. Only one request every 5 minutes is allowed. | Inline |
500 | Internal Server Error | Reload configuration failed. The service is not operational. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» version | string | true | none | none |
» ukc | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
» db | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
»» schemaVersion | string | false | none | CASP schema version |
» nativeCrypto | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
Status Code 420
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» version | string | true | none | none |
» ukc | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
» db | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
»» schemaVersion | string | false | none | CASP schema version |
» nativeCrypto | object | true | none | none |
»» healthy | boolean | true | none | Is entity healthy |
»» errorMessage | string | false | none | Error message in case entity is not healthy |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Authentication
Refer to the Authentication section in the Unbound CASP Developers Guide
Create a new user
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'*/*'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/users',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/auth/users \
-H 'Content-Type: application/json' \
-H 'Accept: */*'
POST /casp/api/v1.0/mng/auth/users
Create a new user
Body parameter
{
"name": "string",
"password": "string",
"role": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | Create user request |
» name | body | string | true | User's name |
» password | body | string | true | User's password |
» role | body | string | true | User's role. Can be one of the following: Super_User, Security_Officer, Trader |
Example responses
400 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | New user created successfully | None |
400 | Bad Request | Bad Request | Inline |
401 | Unauthorized | Unauthorized: Invalid user name or password | Inline |
409 | Conflict | User already exists | Inline |
500 | Internal Server Error | Create new user failed | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
List users
Code samples
var headers = {
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/users',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/auth/users \
-H 'Accept: application/json'
GET /casp/api/v1.0/mng/auth/users
List users
Example responses
200 Response
[
{
"name": "string",
"enabled": true,
"role": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Unauthorized: Invalid request | Inline |
500 | Internal Server Error | Internal error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» name | string | true | none | User name |
» enabled | boolean | true | none | User enabled state |
» role | string | true | none | User role |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Change user password
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/password',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X PUT /casp/api/v1.0/mng/auth/password \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PUT /casp/api/v1.0/mng/auth/password
Change user's password to the CASP service
Body parameter
{
"value": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | Change user's password request |
» value | body | string | true | User's password |
Example responses
401 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
401 | Unauthorized | Unauthorized: Invalid user name or password | Inline |
500 | Internal Server Error | Change password failed | Inline |
Response Schema
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Reset user password
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/users/{username}/password',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X PUT /casp/api/v1.0/mng/auth/users/{username}/password \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PUT /casp/api/v1.0/mng/auth/users/{username}/password
Reset user's password to the CASP service
Body parameter
{
"password": "string",
"mustChangePassword": true
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | Username |
body | body | object | true | Change user's password request |
» password | body | string | true | User's password |
» mustChangePassword | body | boolean | true | User must change password |
Example responses
401 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
401 | Unauthorized | Unauthorized: Invalid user name or password | Inline |
500 | Internal Server Error | Change password failed | Inline |
Response Schema
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Update user
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/{user_name}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X PUT /casp/api/v1.0/mng/auth/{user_name} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
PUT /casp/api/v1.0/mng/auth/{user_name}
Update user
Body parameter
{
"active": true,
"role": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
user_name | path | string | true | User Name |
body | body | object | true | Update user's state |
» active | body | boolean | false | Is user active |
» role | body | string | false | User's role. Can be one of the following: Super_User, Security_Officer, Trader |
Example responses
400 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A user was successfully updated | None |
400 | Bad Request | Unauthorized: Invalid request | Inline |
500 | Internal Server Error | A user removal failed | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Remove a user
Code samples
var headers = {
'Accept':'*/*'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/users/{user_name}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X DELETE /casp/api/v1.0/mng/auth/users/{user_name} \
-H 'Accept: */*'
DELETE /casp/api/v1.0/mng/auth/users/{user_name}
Remove a user
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
user_name | path | string | true | User Name |
Example responses
400 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A user was successfully removed | None |
400 | Bad Request | Unauthorized: Invalid request | Inline |
500 | Internal Server Error | A user removal failed | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
List API Keys
Code samples
var headers = {
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/apikeys',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/auth/apikeys \
-H 'Accept: application/json'
GET /casp/api/v1.0/mng/auth/apikeys
List API Keys for CASP service
Example responses
200 Response
[
{
"clientId": "string",
"tokenType": "BEARER",
"expiry_in": 0,
"scope": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Unauthorized: Invalid request | Inline |
500 | Internal Server Error | Internal error | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» clientId | string | true | none | Api key client_id |
» tokenType | string | true | none | Api key token type |
» expiry_in | integer(int64) | true | none | Api key expiry in |
» scope | string | true | none | Api key scope |
Enumerated Values
Property | Value |
---|---|
tokenType | BEARER |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Get API Key
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/apikeys',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/auth/apikeys \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /casp/api/v1.0/mng/auth/apikeys
Get API Key for CASP service
Body parameter
{
"client_id": "string",
"client_role": "string",
"scope": "string",
"grant_type": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | Get API key request |
» client_id | body | string | true | Owner client ID auth token will be issued for |
» client_role | body | string | true | Auth token owner role. Can be one of the following: Super_User, Security_Officer, Trader |
» scope | body | string | true | Auth token scope. Value MUST be set to "/mng" |
» grant_type | body | string | true | Request's grant type. Value MUST be set to "client_credentials" |
Example responses
201 Response
{
"access_token": "string",
"token_type": "string",
"expires_in": 0,
"scope": "string",
"role": "SECURITY_OFFICER"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | API key created | Inline |
401 | Unauthorized | Unauthorized: Authentication data is invalid | Inline |
409 | Conflict | API key cannot be generated | Inline |
500 | Internal Server Error | Get API key failed | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» access_token | string | true | none | Oauth Token for CASP service |
» token_type | string | false | none | Oauth Token type |
» expires_in | integer(int64) | false | none | Expiration in seconds |
» scope | string | false | none | Oauth token scope |
» role | string | false | none | Oauth token client role |
Enumerated Values
Property | Value |
---|---|
role | SECURITY_OFFICER |
role | TRADER |
role | SUPER_USER |
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Revoke an Api key
Code samples
var headers = {
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/apikeys/{client_id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X DELETE /casp/api/v1.0/mng/auth/apikeys/{client_id} \
-H 'Accept: application/json'
DELETE /casp/api/v1.0/mng/auth/apikeys/{client_id}
Revoke an Api key
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
client_id | path | string | true | Client_id |
Example responses
400 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | An api key was successfully removed | None |
400 | Bad Request | Unauthorized: Invalid request | Inline |
500 | Internal Server Error | An api key removal failed | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Get access and refresh tokens
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/tokens',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/auth/tokens \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /casp/api/v1.0/mng/auth/tokens
Get access token for CASP service
Body parameter
{
"grant_type": "string",
"refreshtoken": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | getAccessTokenBody | true | Get oauth tokens request |
» grant_type | body | string | true | Request's grant type. Value MUST be set to "password" |
» refreshtoken | body | string | false | Request's grant type. Value MUST be set to "password" or "refresh_token" depends on the purpose |
Example responses
201 Response
{
"access_token": "string",
"token_type": "string",
"expires_in": 0,
"scope": "string",
"role": "SECURITY_OFFICER",
"refresh_token": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Access and refresh tokens created | Inline |
401 | Unauthorized | Unauthorized: Authentication data is invalid | Inline |
409 | Conflict | Auth tokens cannot be generated | Inline |
500 | Internal Server Error | Get OAuth tokens failed | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» access_token | string | true | none | Oauth Token for CASP service |
» token_type | string | false | none | Oauth Token type |
» expires_in | integer(int64) | false | none | Expiration in seconds |
» scope | string | false | none | Oauth token scope |
» role | string | false | none | Oauth token client role |
» refresh_token | string | true | none | Oauth Token for CASP service |
Enumerated Values
Property | Value |
---|---|
role | SECURITY_OFFICER |
role | TRADER |
role | SUPER_USER |
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Get access and refresh token
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/token',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/auth/token \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST /casp/api/v1.0/mng/auth/token
Get access token for CASP service
Body parameter
{
"grant_type": "string",
"refreshtoken": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | getAccessTokenBody | true | Get oauth tokens request |
» grant_type | body | string | true | Request's grant type. Value MUST be set to "password" |
» refreshtoken | body | string | false | Request's grant type. Value MUST be set to "password" or "refresh_token" depends on the purpose |
Example responses
201 Response
{
"access_token": "string",
"token_type": "string",
"expires_in": 0,
"scope": "string",
"role": "SECURITY_OFFICER",
"refresh_token": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Access and refresh tokens created | Inline |
401 | Unauthorized | Unauthorized: Authentication data is invalid | Inline |
409 | Conflict | Auth tokens cannot be generated | Inline |
500 | Internal Server Error | Get OAuth tokens failed | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» access_token | string | true | none | Oauth Token for CASP service |
» token_type | string | false | none | Oauth Token type |
» expires_in | integer(int64) | false | none | Expiration in seconds |
» scope | string | false | none | Oauth token scope |
» role | string | false | none | Oauth token client role |
» refresh_token | string | true | none | Oauth Token for CASP service |
Enumerated Values
Property | Value |
---|---|
role | SECURITY_OFFICER |
role | TRADER |
role | SUPER_USER |
Status Code 401
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Revoke an access token
Code samples
var headers = {
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/token/{token_owner}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X DELETE /casp/api/v1.0/mng/auth/token/{token_owner} \
-H 'Accept: application/json'
DELETE /casp/api/v1.0/mng/auth/token/{token_owner}
Revoke an access token
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
token_owner | path | string | true | token_owner |
Example responses
400 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | An access token was successfully removed | None |
400 | Bad Request | Unauthorized: Invalid request | Inline |
500 | Internal Server Error | An access token removal failed | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Revoke an access token (deprecated)
Code samples
var headers = {
'Accept':'application/json'
};
$.ajax({
url: '/casp/api/v1.0/mng/auth/tokens/{token_owner}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X DELETE /casp/api/v1.0/mng/auth/tokens/{token_owner} \
-H 'Accept: application/json'
DELETE /casp/api/v1.0/mng/auth/tokens/{token_owner}
Revoke an access token
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
token_owner | path | string | true | token_owner |
Example responses
400 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | An access token was successfully removed | None |
400 | Bad Request | Unauthorized: Invalid request | Inline |
500 | Internal Server Error | An access token removal failed | Inline |
Response Schema
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Accounts
Refer to the Accounts section in the Unbound CASP Developers Guide
Create a new account
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/accounts',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/accounts \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
POST /casp/api/v1.0/mng/accounts
Create a new account managed by the CASP service
Body parameter
{
"name": "string",
"isGlobal": true
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | Create accounts request |
» name | body | string | true | Account name |
» isGlobal | body | boolean | false | Is account global |
Example responses
201 Response
{
"id": "string",
"name": "string",
"isGlobal": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | OK | Inline |
409 | Conflict | Account already exists | Inline |
500 | Internal Server Error | Create account failed | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | Account ID |
» name | string | true | none | Account name |
» isGlobal | boolean | true | none | Is global account |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
List accounts
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/accounts',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/accounts \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
GET /casp/api/v1.0/mng/accounts
List all accounts managed by the CASP service
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
withStats | query | boolean | false | Include additional info per account |
filter | query | string | false | Search the account names |
sort | query | string | false | Specify the column name to sort by and the sort direction. The format is '{column_name}:{asc/desc}'. The default sort is ascending. The column name can be one of the following: Name, Global |
skip | query | integer(int32) | false | The number of results to skip from the beginning of the results after applying the filter and sort |
limit | query | integer(int32) | false | The maximum number of results to return |
Example responses
200 Response
{
"totalItems": 0,
"items": [
{
"id": "string",
"name": "string",
"isGlobal": true
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not found | Inline |
500 | Internal Server Error | List accounts failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» totalItems | integer(int32) | true | none | Total Items |
» items | [object] | true | none | Items |
»» id | string | true | none | Account ID |
»» name | string | true | none | Account name |
»» isGlobal | boolean | true | none | Is global account |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Get account details
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/accounts/{id}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/accounts/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
GET /casp/api/v1.0/mng/accounts/{id}
Get account information about a specific account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Account ID |
withStats | query | boolean | false | Return detailed information about the account |
Example responses
200 Response
[
{
"id": "string",
"name": "string",
"isGlobal": true,
"stats": {
"participants": {
"total": 0,
"inactive": 0
},
"operations": {
"total": 0,
"pending": 0
},
"vaults": {
"total": 0,
"inactive": 0
}
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
404 | Not Found | Not found | Inline |
500 | Internal Server Error | Get account details failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | Account ID |
» name | string | true | none | Account name |
» isGlobal | boolean | true | none | Is global account |
» stats | object | true | none | none |
»» participants | object | true | none | none |
»»» total | integer(int32) | true | none | Total number of participants in the account |
»»» inactive | integer(int32) | true | none | Total number of inactive participants in the account |
»» operations | object | true | none | none |
»»» total | integer(int32) | true | none | The number of operations from the account |
»»» pending | integer(int32) | true | none | The number of operations that are still pending |
»» vaults | object | true | none | none |
»»» total | integer(int32) | true | none | The number of vaults that belong to this account |
»»» inactive | integer(int32) | true | none | The number of inactive vaults that belong to this account |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Update an existing account
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/accounts/{id}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X PUT /casp/api/v1.0/mng/accounts/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
PUT /casp/api/v1.0/mng/accounts/{id}
Update the parameters for a specific account
Body parameter
{
"name": "string",
"isGlobal": true
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Account ID |
body | body | object | true | Update account request |
» name | body | string | true | Account name |
» isGlobal | body | boolean | false | Is account global |
Example responses
404 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
404 | Not Found | Account not found | Inline |
409 | Conflict | Can't change global property, Account already has participants | Inline |
500 | Internal Server Error | Update account failed | Inline |
Response Schema
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Delete an account
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/accounts/{id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X DELETE /casp/api/v1.0/mng/accounts/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
DELETE /casp/api/v1.0/mng/accounts/{id}
Delete an existing account. Only accounts with no vaults or participants may be deleted.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Account ID |
Example responses
403 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | Account not found | Inline |
500 | Internal Server Error | Delete account failed | Inline |
Response Schema
Status Code 403
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Participants
Refer to the Participants section in the Unbound CASP Developers Guide
Create a new participant
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/accounts/{id}/participants',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/accounts/{id}/participants \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
POST /casp/api/v1.0/mng/accounts/{id}/participants
Create a new participant in the specified account
Body parameter
{
"name": "string",
"email": "string",
"role": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Account ID |
body | body | object | true | Create participant request |
» name | body | string | true | ParticipantWithVault name |
body | string | true | ParticipantWithVault email | |
» role | body | string | true | ParticipantWithVault role |
Example responses
201 Response
{
"id": "string",
"activationCode": "string",
"name": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | New participant created successfully | Inline |
404 | Not Found | Account not found | Inline |
406 | Not Acceptable | Email is not valid | Inline |
409 | Conflict | Participant already exists | Inline |
500 | Internal Server Error | Create new participant failed | Inline |
Response Schema
Status Code 201
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | ParticipantWithVault ID |
» activationCode | string | true | none | Activation code for the specified participant |
» name | string | true | none | ParticipantWithVault name |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 406
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
List participants
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/accounts/{id}/participants',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/accounts/{id}/participants \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
GET /casp/api/v1.0/mng/accounts/{id}/participants
List all participants in the account, which can be both humans and BOT's. An option is provided to include the deactivated participants.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Account ID |
withGlobal | query | boolean | false | Include participants which take part in this account vaults and belong to a different global account |
withDeactivated | query | boolean | false | Include deactivated participants |
filter | query | string | false | Search the participant names |
sort | query | string | false | Specify the column name to sort by and the sort direction. The format is '{column_name}:{asc/desc}'. The default sort is ascending. The column name can be one of the following: Name, Status, Email |
skip | query | integer(int32) | false | The number of results to skip from the beginning of the results after applying the filter and sort |
limit | query | integer(int32) | false | The maximum number of results to return |
Example responses
200 Response
{
"totalItems": 0,
"items": [
{
"id": "string",
"accountID": "string",
"name": "string",
"email": "string",
"status": "NOT_ACTIVATED",
"isActive": true,
"accountName": "string",
"role": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Account not found | Inline |
500 | Internal Server Error | List participant per account failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» totalItems | integer(int32) | true | none | Total Items |
» items | [object] | true | none | Items |
»» id | string | true | none | Participant ID |
»» accountID | string | true | none | Participant account ID |
»» name | string | true | none | Participant name |
string | true | none | Participant email | |
»» status | string | true | none | Participant status |
»» isActive | boolean | true | none | Participant activation state |
»» accountName | string | true | none | Participant account name |
»» role | string | true | none | Participant role |
Enumerated Values
Property | Value |
---|---|
status | NOT_ACTIVATED |
status | ACTIVATED |
status | DEACTIVATED |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Get participant information
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/participants/{id}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/participants/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
GET /casp/api/v1.0/mng/participants/{id}
Get details of a participant
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ParticipantWithVault ID |
Example responses
200 Response
{
"id": "string",
"accountID": "string",
"name": "string",
"email": "string",
"status": "NOT_ACTIVATED",
"isActive": true,
"accountName": "string",
"role": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
404 | Not Found | ParticipantWithVault not found | Inline |
500 | Internal Server Error | Get participant failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | Participant ID |
» accountID | string | true | none | Participant account ID |
» name | string | true | none | Participant name |
string | true | none | Participant email | |
» status | string | true | none | Participant status |
» isActive | boolean | true | none | Participant activation state |
» accountName | string | true | none | Participant account name |
» role | string | true | none | Participant role |
Enumerated Values
Property | Value |
---|---|
status | NOT_ACTIVATED |
status | ACTIVATED |
status | DEACTIVATED |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Update an existing participant
Code samples
var headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/participants/{id}',
method: 'put',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X PUT /casp/api/v1.0/mng/participants/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
PUT /casp/api/v1.0/mng/participants/{id}
Update a participant's details. ParticipantWithVault name and other attributes can be changed. It can also be used to deactivate a participant by setting status to DEACTIVATED, and reactivate a participant by setting status to ACTIVATED
Body parameter
{
"name": "string",
"email": "string",
"role": "string",
"status": "ACTIVATED"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ParticipantWithVault ID |
body | body | object | true | Update participant request |
» name | body | string | false | ParticipantWithVault name |
body | string | false | ParticipantWithVault email | |
» role | body | string | false | ParticipantWithVault role |
» status | body | string | false | ParticipantWithVault status |
Enumerated Values
Parameter | Value |
---|---|
» status | ACTIVATED |
» status | DEACTIVATED |
Example responses
404 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
404 | Not Found | ParticipantWithVault not found | Inline |
409 | Conflict | Cannot deactivate participant | Inline |
500 | Internal Server Error | Update participant failed | Inline |
Response Schema
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 409
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Delete a participant
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/participants/{id}',
method: 'delete',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X DELETE /casp/api/v1.0/mng/participants/{id} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
DELETE /casp/api/v1.0/mng/participants/{id}
Deletes a participant. A participant can be deleted only if it has no related vaults.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ParticipantWithVault ID |
Example responses
403 Response
{
"type": "string",
"title": "string",
"details": "string",
"status": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
403 | Forbidden | Forbidden | Inline |
404 | Not Found | ParticipantWithVault not found | Inline |
500 | Internal Server Error | Delete participant failed | Inline |
Response Schema
Status Code 403
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Regenerate activation code
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/participants/{id}/reactivate',
method: 'post',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X POST /casp/api/v1.0/mng/participants/{id}/reactivate \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
POST /casp/api/v1.0/mng/participants/{id}/reactivate
Regenerate activation code for an existing participant. Used when the activation code was lost or the participant needs to be reactivated.
This request returns an error (403) if there is a pending request for the user to join a vault.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | ParticipantWithVault ID |
Example responses
200 Response
{
"id": "string",
"activationCode": "string",
"name": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
403 | Forbidden | Reactivation is not allowed | Inline |
404 | Not Found | Vault not found | Inline |
500 | Internal Server Error | Regenerate activation code failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | ParticipantWithVault ID |
» activationCode | string | true | none | Activation code for the specified participant |
» name | string | true | none | ParticipantWithVault name |
Status Code 403
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Backup
Refer to the Backup section in the Unbound CASP Developers Guide
Get vault backup data
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/vaults/{id}/backup',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{id}/backup \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
GET /casp/api/v1.0/mng/vaults/{id}/backup
The vault cryptographic material is backed up with a key that is external to the CASP system. The backup can be used for safe recovery of the vault in case of service failure, participants losing their shares, or termination of CASP usage.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Vault ID |
Example responses
200 Response
{
"vaultID": "string",
"backupData": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad request | Inline |
404 | Not Found | Backup not found | Inline |
500 | Internal Server Error | Get vault backup data failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» vaultID | string | true | none | Vault ID |
» backupData | string | true | none | Vault backup data |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Get backup for account
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/backup',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/backup \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
GET /casp/api/v1.0/mng/vaults/{vaultId}/coins/{coinType}/accounts/{accountIdentifier}/backup
Get backup for BIP44 account.
This endpoint is only functional if you generated a BIP44 vault.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
vaultId | path | string | true | Vault ID |
coinType | path | integer(int32) | true | Coin type |
accountIdentifier | path | string | true | Account identifier, which can be the index or the name |
Example responses
200 Response
{
"vaultId": "string",
"backupData": "string",
"bipLevel": 0,
"cpar": "string",
"parentFingerprint": "string",
"childNumber": 0,
"publicKey": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
404 | Not Found | Vault not found | Inline |
406 | Not Acceptable | Not supported | Inline |
500 | Internal Server Error | Get account backup failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» vaultId | string | true | none | the vault ID |
» backupData | string | true | none | The backup data, in encrypted form |
» bipLevel | integer(int32) | true | none | derivation level |
» cpar | string | true | none | CPar |
» parentFingerprint | string | true | none | parent fingerprint |
» childNumber | integer(int32) | true | none | child number |
» publicKey | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 406
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Get public key backup data
Code samples
var headers = {
'Accept':'application/json',
'Authorization':'API_KEY'
};
$.ajax({
url: '/casp/api/v1.0/mng/vaults/{vaultId}/backup/{publicKey}',
method: 'get',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
# You can also use wget
curl -X GET /casp/api/v1.0/mng/vaults/{vaultId}/backup/{publicKey} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer API_KEY'
GET /casp/api/v1.0/mng/vaults/{vaultId}/backup/{publicKey}
The vault cryptographic material is backed up with a key that is external to the CASP system. The backup can be used for safe recovery of the vault in case of service failure, participants losing their shares, or termination of CASP usage.
This endpoint is only functional if you generated a BIP32 vault.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
vaultId | path | string | true | Vault ID |
publicKey | path | string | true | public key |
Example responses
200 Response
{
"vaultId": "string",
"backupData": "string",
"bipLevel": 0,
"cpar": "string",
"parentFingerprint": "string",
"childNumber": 0,
"publicKey": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
404 | Not Found | Vault not found | Inline |
406 | Not Acceptable | Not supported | Inline |
500 | Internal Server Error | Get vault backup data failed | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» vaultId | string | true | none | the vault ID |
» backupData | string | true | none | The backup data, in encrypted form |
» bipLevel | integer(int32) | true | none | derivation level |
» cpar | string | true | none | CPar |
» parentFingerprint | string | true | none | parent fingerprint |
» childNumber | integer(int32) | true | none | child number |
» publicKey | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 406
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» type | string | true | none | Error identification |
» title | string | true | none | Error summary |
» details | string | true | none | Error details |
» status | integer(int64) | true | none | Original HTTP status code |