Skip to content

Reference

API: Rankings

Markdown version

MethodPathWhat it doesScope
GET/v1/rankingsPublic rankings: the most used models and the apps that send attribution headers, by tokens, over a day, a week or a month (no sign-in)—
GET/v1/settings/rankingsWhether your organization's traffic counts in the public rankingssettings:read
PUT/v1/settings/rankingsKeep your organization's traffic out of the public rankings (owners). Agents may opt out; opting back in is done by a person.settings:write

Examples

GET /v1/rankings

Public rankings: the most used models and the apps that send attribution headers, by tokens, over a day, a week or a month. No sign-in, so it sends no key.

curl -s "https://manage.restolayer.com/v1/rankings"
const res = await fetch(`https://manage.restolayer.com/v1/rankings`, {
  method: "GET",
});
const data = await res.json();

GET /v1/settings/rankings

Whether your organization's traffic counts in the public rankings

curl -s "https://manage.restolayer.com/v1/settings/rankings" \
  -H "Authorization: Bearer $LG_API_KEY"
const res = await fetch(`https://manage.restolayer.com/v1/settings/rankings`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.LG_API_KEY}` },
});
const data = await res.json();

PUT /v1/settings/rankings

Keep your organization's traffic out of the public rankings (owners). Agents may opt out; opting back in is done by a person.

curl -s -X PUT "https://manage.restolayer.com/v1/settings/rankings" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://manage.restolayer.com/v1/settings/rankings`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.LG_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.restolayer.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.