4. Advanced features

The API supports advanced feature usage, see the documentation below.
You can suggest additional features in the official Discord .

4.1. Etags

4.1.1. If-Match

The If-Match HTTP request header makes the request conditional. For GET methods, the server will send back the requested resource ONLY IF it matches one of the listed ETags .

see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match .

4.1.2. If-None-Match

The If-None-Match HTTP request header makes the request conditional. For GET methods, the server will send back the requested resource ONLY IF it doesn’t have an ETag that matches the ones provided.

see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match .

4.2. Global argument

4.2.1. JSON Path

A basic knowledge of the API and JSON Path is required.

The JSON Path selector is a way to select data in the query.
The root ( $ ) of the selector is the field data in the response.
This is based on the python-jsonpath-rw-ext , see the doc to learn how to use it.

Warning

Don’t forget to encode special characters ($, +, -, *, /).

Select the handle only:

GET / ( string: apikey ) /v1/live/user/dymerz?json_path=$.profile.display
In this example, we are fetching the data of a user named dymerz via the live source. Notice how we also have a json_path parameter with the value: profile.display .
This will result in selecting the display only:
{
  "message": "ok",
  "source": "live",
  "success": 1,
  "data": "[ΩP] Dymerz"
}

Search all unfinished tasks from the roadmap.

GET / ( string: apikey ) /v1/live/roadmap/starcitizen?json_path=$[*].cards[?(completed=0)]
{
  "message": "ok",
  "source": "live",
  "success": 1,
  "data": [
    {
      "board_id": 1,
      "body": "Prison uniform that will be provided to incarcerated Players serving a sentence.",
      "category_id": 3,
      "category_name": "Characters",
      "completed": 0,
      "description": "Creating a uniform for Players to wear while incarcerated. ",
      "id": "708",
      "importer_id": "SC-358590",
      "inprogress": 0,
      "name": "Prison Uniform",
      "order": 0,
      "release_id": 27,
      "released": 0,
      "scheduled_at": null,
      "tasks": 2,
      "thumbnail": {
          "id": "1896708",
          "urls": {
          "large": "/media/cm1pcw46m27aqr/hub_large/00-Prison-Uniform.jpg",
          "rect": "/media/cm1pcw46m27aqr/product_thumb_large/00-Prison-Uniform.jpg",
          "source": "/media/cm1pcw46m27aqr/source/00-Prison-Uniform.jpg",
          "square": "/media/cm1pcw46m27aqr/heap_infobox/00-Prison-Uniform.jpg"
          }
      },
      "time_created": 1573849305,
      "time_modified": 1576605345,
      "url_slug": "Prison-Uniform"
    }
  ]
}