Get usage snapshot for a limit
curl --request GET \
--url https://tracer.sandbox.lerian.net/v1/limits/{id}/usage \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://tracer.sandbox.lerian.net/v1/limits/{id}/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://tracer.sandbox.lerian.net/v1/limits/{id}/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://tracer.sandbox.lerian.net/v1/limits/{id}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"currentUsage": "500.00",
"limitAmount": "1000.00",
"limitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nearLimit": false,
"utilizationPercent": 50,
"resetAt": "2023-11-07T05:31:56Z"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Get usage snapshot for a limit
Use this endpoint to retrieve the current usage snapshot for a spending limit.
GET
/
v1
/
limits
/
{id}
/
usage
Get usage snapshot for a limit
curl --request GET \
--url https://tracer.sandbox.lerian.net/v1/limits/{id}/usage \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://tracer.sandbox.lerian.net/v1/limits/{id}/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://tracer.sandbox.lerian.net/v1/limits/{id}/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://tracer.sandbox.lerian.net/v1/limits/{id}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"currentUsage": "500.00",
"limitAmount": "1000.00",
"limitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"nearLimit": false,
"utilizationPercent": 50,
"resetAt": "2023-11-07T05:31:56Z"
}{
"code": "ERR-0001",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Authorizations
BearerAuthApiKeyAuth
JWT bearer token issued by the identity provider.
Path Parameters
Limit ID (UUID)
Was this page helpful?

