Get a list of accounts
Now that the user is logged into the REST API, they can obtain a list of their associated accounts. The endpoint used to achieve this is GET /accounts.
From Swagger UI, locate GET /accounts, which is under Accounts.
Click GET /accounts.
View the parameters available for the endpoint, which is mainly used to format or filter the results returned. These are optional fields but can be useful to specify, especially if there are a lot of results returned. Not all endpoints will have the same parameters, and some may have required fields, so be sure to go through each endpoint to see what is applicable.
You can also see what response codes will be returned from this endpoint, as well as an example response body in json format.
Click Try it out to get the list of accounts for User1.
We can leave the parameters blank for now.
Scroll down and click Execute.
Check that the endpoint returned a 200 (Success) code, and displayed the response body with the list of User1’s accounts.
You should also see the Curl and Request URL used for the endpoint execution. This can be useful to note if you want to know what headers and other inputs are required if you want to execute this in an external program. It is where you can also see the bearer token issued for this session.
Choose the account to change the password for. The account’s id is needed, so for this example, we will choose the first one with id: 1a7145c0-537c-4e77-af36-1a7e6ead288a.