It consists of following It consists of following navigation tabs:
- Web Service Details
- Path Parameters
- Query parameters
- Request Headers
- Outbound Mapping
- Inbound Mapping
...
- Get: To retrieve data
- Post: To create data
- Put: To edit the data
- Delete: To delete the data
- Patch: To update partial resources
Path Parameters
The path parameter is part of a path segment that occurs after its name. Path parameters offer a unique opportunity to dynamically replace the values and pass them in the URL
...
- Key- parameter1 and Value value1
- Key- parameter2 and Value value2
Query Parameters
The query parameters are sometimes referred to as optional parameters. The query parameters are separated from the hierarchical parameters by the question mark. Query parameters appear in the URL after the question mark (?
) after the resource name:
https://myserver.com/resource-name?param1=value1¶m2=value2
...
The following sample headers are encountered the most.
Authorization: Carries credentials containing the authentication information of the client for the resource being requested.
Accept-Charset: This is a header which is set with the request and tells the server about which character sets are acceptable by the client.
Content-Type: Indicates the media type (text/HTML or text/JSON, XML/custom) of the response sent to the client by the server, this will help the client in processing the response body correctly.Content-Type: Indicates the type of content (JSON, xml, Custom, form data, text/plain) sent to client API by Luma server.
Accept: Indicates the data type of the response (JSON, xml, Custom, form data, text/plain) to be received from the client API.
Outbound Mapping
Request payload needs to be passed to complete the request.
...
- Key: In the form data, Key represents an attribute.
- Value: It represents attribute value.
XML Response
Example: For a sample XML response for a payload looks like this:
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <entries> <values> <EntryID>INC000000867505</EntryID> <Submitter>peter.hinchey</Submitter> <Submit_Date>2018-12-17T16:12:39.000+0000</Submit_Date> <AEC_Initial_Assignee>Roman Havryshkiv</AEC_Initial_Assignee> <Assignee_Login_ID>v-havryshr</Assignee_Login_ID> </values> </entries> |
...
The above sample XML response will be parsed as shown below:
@resp.\\entries\values\EntryID OR @resp.\\EntryID
@resp.\\entries\values\Submitter OR @resp.\\Submitter
@resp.\\entries\values\Submit_Date OR @resp.\\Submit_Date
@resp.\\entries\values\AEC_Initial_Assignee OR @resp.\\AEC_Initial_Assignee
@resp.\\entries\values\Assignee_Login_ID OR @resp.\\Assignee_Login_ID
Response
It is the format of your output response. Once the skill is fulfilled the response from the payload can be configured to visualize in the three response formats. They are Card, Image, Quick Replies.
...
Payload: Data type payload.
- Click Save to reflect the Web Services in Luma Bot or else click Cancel.