Query organization inventory
POST
/graphql
const url = 'https://api.datacenter.butlr.io/graphql';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"query":"query Inventory { orgs { id name } dataHalls { id name } }"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.datacenter.butlr.io/graphql \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "query": "query Inventory { orgs { id name } dataHalls { id name } }" }'Run a GraphQL query scoped to the organization bound to the token. GraphQL mutations are rejected.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
query
required
string
operationName
string | null
variables
object | null
Example
{ "query": "query Inventory { orgs { id name } dataHalls { id name } }"}Responses
Section titled “Responses”GraphQL response
Media typeapplication/json
object
data
object | null
errors
Array<object>
object
key
additional properties
any
key
additional properties
any
Example generated
{ "data": "example", "errors": [ {} ]}Missing, invalid, expired, or revoked token
Media typeapplication/json
object
message
string
key
additional properties
any
Example generated
{ "message": "example"}Route, operation, or resource is outside the token’s read-only organization scope
Media typeapplication/json
object
message
string
key
additional properties
any
Example generated
{ "message": "example"}Request rate exceeded; honor Retry-After
Media typeapplication/json
object
message
string
key
additional properties
any
Example generated
{ "message": "example"}