Get Element

Get element with specified id.

get
Get Element

https://environment.lvis.io/api/v2/elements/:element_id
Request
Response
Request
Path Parameters
element_id
required
string
Element ID.
Headers
Authorization
required
string
Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb
Content-Type
required
string
application/vnd.api+json
Query Parameters
include
optional
string
Include additional relation to the response. For example, include=stats adds element stats to the response. Possible values: stats.
Response
200: OK
Check below examples of responses for different types of elements.

Example

curl --request GET \
--url https://environment.lvis.io/api/v2/elements/2862e114-2fa9-47ae-8774-2ba0b27f1887 \
--header 'Authorization: Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb' \
--header 'Content-Type: application/vnd.api+json'

The response depends on type of element, see examples below.

Data Element
Send Tweet Element
Data Element
{
"data": {
"id": "2862e114-2fa9-47ae-8774-2ba0b27f1887",
"type": "elements",
"attributes": {
"offset": 0,
"duration": 0,
"content_type": "media",
"start_mode": "manual",
"state": "non_scheduled",
"updated_at": null,
"updated_at_iso": null,
"revoked_at": null,
"revoked_at_iso": null,
"label": "Label example",
"custom_fields": [
{
"key": "label",
"values": {
"en": "Label example",
"by": null
}
},
{
"key": "image",
"values": {
"all": "https://example.com/image.jpg"
}
}
]
},
"relationships": {
"event": {
"data": {
"id": "cafc2ae8-2cd6-4664-bb20-e9e30a5f0e8d",
"type": "events"
}
},
"stats": {
"data": {
"id": "2862e114-2fa9-47ae-8774-2ba0b27f1887",
"type": "stats"
}
}
},
"links": {
"self": "https://environment.lvis.io/api/v2/elements/2862e114-2fa9-47ae-8774-2ba0b27f1887"
}
}
}
Send Tweet Element
{
"data": {
"id": "1f844f15-4be4-44ed-af60-e636860b2edc",
"type": "elements",
"attributes": {
"content_type": "tweet",
"duration": 0,
"offset": 0,
"revoked_at": null,
"revoked_at_iso": null,
"start_mode": "manual",
"state": "non_scheduled",
"tweet": {
"image_url": "//example.com/image.png",
"status": "Tweet message"
},
"updated_at": 1492511765,
"updated_at_iso": "2017-04-18T10:36:05Z"
},
"relationships": {
"event": {
"data": {
"id": "cafc2ae8-2cd6-4664-bb20-e9e30a5f0e8d",
"type": "events"
}
},
"stats": {
"data": {
"id": "1f844f15-4be4-44ed-af60-e636860b2edc",
"type": "stats"
}
}
},
"links": {
"self": "https://environment.lvis.io/api/v2/elements/1f844f15-4be4-44ed-af60-e636860b2edc"
}
}
}

Element attributes described in the Element Resource section.