Skip to main content

Access via GraphQL API

The OSO GraphQL API exposes a programmatic interface for everything users can do on the OSO platform. Let's make your first query in under five minutes.

warning

If you want to execute SQL against your organization's data, use the pyoso Python library instead.

Generate an API key

  1. Log in to your account
  2. Navigate to your organization's Settings → API Keys
  3. Click "New Key +" and give it a descriptive name
  4. Save your key immediately - you won't see it again
Detailed step-by-step instructions
  1. Go to www.oso.xyz and log in
  2. You'll be redirected to your organization dashboard
  3. In the left sidebar, click the dropdown next to your organization name
  4. Select "Settings"
  5. Navigate to "Organization" → "API Keys"
  6. Click "New Key +"
  7. Enter a descriptive label (e.g., "Production API")
  8. Copy and save your key immediately
  9. Click "Create"

generate API key

Prepare your query

You can navigate to our public GraphQL explorer to explore the schema and execute test queries.

GraphQL explorer

For example, this query will fetch the current user.

query Viewer {
viewer {
id
email
fullName
avatarUrl
}
}

Issue your first API request

All API requests are sent to the following URL:

https://api.oso.xyz/v1/graphql

In order to authenticate with the API service, you have to use the Authorization HTTP header and Bearer authentication on all HTTP requests

curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DEVELOPER_API_KEY" \
-d '{"query":"query Viewer { viewer { id email fullName avatarUrl } }"}' \
https://api.oso.xyz/v1/graphql