Account Filtering¶
By default, the API will return data associated with the account that your
API token is associated with. Typically, this is the root account. To interact
with data for a specific subaccount, you can use the query string parameter,
account
. Please read the Subaccount Dashboards
section before attempting to interact with the API for a subaccount. If you
wish to use a different request type such as POST, PUT, or DELETE, you will
need to include the account
as a query string parameter.
Let’s assume your account structure is as follows and the API token was created for the Root Account.
Root Account (account 1)
- Subaccount A (account 2)
- Subaccount B (account 3)
- Subaccount C (account 4)
If you wanted to fetch the dashboards for Subaccount B, you would make the following request:
https://apps.aspiredu.com/detective/api/v2/dashboards?account=3
If the request is made without the account
parameter, the API will
return the dashboards the Root Account.
If you’re unsure of which account to use, don’t specify the account
parameter and use the default token account. This is typically the best
approach for most schools.