Update Application Details by ID

put

/iot/api/v2/apps/{app-id}

Update application details with provided IoT Application definition, for given application id

Request

Supported Media Types
Path Parameters
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.

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.

404 Response

Not Found. The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

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 PUT 
   -u <username>:<password>
   -H 'Content-Type: application/json'
   http://iotserver/iot/api/v2/apps/{app-id}

Example of Request Body

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


{
"integrationIds":[
"integrationIds_1",
"integrationIds_2",
"integrationIds_3"
],
"metadata":{
"metadata_key1":"metadata_value1",
"metadata_key2":"metadata_value2",
"metadata_key3":"metadata_value3"
},
"fences":[
{
"3DFence":false,
"createdAsString":"2016-07-22T10:44:57.746Z",
"geoJSON":{
"crs":{
"type":"name",
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
}
},
"bbox":[
"bbox_1",
"bbox_2",
"bbox_3"
],
"geometry":{
"crs":{
"type":"name",
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
}
},
"bbox":[
"bbox_1",
"bbox_2",
"bbox_3"
]
},
"id":"20bf114937c6-6628",
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
}
},
"lastModifiedAsString":"2016-07-22T10:44:57.746Z",
"altitudeRange":[
"altitudeRange_1",
"altitudeRange_2",
"altitudeRange_3"
],
"name":"Human friendly name of the GeoFence",
"id":"33ba578a3ec0-3d27",
"applicationId":"472f7b031be-2350",
"enabled":false,
"tags":[
"tags_1",
"tags_2",
"tags_3"
]
}
],
"deviceModels":[
{
"urn":"urn:example:unique:identifier:of:the:resource:1dd0",
"formats":[
{
"urn":"urn:example:unique:identifier:of:the:resource:3877",
"name":"Message format name",
"description":"Message format description",
"deviceModel":"Device model that created this message format",
"type":"DATA",
"value":{
"fields":[
{
"name":"Name of the message format field",
"optional":false,
"type":"STRING"
}
]
}
}
],
"name":"Human friendly name of the device model",
"description":"Optional description of the device model",
"attributes":[
{
"name":"A name for the attribute",
"description":"A human friendly description",
"alias":"Optional alternative name",
"range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive.",
"type":"STRING",
"writable":false
}
],
"actions":[
{
"name":"A name for the action",
"argType":"STRING",
"description":"A human friendly description",
"alias":"Optional alternative name",
"range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive."
}
]
}
],
"name":"IoT Application name",
"description":"IoT Application description",
"deviceModelURNs":[
"deviceModelURNs_1",
"deviceModelURNs_2",
"deviceModelURNs_3"
],
"iacsServiceNames":[
"iacsServiceNames_1",
"iacsServiceNames_2",
"iacsServiceNames_3"
],
"type":"IoT Application type"
}

Example of Response Body

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


{
"exported":1469184297746,
"metadata":{
"metadata_key1":"metadata_value1",
"metadata_key2":"metadata_value2",
"metadata_key3":"metadata_value3"
},
"createdAsString":"2016-07-22T10:44:57.746Z",
"deviceModels":[
{
"formats":[
{
"urn":"urn:example:unique:identifier:of:the:resource:4165",
"name":"Message format name",
"description":"Message format description",
"deviceModel":"Device model that created this message format",
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"type":"DATA",
"value":{
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"fields":[
{
"name":"Name of the message format field",
"optional":false,
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"type":"STRING"
}
]
}
}
],
"createdAsString":"2016-07-22T10:44:57.746Z",
"created":1469184297746,
"description":"Optional description of the device model",
"userLastModified":"Name of the user who last to modify this device model",
"urn":"urn:example:unique:identifier:of:the:resource:68d9",
"system":false,
"lastModifiedAsString":"2016-07-22T10:44:57.746Z",
"draft":false,
"name":"Human friendly name of the device model",
"attributes":[
{
"name":"A name for the attribute",
"description":"A human friendly description",
"alias":"Optional alternative name",
"range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive.",
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"type":"STRING",
"writable":false
}
],
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"lastModified":1469184297746,
"actions":[
{
"name":"A name for the action",
"argType":"STRING",
"description":"A human friendly description",
"alias":"Optional alternative name",
"range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive.",
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
]
}
]
}
],
"created":1469184297746,
"description":"IoT Application description",
"userLastModified":"Name of the user performed last application update",
"type":"IoT Application type",
"exportedFrom":"Application instance export source",
"fences":[
{
"createdAsString":"2016-07-22T10:44:57.746Z",
"geoJSON":{
"crs":{
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"type":"name",
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
}
},
"bbox":[
"bbox_1",
"bbox_2",
"bbox_3"
],
"geometry":{
"crs":{
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"type":"name",
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
}
},
"bbox":[
"bbox_1",
"bbox_2",
"bbox_3"
],
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
]
},
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"id":"2f4c46177817-68ec",
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
}
},
"lastModifiedAsString":"2016-07-22T10:44:57.746Z",
"created":1469184297746,
"name":"Human friendly name of the GeoFence",
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"id":"12c15444750-e38",
"lastModified":1469184297746,
"applicationId":"7afd5bcd5b49-28d4",
"enabled":false,
"tags":[
"tags_1",
"tags_2",
"tags_3"
]
}
],
"lastModifiedAsString":"2016-07-22T10:44:57.746Z",
"exportedAsString":"2016-07-22T10:44:57.746Z",
"name":"IoT Application name",
"iacsServiceNames":[
"iacsServiceNames_1",
"iacsServiceNames_2",
"iacsServiceNames_3"
],
"links":[
{
"rel":"self",
"href":"http://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"http://iotserver/iot/api/version/resource/path"
}
],
"id":"71c344c11cc6-4045",
"lastModified":1469184297746
}



Complete cURL Example

The following example shows compete cURL comand that can be used to perform described operation

curl -X PUT 
   -u <username>:<password>
   -H 'Content-Type: application/json'
   -d '{"integrationIds":["integrationIds_1","integrationIds_2","integrationIds_3"],"metadata":{"metadata_key1":"metadata_value1","metadata_key2":"metadata_value2","metadata_key3":"metadata_value3"},"fences":[{"3DFence":false,"createdAsString":"2016-07-22T10:44:57.746Z","geoJSON":{"crs":{"type":"name","properties":{"properties_key1":"properties_value1","properties_key2":"properties_value2","properties_key3":"properties_value3"}},"bbox":["bbox_1","bbox_2","bbox_3"],"geometry":{"crs":{"type":"name","properties":{"properties_key1":"properties_value1","properties_key2":"properties_value2","properties_key3":"properties_value3"}},"bbox":["bbox_1","bbox_2","bbox_3"]},"id":"20bf114937c6-6628","properties":{"properties_key1":"properties_value1","properties_key2":"properties_value2","properties_key3":"properties_value3"}},"lastModifiedAsString":"2016-07-22T10:44:57.746Z","altitudeRange":["altitudeRange_1","altitudeRange_2","altitudeRange_3"],"name":"Human friendly name of the GeoFence","id":"33ba578a3ec0-3d27","applicationId":"472f7b031be-2350","enabled":false,"tags":["tags_1","tags_2","tags_3"]}],"deviceModels":[{"urn":"urn:example:unique:identifier:of:the:resource:1dd0","formats":[{"urn":"urn:example:unique:identifier:of:the:resource:3877","name":"Message format name","description":"Message format description","deviceModel":"Device model that created this message format","type":"DATA","value":{"fields":[{"name":"Name of the message format field","optional":false,"type":"STRING"}]}}],"name":"Human friendly name of the device model","description":"Optional description of the device model","attributes":[{"name":"A name for the attribute","description":"A human friendly description","alias":"Optional alternative name","range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive.","type":"STRING","writable":false}],"actions":[{"name":"A name for the action","argType":"STRING","description":"A human friendly description","alias":"Optional alternative name","range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive."}]}],"name":"IoT Application name","description":"IoT Application description","deviceModelURNs":["deviceModelURNs_1","deviceModelURNs_2","deviceModelURNs_3"],"iacsServiceNames":["iacsServiceNames_1","iacsServiceNames_2","iacsServiceNames_3"],"type":"IoT Application type"}'
   http://iotserver/iot/api/v2/apps/274666cf6079-6c41



Note that in the request, http://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