Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

Actionflows 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

  1. Create an Actionflow from the Actionflow home page
  2. Set a unique name and provide a useful description
    1. Note the name must be unique across all applications on PhixFlow.
  3. When the Actionflow opens, on the toolbar click  Properties
  4. In the Basic Settings section of the properties, click API End-Point
    1. This turns the Actionflow into an incoming API.
  5. Click Allow Anonymous Connections
    1. This allows anyone with the URL for the API to call it. Adding authorization is cover later on this page.
  6.  Apply your changes

Step 2 - Input Connection Point Input Parameters

Incoming APIs require a specific set of Input Parameters on the connection point.

  1. Click on the Connection Point In
  2. In the Properties that open, in the Input Parameters section add the following attributes as Stings, the names are case sensitive:
NameTypeDescription
bodyStringprovides the information sent in the body of the API call.
contentTypeStringProvides details of the Content Type
headersStringProvides the information sent in the API call header.
urlStringProvides the compete URL that was used to call the API. This can be used to pass parameters to the API.  

 3.  Apply your changes

Step 3 - Configure your Actionflow

Configure the actionflow to perform the required tasks.

If you wish to return data from the API, 

  1. Add a new Connection of type Output
    1. 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.
  2. 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

parameterdescription
<<Server Name>>URL of the server e.g. app.phixflow.com
phixflowthe 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



  • No labels