CallEndpoint
The CallEndpoint action calls an HTTP endpoint.
The following table shows the parameters for the CallEndpoint action.
Name | Data type | Relationship | Required | Notes |
---|---|---|---|---|
method | Enumeration | Attribute | Yes | Possible values:
|
url | String | Attribute | Yes | The base URL of the endpoint (excluding the query parameters). |
savePath | String | Attribute | No | The response is stored as a JSON object with the following format:
If you do not provide a savePath value, the endpoint response is not saved in a default location. A savePath value must be provided if you want to store the response. |
sslConfiguration | SSLConfiguration | Subelement | No | For more information, see SSLConfiguration. |
authentication | Authentication | Subelement | No | An Authentication object must be one of the following types: |
queryParameters | QueryParameter | Subelement | No | You can have more than one query parameter. For more information, see QueryParameter. |
requestHeaders | RequestHeaders | Subelement | No | You can have more than one request header. For more information, see RequestHeader. |
body |
RequestBody UrlEncodedFormRequestBody XmlRequestBody |
Subelement | No | The body must be one of the following types: |
The following table shows the parameters for SSLConfiguration.
Name | Data type | Required | Notes |
---|---|---|---|
protocol | String | No | The SSL protocol to use. The default is TLSv1.2. |
allowUntrustedServerCertificate | Boolean | No | Indicates whether untrusted server certificates are allowed. The default is False. |
XML Example:
This example allows an untrusted server certificate.
<SSLConfiguration allowUntrustedServerCertificate="true" />
The following table shows the parameters for BasicAuthentication.
Name | Data type | Required |
---|---|---|
username | String | Yes |
password | String | No |
XML Example:
This example sets an authentication username and password.
<BasicAuthentication username="${/username}" password="${/password}" />
The following table shows the parameters for BearerAuthentication.
Name | Data type | Required | Notes |
---|---|---|---|
token | String | Yes | The access token. |
XML Example:
This example sets an access token for authentication.
<BearerAuthentication token="${/access_token}" />
The following table shows the parameters for DigestAuthentication.
Name | Data type | Required |
---|---|---|
username | String | Yes |
password | String | Yes |
realm | String | No |
nonce | String | No |
algorithm | String | No |
qop | String | No |
cnonce | String | No |
nonceCount | String | No |
XML Example:
This example sets a username and password for authentication.
<DigestAuthentication username="${/public_key}" password="${/private_key}" />
New in V2
The following table shows the parameters for Akamai EdgeGrid authentication.
Name | Data type | Required |
---|---|---|
accessToken | String | Yes |
clientToken | String | Yes |
clientSecret | String | Yes |
New in V2
The following table shows the parameters for Hawk authentication.
Name | Data type | Required |
---|---|---|
keyID | String | Yes |
key | String | Yes |
algorithm | String | Yes |
hash | String | No |
ext | String | No |
app | String | No |
dlg | String | No |
The following table shows the parameters for QueryParameter.
Name | Data type | Required | Notes |
---|---|---|---|
name | String | Yes | |
value | String | Yes | |
omitIfEmpty | Boolean | No | Omits the parameter if the value is empty. |
XML Example:
This example sets a name and value for a query, and omits the parameter if the value is empty.
<QueryParameter name="stream_position" value="${/bookmark}" omitIfEmpty="true" />
The following table shows the parameters for RequestHeader.
Name | Data type | Required | Notes |
---|---|---|---|
name | String | Yes | |
value | String | No | |
omitIfEmpty | Boolean | No | Omits the header if the value is empty. |
XML Example:
This example sets a name and value for a request header.
<RequestHeader name="authorization" value="client_id:${/client_id}, client_secret:${/client_secret}" />
The following table shows the parameters for RequestBody.
Name | Data type | Required | Notes |
---|---|---|---|
type | String | Yes | Must be a valid HTTP request content-type. For example, application/json. |
encoding | String | Yes | Must be a valid HTTP body encoding type. For example, UTF-8. |
content | String | Yes | Include the body content between the opening and closing tags of the <RequestBody> element. |
XML Example:
This example sets a content-type, body encoding, and content for a request body.
<RequestBody type="application/json" encoding="UTF-8">{ "grant_type": "client_credentials" }</RequestBody>
The following table shows the parameters for UrlEncodedFormRequestBody.
Name | Data type | Required | Notes |
---|---|---|---|
parameters | Map <String, String> | Yes | A collection of name/value pairs. |
XML Example:
This example sets the name/value pairs for a URL encoded form request body.
<UrlEncodedFormRequestBody>
<Parameter name="grant_type" value="urn:ietf:params:oauth:grant-type:jwt-bearer" />
<Parameter name="client_id" value="${/client_id}" />
<Parameter name="client_secret" value="${/client_secret}" />
<Parameter name="assertion" value="${/jwt_assertion}" />
</UrlEncodedFormRequestBody>
The following table shows the parameters for XmlRequestBody.
Name | Data type | Required | Notes |
---|---|---|---|
type | String | No | Must be a valid HTTP request content-type. For example, application/json. |
encoding | String | No | Must be a valid HTTP body encoding type. For example, UTF-8. |
content | XML | Yes | The actual XML content of the body must be nested within the <XmlRequestBody> element as subelements. |
XML Example:
This example sets the content for an XML request body.
<XmlRequestBody>
<authRequest>
<maaS360AdminAuth>
<billingID>${/billing_id}</billingID>
<platformID>${/platform_id}</platformID>
<appID>${/app_id}</appID>
<appVersion>${/app_version}</appVersion>
<appAccessKey>${/app_access_key}</appAccessKey>
<userName>${/username}</userName>
<password>${/password}</password>
</maaS360AdminAuth>
</authRequest>
</XmlRequestBody>
XML Example:
This action calls makes a POST request to https://${/host}/auth/oauth2/token with a request header and a request body, and saves the response in the State at /get_access_token.
<CallEndpoint url="https://${/host}/auth/oauth2/token" method="POST" savePath="/get_access_token">
<RequestHeader name="authorization" value="client_id:${/client_id}, client_secret:${/client_secret}" />
<RequestBody type="application/json" encoding="UTF-8">{ "grant_type": "client_credentials" }</RequestBody>
</CallEndpoint>