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
- application/json
Root Schema : AssetGroupImpl_create
Type:
Show Source
object
-
children:
array children
Property description was not set
-
description:
string
Property description was not set
-
name:
string
Property description was not set
-
organizationId:
string
Property description was not set
-
parentId:
string
Property description was not set
-
path:
array path
Property description was not set
-
placeId:
string
Property description was not set
-
query:
string
Property description was not set
-
restricted:
boolean
Property description was not set
-
type:
string
One of [STATIC, QUERY].
Nested Schema : AssetGroup_create
Type:
Show Source
object
-
children:
array children
Property description was not set
-
description:
string
Property description was not set
-
name:
string
Property description was not set
-
organizationId:
string
Property description was not set
-
parentId:
string
Property description was not set
-
path:
array path
Property description was not set
-
placeId:
string
Property description was not set
-
query:
string
Property description was not set
-
restricted:
boolean
Property description was not set
-
type:
string
One of [STATIC, QUERY].
Nested Schema : PathToOrgEntityType_create
Type:
Show Source
object
-
id:
string
Property description was not set
-
name:
string
Property description was not set
-
type:
string
One of [TRIP, TRIP_TEMPLATE, SHIPMENT, VEHICLE, DRIVER, ASSET, GROUP, FACILITY, LOAD, ORG, TRANSACTION_LOG, SHIP_UNIT, SHIP_ITEM, EQUIPMENT].
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
201 Response
Successfully processed.
Root Schema : AssetGroupImpl_receive
Type:
Show Source
object
-
assets:
object assets
Property description was not set
-
assetsCount:
integer
Property description was not set
-
children:
array children
Property description was not set
-
description:
string
Property description was not set
-
id:
string
Property description was not set
-
name:
string
Property description was not set
-
organizationId:
string
Property description was not set
-
parentId:
string
Property description was not set
-
path:
array path
Property description was not set
-
placeId:
string
Property description was not set
-
query:
string
Property description was not set
-
restricted:
boolean
Property description was not set
-
type:
string
One of [STATIC, QUERY].
Nested Schema : assets
Type:
object
Property description was not set
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : AssetGroup_receive
Type:
Show Source
object
-
assets:
object assets
Property description was not set
-
assetsCount:
integer
Property description was not set
-
children:
array children
Property description was not set
-
description:
string
Property description was not set
-
id:
string
Property description was not set
-
name:
string
Property description was not set
-
organizationId:
string
Property description was not set
-
parentId:
string
Property description was not set
-
path:
array path
Property description was not set
-
placeId:
string
Property description was not set
-
query:
string
Property description was not set
-
restricted:
boolean
Property description was not set
-
type:
string
One of [STATIC, QUERY].
Nested Schema : assets
Type:
object
Property description was not set
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : PathToOrgEntityType_receive
Type:
Show Source
object
-
id:
string
Property description was not set
-
name:
string
Property description was not set
-
type:
string
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.
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.