Fetch related datasets

You can fetch your related datasets like this:

[GET]https://<your-project-id>.app.jexia.com/rest/<dataset1>/<dataset2>

Authorization: <jexia-token>


or like this:

[GET]https://<your-project-id>.app.jexia.com/rest/<dataset2>/<dataset1>

Authorization: <jexia-token>


Example:

[GET]https://<your-project-id>.app.jexia.com/rest/authors/books

Authorization: <jexia-token>


Response:

[
    {
        "id": "127b54a4-f880-47ae-8760-89f42234a4af",
        "created_at": "2018-02-13T13:40:49.61886Z",
        "updated_at": null,
        "name": "The Author",
        "email": "theauthor@book.com",
        "books": [
            {
                "id": "363cdcfa-9bf9-42b2-b69d-dd00fb811ca3",
                "created_at": "2018-02-13T14:26:25.07194Z",
                "updated_at": null,
                "title": "My third book",
                "publishing_date": null,
                "authors_id": "127b54a4-f880-47ae-8760-89f42234a4af"
            },
            {
                "id": "7b45cb5e-bab6-49d2-8c6d-0ecdbc771fa5",
                "created_at": "2018-02-13T13:37:24.99517Z",
                "updated_at": null,
                "title": "My first book",
                "publishing_date": null,
                "authors_id": "127b54a4-f880-47ae-8760-89f42234a4af"
            }
        ]
    }
]


[GET]https://<your-project-id>.app.jexia.com/rest/books/authors

Authorization: <jexia-token>


Response:

[
  {
        "id": "7b45cb5e-bab6-49d2-8c6d-0ecdbc771fa5",
        "created_at": "2018-02-13T13:37:24.99517Z",
        "updated_at": null,
        "title": "My first book",
        "publishing_date": null,
        "authors_id": "127b54a4-f880-47ae-8760-89f42234a4af",
        "authors": [
            {
                "id": "127b54a4-f880-47ae-8760-89f42234a4af",
                "created_at": "2018-02-13T13:40:49.61886Z",
                "updated_at": null,
                "name": "The Author",
                "email": "theauthor@book.com"
            }
        ]
    }

]

Curl:

curl -i -H "Accept: application/json" -H ": application/json" -H "Authorization: <jexia-auth-token>" -X GET https://<project-id>.jexia.com/rest/<dataset1>/<dataset2>