Service Info
|
Enter information in the necessary fields. Help buttons are available next to each field for additional information.
|
||
Route Info
|
a. Endpoint: Select an option from the drop-down list. Endpoints are retrieved from the back-end system you set up on the Configuration page.
b. Mapping ID: Select an existing map or create a New API Map. For more information, see Creating a New API Map for the Service. Note the following:
◦ No API map is needed for a JSON response.
◦ PTC recommends that services are created using maps generated for the same endpoint as the one for which the service is being created. Not all maps are interchangeable or reusable across all endpoints. The reusability is governed by the response schemas of each endpoint. If the response schemas are similar for a given set of endpoints, the map created for one can be used as the map for the service created for its counterpart.
c. Base Type
|
||
Inputs
|
Inputs populate after you have selected the endpoint to connect to.
For services, the following input query parameters are available if you want to filter the results:
• $select
• $filter
• $skip
• $top
• $expand: OData parameter that can be used if an entity has a Navigate property.
For more information on the query parameters, see Using ODataConnector or SAPODataConnector.
• $orderby: Returns an entity set information in ascending or descending order. Default is ascending order.
The $orderby logic in ThingWorx follows the $orderby logic defined in Windchill or OData specifications.
This parameter is available only for returnType as Collection.
Odata official website mentions that entitySet always returns a collection. Therefore, when endpoints refer to an entitySet, $orderby parameter is displayed even though it does not have a returnType.
For Windchill, the parameter $orderby does not work for actions and functions.
$orderby parameter is available for SAPOdata and Odata Connectors only.
They must be constructed using specific expressions defined in back-end applications.
|
|
Click Done before saving the Thing; otherwise, the new service is lost.
|