Accessing Nexar Account Information Programmatically

Modified on Fri, 26 Jul at 9:43 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. This will then follow the authorization code flow for OAuth 2.0.


We recommend making an adm query once a day - any more than this will put pressure on the Nexar system.



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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article