Skip to content

Read an AWS account's bill by region, its Cost Explorer charge said before you accept

What you can call today

Every example here runs against api.xovris.ai with a key from your account’s settings. GET /v1/health and GET /v1/public/status answer without one.

POST
/v1/cloud/connections/{id}/bill/regions
curl --request POST \  --url https://api.xovris.ai/v1/cloud/connections/example/bill/regions \  --header 'Authorization: Bearer <token>' \  --header 'Content-Type: application/json' \  --data '{ "accept": null, "days": null }'

Needs a token that can read and change. A token without change access is refused with token_read_only and the step to take.

id
required
string
Media typeapplication/json
object
accept
days

Example

{  "accept": null,  "days": null}

Done.

Media typeapplication/json
object
bill
required
object
from
required
string
to
required
string
currency
required
string
regions
required
Array<object>
object
region
required
One of:
string
amount
required
number
days
required
Array<object>
object
day
required
string
total
required
number
byRegion
required
object
key
additional properties
number
requests
required
number
estimated
required
boolean
charged
required
object
requests
required
number
usd
required
number

Example

{  "bill": {    "from": "string",    "to": "string",    "currency": "string",    "regions": [      {        "region": "string",        "amount": 1      }    ],    "days": [      {        "day": "string",        "total": 1,        "byRegion": {}      }    ],    "requests": 1,    "estimated": true  },  "charged": {    "requests": 1,    "usd": 1  }}

Not signed in: the token is missing, expired or revoked. The answer says how to get a new one.

Media typeapplication/json
object
error
required
object
code
required

A stable code a program can branch on.

string
message
required

What happened, in plain words.

string
nextStep
required

What to do next.

string
decisionId

The recorded authorisation decision, when a role refused it.

string

Example generated

{  "error": {    "code": "example",    "message": "example",    "nextStep": "example",    "decisionId": "example"  }}

Signed in, but this token or role may not do this. The answer names the permission it needs.

Media typeapplication/json
object
error
required
object
code
required

A stable code a program can branch on.

string
message
required

What happened, in plain words.

string
nextStep
required

What to do next.

string
decisionId

The recorded authorisation decision, when a role refused it.

string

Example generated

{  "error": {    "code": "example",    "message": "example",    "nextStep": "example",    "decisionId": "example"  }}

Nothing with that id here, or it belongs to another workspace. Nothing was changed.

Media typeapplication/json
object
error
required
object
code
required

A stable code a program can branch on.

string
message
required

What happened, in plain words.

string
nextStep
required

What to do next.

string
decisionId

The recorded authorisation decision, when a role refused it.

string

Example generated

{  "error": {    "code": "example",    "message": "example",    "nextStep": "example",    "decisionId": "example"  }}

Any other refusal or failure. The answer says what happened and what to do next.

Media typeapplication/json
object
error
required
object
code
required

A stable code a program can branch on.

string
message
required

What happened, in plain words.

string
nextStep
required

What to do next.

string
decisionId

The recorded authorisation decision, when a role refused it.

string

Example generated

{  "error": {    "code": "example",    "message": "example",    "nextStep": "example",    "decisionId": "example"  }}

Ask Xovris

Open the full page

Your data is never used to train our AI. How your data is kept

A problem is called fixed only once it works again. How each fix is checked

XOVRIS LTD, registered in England and Wales, company number 17499910. Registered office: 66 Paul Street, London EC2A 4NA.