Skip to content

Using the Server API

About

The platform uses offers user and administrative APIs via GraphQL.

The server provides two GraphQL end points and associated schema - one for users and one for administrative tasks.The user experience API accesses data and functionality within the context of the logged in user while the administrative API uses the user context only for audit trail and logging.

Testing

GraphQL APIs can be tested via the command line or GUI tools such as Insomnia. More details available on the GraphQL website.

End points

All end points require a valid session. See Authentication for details.

Administration

Used for org level configuration and administration. This is used by the admin console and command line. Documentation

End point

https://rest.weave.io/admin/graphql
Example

query ($org: Uuid!) {
    orgStats(org:$org){
        usersTotal
        usersActive
        usersRetired
        usersDeleted
    }     
    orgChildren(org:$org) {
        name
        id
        parentId
    }}
Variables

{
    "org": "7be40b03-e0c3-4fce-b816-078e78fc8ceb"
}

User

Used to provide the end user experience. This is used by the mobile and web applications. Documentation

End point

https://rest.weave.io/user/graphql

Example

query($org: Uuid!, $query: String!){
    programKind(org:$org, query:$query){
        name
        id
        handle
        status
        document
        duration
        color
        sku
    }
}

Variables

{
  "org": "7be40b03-e0c3-4fce-b816-078e78fc8ceb",
  "query": "id:2525d7e0-96eb-456a-93e3-caaf3b4a44ad"
}