With the API Call, the flow can be extended by connecting to another API (endpoint) by making the necessary settings at any point in the request or response line, and the returned data can be included in the flow if desired.

The picture below shows the policy settings:


The policy fields are shown in the table below.

Field

Description

DescriptionAn optional description of the policy that may be useful for usage and management activities.
Call Type

Specifies how to make the call. There are two types of call methods:

One-Way-Call: In the one-way call type, Apinizer sends the defined request information to the relevant endpoint and continues its flow without waiting for a response. When this call type is selected, Request settings become active.

Two-Way-Call: In the two-way call type, Apinizer sends the defined request information to the relevant endpoint and waits for the response to be returned from there. When a response arrives, it can use this response to update the data in its stream according to defined rules. When this call type is selected, Request and Response settings become active.


Request Section

This is the section where the necessary settings are made in order to make a request to the specified endpoint.

Although it is generally the same as the Test Console screen, it contains minor differences.

Editing of The Body

The image containing the settings for the body of the message to be sent is given below:


The fields used for the body-related configuration on the request section are shown in the table below.

Field

Description

Clear Copied Body Content

This field is used to create the body of the API Call request.

If this option is not active, normally the incoming message content in the stream is sent to the endpoint as is.

If this option is active, the message body copied from the original message is cleared and the new message body is sent.

Use Message Template

This field appears when the "Clear Copied Body Content" option is activated.

It is used to determine where the value entered in the New Message Body field should be placed in the body from the original message.

Message Template Content TypeIt is determined in which type the value to be entered in the New Message Body field will be sent. There are 4 different types: raw, XML, JSON, x-www-form-urlencoded.
Message TemplateXML, JSON, plain text or form data to be sent is entered in this field.
API Call Request Body Data Manipulation

Through the body of the original message, the data of the request line of the API call to be made can be manipulated. There are 2 types of data editing operations; Add/Edit and Delete.

Source refers to the original message, while Target refers to the request line in the API Call. Here, the Source field acts as the key value of the data, and the Target value acts as value.


Editing of The Header

The image containing the settings for the header of the message to be sent is given below:


The fields used for the configuration of the header(s) on the request section are shown in the table below.

Field

Description

Delete All Copied Headers

When this field is not selected, all headers from the original message are copied to the request message as it is. If selected, none will be copied.

Headers To Be Deleted

This field appears when the "Delete All Copied Headers" field is deactivated.

Only the headers added here will be removed from the copied messages.

New Headers

It is used to enter the message headers to be sent in the request message.

Editing of The Parameter

The image containing the settings for the parameters of the message to be sent is given below:


The fields used for the configuration of the parameter(s) on the request section are shown in the table below.

Field

Description

Remove All Copied Parameters

When this field is not selected, all parameters from the original message are copied to the request message as it is. If selected, none will be copied.

Parameters To Be Deleted

This field appears when the "Remove All Copied Parameters" field is inactive.

Only the parameters added here will be removed from the copied messages.

New Parameters

Message parameters to be sent in the request message are entered.


Editing of The Cache Settings 

This setting ensures that the result of the request is fetched from the cache, based on the value of the selected variable. Thus, unnecessary requests are avoided.

The image containing the editing of the cache settings is given below:


The fields used for the configuration of the cache on the request partition are shown in the table below.

Field

Description

Enable Cache

Enables/disables cache settings.

Apply by

A variable can be selected for this policy to work over a certain variable.

It is optional.

Capacity

The maximum number of responses that can be stored in the cache.

TTL

The length of time the cached response will remain in the cache. It is given in seconds. 

Cache Null Responses

Checked if null values ​​are also to be cached.


Settings Tab

The image containing the settings configuration is given below:


The fields used for the configuration of the settings on the request partition are shown in the table below.

Field

Description

Timeout

It is the information of how long after the request will time out.

It is mandatory.

Certificate Disabled/Enabled

It is managed whether or not the certificate goes with the request.

Certificate

This field is required if the certificate has been activated. If there is no desired value in the certificate list, a new one can be created from the Add Certificate link.

Response Section

This is the section where the necessary settings are made to process the returned result after the request is made to the specified endpoint.

Editing of The Body

The image containing the settings for what will be done to the body of the original message after the returned message is given below:


The fields used for the body-related configuration on the response section are shown in the table below.

Field

Description

Message Template Operation Type

Select which operation to apply to the body in the original message. There are three types of options:

Not Change: The Original Body will be the same as before the API Call.

Replace Original Body with API Call Response

Clear Original Body after API Call

Use Message Template

This field appears when the Clear Original Body after API Call option is activated.

If you want to create a new message body of the original message body, it is activated.

Message Template Content Type

The value of the new message body determines the type to be sent. There are 2 different types; XML, JSON.
Message TemplateThe data to be sent is entered in this field as XML or JSON according to the selected content type.
Original Message Data Manipulation

Allows manipulation of the original body over the body of the API call response. Add/Edit and Delete operations are available on the body.

Source refers to the response line in the API Call, while Target refers to the original message.


Editing of The Header

The image containing the settings for what to do with the headers of the original message after the returned message is given below:


The fields used for the configuration of the header(s) on the response section are shown in the table below.

Field

Description

Delete All Original Headers

When this field is selected, all message headers in the original message are deleted.

Headers To Be Deleted

This field appears when the "Delete All Original Headers" field is inactive.

Used to remove original message headers.

New Headers

This is used if a new header is to be sent after the policy is executed in the request message. The value can be taken from the response of the request or can be a fixed value.


Editing of The Parameter

After the returned message, the image containing the settings for what to do with the parameters of the original message, if any, is given below:


The fields used for the configuration of the parameter(s) on the response section are shown in the table below.

Field

Description

Delete All Original Parameters

When this field is selected, all query parameters in the original message are deleted.

Parameters To Be Deleted

This field appears when the "Delete All Original Parameters" field is inactive.

It is used to remove parameters from the original parameters.

New Parameters

If a new parameter is wanted to be sent in the request message after the operation of the policy, this is used. Its value can be taken from the response of the request or can be a fixed value.


You can visit the Policies page for the details of the Conditions and Error Message Customization panels.