Forming Calls
Was this helpful?
Was this helpful?
Once your account is provisioned, an account admin can grant individuals developer
access via your account settings page. Users with developer
permissions will then have the ability to issue an API key for themselves and gain access to our API Explorer.
The API key that is granted to a user issues queries and mutations under that user's roles and permissions.
While a typical REST endpoint has multiple endpoints, the GraphQL API has a single endpoint: https://app.arize.com/graphql
Because GraphQL operations consist of complex, nested structures, we recommend using the to make GraphQL calls. You can also use cURL or any other HTTP-speaking library.
In REST, HTTP determine the operation performed. In GraphQL, you'll provide a JSON-encoded body whether you're performing a query or a mutation, so the HTTP verb is POST
.
To query GraphQL using cURL, make a POST
request with a JSON payload. The payload must contain a string called query
:
As you can see, GraphQL is simply an HTTP POST
and does not require any particular library. However, we highly recommend you use a as it can vastly improve your developer experience.
In our tutorials we will make use of the following clients in our script examples:
The two types of allowed operations in Arize's GraphQL API are queries and mutations. Comparing GraphQL to REST, queries operate like GET
requests, while mutations operate like POST
/PATCH
/DELETE
. The mutation name determines which modification is executed.
For information about rate limiting, please consult our resource limitations guide.
Queries and mutations share similar forms, with some important differences.
Queries are structured like this:
Here is a simple example of how to pull your information
Python:
JavaScript:
GraphQL queries return only the data you specify. To form a query, you must specify fields within fields (also known as nested subfields) until you return only .
Having trouble? Reach out to us via email or in the #arize-support channel for more support.