Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
What is an API Endpoint?
Excerpt | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
API endpoints can be setup to enable external systems to make calls to PhixFlow. API endpoints can be seen in the Repository for your application under
|
Excerpt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Creating an API EndpointAPI endpoints must be made using the specific option on the
Input Parameters
On the Input Connection Point, additional Input Parameters can be created to facilitate query string parameters being passed into the API via the URL.
The Name set on the If a parameter is missing then it will be marked as unavailable, unless a Default Value has been configured.
URL & URL AliasURL and URL Alias can be found on the API Endpoint
URL Alias ExampleIf the API URL is, https://server.phixflow.com/phixflow/api/1/action/My%20App/My%20API%20Endpoint/trigger and a URL Alias of CompanyData is set, then the API URL will change to, https://server.phixflow.com/phixflow/api/2/CompanyData API ModeAPI Mode can be found on the API Endpoint
Choose an API Mode:
AuthorisationAllow Anonymous Connections can be found on the API Endpoint
If Allow Anonymous Connections is enabled:
Note: Adding authorisation is covered on API Authentication and Secret Keys. TimeoutTimeout can be found on the API Endpoint
Set a Timeout (optional):
API Status Check (Poll for Result)
Calling a PhixFlow APIHTTP MethodThis is set on the
Returned Data JSON PathIf your API has been configured to return data the path will be in the format:
Where <<Output Name>> is the Output connection point. Server Console ResponsesThe item calling the API endpoint will receive the Response from the API endpoint stating whether it has run successfully (Success) or not (Fail). Responses can be customised to return specific messages. The response recorded in the
If you are making the call using PhixFlow the Responses can be access as follows:
API Endpoint ResultsTo see the results of the API Endpoint processing in the
FailuresAn API Endpoint will fail if the logic in the Actionflow fails or if the error() function is used to force a failure. If records are passed to the API Endpoint individually a failure will only impact the specific record being processed. Error Codes200
400
|
Worked Example
Here's a worked example using the Company Data (available from the Learning Centre).
In this example, we are using:
- A Company Call API screen containing a fixed drop down list of industries, a string fields for the API Status and a multi-line string field for the Results - this screen was created using the Tile with Buttons template
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, the screens have already been pre-loaded into the Actionflow Advanced Application. For this example, we'll be working on the Company Call API screen. |
Excerpt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example 1: Passing Out DataIn this example, we'll configure an API Endpoint that passes out Company ID, Company Name and Industry data from our Companies data. Create API EndpointIn this example, we'll set up an API Endpoint to pass out company data.
Construct JSON
Configure the Output
Example 2: Passing in ParametersIn this example, we'll retrieve data from our Companies API and pass in an industry parameter (e.g. "Telecoms") to filter the results to just companies in that industry. API End Point Setup
Call API Actionflow Setup
Testing
|
On this page
Table of Contents | ||
---|---|---|
|