elements

Get relation of one element to multiple specific elements.

Get relation of one element to multiple specific elements. The element will have local_from_top and local_from_bottom populated.Elements that are not found are ignored.

Required security scopes:

  • api:read
post/lists/{list_id}/elements/{element_id}/around

Request

Path parameters

element_idstring required

ID of element

list_idstring required

The ID of the list to apply the operation on. Can be a to z (both upper/lower case), 0 to 9 or one of these characters _-.

Query parameters

rangeinteger

Return this number of elements above and below the current element in neighbors field.

Request body

element_idsinteger[] required

IDs of elements

Example request

{
  "element_ids": [
    120,
    340,
    550
  ]
}

Response

OK

from_bottominteger required

Element rank in list from bottom. Bottom element has value 0.

from_topinteger required

Element rank in list from top. Top element has value 0.

idinteger required

ID of element

list_idstring required

The ID of the list to apply the operation on. Can be a to z (both upper/lower case), 0 to 9 or one of these characters _-.

local_from_bottominteger

Local element rank in list from bottom when requesting sub-list. Bottom element has value 0.

local_from_topinteger

Local element rank in list from top when requesting sub-list. Top element has value 0.

payloadobject required

Custom payload. Stored untouched. On updates null means do not update. {} is the empty value.

scoreinteger required

Score of the element. Higher score gives higher placement.

tie_breakerinteger required

Tie breaker, used if score matches for consistent sorting. Higher value = higher placement if score is equal.

updated_atstring date-time required

Date of last update

Example response

{
  "from_bottom": 4000,
  "from_top": 50,
  "id": 100,
  "list_id": "highscore-list",
  "local_from_bottom": 4000,
  "local_from_top": 50,
  "neighbors": {
    "above": [
      {
        "from_bottom": 4000,
        "from_top": 50,
        "id": 100,
        "list_id": "highscore-list",
        "payload": {
          "country": "dk",
          "name": "Mark Anthony"
        },
        "score": 100,
        "tie_breaker": 2000,
        "updated_at": "1996-11-22T14:02:34Z"
      },
      {
        "from_bottom": 4000,
        "from_top": 50,
        "id": 100,
        "list_id": "highscore-list",
        "payload": {
          "country": "dk",
          "name": "Mark Anthony"
        },
        "score": 100,
        "tie_breaker": 2000,
        "updated_at": "1996-11-22T14:02:34Z"
      }
    ],
    "below": [
      {
        "from_bottom": 4000,
        "from_top": 50,
        "id": 100,
        "list_id": "highscore-list",
        "payload": {
          "country": "dk",
          "name": "Mark Anthony"
        },
        "score": 100,
        "tie_breaker": 2000,
        "updated_at": "1996-11-22T14:02:34Z"
      },
      {
        "from_bottom": 4000,
        "from_top": 50,
        "id": 100,
        "list_id": "highscore-list",
        "payload": {
          "country": "dk",
          "name": "Mark Anthony"
        },
        "score": 100,
        "tie_breaker": 2000,
        "updated_at": "1996-11-22T14:02:34Z"
      },
      {
        "from_bottom": 4000,
        "from_top": 50,
        "id": 100,
        "list_id": "highscore-list",
        "payload": {
          "country": "dk",
          "name": "Mark Anthony"
        },
        "score": 100,
        "tie_breaker": 2000,
        "updated_at": "1996-11-22T14:02:34Z"
      }
    ]
  },
  "payload": {
    "country": "dk",
    "name": "Mark Anthony"
  },
  "score": 100,
  "tie_breaker": 2000,
  "updated_at": "2011-03-06T07:38:11Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.