Labels
This method returns the account's labels.
If you've set up your API Key when initializing your LAM, you'll need to include it as a header along with the api user header. For more details, see step 5 of the get started documentation.
(required) Username of a registered API User
The account's ID
Account object
Account not found
GET /accounts/{account_id}/labels HTTP/1.1
Host:
X-Ledger-API-Key: YOUR_API_KEY
X-Ledger-API-User: YOUR_API_KEY
Accept: */*
[
{
"id": 1,
"info": {
"color": "#fe3423",
"description": "Flag resources as potentially harmfull"
},
"name": "SPAM"
}
]This post endpoint set the Label matching the ID passed in the payload to the Account matching the ID passed in the url
If you've set up your API Key when initializing your LAM, you'll need to include it as a header along with the api user header. For more details, see step 5 of the get started documentation.
(required) Username of a registered API User
The account's ID
ID of the label to add to the resource
42Whether or not the Label has been successfully attached
Account or Label does not exist
POST /accounts/{account_id}/labels HTTP/1.1
Host:
X-Ledger-API-Key: YOUR_API_KEY
X-Ledger-API-User: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"label_id": 42
}{
"success": true
}This post endpoint remove the Label from the account matching the IDs passed in url
If you've set up your API Key when initializing your LAM, you'll need to include it as a header along with the api user header. For more details, see step 5 of the get started documentation.
(required) Username of a registered API User
The account's ID
The label's ID
Whether or not the Label has been successfully removed
Account or Label does not exist
DELETE /accounts/{account_id}/labels/{label_id} HTTP/1.1
Host:
X-Ledger-API-Key: YOUR_API_KEY
X-Ledger-API-User: YOUR_API_KEY
Accept: */*
{
"success": true
}