Get a policy
curl --request GET \
--url https://api.anchorage-staging.com/v4/policies/{policyId} \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v4/policies/{policyId}"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v4/policies/{policyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"name": "<string>",
"target": {
"resourceType": "ACCOUNT",
"resourceIds": [
"3486b413-93d3-4447-afce-2b9c9dc34a32"
],
"actionTypes": [
"WITHDRAWAL"
]
},
"requiredActions": {
"description": "<string>",
"allOf": "<array>",
"anyOf": "<array>",
"approvals": {
"description": "<string>",
"approvalGroupId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"count": 2,
"allOf": "<array>",
"anyOf": "<array>"
},
"deny": true,
"allow": true,
"settings": {
"expiresIn": "P14D"
}
},
"description": "<string>",
"conditions": {
"description": "<string>",
"allOf": "<array>",
"anyOf": "<array>",
"not": "<unknown>",
"assetType": "BTC",
"amount": {
"minInclusive": "<string>"
},
"cumulativeAmount": {
"value": "<string>",
"period": "<string>"
}
},
"id": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"status": "PENDING_APPROVAL",
"createdAt": "2019-01-02T12:34:56.000Z",
"archivedAt": "2019-01-02T12:34:56.000Z"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Get a policy
Fetch a single policy by id.
GET
/
policies
/
{policyId}
Get a policy
curl --request GET \
--url https://api.anchorage-staging.com/v4/policies/{policyId} \
--header 'Api-Access-Key: <api-key>'import requests
url = "https://api.anchorage-staging.com/v4/policies/{policyId}"
headers = {"Api-Access-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Access-Key': '<api-key>'}};
fetch('https://api.anchorage-staging.com/v4/policies/{policyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"name": "<string>",
"target": {
"resourceType": "ACCOUNT",
"resourceIds": [
"3486b413-93d3-4447-afce-2b9c9dc34a32"
],
"actionTypes": [
"WITHDRAWAL"
]
},
"requiredActions": {
"description": "<string>",
"allOf": "<array>",
"anyOf": "<array>",
"approvals": {
"description": "<string>",
"approvalGroupId": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"count": 2,
"allOf": "<array>",
"anyOf": "<array>"
},
"deny": true,
"allow": true,
"settings": {
"expiresIn": "P14D"
}
},
"description": "<string>",
"conditions": {
"description": "<string>",
"allOf": "<array>",
"anyOf": "<array>",
"not": "<unknown>",
"assetType": "BTC",
"amount": {
"minInclusive": "<string>"
},
"cumulativeAmount": {
"value": "<string>",
"period": "<string>"
}
},
"id": "3486b413-93d3-4447-afce-2b9c9dc34a32",
"status": "PENDING_APPROVAL",
"createdAt": "2019-01-02T12:34:56.000Z",
"archivedAt": "2019-01-02T12:34:56.000Z"
}
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}{
"message": "Missing required field 'amount'."
}Was this page helpful?