Albato
  • Language
    En
    English
    Portuguese
    Spanish
  • Welcome to Albato Help

    Request Section


    IN THIS ARTICLE

    General information

    The setting of the outgoing HTTP request is held in the Request tab. We set up all the required parameters. Headers and alternative parameters are added as the separate fields with the additional keys (value and type).

    upload_10155158940219007719.jpg

    Request method
    Select the method from the list. Available methods:

    • GET
    • POST
    • PUT
    • MERGE
    • PATCH
    • DELETE
     

    Request URL

    Enter the endpoint address to send the HTTP request. You can enter both static text and dynamic variables (entity fields). For example, you can transfer certain IDs between slashes in the url / /

    upload_13863635756594609609.jpg

    If you use a POST request, but want to transfer some GET parameters, you can add it in the URL. For example:

    upload_16111565595974509353.jpg

    Please note, URL must be valid and start with https:// or http://
    All GET parameters in the URL (after ?) will be urlEncoded automatically.

     

    Content-type

    Specify the format of the request to send. Available options:

    • JSON
    • XML
    • urlEncoded

    The required Content-type header will be automatically substituted in the request.

     

    Authorization

    Select one of the created app authorizations. Authorization data will be automatically substituted in the request. Optional parameter.

     

    Headers

    If you need to send the additional headers, add fields in this tab. Each field on the left indicates a key, on the right — the value of this header.
    For example, when you need to send the following header:

    curl -H "Action: create"

    Click the Add field button, fill in the left field with the Action value, and the right one with create value.

    upload_184746635132979919.jpg

    A dynamic parameter (entity fields) is also available in the right field. It will be filled in the automation.

     

    Parameters

    Parameter is the body of the request. Each field added here will form the request body in the selected format and method.
    If the GET method is selected, all fields created on this tab will be automatically added to the URL as GET parameters.

    As in the header tab, add the fields and indicate variable key mapping on the left, the value in the middle, and the type of the variable on the right.

    It is important to indicate the mapping correctly.
    Example JSON:

    { "name":"John"}

    Specify key: name.

    If the required variable is in an object, the path to the object is indicated through a dot.

    JSON example:

    { "contact":{  "name":"John"  }}

    Mapping for name will be: contact.name.

    If the variable is in an array of objects and you need a specific object:

    { "contacts":[  { "name":"John" }, { "name":"Smith" } ]}

    Mapping:
    contacts.0.name for the first object
    contacts.1.name for the second object

    This scenario works only with predictable array length.
    Otherwise, create a string section and select field type Array of objects. Objects will be created as many as fit in the section.

    Example:

    upload_6501078113872847965.jpg

     

    Variable types

    Select the type of the variable in the right field of the parameters tab. Available options:

    • String – text
    • Int – integer
    • Decimal – fractional number
    • Boolean – true/false
    • dateTime – date with formatting and timezone options
    • Phone – phone with mask and final type
    • ObjectArray – array of objects (requires string section)

    All types (except ObjectArray) also have a version ending with Array, meaning data is transferred as an array:

    Example JSON:

    { "tags":[ "tag", "tag2", "tag3" ]}

    Use type StringArray.
    Selecting this type, click gear button to specify a separator between array items (default comma).

     

    Date and Time

    Select the required type of variable to send date and time. Three additional settings:

    • Type – int (converted to unixtime) or string
    • Format – according to PHP docs (auto converts date into selected format)
    • Time zone – target timezone for conversion

    Formatting example:
    Format Y/m/d+H:i:s converts:

    21.03.2021 19:00:002021/03/21+19:00:00

     

    Objects Array

    The ObjectArray type is a sub-entity in the request tab.

    This field becomes a separate array. It cannot be undone, only deleted.

    Enter the mapping to the array on the left. Select the request entity in the string section on the right. Add static or dynamic values.

    Mapping inside the array is written without the array path.

    Example:

    { "items":[  
      { "name":"Item 1", "quantity":1 },  
      { "name":"Item 2", "quantity":3 }  
    ]}

    Here the ObjectArray key is items.
    Fields inside it will have keys: name, quantity — filled with values from the string section.

    Did this answer your question?