Kuali GraphQL Documentation

Essentials

Authentication

Accessing the GraphQL API requires a valid API key.


API Keys

All API requests require a valid API key. API keys can be created in the My Account screen. Each API key is tied to a specific user and allows the API to perform operations on behalf of that user. The API permissions are limited to the role of the API key’s user. So an API key for a user with role user will only be able to do things that user is allowed to do.

The API keys are JSON Web tokens. They have a built in expiration and SHA256 signatures specific to your institution.

You can create API keys in the My Account screen.

https://{yoursubdomain}.{yourhost}.com/build/space/favorites/account/api-keys
Replace the subdomain and host with yours.

Javascript Example

The API key is set via a Authorization Bearer header on each request.

          
import fetch from 'node-fetch'

const subdomain = 'subdomain'
const apikey = 'apikey'

const query = `query {
                 apps {
                   id
                   name
                 }
               }`

const variables = {}

fetch(`https://${subdomain}.kualibuild.com/app/api/v0/graphql`, {
  method:'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${apikey}`
  },
  body: JSON.stringify({query, variables})
})
.then(res => res.text())
.then(data => console.log(data))
.catch(err => console.log(err))