Accessing Nexar Account Information Programmatically

Modified on Thu, 23 Mar 2023 at 11:50 AM

Introduction

For programmatic access to your Nexar Account, we have API queries prefixed "adm" which is short for admin. With these queries, you can receive data about organizations, their users, and applications.


We require authorization to be at a user level to access this information. This means that to be authorized to run these queries, an access token with the "openid" and "user.access" scopes must be generated. This is done by using an application with the design scope for the API.


Example Queries


Query for organizations, their users, and their applications with the corresponding supply counts:

query admin {
  admOrganizations {
    id
    name
    users {
      id
      userName
    }
    applications {
      id
      name
      description
      scopes {
        scope
      }
      supplyCounts {
        partCounter
        partLimit
      }
    }
  }
}


Query for a specific application by ID:

query admin {
  admApplicationById (id: "Your application ID") {
    id
    name
    description
    organizationId
    scopes {
      scope
    }
    supplyCounts {
      partCounter
      partLimit
    }
  }
}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article