Entities¶
Get Entities List¶
Gets Entity list within an account. This API can be used to get all Entities or filter by name.
Query Parameters¶
?name=
: Name of the entity. By default, it performs a contains match. To match the exact entity name, set the value with double quotes.?offset=
: Index to start for the next paginated request. Default value is0
.> ?limit=
: Number of items to include in each page result. There could be fewer items remaining than the specified value.
cURL request¶
$ curl -H "Authorization: Bearer <token>" \
"https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/entities?offset=0&limit=10&name=\%22Machine_1\"
Python¶
import requests
URL = 'https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/entities?offset=0&limit=10&name="Machine_1"
TOKEN = '<token>'
HEADERS = {'Authorization': f'Bearer {TOKEN}'}
response = requests.get(URL, headers=HEADERS)
print(response.json())
[
{
"id": "eeeeeeeeeeeeeeeeee",
"name": "Machine_1",
"key": "machine_1",
"type": "entities.entity",
"datastream": "yyyyyyyyyyyy",
"tenant": "xxxxxxxxxxxxxxx",
"createTime": 1661671135931,
"updateTime": 1661782660488,
"createdBy": "pod",
"updatedBy": "pod",
"archived": false,
"stats": {
"events": 561120,
"earliestDataPoint": "2022-08-26T19:25:30.000000Z",
"latestDataPoint": "2022-08-29T13:47:10.000000Z",
"dataSize": 0
},
"tags": [],
"links": []
}
]
Get an Entity¶
Get an Entity by ID within an account.
cURL request¶
$ curl -H "Authorization: Bearer <token>" \
"https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/entities/eeeeeeeeeeeeee"
Python¶
import requests
URL = 'https://app3.falkonry.ai/api/1.2/accounts/xxxxxxxxxxxxxxx/entities/eeeeeeeeeeeeee
TOKEN = '<token>'
HEADERS = {'Authorization': f'Bearer {TOKEN}'}
response = requests.get(URL, headers=HEADERS)
print(response.json())
{
"id": "eeeeeeeeeeeeeeeeee",
"name": "Machine_1",
"key": "machine_1",
"type": "entities.entity",
"datastream": "yyyyyyyyyyyy",
"tenant": "xxxxxxxxxxxxxxx",
"createTime": 1661671135931,
"updateTime": 1661782660488,
"createdBy": "pod",
"updatedBy": "pod",
"archived": false,
"stats": {
"events": 561120,
"earliestDataPoint": "2022-08-26T19:25:30.000000Z",
"latestDataPoint": "2022-08-29T13:47:10.000000Z",
"dataSize": 0
},
"tags": [],
"links": []
}