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 toolssuch 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

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

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

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

{
    "org": "7078cf4b-7229-4ea7-a911-e37fb28fe539"
}