Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
Coming SoonActionflows can be setup to provide an API end point which enables external systems to make calls to PhixFlow.
Incoming API Setup
To enable an actionflow as an incoming API, we need to define it as an end point and configure an incoming connection point with a set of predefined input parameters. These setting are described below:
Step 1 - Actionflow Properties
- Create an Actionflow from the Actionflow home page
- Set a unique name and provide a useful description
- Note the name must be unique across all applications on PhixFlow.
- When the Actionflow opens, on the toolbar click
Insert excerpt _property_settings _property_settings nopanel true - In the Basic Settings section of the properties, click API End-Point
- This turns the Actionflow into an incoming API.
- Click Allow Anonymous Connections
- This allows anyone with the URL for the API to call it. Adding authorization is cover later on this page.
your changesInsert excerpt _save _save nopanel true
Step 2 - Input Connection Point Input Parameters
Incoming APIs require a specific set of Input Parameters on the connection point.
- Click on the Connection Point In
- In the Properties that open, in the Input Parameters section add the following attributes as Stings, the names are case sensitive:
Name | Type | Description |
---|---|---|
body | String | provides the information sent in the body of the API call. |
contentType | String | Provides details of the Content Type |
headers | String | Provides the information sent in the API call header. |
url | String | Provides the compete URL that was used to call the API. This can be used to pass parameters to the API. |
3.
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Step 3 - Configure your Actionflow
Configure the actionflow to perform the required tasks.
If you wish to return data from the API,
- Add a new Connection of type Output
- The name of the Output Connection Point will be used to retrieve the data as part of the path. This is covered in Calling a PhixFlow API.
- Add the required Output Attributes
Calling a PhixFlow API
Step 1 - HTTP Method
To call a PhixFlow API use the HTTP Method POST
Step 2 - API URL
The API can be called using a URL which is constructed as follows:
https://<<Server Name>>
/phixflow/api/1/action/<<Actionflow Name>>
/trigger
parameter | description |
---|---|
<<Server Name>> | URL of the server e.g. app.phixflow.com |
phixflow | the name of the instance, typically this is phixflow |
<<Actionflow Name>> | The name of the actionflow set in Step 1. Note that if your actionflow has a space in the name this must be replaced with %20. For example "My API" becomes, "My%20API". |
Example URL
https://app.phixflow.com/phixflow/api/1/action/My%20API/trigger