This section will guide you through the automation of API tasks including testing your automation using Postman.
With an automation token, you can make changes and perform various tasks against elements of the DfE Find and Use an API Management Portal without the need to manually login.
Before you can automate tasks relating to any aspects of the DfE Find and Use an API Management Portal, you must generate an authorisation token to be used for task automation process. This is a bearer token that must be supplied to the Authorization header of any request.
Automating the management of any activity within the DfE Find and Use an API Management Portal using involves 2 processes:
- Generating an automation token - This is will be the access token generated from within the Department for Education (DfE) Find and Use an API Management Portal and sent with the authorization header of any requests from Postman (the API tool used in this case) as a bearer token.
- Managing automation using an API endpoint - This is URL where the API receives requests for management of various tasks within the DfE Find and use an API Management Portal through consuming the Automation Task API.
1. Generating an automation token
You will need to generate an automation token from the Department for Education (DfE) Find and Use an API Management Portal for use within Postman - as part of your automation of any management of task using the public Automation Task API:
To generate an Automation token follow these steps:
- Sign to the Department for Education (DfE) Find and Use an API Management Portal as detailed in Signing in to the Find and Use an API Management Portal.
- Generate a token as described in Adding a workspace automation token. Ensure the token is set to enabled for use. This is indicated by the Enabled checkbox. (See Enabling a workspace automation token)
- View the generated token as described in Viewing a workspace automation token.
- View the generated token value you will need to copy as described in Viewing a workspace automation token value.
- Select the Copy link to copy the value of the Automation token.
Generated automation tokens associated with the workspace from which they were created. This means will only permit or authorise automation of tasks within that workspace. Additionally, this means there would be no need to specify the workspace with any API endpoint URL requests from Postman.
Now you have generated and copied your automation token, you can go onto the second stage of the process of setting up different task automation through Postman.
2. Managing resources using the Platform API
The following automation tasks are available in the Find and Use an API Platform Automation API: