Skip to content

Get API limits

By , Head of IntegrationsUpdated

Open this page in a new chat

Short answer

Get API limits with GET /v2/account/limits. Use this method to check the allowed number of API requests and the number of requests used in the past 60 minutes. Each call needs a bearer token and counts towards your hourly API limit.

After reading this you will know

  • How to get API limits
  • Which parameters it takes
  • Sample code in 9 languages and a sample answer

This command needs a bearer token and counts towards your hourly limit.

GEThttps://api.sirv.com/v2/account/limits

Use this method to check the allowed number of API requests and the number of requests used in the past 60 minutes.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/account/limits', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"s3:global": {
"count": 0,
"limit": 7000,
"remaining": 7000,
"reset": 1771859252
},
"s3:PUT": {
"count": 0,
"limit": 2000,
"remaining": 2000,
"reset": 1771859252
},
"s3:GET": {
"count": 0,
"limit": 3000,
"remaining": 3000,
"reset": 1771859252
},
"s3:DELETE": {
"count": 0,
"limit": 3000,
"remaining": 3000,
"reset": 1771859252
},
"rest:global": {
"count": 64,
"limit": 7000,
"remaining": 6936,
"reset": 1771858410
},
"rest:post:files:search": {
"count": 1,
"limit": 1000,
"remaining": 999,
"reset": 1771858422
},
"rest:post:files:search:scroll": {
"count": 0,
"limit": 2000,
"remaining": 2000,
"reset": 1771859252
},
"rest:post:files:video2spin": {
"count": 1,
"limit": 200,
"remaining": 199,
"reset": 1771858423
},
"rest:post:files:spin2video": {
"count": 1,
"limit": 200,
"remaining": 199,
"reset": 1771858426
},
"rest:post:files:upload": {
"count": 0,
"limit": 2000,
"remaining": 2000,
"reset": 1771859252
},
"rest:post:files:delete": {
"count": 1,
"limit": 3000,
"remaining": 2999,
"reset": 1771858504
},
"rest:post:files:batch:delete": {
"count": 1,
"limit": 25,
"remaining": 24,
"reset": 1771858518
},
"rest:post:account": {
"count": 2,
"limit": 50,
"remaining": 48,
"reset": 1771858410
},
"rest:post:account:fetching": {
"count": 0,
"limit": 50,
"remaining": 50,
"reset": 1771859252
},
"rest:get:stats:http": {
"count": 1,
"limit": 100,
"remaining": 99,
"reset": 1771858419
},
"rest:get:stats:storage": {
"count": 1,
"limit": 100,
"remaining": 99,
"reset": 1771858420
},
"rest:post:account:new": {
"count": 0,
"limit": 5,
"remaining": 5,
"reset": 1771859252
},
"rest:post:user:accounts": {
"count": 0,
"limit": 20,
"remaining": 20,
"reset": 1771859252
},
"rest:get:rest:credentials": {
"count": 0,
"limit": 50,
"remaining": 50,
"reset": 1771859252
},
"rest:post:video:toSpin": {
"count": 0,
"limit": 400,
"remaining": 400,
"reset": 1771859252
},
"rest:post:upload:toSirv": {
"count": 0,
"limit": 2000,
"remaining": 2000,
"reset": 1595076350
},
"ftp:global": {
"count": 0,
"limit": 10000,
"remaining": 10000,
"reset": 1771859252
},
"ftp:STOR": {
"count": 0,
"limit": 2000,
"remaining": 2000,
"reset": 1771859252
},
"ftp:RETR": {
"count": 0,
"limit": 3000,
"remaining": 3000,
"reset": 1771859252
},
"ftp:DELE": {
"count": 0,
"limit": 3000,
"remaining": 3000,
"reset": 1771859252
},
"fetch:file": {
"count": 2,
"limit": 1000,
"remaining": 998,
"reset": 1771858429
},
"fetch:largefile": {
"count": 0,
"limit": 10,
"remaining": 10,
"reset": 1771859252
},
"fetch:largetimeout": {
"count": 0,
"limit": 10,
"remaining": 10,
"reset": 1771859252
},
"zips2:create": {
"count": 276737,
"limit": 536870912000,
"remaining": 536870635263,
"reset": 1771858513
}
}
Back to top