Create an API request
An API Request describes one call to another system, such as updating a record in your student system. A process can make it for every record using a Make API Request step, or only for some records as an action inside a Rule Match Outcome or No Rule Match Outcome step.
Before you start
Every API request must use an API Auth Profile, which says how to sign in to the other system. Make sure the profile you need exists. The credentials behind it are stored securely by Three 17.
Steps
-
Create the request
In the back office, go to your API Requests folder and create a new API Request. Give it a clear name. This name is shown on the process page and in run history.
-
Enter the API Endpoint
Enter the full address in API Endpoint, starting with
https://. You can include tokens, for examplehttps://api.example.com/students/$$StudentId$$. -
Choose the Request Type
Choose the method in Request Type: GET, POST, PUT, PATCH or DELETE.
-
Write the Body
Enter what to send in Body, usually JSON, for example
{ "status": "$$Status$$" }. The body is sent with the content typeapplication/json.Body is a required field. For a GET request the body isn't sent, so you can enter
{}.See Write an API request body with tokens and expressions for how values are inserted safely and how to use simple conditions.
-
Pick the API Auth Profile
In API Auth Profile, pick the profile that signs in to this API.
You can leave Update if exists switched off. It doesn't currently change how the request is sent.
-
Click Test Connection
Click Test Connection, next to the save buttons at the bottom of the editor. This checks the sign-in details of the selected API Auth Profile. It doesn't call your endpoint.
You'll see a message such as
Token endpoint responded successfully.orCredential 'my-key' is configured.If you see an error, see Why did my API request fail? -
Save, publish and preview
Click Save and publish. Then run a test on the process's Test tab and click the step badge on a record to see the method, address and body that would be sent for that record. Nothing is sent during a test.
What happens next
When the process runs, the request is made once per record that reaches the step. Any response from 200 to 299 counts as success. Any other response, or a request that couldn't be sent, fails that record. If the other system says the sign-in has expired (a 401 response), AutomatedOn refreshes the sign-in and tries once more.