Scoping an API Call

You can associate one app client to multiple Avanan tenants. This allows you to query multiple portals in the same region, mainly Managed Service Providers (MSP).

Our MSP system automatically updates the list of associated portals.

To verify the available scopes for your app client, call the GET /scopes endpoint. It returns a list of the scopes available at that moment for your app client.

Note - Scopes follow {farm}:{tenant} format, where farm is the internal Avanan identifier of a complete regional compute unit. Tenant is your unique identifier.Avanan URLs always follow {tenant}.avanan.net schema.

Query endpoints (POST /event/query, and /POST search/query) have scopes as an optional argument. If you have a multi-scope app client, you can pass a list of scopes to narrow down the query to a set of tenants. By default, queries are performed on all the available scopes.

Action related endpoints (POST /action/event, POST /action/entity and GET /task/{task_id}) have single scope only. If you have a multi-scope app, the payload's optional “scope” argument is mandatory, and the API returns 400 if none is passed.