Image Removed Image Added
FunctionFunktionDieses Objekt wird verwendet, um einen REST-Anruf an einen Webdienst durchzuführenThis object is used to make a REST call to a web service. Info |
---|
title | Programming Experience Required |
---|
| Note: you will require programming experience to use this object. jtel does not provide developer support as part of the standard support contract. | Programmiererfahrung erforderlich |
| Hinweis: Für die Verwendung dieses Objekts benötigen Sie Programmiererfahrung. jtel bietet im Rahmen des Standard-Supportvertrags keinen Entwickler-Support. |
Das Objekt kann folgende Arten von REST-Anrufen durchführenThe object can perform the following type of REST calls: It is possible to specify parameters, which are coded in the URL. Also it is possible to specify additional headers which will be sent with the http headers when the REST call is made. When POST or PUT operations are performed, data can be specified which is sent in the content of the http request. When the call returns, the headers from the response are provided as variables which can be used in the application at a later step. The response body is parsed if valid XML or JSON, and is also provided as variables. It is possible to specify a prefix for the result (which includes the headers), and a separate prefix for the content variables provided. Parameters Es ist möglich, Parameter anzugeben, die in der URL kodiert sind. Es ist auch möglich, zusätzliche Header anzugeben, die mit den http-Headern gesendet werden, wenn der REST-Anruf erfolgt. Wenn POST- oder PUT-Operationen durchgeführt werden, können Daten angegeben werden, die im Inhalt der http-Anforderung gesendet werden. Wenn der Aufruf zurückkehrt, werden die Header aus der Antwort als Variablen bereitgestellt, die dann in einem späteren Schritt in der Anwendung verwendet werden können. Der Antwortkörper wird geparst, wenn XML oder JSON gültig ist, und wird ebenfalls als Variablen bereitgestellt. Es ist möglich, ein Präfix für das Ergebnis (das die Kopfzeilen enthält) und ein separates Präfix für die bereitgestellten Inhaltsvariablen anzugeben. Parameter Parameter | Zweck | Objekt Name | Der Name dieser Objektinstanz | Anfragemethode | Wählen Sie die zu verwendende http-Anforderungsmethode. GET, POST, PUT und DELETE werden unterstützt. | Header | Eine beliebige Anzahl von Headern kann angegeben werden und wird mit der http-Anfrage mitgeschickt. Header müssen durch \n getrennt angegeben werden, wenn mehr als ein Header verwendet werden soll. Zum Beispiel | Parameter | Purpose | Object Name | The name of this object instance | Request Method | Choose the http request method to be used. GET, POST, PUT and DELETE are supported. | Headers | Any number of headers can be specified and will be sent with the http request. Headers must be specified separated by \n, if more than one header will be used. For example: my-header-1: value1\n my-header-2: value2 | Parameter | Parameter werden am Ende der URL in dieser Form übergeben | Parameters | Parameters are passed at the end the URL, in the form: http(s)://url?param1=value1¶m2=value2 The parameters will automatically be URL encoded as required. Die Parameter werden je nach Bedarf automatisch URL-kodiert. | Daten | Daten sind nur für POST- oder PUT-Operationen erforderlich. Die Daten werden, wie durch den "Content-Type" Parameter definiert, übergeben | Data | Data is only required for POST or PUT operations. The data is passed as defined by the Content-Type parameter. | Content-Type | This parameter is passed as the http header Dieser Parameter wird als http-Header "Content-Type" , and defines how the data included in the POST or PUT request will be encoded.übergeben und definiert, wie die in der POST- oder PUT-Anforderung enthaltenen Daten kodiert werden. Derzeit unterstützt werdenCurrently supported are: application/json application/x-www-form-urlencoded text/plain text/xml | Variablenpräfix Inhalt | Wenn der Webdienst Inhalte mit der http-Antwort zurückgibt, dann werden diese wie folgt bereitgestellt: | Variable Prefix Content | If the web service returns content with the http response, then this will be provided as follows: If valid XML, then as variables of the formWenn gültiges XML, dann als Variablen in der Form: $<VariablePrefixContent>.xmlStructure.xmlFieldName
If valid JSON, then as variables of the form:Wenn gültig JSON, dann als Variablen in der Form $<VariablePrefixContent>.jsonStructure.jsonFieldName
The exact format provided will depend on the exact structure returned. You should use the Variable Dump Object to examine the exact variables which are parsed. Das genaue Format hängt von der genauen zurückgegebenen Struktur ab. Sie sollten das Variablen-Dump-Objekt verwenden, um die genauen Variablen zu untersuchen, die geparst werden.
BeispielExample: Item | Value |
---|
Variable Prefix ContentVariablenpräfix Inhalt | myContent | Returned ContentZurückgegebener Inhalt | { "token": "QpwL5tke4Pnpja7X" } | Provided VariablesGegebene Variablen | $myContent.responseData = { "token": "QpwL5tke4Pnpja7X" } $myContent.token = QpwL5tke4Pnpja7X |
| Variablenpräfix Ergebnis | Die Kopfzeilen sowie die http-Statuszeile und der Statuscode sind in Variablen gespeichert, denen der hier angegebene Wert vorangestellt wird. Die folgenden Variablen werden automatisch bereitgestellt (unter der Annahme einer gültigen http-Antwort | Variable Prefix Result | The headers and the http status line and status code are stored in variables prefixed with the value provided here. The following variables are provided automatically (assuming a valid http response): ExampleBeispiel: Item | Value |
---|
Variable Prefix ResultVariablenpräfix Ergebnis | myResult | http Status LineZeile | HTTP/2 200 OK | HeadersHeader | content-type: application/json; charset=utf-8 set-cookie: __cfduid=d071fc20b4ada453375f3189252f1559d1556981085; expires=Sun, 03-May-20 14:44:45 GMT; path=/; domain=.test.com; HttpOnly | Provided VariablesGegebene Variablen | $myResult.httpResponseCode = 200 $myResult.httpResponse = HTTP/2 200 OK $myResult.content-type = application/json; charset=utf-8 $myResult.set-cookie = __cfduid=d071fc20b4ada453375f3189252f1559d1556981085; expires=Sun, 03-May-20 14:44:45 GMT; path=/; domain=.test.com; HttpOnly |
|
Outputs Output | Used when ... | Continue | A record is found | Not Found | No record for the specified caller was found using the criteria specified (ACD groups and time period) | Error | An error occurred. This is most likely due to the incorrect specification of the ACD groups - either missing commas at the relevant positions, or specifying variables which could not be evaluated. |
Variables Provided200 OK | Ein Datensatz wird gefunden | Sonstiges | Es wurde kein Datensatz für den angegebenen Anrufer unter Verwendung der angegebenen Kriterien (ACD-Gruppen und Zeitraum) gefunden | Fehler | Es ist ein Fehler aufgetreten. Dies ist höchstwahrscheinlich auf die falsche Angabe der ACD-Gruppen zurückzuführen - entweder fehlende Kommas an den entsprechenden Stellen oder die Angabe von Variablen, die nicht ausgewertet werden konnten. |
Gegebene VariablenPräfix wird durch das in der Objektdefinition angegebene Präfix ersetztPrefix is replaced with the prefix specified in the object definition. Variable | Contains | resultPrefix.httpResponseCode | The http response codeDer http-Antwort-Code. | resultPrefix.httpResponse | The Die http response-Antwort. | resultPrefix.responseData | The Der http content-Inhalt. | resultPrefix.* | Other http headers provided by the web serviceAndere http-Header, die vom Webdienst zur Verfügung gestellt werden. | contentPrefix.*Parsed | variables from a valid JSON or XML responseGepartete Variablen aus einer gültigen JSON- oder XML-Antwort. |
Release Status |
---|
colour | Green |
---|
title | 3.14 ab 04.05.2019 |
---|
|
|