GraphQL API

Basic usage

API calls can be made to https://worknice.com/api/graphql:

curl https://app.worknice.com/api/graphql -H 'content-type: application/json' -d '{"query":"{ session { person { displayName } } }","variables":{}}'

You can log-in using the logIn mutation:

mutation {
  logIn(email: "example@example.com", password: "example") {
    id
  }
}

The session field can be used to get information about your current session:

query {
  session {
    user {
      id
    }
    person {
      id
      displayName
      org {
        name
      }
    }
  }
}

API tokens

Create personal API tokens to access the API from a script or application. Actions performed using API tokens will be attributed to your person in Worknice.