Retrieve rule by ID

get

/productionMonitoring/clientapi/v2/rules/{rule-id}

This operation returns information about a rule that is specified by its ID. This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.

Request

Path Parameters
Query Parameters
  • The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
  • The comma-separated list of fields to be shown in response. By default all response object fields will be present.
Header Parameters
  • This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : RuleDocModel_receive
Type: object
Show Source
Nested Schema : actions
Type: array
The set of actions for the rule.
Show Source
Nested Schema : config
Type: object
Additional Properties Allowed
Show Source
  • A map of the following type: Map<String, String>
The rule configuration.
Show Source
Nested Schema : predicates
Type: array
The predicates for the rule.
Show Source
Nested Schema : sources
Type: object
Additional Properties Allowed
Show Source
  • A map of the following type: Map<String, String>
The source of the rule.
Show Source
Nested Schema : RuleActionDocModel_receive
Type: object
Show Source
Nested Schema : config
Type: object
Additional Properties Allowed
Show Source
  • A map of the following type: Map<String, String>
Config of Action
Show Source
Nested Schema : tags
Type: array
Tags of Action
Show Source
Nested Schema : PredicateModel_receive
Type: object
Show Source
Nested Schema : config
Type: object
Additional Properties Allowed
Show Source
  • A map of the following type: Map<String, String>
Config of Predicate
Show Source

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.
Back to Top

Examples

curl -X GET 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/productionMonitoring/clientapi/v2/rules/{rule-id}

Example of Response Body

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


{
"actions":[
{
"config":{
"config_key1":"config_value1",
"config_key2":"config_value2",
"config_key3":"config_value3"
},
"id":"bd47a1f7d4e-6373",
"tags":[
"tags_1",
"tags_2",
"tags_3"
],
"type":"Type of Action, One of [TRIGGERALERT, TRIGGERINCIDENT, TRIGGERWARNING]."
}
],
"applicationId":"62f169be5069-1edc",
"config":{
"config_key1":"config_value1",
"config_key2":"config_value2",
"config_key3":"config_value3"
},
"createdTime":1469184297746,
"createdTimeAsString":"2016-07-22T10:44:57.746Z",
"description":"The detailed description of the rule.",
"id":"72159344f33-5ebe",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":"2016-07-22T10:44:57.746Z",
"name":"The name of the rule.",
"organizationId":"637f70441ac2-213e",
"predicateCombination":"The manner in which to combine rule predicates. One of [ANY_OF, ALL_OF].",
"predicates":[
{
"config":{
"config_key1":"config_value1",
"config_key2":"config_value2",
"config_key3":"config_value3"
},
"type":"Type of Predicate, One of [THRESHOLD, GEO, ALERT, ANOMALY, PREDICTION, TREND]."
}
],
"sources":{
"sources_key1":"sources_value1",
"sources_key2":"sources_value2",
"sources_key3":"sources_value3"
},
"state":"The state of the rule. One of [ENABLED, DISABLED, INVALID].",
"system":false
}



Complete cURL Example

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

curl -X GET 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/productionMonitoring/clientapi/v2/rules/45b62ed93e04-7071



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