OData Controller
OData provides a uniform way to query and manipulate data sets through CRUD operations (create, read, update, and delete) easily. This controller helps you focus on your business logic while building RESTful APIs without having to worry about the approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats and query options etc. To learn more about OData, see http://www.odata.org/.
The OData Controller is used to access ISM objects that don't have specific controllers. This could include objects such as Asset, Approval Group, Ticket Actions and so on. Anything done in the ISM UI can be done through this generic API.
POST/ OData
To create data, perform the following:
- Click POST to create information.
- Specify the following details in the Parameters section.:
- ISM application URL
- User authtoken
- Slice token
- Web service user name and password - Click the Example Value text box. The operations displayed in the text box will be copied to the odataRequest text box.
- Click Try it out.
The following information is displayed in the Example Value box.
Valid Attribute { |
---|
Sample payload for retrieving the list of Assets with all the attributes
{ "fields":"", "filter":"(active eq '1')", "orderby":"LastModTimestamp desc", "methodType":"GET", "uri":"/NimsoftServiceDesk/NSDServices/odata/Asset?$expand=relatedAssets,model,model/category,model/manufacturer,ownedBy,organization,createdBy,modifiedBy,assetState,assetType,relatedAssets/assetState,relatedAssets/assetType" }
Sample payload for creating an Asset with the following details with the parent organization.
{ "fields":"", "filter":"", "orderby":"", "methodType":"POST", "body":{"name":"Demo_asset1", "assetTag":"Demo_asset1", "assetHostName":"Demo_asset1", "purchaseOrderNumber":"313423", "serialNumber":"22123123", "discoverySource":"Web", "ipv4Address":"10.2.45.34", "macAdress":"00:33:23:45:32:43:54", "operatingSystem":"Microsoft Windows", "warrantyExpiryDate":null, "organization":{"__metadata":{"uri":"Organization(rowID=1,slice=20180142)"}}}, "uri":"/NimsoftServiceDesk/NSDServices/odata/Asset"}
© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com