Create asset group

post

/assetMonitoring/clientapi/v2/groups

This operation creates a new instance of an asset group in Oracle IoT Asset Monitoring Cloud Service.

Request

Supported Media Types
Body ()
Root Schema : AssetGroupImpl_create
Type: object
Show Source
Nested Schema : children
Type: array
Property description was not set
Show Source
Nested Schema : path
Type: array
Property description was not set
Show Source
Nested Schema : AssetGroup_create
Type: object
Show Source
Nested Schema : children
Type: array
Property description was not set
Show Source
Nested Schema : path
Type: array
Property description was not set
Show Source
Nested Schema : PathToOrgEntityType_create
Type: object
Show Source
  • Property description was not set
  • Property description was not set
  • One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT].
Back to Top

Response

Supported Media Types

201 Response

Successfully processed.
Body ()
Root Schema : AssetGroupImpl_receive
Type: object
Show Source
Nested Schema : assets
Type: object
Property description was not set
Show Source
Nested Schema : children
Type: array
Property description was not set
Show Source
Nested Schema : path
Type: array
Property description was not set
Show Source
Nested Schema : AssetGroup_receive
Type: object
Show Source
Nested Schema : assets
Type: object
Property description was not set
Show Source
Nested Schema : children
Type: array
Property description was not set
Show Source
Nested Schema : path
Type: array
Property description was not set
Show Source
Nested Schema : PathToOrgEntityType_receive
Type: object
Show Source
  • Property description was not set
  • Property description was not set
  • One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT].

400 Response

Bad Request. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

401 Response

Unauthorized. The request requires user authentication.

403 Response

Forbidden. The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.

406 Response

Request Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.

415 Response

Unsupported Media Type. The request entity has a media type which the server or resource does not support.
Back to Top

Examples

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   -H 'Content-Type: application/json'
   https://iotserver/assetMonitoring/clientapi/v2/groups

Example of Request Body

The following example shows the content of the request body in JSON format:


{
"children":[
{
"description":"Property description was not set",
"name":"Property description was not set",
"organizationId":"1ef1b7226b3-1ada",
"parentId":"5259302c6886-3561",
"path":[
{
"id":"46ab7d51b2-366e",
"name":"Property description was not set",
"type":"One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT]."
}
],
"placeId":"211153b9e2b-3b86",
"query":"Property description was not set",
"restricted":false,
"type":"One of [STATIC, QUERY]."
}
],
"description":"Property description was not set",
"name":"Property description was not set",
"organizationId":"4391b0c16c4-1c0d",
"parentId":"215346a02e4e-1eac",
"path":[
{
"id":"136352222d87-3f73",
"name":"Property description was not set",
"type":"One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT]."
}
],
"placeId":"1946f9e3926-5ab0",
"query":"Property description was not set",
"restricted":false,
"type":"One of [STATIC, QUERY]."
}

Example of Response Body

The following example shows the content of the response body in JSON format:


{
"assets":{
"links":[
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"assetsCount":12345,
"children":[
{
"assets":{
"links":[
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"assetsCount":12345,
"description":"Property description was not set",
"id":"37da8cd4ec-34a2",
"name":"Property description was not set",
"organizationId":"3767178b661b-5c88",
"parentId":"5d8c43a01280-23e3",
"path":[
{
"id":"29f22d61265-9d2",
"name":"Property description was not set",
"type":"One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT]."
}
],
"placeId":"cd44ccd40ef-41b7",
"query":"Property description was not set",
"restricted":false,
"type":"One of [STATIC, QUERY]."
}
],
"description":"Property description was not set",
"id":"616e4db5177-ef3",
"name":"Property description was not set",
"organizationId":"5c9e30dc3100-597a",
"parentId":"3cd242012921-6a53",
"path":[
{
"id":"270371605b53-2d90",
"name":"Property description was not set",
"type":"One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT]."
}
],
"placeId":"43b2ff95afd-5bdd",
"query":"Property description was not set",
"restricted":false,
"type":"One of [STATIC, QUERY]."
}



Complete cURL Example

The following example shows a complete cURL command that you can use to perform the described operation:

curl -X POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   -H 'Content-Type: application/json'
   -d '{"children":[{"description":"Property description was not set","name":"Property description was not set","organizationId":"1ef1b7226b3-1ada","parentId":"5259302c6886-3561","path":[{"id":"46ab7d51b2-366e","name":"Property description was not set","type":"One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT]."}],"placeId":"211153b9e2b-3b86","query":"Property description was not set","restricted":false,"type":"One of [STATIC, QUERY]."}],"description":"Property description was not set","name":"Property description was not set","organizationId":"4391b0c16c4-1c0d","parentId":"215346a02e4e-1eac","path":[{"id":"136352222d87-3f73","name":"Property description was not set","type":"One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT]."}],"placeId":"1946f9e3926-5ab0","query":"Property description was not set","restricted":false,"type":"One of [STATIC, QUERY]."}'
   https://iotserver/assetMonitoring/clientapi/v2/groups



Note that in the request, https://iotserver will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is https://myinstance-myidentitydomain.iot.us.oraclecloud.com and the default port is 443.
Back to Top