2020-01-01 22:37:59 +01:00
|
|
|
---
|
|
|
|
title: Context
|
2020-01-12 14:11:56 +01:00
|
|
|
description: Represents the tree around a given status. Used for reconstructing threads of statuses.
|
2020-01-01 22:37:59 +01:00
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: entities
|
2022-11-20 07:34:38 +01:00
|
|
|
aliases: [
|
|
|
|
"/entities/context",
|
|
|
|
"/entities/Context",
|
|
|
|
"/api/entities/context",
|
|
|
|
"/api/entities/Context",
|
|
|
|
]
|
2020-01-01 22:37:59 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2022-11-20 07:34:38 +01:00
|
|
|
```json
|
2020-01-01 22:37:59 +01:00
|
|
|
{
|
|
|
|
"ancestors": [
|
|
|
|
{
|
|
|
|
"id": "103188938570975982",
|
|
|
|
"created_at": "2019-11-23T19:44:00.124Z",
|
|
|
|
"in_reply_to_id": null,
|
2022-11-20 07:34:38 +01:00
|
|
|
// ...
|
2020-01-01 22:37:59 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "103188971072973252",
|
|
|
|
"created_at": "2019-11-23T19:52:23.398Z",
|
|
|
|
"in_reply_to_id": "103188938570975982",
|
2022-11-20 07:34:38 +01:00
|
|
|
// ...
|
2020-01-01 22:37:59 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "103188982235527758",
|
|
|
|
"created_at": "2019-11-23T19:55:08.208Z",
|
|
|
|
"in_reply_to_id": "103188971072973252",
|
2022-11-20 07:34:38 +01:00
|
|
|
// ...
|
|
|
|
}
|
2020-01-01 22:37:59 +01:00
|
|
|
],
|
|
|
|
"descendants": [
|
|
|
|
{
|
|
|
|
"id": "103189026958574542",
|
|
|
|
"created_at": "2019-11-23T20:06:36.011Z",
|
|
|
|
"in_reply_to_id": "103189005915505698",
|
2022-11-20 07:34:38 +01:00
|
|
|
// ...
|
2020-01-01 22:37:59 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-11-20 07:34:38 +01:00
|
|
|
## Attributes
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `ancestors` {#ancestors}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** Parents in the thread.\
|
2022-11-20 07:34:38 +01:00
|
|
|
**Type:** Array of [Status]({{< relref "entities/Status" >}})\
|
|
|
|
**Version history:**\
|
|
|
|
0.6.0 - added
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
### `descendants` {#descendants}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2020-01-12 14:11:56 +01:00
|
|
|
**Description:** Children in the thread.\
|
2022-11-20 07:34:38 +01:00
|
|
|
**Type:** Array of [Status]({{< relref "entities/Status" >}})\
|
|
|
|
**Version history:**\
|
|
|
|
0.6.0 - added
|
2020-01-01 22:37:59 +01:00
|
|
|
|
|
|
|
## See also
|
|
|
|
|
2022-11-20 07:34:38 +01:00
|
|
|
{{< page-relref ref="methods/statuses#context" caption="GET /api/v1/statuses/:id/context" >}}
|
2020-01-01 22:37:59 +01:00
|
|
|
|
2022-11-20 07:34:38 +01:00
|
|
|
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/context_serializer.rb" caption="app/serializers/rest/context_serializer.rb" >}}
|