LSv2 Participant Ledger v2.1
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
API provided by the LSv2 Participant Ledger
Base URLs:
-
- instance - Instance of LedgerSwarm - your LedgerSwarm node
Authentication
-
HTTP Authentication, scheme: basic Pass username and password in the Authorization header using BASIC authentication.
-
HTTP Authentication, scheme: bearer Use a token returned from one of the auth endpoints.
auth
Authentication
auth_basic
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/auth");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/auth", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/auth
Authenticate to the system as an administrator or user. The user should provide BASIC authentication details.
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Token | AuthResponse |
auth_login
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"password": "cheese000!!",
"userName": "user123"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://{instance}/api/v2/auth',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/auth");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/auth", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/auth
Authenticate to the system as an administrator or user
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AuthRequest | false | The authentication request |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Token | AuthResponse |
user
User management
user_admin_delete-user
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/user/{username}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /api/v2/user/{username}
Delete a user. A user cannot delete themselves. Only available to 'admin' users.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | The username |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Indicates success | None |
user_admin_get-user
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/user/{username}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/user/{username}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/user/{username}
Get a user's details. Only available to 'admin' users.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | The username |
Example responses
default Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
default | Default | default response | UserData |
user_admin_create-user
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"isAdmin": true,
"password": "string"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/user/{username}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/user/{username}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/user/{username}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/user/{username}
Create a new user. Only available to 'admin' users.
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | The username |
body | body | UserUpdate | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Indicates success | None |
user_admin_update-user
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"isAdmin": true,
"password": "string"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/user/{username}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/user/{username}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/user/{username}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/user/{username}
Update a user, changing the password or their status as an administrator. Only available to 'admin' users.
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | The username |
body | body | UserUpdate | false | The updates to the user data |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Indicates success | None |
user_change-password
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"newPassword": "string",
"oldPassword": "string"
}';
const headers = {
'Content-Type':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://{instance}/api/v2/user/{username}/password',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/user/{username}/password");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/user/{username}/password", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/user/{username}/password
Change the current user's password
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | The username |
body | body | NewPassword | false | The old and new passwords |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Indicates success | None |
account
Ledger account management
v3_account_get-all
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/account");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v3/account", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v3/account
Get all account IDs.
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of account IDs | Inline |
Response Schema
v3_account_get-all-of-type
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/account/{accountType}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v3/account/{accountType}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v3/account/{accountType}
Get all account IDs of a given type.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account type |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of account IDs of given type | Inline |
Response Schema
v3_account_get-all-assets
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/account/{accountType}/{accountId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v3/account/{accountType}/{accountId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v3/account/{accountType}/{accountId}
Get all assets IDs for a given account ID and account type.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account type |
accountId | path | string | true | The account ID |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of all asset IDs associated with the account type and ID | Inline |
Response Schema
v3_account_rename
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"amount": 0,
"isDelta": true,
"reason": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://{instance}/api/v3/account/{accountType}/{accountId}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v3/account/{accountType}/{accountId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v3/account/{accountType}/{accountId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/account/{accountType}/{accountId}
Change the ID or type of an account
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account Type |
accountId | path | string | true | The account ID |
body | body | AccountBalanceUpdate | false | The new account ID and type |
Example responses
204 Response
{
"accountId": "string",
"accountType": "string",
"assetId": "string",
"balances": [
{
"amount": 0,
"label": "string"
}
],
"external": true,
"hotBalance": 0,
"lastProposalAt": "2019-08-24T14:15:22Z",
"lastSettledAt": "2019-08-24T14:15:22Z",
"liability": true,
"settledBalance": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | Updated account and type | AccountDTO |
v3_account_get
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v3/account/{accountType}/{accountId}/{assetId}
Get the account details
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account type |
accountId | path | string | true | The account ID |
assetId | path | string | true | The asset ID |
Example responses
200 Response
{
"accountId": "string",
"accountType": "string",
"assetId": "string",
"balances": [
{
"amount": 0,
"label": "string"
}
],
"external": true,
"hotBalance": 0,
"lastProposalAt": "2019-08-24T14:15:22Z",
"lastSettledAt": "2019-08-24T14:15:22Z",
"liability": true,
"settledBalance": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account details | AccountDTO |
v3_account_update-settled-balance
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"amount": 0,
"isDelta": true,
"reason": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/account/{accountType}/{accountId}/{assetId}
Update the balance for this account + asset
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account Type |
accountId | path | string | true | The account ID |
assetId | path | string | true | The asset ID |
body | body | AccountBalanceUpdate | false | The balance change |
Example responses
200 Response
{
"accountId": "string",
"accountType": "string",
"assetId": "string",
"balances": [
{
"amount": 0,
"label": "string"
}
],
"external": true,
"hotBalance": 0,
"lastProposalAt": "2019-08-24T14:15:22Z",
"lastSettledAt": "2019-08-24T14:15:22Z",
"liability": true,
"settledBalance": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Updated balances for account + asset | AccountDTO |
v3_account_create
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
PUT /api/v3/account/{accountType}/{accountId}/{assetId}
Create an account with an initial balance of zero.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account ID |
accountId | path | string | true | The account ID |
assetId | path | string | true | The asset ID |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Account was created | None |
204 | No Content | Account already existed | None |
v3_account_get-pending
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}/pending");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v3/account/{accountType}/{accountId}/{assetId}/pending", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v3/account/{accountType}/{accountId}/{assetId}/pending
Get pending transfers for this account + asset
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account Type |
accountId | path | string | true | The account ID |
assetId | path | string | true | The asset ID |
Example responses
200 Response
[
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of all pending transfers for this account + asset | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [TransferDTO] | false | none | [A credit or debit resulting from a transfer] |
» accountId | string | true | none | The account ID |
» accountType | string | true | none | The account type |
» amount | number | true | none | The amount being transferred. This will be a floating point number. |
» assetId | string | true | none | The asset ID. |
» createdAt | string(date-time) | true | none | When the transfer was loaded. This is an ISO-8601 format timestamp |
» finalisedAt | string(date-time) | false | none | When the manifest was finalised, if it has been. |
» id | integer(int64) | true | none | The database record ID |
» isAccepted | boolean | false | none | Only present if the manifest is finalised. Was the manifest accepted? |
» isFinalised | boolean | true | none | Has the manifest been finalised? |
» manifestCorrelationId | string | true | none | The correlation ID associated with the manifest that contains the transfer. |
» requestId | string | true | none | The request ID associated with the manifest that contains the transfer |
» swarmId | string | true | none | The swarm ID associated with the manifest that contains the transfer |
» tags | [string] | false | none | Tags assigned to this transfer |
» transferCorrelationId | string | true | none | The correlation ID associated with the transfer |
asset
Asset management
v3_instrument_get-all
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/instrument");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v3/instrument", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v3/instrument
Get all instrument IDs.
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of all instrument IDs | Inline |
Response Schema
manifest
Manifest approvals and searches
manifest_approve
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/manifest/approve/{swarmId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/problem+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/manifest/approve/{swarmId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/manifest/approve/{swarmId}
Approve the manifest with the given swarm ID
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | path | string | true | The swarm ID of the manifest to approve |
Example responses
424 Response
{
"detail": "string",
"instance": "string",
"status": 0,
"timestamp": "string",
"title": "string",
"type": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The manifest was approved | None |
424 | Failed Dependency | The manifest was not found. Note that this may occur if another party has already voted. | ErrorResponse |
Cancel all open manifests.
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/manifest/cancel-all");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /api/v2/manifest/cancel-all
Every open manifests is immediately marked as rejected in the database and a vote for rejection is sent to the swarm.
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | All open manifests rejected and closed. | None |
manifest_reject
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/manifest/reject/{swarmId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/problem+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/manifest/reject/{swarmId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/manifest/reject/{swarmId}
Reject the manifest with the given swarm ID
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | path | string | true | The swarm ID of the manifest to reject |
Example responses
424 Response
{
"detail": "string",
"instance": "string",
"status": 0,
"timestamp": "string",
"title": "string",
"type": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The manifest was rejected | None |
424 | Failed Dependency | The manifest was not found. Note this may occur if another party has already voted on the manifest. | ErrorResponse |
manifest_search
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/manifest/search");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/manifest/search", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/manifest/search
Search for manifests
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | query | string | false | The swarm ID to search for |
requestId | query | string | false | The request ID to search for |
correlationId | query | string | false | The correlation ID to search for |
createdAfter | query | string | false | The time after which the manifest was created. This may be provided as a ISO-8601 timestamp indicating an absolute time, or as an ISO-8601 duration indicating a time-before-present. |
createdBefore | query | string | false | The time before which the manifest was created. This may be provided as a ISO-8601 timestamp indicating an absolute time, or as an ISO-8601 duration indicating a time-before-present. |
scope | query | string | false | The scope of the search. Defaults to ALL. |
offset | query | integer(int32) | false | Number of results to skip at start. Defaults to zero. |
limit | query | integer(int32) | false | Maximum number of results to return. Defaults to ALL. |
Enumerated Values
Parameter | Value |
---|---|
scope | ACTIVE |
scope | ALL |
scope | FINALISED |
Example responses
200 Response
[
{
"correlationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalised": true,
"finalisedAt": "2019-08-24T14:15:22Z",
"isAccepted": true,
"requestId": "string",
"swarmId": "string",
"transfers": [
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All matching manifests. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ManifestDTO] | false | none | [The manifest of a set of transfers.] |
» correlationId | string | false | none | Correlation ID assigned by the client, if any. |
» createdAt | string(date-time) | false | none | When this transaction was loaded into the database. |
» finalised | boolean | false | none | Is the manifest finalised? |
» finalisedAt | string(date-time) | false | none | Time at which the manifest was finalised, if it has been. |
» isAccepted | boolean | false | none | Was the manifest accepted, rejected, or is it still undecided?. This is not present or null if it is undecided. |
» requestId | string | false | none | Request ID assigned by the scheduler. |
» swarmId | string | false | none | Swarm ID assigned by the Ledger-Swarm. |
» transfers | [TransferDTO] | false | none | Transfers associated with this manifest. |
»» accountId | string | true | none | The account ID |
»» accountType | string | true | none | The account type |
»» amount | number | true | none | The amount being transferred. This will be a floating point number. |
»» assetId | string | true | none | The asset ID. |
»» createdAt | string(date-time) | true | none | When the transfer was loaded. This is an ISO-8601 format timestamp |
»» finalisedAt | string(date-time) | false | none | When the manifest was finalised, if it has been. |
»» id | integer(int64) | true | none | The database record ID |
»» isAccepted | boolean | false | none | Only present if the manifest is finalised. Was the manifest accepted? |
»» isFinalised | boolean | true | none | Has the manifest been finalised? |
»» manifestCorrelationId | string | true | none | The correlation ID associated with the manifest that contains the transfer. |
»» requestId | string | true | none | The request ID associated with the manifest that contains the transfer |
»» swarmId | string | true | none | The swarm ID associated with the manifest that contains the transfer |
»» tags | [string] | false | none | Tags assigned to this transfer |
»» transferCorrelationId | string | true | none | The correlation ID associated with the transfer |
manifest_select
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/manifest/select/{swarmId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/manifest/select/{swarmId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/manifest/select/{swarmId}
Select the manifest with the given swarm ID
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | path | string | true | The swarm ID of the manifest |
Example responses
200 Response
{
"correlationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalised": true,
"finalisedAt": "2019-08-24T14:15:22Z",
"isAccepted": true,
"requestId": "string",
"swarmId": "string",
"transfers": [
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The manifest | ManifestDTO |
404 | Not Found | The manifest was not found | None |
kafka
Search Kafka message history
kafka_search
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/kafka/search");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/kafka/search", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/kafka/search
Search for Kafka messages
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | query | string | false | The swarm ID to search for |
requestId | query | string | false | The request ID to search for |
correlationId | query | string | false | The correlation ID to search for |
createdAfter | query | string | false | The time after which the message was created. This may be provided as a ISO-8601 timestamp indicating an absolute time, or as an ISO-8601 duration indicating a time-before-present. |
createdBefore | query | string | false | The time before which the message was created. This may be provided as a ISO-8601 timestamp indicating an absolute time, or as an ISO-8601 duration indicating a time-before-present. |
type | query | string | false | The type of the message's envelope |
offset | query | integer(int32) | false | Number of results to skip at start. Defaults to zero. |
limit | query | integer(int32) | false | Maximum number of results to return. Defaults to ALL. |
Example responses
200 Response
[
{
"correlationId": "string",
"envelopeText": "string",
"headers": [
{
"name": "string",
"textValue": "string"
}
],
"receivedAt": "2019-08-24T14:15:22Z",
"recordKey": "string",
"requestId": "string",
"swarmId": "string",
"type": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All matching messages. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [KafkaRecordDTO] | false | none | [A Kafka message with standard LedgerSwarm headers] |
» correlationId | string | false | none | The correlation ID of the message |
» envelopeText | string | false | none | Textual representation of the Kafka message, assuming it contained a LedgerSwarm Envelope. |
» headers | [KafkaHeaderDTO] | false | none | The headers on the message |
»» name | string | false | none | The name of the header |
»» textValue | string | false | none | The value of the header as a string |
» receivedAt | string(date-time) | false | none | The time the message was received |
» recordKey | string | false | none | The Kafka record key of the message |
» requestId | string | false | none | The request ID associated with the message. |
» swarmId | string | false | none | The swarm ID associated with the message. |
» type | string | false | none | The type of the message. |
transfer
Transfer approvals and searches
transfer_get-all
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/transfer");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/transfer", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/transfer
Get all pending transfers.
Example responses
200 Response
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All transfers. | TransferDTO |
transfer_search
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/transfer/search");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/transfer/search", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/transfer/search
Search for transfers
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountId | query | string | false | The account ID to search for |
assetId | query | string | false | The asset ID to search for |
swarmID | query | string | false | The swarm ID to search for |
requestId | query | string | false | The request ID to search for |
manifestCorrelationId | query | string | false | The manifest correlation ID to search for |
transferCorrelationId | query | string | false | The transfer correlation ID to search for |
scope | query | string | false | The scope to search in |
offset | query | integer(int32) | false | Number of results to skip at start. Defaults to zero. |
limit | query | integer(int32) | false | Maximum number of results to return. Defaults to ALL. |
Enumerated Values
Parameter | Value |
---|---|
scope | ACTIVE |
scope | ALL |
scope | FINALISED |
Example responses
200 Response
[
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All matching transfers. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [TransferDTO] | false | none | [A credit or debit resulting from a transfer] |
» accountId | string | true | none | The account ID |
» accountType | string | true | none | The account type |
» amount | number | true | none | The amount being transferred. This will be a floating point number. |
» assetId | string | true | none | The asset ID. |
» createdAt | string(date-time) | true | none | When the transfer was loaded. This is an ISO-8601 format timestamp |
» finalisedAt | string(date-time) | false | none | When the manifest was finalised, if it has been. |
» id | integer(int64) | true | none | The database record ID |
» isAccepted | boolean | false | none | Only present if the manifest is finalised. Was the manifest accepted? |
» isFinalised | boolean | true | none | Has the manifest been finalised? |
» manifestCorrelationId | string | true | none | The correlation ID associated with the manifest that contains the transfer. |
» requestId | string | true | none | The request ID associated with the manifest that contains the transfer |
» swarmId | string | true | none | The swarm ID associated with the manifest that contains the transfer |
» tags | [string] | false | none | Tags assigned to this transfer |
» transferCorrelationId | string | true | none | The correlation ID associated with the transfer |
transfer_set-tags
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/transfer/tag/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/transfer/tag/{id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/transfer/tag/{id}
Set the tags associated with a transfer.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The transfer ID |
Example responses
200 Response
[
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The updated transfer. | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [TransferDTO] | false | none | [A credit or debit resulting from a transfer] |
» accountId | string | true | none | The account ID |
» accountType | string | true | none | The account type |
» amount | number | true | none | The amount being transferred. This will be a floating point number. |
» assetId | string | true | none | The asset ID. |
» createdAt | string(date-time) | true | none | When the transfer was loaded. This is an ISO-8601 format timestamp |
» finalisedAt | string(date-time) | false | none | When the manifest was finalised, if it has been. |
» id | integer(int64) | true | none | The database record ID |
» isAccepted | boolean | false | none | Only present if the manifest is finalised. Was the manifest accepted? |
» isFinalised | boolean | true | none | Has the manifest been finalised? |
» manifestCorrelationId | string | true | none | The correlation ID associated with the manifest that contains the transfer. |
» requestId | string | true | none | The request ID associated with the manifest that contains the transfer |
» swarmId | string | true | none | The swarm ID associated with the manifest that contains the transfer |
» tags | [string] | false | none | Tags assigned to this transfer |
» transferCorrelationId | string | true | none | The correlation ID associated with the transfer |
rule
Auto-approval rule management
consensus_rule_get-all
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/consensus/rule");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/consensus/rule", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/consensus/rule
Get all rules
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All rules | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [RuleDTO] | false | none | none |
» id | integer(int64) | false | none | none |
» name | string | true | none | The rule's name |
» priority | integer(int32) | false | none | The rule's priority (highest value first) |
» text | string | true | none | The rule. The rule is a JEXL script that returns one of ACCEPT, REJECT, MANUAL, or ABSTAIN. |
consensus_rule_create
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"id": 0,
"name": "string",
"priority": 0,
"text": "string"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/consensus/rule',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/consensus/rule");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/consensus/rule", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/consensus/rule
Add a new rule
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | RuleDTO | false | The new rule |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
consensus_rule_delete
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/consensus/rule/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /api/v2/consensus/rule/{id}
Delete a rule
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the rule to delete |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
ping
Ping the server
ping_open
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/open/ping");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/open/ping", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/open/ping
Ping the server (anonymous)
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ping response | PingResponse |
properties_open
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/open/util/participantProperties");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/open/util/participantProperties", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/open/util/participantProperties
Get properties from the server (anonymous)
Example responses
200 Response
{
"context": "string",
"instance": "string",
"domain": "string",
"id": "string",
"cluster": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Participant properties response | PropertiesResponse |
ping_auth
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/ping");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/ping", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/ping
Ping the server (authenticated)
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Ping response | PingResponse |
propose
Propose new transfers
propose_pacs.008
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/pacs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/xml"},
"Accept": []string{"application/xml"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/pacs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/pacs
Create a new manifest proposal from a PACS.008 message and inject it into the ledger
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | string | false | none |
Example responses
201 Response
<?xml version="1.0" encoding="UTF-8" ?>
<PacsResponse>
<error>string</error>
<manifestId>string</manifestId>
<status>string</status>
</PacsResponse>
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | PacsResponse |
propose_create
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"manifestId": "string",
"transfers": [
{
"amount": 0,
"assetId": "string",
"from": {
"account": "string",
"domain": "string",
"participant": "string"
},
"to": {
"account": "string",
"domain": "string",
"participant": "string"
},
"transferId": "string"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://{instance}/api/v2/propose',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/propose");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/propose", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/propose
Create a new manifest proposal and inject it into the ledger
Body parameter
{
"manifestId": "string",
"transfers": [
{
"amount": 0,
"assetId": "string",
"from": {
"account": "string",
"domain": "string",
"participant": "string"
},
"to": {
"account": "string",
"domain": "string",
"participant": "string"
},
"transferId": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sc | query | string | false | The settlement context |
body | body | Proposal | false | The proposal |
Example responses
201 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | ProposalResponse |
consensus
Consensus management
delete
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/consensus?swarmId=string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://{instance}/api/v2/consensus", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /api/v2/consensus
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | query | string | true | The Swarm ID of the consensus. |
Example responses
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
default | Default | default response | None |
Response Schema
get
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/consensus");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/consensus", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/consensus
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | query | string | false | The Swarm ID of the consensus. |
since | query | string | false | The duration, in ISO-8601 format, to search for consensus messages since. |
Example responses
default Response
[
{
"consensus": "string",
"finalisedAt": "2019-08-24T14:15:22Z",
"finalisedStatus": "APPROVED",
"receivedAt": "2019-08-24T14:15:22Z",
"swarmId": "string",
"tags": [
"string"
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
default | Default | default response | Inline |
Response Schema
Status Code default
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ConsensusDTO] | false | none | none |
» consensus | string | false | none | none |
» finalisedAt | string(date-time) | false | none | none |
» finalisedStatus | string | false | none | none |
» receivedAt | string(date-time) | false | none | none |
» swarmId | string | false | none | none |
» tags | [string] | false | none | none |
Enumerated Values
Property | Value |
---|---|
finalisedStatus | APPROVED |
finalisedStatus | REJECTED |
finalisedStatus | EXPIRED |
finalisedStatus | UNRECOGNIZED |
consensus_create
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = 'string';
const headers = {
'Content-Type':'application/json',
'Accept':'application/problem+json'
};
fetch('https://{instance}/api/v2/consensus',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/consensus");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/problem+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/consensus", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/consensus
Create an new consensus proposal.
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
sc | query | string | false | The settlement context |
body | body | string | false | The new consensus |
Example responses
400 Response
{
"detail": "string",
"instance": "string",
"status": 0,
"timestamp": "string",
"title": "string",
"type": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Consensus was submitted to the swarm | None |
400 | Bad Request | Invalid input | ErrorResponse |
consensus_approve
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/consensus/approve/{swarmId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/problem+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/consensus/approve/{swarmId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/consensus/approve/{swarmId}
Approve the consensus with the given swarm ID
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | path | string | true | The swarm ID of the consensus to approve |
Example responses
424 Response
{
"detail": "string",
"instance": "string",
"status": 0,
"timestamp": "string",
"title": "string",
"type": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The consensus was approved | None |
424 | Failed Dependency | The consensus was not found. Note that this may occur if another party has already voted. | ErrorResponse |
consensus_reject
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/consensus/reject/{swarmId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/problem+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/consensus/reject/{swarmId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/consensus/reject/{swarmId}
Reject the consensus with the given swarm ID
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
swarmId | path | string | true | The swarm ID of the consensus to approve |
Example responses
424 Response
{
"detail": "string",
"instance": "string",
"status": 0,
"timestamp": "string",
"title": "string",
"type": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The consensus was rejected | None |
424 | Failed Dependency | The consensus was not found. Note that this may occur if another party has already voted. | ErrorResponse |
approver-manifest
approver_manifest_get-all
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/approver/manifest");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/approver/manifest", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/approver/manifest
Get all manifest IDs
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All manifest IDs | Inline |
Response Schema
approver_manifest_get-all-details
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/approver/manifest-all");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/approver/manifest-all", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/approver/manifest-all
Get all manifests
Example responses
200 Response
[
{
"correlationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalised": true,
"finalisedAt": "2019-08-24T14:15:22Z",
"isAccepted": true,
"requestId": "string",
"swarmId": "string",
"transfers": [
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All manifests | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ManifestDTO] | false | none | [The manifest of a set of transfers.] |
» correlationId | string | false | none | Correlation ID assigned by the client, if any. |
» createdAt | string(date-time) | false | none | When this transaction was loaded into the database. |
» finalised | boolean | false | none | Is the manifest finalised? |
» finalisedAt | string(date-time) | false | none | Time at which the manifest was finalised, if it has been. |
» isAccepted | boolean | false | none | Was the manifest accepted, rejected, or is it still undecided?. This is not present or null if it is undecided. |
» requestId | string | false | none | Request ID assigned by the scheduler. |
» swarmId | string | false | none | Swarm ID assigned by the Ledger-Swarm. |
» transfers | [TransferDTO] | false | none | Transfers associated with this manifest. |
»» accountId | string | true | none | The account ID |
»» accountType | string | true | none | The account type |
»» amount | number | true | none | The amount being transferred. This will be a floating point number. |
»» assetId | string | true | none | The asset ID. |
»» createdAt | string(date-time) | true | none | When the transfer was loaded. This is an ISO-8601 format timestamp |
»» finalisedAt | string(date-time) | false | none | When the manifest was finalised, if it has been. |
»» id | integer(int64) | true | none | The database record ID |
»» isAccepted | boolean | false | none | Only present if the manifest is finalised. Was the manifest accepted? |
»» isFinalised | boolean | true | none | Has the manifest been finalised? |
»» manifestCorrelationId | string | true | none | The correlation ID associated with the manifest that contains the transfer. |
»» requestId | string | true | none | The request ID associated with the manifest that contains the transfer |
»» swarmId | string | true | none | The swarm ID associated with the manifest that contains the transfer |
»» tags | [string] | false | none | Tags assigned to this transfer |
»» transferCorrelationId | string | true | none | The correlation ID associated with the transfer |
approver_manifest_get
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/approver/manifest/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v2/approver/manifest/{id}
Get a specific manifest
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The ID of the manifest to retrieve |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The requested manifest | None |
approver_manifest_tags
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/approver/manifest/{id}/tags");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/approver/manifest/{id}/tags", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/approver/manifest/{id}/tags
Set tags on a manifest
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The ID of the manifest |
body | body | array[string] | false | The new tags |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
approver_manifest_transfer_tags
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '[
"string"
]';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/approver/manifest/{id}/{transfer}/tags',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/approver/manifest/{id}/{transfer}/tags");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/approver/manifest/{id}/{transfer}/tags", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/approver/manifest/{id}/{transfer}/tags
Set tags on a manifest
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The ID of the manifest |
transfer | path | integer(int32) | true | The index of the transfer |
body | body | array[string] | false | The new tags |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
approver_manifest_transfer_link_tags
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '[
"string"
]';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/approver/manifest/{id}/{transfer}/{link}/tags',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/approver/manifest/{id}/{transfer}/{link}/tags");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/approver/manifest/{id}/{transfer}/{link}/tags", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/approver/manifest/{id}/{transfer}/{link}/tags
Set tags on a link
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The ID of the manifest |
transfer | path | integer(int32) | true | The index of the transfer |
link | path | integer(int32) | true | The index of the link |
body | body | array[string] | false | The new tags |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
approver-rule
approver_rule_get-all
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/approver/rule");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/approver/rule", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/approver/rule
Get all ledger rules
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All rules | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [RuleDTO] | false | none | none |
» id | integer(int64) | false | none | none |
» name | string | true | none | The rule's name |
» priority | integer(int32) | false | none | The rule's priority (highest value first) |
» text | string | true | none | The rule. The rule is a JEXL script that returns one of ACCEPT, REJECT, MANUAL, or ABSTAIN. |
approver_rule_create
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"id": 0,
"name": "string",
"priority": 0,
"text": "string"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/approver/rule',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/approver/rule");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/approver/rule", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/approver/rule
Add a new ledger rule
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | RuleDTO | false | The new rule |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
approver_rule_delete
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/approver/rule/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
DELETE /api/v2/approver/rule/{id}
Delete a ledger rule
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the rule to delete |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | None |
router
Get all routes
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/router/route");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/router/route", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/router/route
Get all routes
Example responses
200 Response
[
{
"account": "string",
"asset": "string",
"domain": "string",
"id": 0,
"match": "/UK\\d{4}-\\w{6}/",
"participant": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All routes | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [RouteSpec] | false | none | none |
» account | string | true | none | The account to route via at the remote participant |
» asset | string | true | none | The asset to route. Empty string matches all. |
» domain | string | false | none | The domain to route to. Defaults to same domain as this participant. |
» id | integer(int64) | false | read-only | The ID of the route. |
» match | string | false | none | Regular expression or Literal to match the account. Empty string matches all. Defaults to matching all. The value is interpreted as a regular expression if it starts and ends with a solidus character ('/'). Both regular expressions and literals are matched against the entire account ID. For example: "UK01." matches only the account ID "UK1.". The dot and star are literals, not patterns. "/UK[0-9]{2}.*/" matches any account ID that starts with "UK" followed by two digits then any characters. |
» participant | string | true | none | The participant to route to. Required. |
Create a route
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"account": "string",
"asset": "string",
"domain": "string",
"match": "/UK\\d{4}-\\w{6}/",
"participant": "string"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/router/route',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/router/route");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/router/route", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/router/route
Create a route
Body parameter
{
"account": "string",
"asset": "string",
"domain": "string",
"match": "/UK\\d{4}-\\w{6}/",
"participant": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | RouteSpec | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The route that was created. | None |
Query for matching routes
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/router/route/query");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/router/route/query", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/router/route/query
Query for routes that match an account and asset
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
asset | query | string | false | The asset to route |
account | query | string | false | The account to route |
Example responses
200 Response
[
{
"account": "string",
"asset": "string",
"domain": "string",
"id": 0,
"match": "/UK\\d{4}-\\w{6}/",
"participant": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All matching routes | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [RouteSpec] | false | none | none |
» account | string | true | none | The account to route via at the remote participant |
» asset | string | true | none | The asset to route. Empty string matches all. |
» domain | string | false | none | The domain to route to. Defaults to same domain as this participant. |
» id | integer(int64) | false | read-only | The ID of the route. |
» match | string | false | none | Regular expression or Literal to match the account. Empty string matches all. Defaults to matching all. The value is interpreted as a regular expression if it starts and ends with a solidus character ('/'). Both regular expressions and literals are matched against the entire account ID. For example: "UK01." matches only the account ID "UK1.". The dot and star are literals, not patterns. "/UK[0-9]{2}.*/" matches any account ID that starts with "UK" followed by two digits then any characters. |
» participant | string | true | none | The participant to route to. Required. |
Delete a route
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/router/route/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/problem+json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://{instance}/api/v2/router/route/{id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /api/v2/router/route/{id}
Delete a route
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the route |
Example responses
424 Response
{
"detail": "string",
"instance": "string",
"status": 0,
"timestamp": "string",
"title": "string",
"type": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The route was deleted | None |
424 | Failed Dependency | The route does not exist | ErrorResponse |
Get a route
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/router/route/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v2/router/route/{id}
Get a route
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the route |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The route | None |
424 | Failed Dependency | The route does not exist | None |
Query for the route a transaction will take
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"manifestId": "string",
"transfers": [
{
"amount": 0,
"assetId": "string",
"from": {
"account": "string",
"domain": "string",
"participant": "string"
},
"to": {
"account": "string",
"domain": "string",
"participant": "string"
},
"transferId": "string"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://{instance}/api/v2/router',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/router");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://{instance}/api/v2/router", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v2/router
Query for the route a transaction will take
Body parameter
{
"manifestId": "string",
"transfers": [
{
"amount": 0,
"assetId": "string",
"from": {
"account": "string",
"domain": "string",
"participant": "string"
},
"to": {
"account": "string",
"domain": "string",
"participant": "string"
},
"transferId": "string"
}
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | Proposal | false | The transaction to test |
Example responses
200 Response
[
{
"account": "string",
"asset": "string",
"domain": "string",
"id": 0,
"match": "/UK\\d{4}-\\w{6}/",
"participant": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All matching routes | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [RouteSpec] | false | none | none |
» account | string | true | none | The account to route via at the remote participant |
» asset | string | true | none | The asset to route. Empty string matches all. |
» domain | string | false | none | The domain to route to. Defaults to same domain as this participant. |
» id | integer(int64) | false | read-only | The ID of the route. |
» match | string | false | none | Regular expression or Literal to match the account. Empty string matches all. Defaults to matching all. The value is interpreted as a regular expression if it starts and ends with a solidus character ('/'). Both regular expressions and literals are matched against the entire account ID. For example: "UK01." matches only the account ID "UK1.". The dot and star are literals, not patterns. "/UK[0-9]{2}.*/" matches any account ID that starts with "UK" followed by two digits then any characters. |
» participant | string | true | none | The participant to route to. Required. |
Get all observers
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/router/observer/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/router/observer/{id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/router/observer/{id}
Get an observer by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The id of the observer record |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All routes | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ObserverDTO] | false | none | none |
» id | integer(int64) | false | none | none |
» account | string | true | none | The the account to be observed |
» domain | string | true | none | the domain of the observer participant |
» participant | string | true | none | The participant observing |
Create a observer
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"account": "string",
"domain": "string",
"participant": "string"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v2/router/observer',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v2/router/observer");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v2/router/observer", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v2/router/observer
Create an observer
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | ObserverUpdate | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The observer that was created. | None |
Delete an observer
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/router/observer/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://{instance}/api/v2/router/observer/{id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /api/v2/router/observer/{id}
Delete an observer by id
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The id of the observer record |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All routes | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ObserverDTO] | false | none | none |
» id | integer(int64) | false | none | none |
» account | string | true | none | The the account to be observed |
» domain | string | true | none | the domain of the observer participant |
» participant | string | true | none | The participant observing |
Query observers
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v2/router/observer/query");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v2/router/observer/query", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v2/router/observer/query
Query observers
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
account | query | string | false | the account being observed |
domain | query | string | false | the domain of the observer |
participant | query | string | false | the participant observing |
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | All routes | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ObserverDTO] | false | none | none |
» id | integer(int64) | false | none | none |
» account | string | true | none | The the account to be observed |
» domain | string | true | none | the domain of the observer participant |
» participant | string | true | none | The participant observing |
account-type
v3_account-type_create
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
const inputBody = '{
"amount": 0,
"isDelta": true,
"reason": "string"
}';
const headers = {
'Content-Type':'application/json'
};
fetch('https://{instance}/api/v3/account-type',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
URL obj = new URL("https://{instance}/api/v3/account-type");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://{instance}/api/v3/account-type", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /api/v3/account-type
Create an account type. Note: Account types are immutable once created.
Body parameter
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | AccountBalanceUpdate | false | The authentication request |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Account type was created | None |
204 | No Content | Account type existed already, but matched the specification provided. | None |
409 | Conflict | Account type already existed and differs from the specification. It cannot be changed nor deleted now. | None |
v3_account-type_get
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/account-type/{accountType}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v3/account-type/{accountType}
Get an account type
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
accountType | path | string | true | The account type |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account type fetched | None |
424 | Failed Dependency | Account type did not exist. | None |
nostro-vostro
v3_nostro-vostro
Warning
You need to include a basic Authorization header in the code examples below
replace {instance} with the name of your instance
Code samples
URL obj = new URL("https://{instance}/api/v3/nostro-vostro");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://{instance}/api/v3/nostro-vostro", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /api/v3/nostro-vostro
Get all account IDs.
Example responses
200 Response
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | List of account N-V mappings | Inline |
Response Schema
Schemas
AccountBalanceUpdate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
amount | number | false | none | none |
isDelta | boolean | false | none | none |
reason | string | false | none | none |
ObserverUpdate
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
account | string | false | none | none |
domain | string | false | none | none |
participant | string | false | none | none |
AccountDTO
{
"accountId": "string",
"accountType": "string",
"assetId": "string",
"balances": [
{
"amount": 0,
"label": "string"
}
],
"external": true,
"hotBalance": 0,
"lastProposalAt": "2019-08-24T14:15:22Z",
"lastSettledAt": "2019-08-24T14:15:22Z",
"liability": true,
"settledBalance": 0
}
An account and asset combination
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accountId | string | false | none | The account ID |
accountType | string | false | none | The account's type. This is part of the accounts full identifier. |
assetId | string | false | none | The asset ID |
balances | [BalanceDTO] | false | none | The balances associated with the account. |
external | boolean | false | none | none |
hotBalance | number | false | none | The 'hot' balance, which assumes all pending transactions succeed. (A floating point number). May be null if the ledger implementation does not support it. |
lastProposalAt | string(date-time) | false | none | Time of the last proposed transaction or finalisation. |
lastSettledAt | string(date-time) | false | none | The time of the last settled balance update. |
liability | boolean | false | none | none |
settledBalance | number | false | none | The 'settled' balance, which ignores all pending transactions. (A floating point number). May be null if the ledger implementation does not support it. |
AccountId
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accountId | string | false | none | The account ID |
accountType | string | false | none | The account type |
AccountTypeDTO
An account type
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
external | boolean | false | none | none |
liability | boolean | false | none | none |
name | string | false | none | The unique name of the account type |
AuthRequest
Pass username and password to the login API to retrieve a bearer token
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
password | string | true | none | The password |
userName | string | true | none | The user name |
AuthResponse
Response to an authorisation request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
flags | [NamedFlag] | false | none | A list of tags that indicate the capabilities of the user |
token | string | false | none | A JWT token for use as a bearer authorisation |
BalanceDTO
The balances associated with the account.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
amount | number | false | none | The amount of the balance, if available |
label | string | false | none | The label for this balance type |
BalanceData
{
"accountId": "string",
"assetId": "string",
"balances": [
{
"amount": 0,
"label": "string"
}
],
"hotBalance": 0,
"settledBalance": 0
}
The balance data, if available.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accountId | string | false | none | The account ID |
assetId | string | false | none | The asset ID |
balances | [BalanceDTO] | false | none | The balances associated with the account. |
hotBalance | number | false | none | The 'hot' balance, which assumes all pending transactions succeed. (A floating point number). May be null if the ledger implementation does not support it. |
settledBalance | number | false | none | The 'settled' balance, which ignores all pending transactions. (A floating point number). May be null if the ledger implementation does not support it. |
ConsensusDTO
{
"consensus": "string",
"finalisedAt": "2019-08-24T14:15:22Z",
"finalisedStatus": "APPROVED",
"receivedAt": "2019-08-24T14:15:22Z",
"swarmId": "string",
"tags": [
"string"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
consensus | string | false | none | none |
finalisedAt | string(date-time) | false | none | none |
finalisedStatus | string | false | none | none |
receivedAt | string(date-time) | false | none | none |
swarmId | string | false | none | none |
tags | [string] | false | none | none |
Enumerated Values
Property | Value |
---|---|
finalisedStatus | APPROVED |
finalisedStatus | REJECTED |
finalisedStatus | EXPIRED |
finalisedStatus | UNRECOGNIZED |
ErrorResponse
{
"detail": "string",
"instance": "string",
"status": 0,
"timestamp": "string",
"title": "string",
"type": "string"
}
An RFC-9457 standard error response.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
detail | string | false | none | Human-readable explanation specific to this occurrence of the problem. |
instance | string | false | none | A URI reference that identifies the specific occurrence of the problem. |
status | integer(int32) | false | none | The HTTP status code. |
timestamp | string | false | none | The time the error occurred. |
title | string | false | none | A short human-readable summary of the problem. |
type | string | false | none | A URI reference that identifies the problem type. |
HttpMethod
Properties
None
HttpStatusCode
{
"error": true,
"is1xxInformational": true,
"is2xxSuccessful": true,
"is3xxRedirection": true,
"is4xxClientError": true,
"is5xxServerError": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error | boolean | false | none | none |
is1xxInformational | boolean | false | none | none |
is2xxSuccessful | boolean | false | none | none |
is3xxRedirection | boolean | false | none | none |
is4xxClientError | boolean | false | none | none |
is5xxServerError | boolean | false | none | none |
KafkaHeaderDTO
A header on a Kafka message
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | The name of the header |
textValue | string | false | none | The value of the header as a string |
KafkaRecordDTO
{
"correlationId": "string",
"envelopeText": "string",
"headers": [
{
"name": "string",
"textValue": "string"
}
],
"receivedAt": "2019-08-24T14:15:22Z",
"recordKey": "string",
"requestId": "string",
"swarmId": "string",
"type": "string"
}
A Kafka message with standard LedgerSwarm headers
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
correlationId | string | false | none | The correlation ID of the message |
envelopeText | string | false | none | Textual representation of the Kafka message, assuming it contained a LedgerSwarm Envelope. |
headers | [KafkaHeaderDTO] | false | none | The headers on the message |
receivedAt | string(date-time) | false | none | The time the message was received |
recordKey | string | false | none | The Kafka record key of the message |
requestId | string | false | none | The request ID associated with the message. |
swarmId | string | false | none | The swarm ID associated with the message. |
type | string | false | none | The type of the message. |
LinkDTO
{
"account": {
"accountId": "string",
"accountType": "string",
"assetId": "string",
"balances": [
{
"amount": 0,
"label": "string"
}
],
"external": true,
"hotBalance": 0,
"lastProposalAt": "2019-08-24T14:15:22Z",
"lastSettledAt": "2019-08-24T14:15:22Z",
"liability": true,
"settledBalance": 0
},
"action": "UNKNOWN",
"index": 0,
"tags": [
"string"
]
}
Links that constitute this transfer.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
account | AccountDTO | false | none | An account and asset combination |
action | string | false | none | none |
index | integer(int32) | false | none | The index of this link in the transfer |
tags | [string] | false | none | Tags assigned to this link |
Enumerated Values
Property | Value |
---|---|
action | UNKNOWN |
action | DEBIT |
action | CREDIT |
action | UNRECOGNIZED |
ManifestDTO
{
"correlationId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalised": true,
"finalisedAt": "2019-08-24T14:15:22Z",
"isAccepted": true,
"requestId": "string",
"swarmId": "string",
"transfers": [
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
]
}
The manifest of a set of transfers.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
correlationId | string | false | none | Correlation ID assigned by the client, if any. |
createdAt | string(date-time) | false | none | When this transaction was loaded into the database. |
finalised | boolean | false | none | Is the manifest finalised? |
finalisedAt | string(date-time) | false | none | Time at which the manifest was finalised, if it has been. |
isAccepted | boolean | false | none | Was the manifest accepted, rejected, or is it still undecided?. This is not present or null if it is undecided. |
requestId | string | false | none | Request ID assigned by the scheduler. |
swarmId | string | false | none | Swarm ID assigned by the Ledger-Swarm. |
transfers | [TransferDTO] | false | none | Transfers associated with this manifest. |
NV
{
"nostro": {
"accountId": "string",
"accountType": "string"
},
"vostro": {
"accountId": "string",
"domain": "string",
"participantId": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
nostro | AccountId | false | none | none |
vostro | VostroId | false | none | none |
NamedFlag
A flag that indicates the capabilities of the user
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
name | string | false | none | Name of the flag |
value | boolean | false | none | Value of the flag |
NewPassword
Input to a user's password change request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
newPassword | string | true | none | The new password |
oldPassword | string | true | none | The old password. Must be specified to prevent abuse of leaked bearer token. |
PacsResponse
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error | string | false | none | none |
manifestId | string | false | none | none |
status | string | false | none | none |
Party
A party in the proposed transfer
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
account | string | true | none | The account ID |
domain | string | true | none | The participant's domain |
participant | string | true | none | The participant's ID |
PingResponse
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
timestamp | string(date-time) | false | none | none |
user | string | false | none | none |
PropertiesResponse
{
"context": "string",
"instance": "string",
"domain": "string",
"id": "string",
"cluster": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
context | string | false | none | none |
instance | string | false | none | none |
domain | string | false | none | none |
id | string | false | none | none |
cluster | string | false | none | none |
Proposal
{
"manifestId": "string",
"transfers": [
{
"amount": 0,
"assetId": "string",
"from": {
"account": "string",
"domain": "string",
"participant": "string"
},
"to": {
"account": "string",
"domain": "string",
"participant": "string"
},
"transferId": "string"
}
]
}
A new proposal
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
manifestId | string | false | none | The proposal's correlation ID. This becomes the manifest correlation ID. |
transfers | [ProposedTransfer] | true | none | The new transfers |
ProposalResponse
The ID of the manifest and transfers proposed
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
manifestId | string | false | none | The ID of the manifest proposed |
transferIds | [string] | false | none | The IDs of the transfers proposed |
ProposedTransfer
{
"amount": 0,
"assetId": "string",
"from": {
"account": "string",
"domain": "string",
"participant": "string"
},
"to": {
"account": "string",
"domain": "string",
"participant": "string"
},
"transferId": "string"
}
A proposed transfer within the proposal
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
amount | number | true | none | none |
assetId | string | true | none | none |
from | Party | false | none | A party in the proposed transfer |
to | Party | false | none | A party in the proposed transfer |
transferId | string | false | none | none |
RouteSpec
{
"account": "string",
"asset": "string",
"domain": "string",
"id": 0,
"match": "/UK\\d{4}-\\w{6}/",
"participant": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
account | string | true | none | The account to route via at the remote participant |
asset | string | true | none | The asset to route. Empty string matches all. |
domain | string | false | none | The domain to route to. Defaults to same domain as this participant. |
id | integer(int64) | false | read-only | The ID of the route. |
match | string | false | none | Regular expression or Literal to match the account. Empty string matches all. Defaults to matching all. The value is interpreted as a regular expression if it starts and ends with a solidus character ('/'). Both regular expressions and literals are matched against the entire account ID. For example: "UK01." matches only the account ID "UK1.". The dot and star are literals, not patterns. "/UK[0-9]{2}.*/" matches any account ID that starts with "UK" followed by two digits then any characters. |
participant | string | true | none | The participant to route to. Required. |
RuleDTO
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | integer(int64) | false | none | none |
name | string | true | none | The rule's name |
priority | integer(int32) | false | none | The rule's priority (highest value first) |
text | string | true | none | The rule. The rule is a JEXL script that returns one of ACCEPT, REJECT, MANUAL, or ABSTAIN. |
ObserverDTO
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | integer(int64) | false | none | none |
account | string | true | none | The the account to be observed |
domain | string | true | none | the domain of the observer participant |
participant | string | true | none | The participant observing |
StandardAccountId
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accountId | string | true | none | The account ID |
accountType | string | true | none | The account type |
TransferDTO
{
"accountId": "string",
"accountType": "string",
"amount": 0,
"assetId": "string",
"createdAt": "2019-08-24T14:15:22Z",
"finalisedAt": "2019-08-24T14:15:22Z",
"id": 0,
"isAccepted": true,
"isFinalised": true,
"manifestCorrelationId": "string",
"requestId": "string",
"swarmId": "string",
"tags": [
"string"
],
"transferCorrelationId": "string"
}
A credit or debit resulting from a transfer
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accountId | string | true | none | The account ID |
accountType | string | true | none | The account type |
amount | number | true | none | The amount being transferred. This will be a floating point number. |
assetId | string | true | none | The asset ID. |
createdAt | string(date-time) | true | none | When the transfer was loaded. This is an ISO-8601 format timestamp |
finalisedAt | string(date-time) | false | none | When the manifest was finalised, if it has been. |
id | integer(int64) | true | none | The database record ID |
isAccepted | boolean | false | none | Only present if the manifest is finalised. Was the manifest accepted? |
isFinalised | boolean | true | none | Has the manifest been finalised? |
manifestCorrelationId | string | true | none | The correlation ID associated with the manifest that contains the transfer. |
requestId | string | true | none | The request ID associated with the manifest that contains the transfer |
swarmId | string | true | none | The swarm ID associated with the manifest that contains the transfer |
tags | [string] | false | none | Tags assigned to this transfer |
transferCorrelationId | string | true | none | The correlation ID associated with the transfer |
UserData
A user
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
admin | boolean | false | none | Is the user an administrator? Defaults to false if omitted. |
userName | string | true | none | The user's name. |
UserUpdate
Input to updating a user
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
isAdmin | boolean | false | none | If specified, change the user from an administrator to a regular user and back again. |
password | string | false | none | If specified, change the user's password. Note: this field is required when creating a new user. |
VostroId
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
accountId | string | false | none | none |
domain | string | false | none | none |
participantId | string | false | none | none |