> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Forming Calls

### Authentication

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.

<Info>
  The Arize GraphQL API is available to enterprise-grade customers. To upgrade your account contact [support@arize.com](mailto://support@arize.com)
</Info>

### The GraphQL endpoint

While a typical REST endpoint has multiple endpoints, the GraphQL API has a single endpoint: `https://app.arize.com/graphql`

### Communicating with GraphQL

Because GraphQL operations consist of complex, nested structures, we recommend using the [Explorer](https://app.arize.com/graphql) 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`:

```javascript theme={null}
curl -H "x-api-key: graphql_api_key" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{ "query": "query { viewer { user { name } }}" }' \
  https://app.arize.com/graphql
```

<Info>
  **Note**: The string value `"query"` must escape newline characters or the schema will not parse it correctly. For the `POST` body, use outer double quotes and escaped inner double quotes.
</Info>

As you can see, GraphQL is simply an HTTP `POST` and does not require any particular library. However, we highly recommend you use a [client library](https://graphql.org/code) as it can vastly improve your developer experience. In our tutorials we will make use of the following clients in our script examples:

**Python**: [gql](https://github.com/graphql-python/gql)

**JavaScript**: [graphql-request](https://github.com/prisma-labs/graphql-request)

### About query and mutation operations

The two types of allowed operations in Arize AX'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.

Queries and mutations share similar forms, with some important differences.

### About queries

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 [scalars](https://graphql.org/learn/schema/).

Queries are structured like this:

```graphql theme={null}
query {
    Objects or scalars to return
}
```

Here is a simple example of how to pull your information

<CodeGroup>
  ```graphql Query theme={null}
  query {
    viewer {
      user {
        name
        email
      }
    }
    account {
      name
    }
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "viewer": {
        "user": {
          "name": "Arize Support",
          "email": "support@arize.com"
        }
      },
      "account": {
        "name": "Arize AI"
      }
    }
  }
  ```
</CodeGroup>

<Info>
  Having trouble? Reach out to us via email [support@arize.com](mailto::support@arize.com) or [Slack us](https://arize-ai.slack.com/) in the #arize-support channel for more support.
</Info>
