List User Accounts

GET Request

URL

Obtaining all the resources for a User Account based resource id, requires making a GET request to:

https://api.vanta.com/v1/resources/user_account/list_all

The base url "api.vanta.com" is the same we used to get our access token, but the rest of the path "/v1/resources/user_account/list_all" is resource type specific and therefore in this case defined only to get resources of type User Account.

📘

Any resources that are created using the Base Resource Type of User Accounts, will use the above endpoint to LIST all the resources from Vanta.

Parameters

In order to identify the exact resources we want to retrieve from the desired application, we will include the resource id as a parameter in the URL as follows:

https://api.vanta.com/v1/resources/user_account/list_all?resourceId={{account_resource_id}}

Postman will replace the variable {{account_resource_id}} with its corresponding current value as defined in the environment.

Headers

The last step before executing our request, is to configure the authorization. Vanta requires a Bearer Token to be passed in the header of the request, and the expected value is the one obtained during the Authorization process.

Body

This request does not require any data in the body.

Summary

Request TypeGET
URLhttps://api.vanta.com/v1/resources/user_account/list_all?resourceId={{account_resource_id}}
ParametersresourceId={{your resource id from your Vanta private app}}
HeadersAuthorization: “Bearer {{token}}”
BodyEmpty

GET Response

Response Code

The expected response code for the above request is 200. This means everything has executed correctly. Any other response means there was an issue with the request. Review all the above steps, check the validity of your authorization token and retry your request.

Headers

Response headers can be ignored.

Body

A successful response will consist of an array of resources that follow the schema defined in Vanta for that resources or am empty list if no resources exist.

Summary

No Resources

Vanta does not have any resources for the given resource Id. This is expected if this is the first request we are making on this resource id, and no resources have yet been sent to Vanta via a SYNC request.

Assuming this guide has been followed in the established order, we have not sent any resources to Vanta, so expect to receive this response.

Response Code200
HeaderIgnore
BodyJSON Object containing an empty array.
{
“resources”: []
}

Resources Available

Vanta has one or more resources for the given resource id. This means a successful SYNC request has already been sent to Vanta pushing a set of resources for Vanta to monitor.

Once you have completed the SYNC User Accounts step, return here and rerun the above GET request to LIST resources and confirm you are receiving all the resources sent before.

Assuming you have return here after syncing your resources, expect to receive this response.

Response Code200
HeaderIgnore
BodyJSON Object containing your resources
{
“resources”: [{resource1},{...},{resource n}]
}

👍

We have successfully listed all the resources from Vanta for a given resource id!