1. Home
  2. API
  3. Endpoints

Endpoints

Before you can access any of the available endpoints, make sure to create a valid access token. Also make sure to read the introduction to get familiar with our API.

Workspaces

To get a list of your workspaces, you can access the /api/bases endpoint.

$access_token = 't8ZMQLQiquuyMjHFqfqW0hlEvQsNioCQLLe9npgZ';

curl https://eniston.io/api/bases \
    -H "Authorization: Bearer $access_token" \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

Response

The response will be a list of all workspaces you created.

{
  "success": true,
  "bases": [
    {
      "id": "a04025b1-7964-47cz-9e9d-7175bn002bpf",
      "public": 1,
      "name": "ACME Knowledge Bases",
      "description": "<p>This is the description of your base in HTML.<\/p>",
      "meta_description": null,
      "custom_domain": "help.example.com",
      "custom_domain_active": 1,
      "allow_bots": 1,
      "custom_css": null,
      "theme": "docs"
    }
  ]
}

Single Workspace

You may also access a single workspace by providing the ID of the workspace you want to access. Use the /api/base/{id} endpoint for this. Replace {id} with the id of the workspace which can be obtained via the before mentioned /api/bases endpoint.

You can also find the ID of your workspaces(s) within the workspace settings.

$access_token = 't8ZMQLQiquuyMjHFqfqW0hlEvQsNioCQLLe9npgZ';

curl https://eniston.io/api/base/{id} \
    -H "Authorization: Bearer $access_token" \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

Response

The response is similar to the /api/bases endpoint, just on a per-workspace level.

{
  "success": true,
  "base": [
    {
      "id": "a04025b1-7964-47cz-9e9d-7175bn002bpf",
      "public": 1,
      "name": "ACME Knowledge Bases",
      "description": "<p>This is the description of your base in HTML.<\/p>",
      "meta_description": null,
      "custom_domain": "help.example.com",
      "custom_domain_active": 1,
      "allow_bots": 1,
      "custom_css": null,
      "theme": "docs"
    }
  ]
}

Single Category

If you want to access a category, use the /api/category/{id} endpoint. Replace {id} with the ID of the category. You can find the ID of each category in the category settings.

$access_token = 't8ZMQLQiquuyMjHFqfqW0hlEvQsNioCQLLe9npgZ';

curl https://eniston.io/api/category/{id} \
    -H "Authorization: Bearer $access_token" \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

Response

The response will be the category information, as well as all articles within that category. Only published articles will be listed and drafts will be ignored for this request.

{
  "success": true,
  "category": {
    "id": "086e359c-ba2d-3726-8ac8-22541d439edc",
    "base_id": "bf2003ad-9087-4980-ae87-1e8d40d92a5a",
    "name": "This is my category title",
    "icon": null,
    "font_icon": null,
    "description": "Velit et dolorem ut ut dolores enim explicabo. Commodi a praesentium pariatur quasi nulla et corrupti. Autem asperiores voluptas deserunt occaecati voluptas sed est.",
    "meta_description": null,
    "slug": "my-category-slug",
    "updated_at": "2021-08-07T13:20:05.000000Z",
    "articles": [
      {
        "id": "473edce6-ec9a-370b-a047-b527ca1613fc",
        "category_id": "086e359c-ba2d-3726-8ac8-22541d439edc",
        "title": "Necessitatibus qui perspiciatis tempore architecto repellat qui.",
        "slug": "necessitatibus-qui-perspiciatis-tempore-architecto-repellat-qui-1",
        "text": "<p>HTML formatted output<\/p>",
        "views": 14,
        "rating_happy": 3,
        "rating_neutral": 0,
        "rating_sad": 8,
        "keywords": null,
        "introtext": null,
        "updated_at": "2021-11-18T16:16:31.000000Z"
      },
      {
        "id": "968f7ed9-a3f6-3d0d-b75c-5c4454eb8c3a",
        "category_id": "086e359c-ba2d-3726-8ac8-22541d439edc",
        "title": "Nisi praesentium aut sit voluptatem.",
        "slug": "occaecati-asperiores-optio-facilis-deleniti",
        "text": "<p>HTML formatted output<\/p>",
        "views": 24,
        "rating_happy": 2,
        "rating_neutral": 3,
        "rating_sad": 4,
        "keywords": null,
        "introtext": null,
        "updated_at": "2021-08-07T12:29:43.000000Z"
      },
      {
        "id": "99eb3e36-46d4-3a73-8ee9-a71ee6ff89ea",
        "category_id": "086e359c-ba2d-3726-8ac8-22541d439edc",
        "title": "Fugit eum vitae ut quia ad.",
        "slug": "laborum-veritatis-illum-et-voluptatem",
        "text": "<p>HTML formatted output<\/p>",
        "views": 59,
        "rating_happy": 9,
        "rating_neutral": 0,
        "rating_sad": 0,
        "keywords": null,
        "introtext": null,
        "updated_at": "2021-10-15T07:39:29.000000Z"
      }
    ]
  }
}

Single Article

Use the /api/article/{id} endpoint to get information about a specific article. Replace {id} with the ID of the article you want to access. You can find the ID of the articles within the article settings.

Only published articles can be accessed via the API.

$access_token = 't8ZMQLQiquuyMjHFqfqW0hlEvQsNioCQLLe9npgZ';

curl https://eniston.io/api/article/{id} \
    -H "Authorization: Bearer $access_token" \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

Response

{
  "success": true,
  "article": {
    "id": "99eb3e36-46d4-3a73-8ee9-a71ee6ff89ea",
    "category_id": "086e359c-ba2d-3726-8ac8-22541d439edc",
    "title": "Fugit eum vitae ut quia ad.",
    "slug": "laborum-veritatis-illum-et-voluptatem",
    "text": "<p>Corporis nostrum laboriosam enim non. Possimus aut magnam praesentium ut rem ut. Ipsa ut enim nihil praesentium voluptatem tenetur ipsa.<\/p>",
    "views": 59,
    "rating_happy": 9,
    "rating_neutral": 6,
    "rating_sad": 3,
    "keywords": null,
    "introtext": null,
    "updated_at": "2021-10-15T07:39:29.000000Z"
  }
}

Was this article helpful?