AMT Help Files

Definitions

The definitions screen of a Consumable REST API web service shows all the paths and routines with their parameters available to AMT from the REST API web service.

 

 

Path

In the Path pane a list of the Paths and their method defined for this REST API web service is shown.

When a path is selected an 'Object inspector' window will be opened where the URL (Path) and HTTP method of the path can be set.

The following HTTP methods are supported: POST, GET, PUT, PATCH and DELETE.

If a OpenAPI json file is loaded in the Consumable REST API, the 'Add Path' and 'Remove Path' buttons are disabled.

 

Routine

The Routine pane shows the AMT routine name for the selected path, the MIME Type of the data and the parameters for the selected path in the Path pane and their AMT mapping.

When a parameter is selected an 'Object inspector' window will be opened where the properties of the parameter can be set.

Properties: Description: Value:
Name The name of the parameter <Text>
ArrayType If the native type of the method is an array, the value type of the array is defined here. <None | Int32 | Int64
| Double | Boolean | String
| Decimal | Object>
Length The maximal number of characters. <Integers>
Decimals The number of decimal characters. <Integers>
ClassName When using a Class type or a List with the ListType Class, the name of the class can be set or changed here.
A Class definition with the set name must be present in the Implementation screen of the Consumable REST API.
<Text>
Direction The direction this parameter is passed, from AMT to the REST API (In) or the response from the REST API to AMT (Out). <In | Out>
HTTPStatusCode

The HTTP status code mapped to the response. This can be any HTTP status code or "default" to cover undeclared responses.

If multiple responses are defined for a routine, the response objects will be returned as a JSONString. With the help of the system-item SI-HTTPSTATUSCODE, the corresponding response object can then be created from the JSONString using the FROMJSON class function.
See SI-HTTPSTATUSCODE for an example.

<HTTP Status code> | default
ListType If the (AMT) type of the method is a list, the AMT data type of the list must be defined here.
In case of Alpha, Financial, Numeric or Signed, the 'Length' property should be set.
For Financial, Numeric or Signed, the 'Decimal' property can also be set.
If set to Class, a Class definition must be added to the Implementation screen of the Consumable REST API.
This will be generated by AMT if a OpenAPI JSON file was loaded.
If more than one class definition is present, the class can be specified by setting the class name in the ClassName property.
<Alpha | Boolean | Financial
| Integer | Numeric | RealString
| Signed | String | Date
| Class | List>
NativeType The data type of the parameter in the REST API.
The Invalid type indicates that the OpenAPI JSON file was not (completely) successfully loaded,
or the parameter contains an unsupported data type.
If set to Object, a Class definition must be added to the Implementation screen of the Consumable REST API.
This will be generated by AMT incase a OpenAPI JSON file was loaded.
Array requires the properties 'ArrayType' and 'ListType' to be set.
<Int32 | Int64 | Double
| Char | Boolean | String
| Decimal | Object | Array
| Invalid>
Optional Indicates if the parameter is optional (True) or required (False). <Boolean>
ParameterLocation The location of the parameter:

  • Path - For parameters located in the request URL, taken from a variable in the URL denoted by curly brackets.
    Example: /Customer/{Id}
  • Query - For parameters located at the end of a request URL after a ? (question mark).
    Example: /Customer?LIMIT=2
  • Header - For parameters located in the header of the request.
    Example CURL -X ... -H 'CUSTID: 2'
  • Cookie - For parameters located in the cookie header.
    Example CURL -X ... -b 'CUSTID=2'
  • [Empty] / None - Used for parameters in the data (body).
    Example CURL -X ... -d '{"custid": 2}'
<Path | Query | Header
| Cookie | [empty]>
Type

The AMT data type of the parameter used in the underlying routine.

In case of Alpha, Financial, Numeric or Signed, the 'Length' property should be set.

For Financial, Numeric or Signed, the 'Decimal' property can also be set.

If set to Class, a Class definition must be added to the Implementation screen of the Consumable REST API. This will be generated by AMT if a OpenAPI JSON file was loaded.
If more than one class definition is present, the class can be specified by setting the class name in the ClassName property.

List requires the properties 'ListType' and 'ArrayType' to be set.

<Alpha | Boolean | Financial
| Integer | Numeric | RealString
| Signed | String | Date
| Class | List>