Motivation
This blog focusses on the concept and usability of API Formats within an Action of the Actions Project.
Parent Blog
Concept and Need
Actions Project allows the citizen developer to add a format type to the parameters of the input/output tables. The format can be chosen from the API Format column of these tables. These API formats help to understand the specific data-type format for the parameter that is to be passed to invoke the API.
API Formats are introduced to bridge the gap between the date/time formats that the Action Designer expects and the formats that are internally accepted by the API.
Example:
- Click on the specific Action Parameter for which a format needs to be specified as shown in figure 1.

Figure 1: Display details of a specific Action Parameter
- Click on the API Format selection box as shown in figure 2.

Figure 2: Expanding API Format selection box
- Choose the appropriate format from the API Format selection box. This change will be reflected as shown in figure 3.

Figure 3: Select a specific API Format for an Action Parameter
- Add a value based on the format selected as shown in figure 4.

Figure 4: Input a Value corresponding to the API Format selected
Behavior for Input and Output API Format
When an API format is selected for input parameters, the Action Service will expect a consumer value, and the service will convert them to the specified format types to make the API call.
When an API format is selected for output parameters, the Action Service will convert the response from the selected format type and return the result to the citizen developer in the form of a consumer value.
These behaviors are illustrated in figure 5.

Figure 5: Behavior of Input and Output API Formats
Supported API Format types
As of now, Actions Project supports the following API formats:
Format Type |
Definition |
Example value |
Consumer value |
None |
No format type is specified. Actions will accept any value for the parameter. |
Any value |
- |
DD-MM-YYYY |
A date format is specified. |
01-01-9999
|
"9999-01-01" |
MM-DD-YYYY |
A date format is specified. |
01-01-9999 |
"9999-01-01" |
YYYY-MM-DD |
A date format is specified. |
9999-01-01 |
"9999-01-01" |
HH:MM:SS |
A time format is specified. |
12:34:56 |
"12:34:56Z", "12:34:56+03:00" |
EDM DateTime |
A timestamp format is specified. |
9999-01-01T12:34:56
|
9999-01-01T12:34:56+05 |
EDM Time |
A time format is specified. |
PT13H20M55S |
"12:34:56Z", "12:34:56+03:00" |
EDM DateTimeOffset |
A time format is specified. |
9999-01-01T12:34:56Z |
9999-01-01T12:34:56+05 |
Timestamp since Epoch |
A timestamp format is specified. |
/Date(1492098664000)/ |
2016-07-08T12:34:56+05 |
Date since Epoch |
A date format is specified. |
/Date(1492098664000)/ |
"9999-01-01" |
Disabled or Empty API Format
The Action Designer will sometimes would not see the format selection box at all as shown in figure 6. This is because API formats are not supported for some parameter types.

Figure 6: Showcasing disabled or empty API Format
The following table details the relationship between the parameter type and API format:
Parameter Type |
API Format |
string |
Supported. Format selection box is shown and usable. |
integer |
Not supported. Format selection box is not shown. |
boolean |
Not supported. Format selection box is not shown. |
number |
Not supported. Format selection box is not shown. |
array |
Not supported. Format selection box is not shown. |
object |
Not supported. Format selection box is not shown. |
Blog Reference
Thanks for reading and I hope it helped to understand the concept of API Formats in Actions Project. Please feel free to leave a comment if there are any questions and I would be happy to receive any feedback.