Count total ledgers
curl --request HEAD \
--url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count"
req, _ := http.NewRequest("HEAD", 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: 'HEAD', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count"
headers = {"Authorization": "Bearer <token>"}
response = requests.head(url, headers=headers)
print(response.text)Count total ledgers
deprecated
Returns the total in the X-Total-Count header with an empty 204 body. Deleted items are not counted.
HEAD
/
v1
/
organizations
/
{organization_id}
/
ledgers
/
metrics
/
count
Count total ledgers
curl --request HEAD \
--url https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count"
req, _ := http.NewRequest("HEAD", 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: 'HEAD', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ledger.sandbox.lerian.net/v1/organizations/{organization_id}/ledgers/metrics/count"
headers = {"Authorization": "Bearer <token>"}
response = requests.head(url, headers=headers)
print(response.text)¿Esta página le ayudó?

