Retrieve the rules of an asset
GEThttps://demo.openremote.io/api/master/rules/asset/for/:assetId
Retrieve the rules of an asset
Request
Path Parameters
assetId stringrequired
Query Parameters
language string[]
Possible values: [JAVASCRIPT
, GROOVY
, JSON
, FLOW
]
fullyPopulate boolean
Header Parameters
Authorization string
X-Forwarded-Proto string
X-Forwarded-Host string
Responses
- default
default response
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
idint64
versionint64
createdOndate-time
lastModifieddate-time
namestringrequired
Possible values: >= 3 characters
and <= 255 characters
enabledboolean
rulesstring
langstringrequired
Possible values: [JAVASCRIPT
, GROOVY
, JSON
, FLOW
]
meta object
statusstring
Possible values: [READY
, DEPLOYED
, COMPILATION_ERROR
, VALIDITY_PERIOD_ERROR
, EXECUTION_ERROR
, LOOP_ERROR
, DISABLED
, PAUSED
, EXPIRED
, REMOVED
, EMPTY
]
errorstring
assetIdstring
accessPublicReadboolean
realmstring
[
{
"id": 0,
"version": 0,
"createdOn": "2024-07-29T15:51:28.071Z",
"lastModified": "2024-07-29T15:51:28.071Z",
"name": "string",
"enabled": true,
"rules": "string",
"lang": "JAVASCRIPT",
"meta": {},
"status": "READY",
"error": "string",
"assetId": "string",
"accessPublicRead": true,
"realm": "string"
}
]
Authorization: oauth2
name: openidtype: oauth2flows: {
"clientCredentials": {
"tokenUrl": "/auth/realms/master/protocol/openid-connect/token",
"refreshUrl": "/auth/realms/master/protocol/openid-connect/token",
"scopes": {
"profile": "profile"
}
},
"authorizationCode": {
"authorizationUrl": "/auth/realms/master/protocol/openid-connect/auth",
"tokenUrl": "/auth/realms/master/protocol/openid-connect/token",
"refreshUrl": "/auth/realms/master/protocol/openid-connect/token",
"scopes": {
"profile": "profile"
}
}
}
- curl
- nodejs
- java
- python
- ruby
- csharp
- go
- php
- powershell
- CURL
curl -L 'https://demo.openremote.io/api/master/rules/asset/for/:assetId' \
-H 'Authorization: Bearer <token>'
ResponseClear