Spend caps
Read and set your organization's spend caps, and resume paid work after a cap has stopped it.
x-api-key<token>A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.
The org's spending caps, their current state, and the live spend in each window
application/json- response
platform*curl -X GET 'https://api.nuvelics.com/api/tenant/v1/spend-caps'{ "platform": { "dailyCapMicroUsd": 0, "weeklyCapMicroUsd": 0, "monthlyCapMicroUsd": 0, "resumePolicy": "auto", "state": { "status": "running", "trippedWindow": "day", "resetsAt": "2019-08-24T14:15:22Z" }, "windows": { "day": { "spentMicroUsd": 0, "windowStartsAt": "2019-08-24T14:15:22Z", "windowResetsAt": "2019-08-24T14:15:22Z" }, "week": { "spentMicroUsd": 0, "windowStartsAt": "2019-08-24T14:15:22Z", "windowResetsAt": "2019-08-24T14:15:22Z" }, "month": { "spentMicroUsd": 0, "windowStartsAt": "2019-08-24T14:15:22Z", "windowResetsAt": "2019-08-24T14:15:22Z" } } }}x-api-key<token>A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.
application/json- body
platform*Caps saved and applied; carries the state the save produced
application/json- response
platform*curl -X PUT 'https://api.nuvelics.com/api/tenant/v1/spend-caps' \ -H 'Content-Type: application/json' \ -d '{ "platform": { "dailyCapMicroUsd": 0, "weeklyCapMicroUsd": 0, "monthlyCapMicroUsd": 0, "resumePolicy": "auto" }}'{ "platform": { "dailyCapMicroUsd": 0, "weeklyCapMicroUsd": 0, "monthlyCapMicroUsd": 0, "resumePolicy": "auto", "state": { "status": "running", "trippedWindow": "day", "resetsAt": "2019-08-24T14:15:22Z" } }}x-api-key<token>A service key (nvs_...) in the x-api-key header. A service key belongs to one organization: an X-Org-Id header is optional and, when sent, must name that organization. This header also accepts any credential the bearer scheme does, and when a request sends both headers, this one is used.
Spending resumed (or already running)
application/json- response
platform*curl -X POST 'https://api.nuvelics.com/api/tenant/v1/spend-caps/resume'{ "platform": { "dailyCapMicroUsd": 0, "weeklyCapMicroUsd": 0, "monthlyCapMicroUsd": 0, "resumePolicy": "auto", "state": { "status": "running", "trippedWindow": "day", "resetsAt": "2019-08-24T14:15:22Z" } }}