> For the complete documentation index, see [llms.txt](https://docs.akenza.io/akenza.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akenza.io/akenza.io/get-started/reference/api-documentation.md).

# REST API

Akenza provides a REST API for programmatic access to its features. If you have any questions or want to request new API features, please submit a feature request [here](https://feedback.akenza.io).&#x20;

A set of examples, showing how to use the API:

**Python:**

{% embed url="<https://github.com/akenza-io/akenza-python-examples>" %}

**Javascript:**

{% embed url="<https://github.com/akenza-io/akenza-javascript-examples>" %}

**Java:**

{% embed url="<https://github.com/akenza-io/akenza-java-examples>" %}

The API documentation can be found here:

{% embed url="<https://docs.api.akenza.io>" %}

## Authenticating Requests

Requests can be authenticated with with **API Keys** by providing the `x-api-key` header or **OAuth2 Clients** with short-lived Baerer tokens passed as the `Authentication` header.

If the request is out of the specified permission scopes (e.g. Organization Delete) the API will return permission denied error.&#x20;

Refer to [Authentication](/akenza.io/get-started/reference/api-documentation/authentication.md) for more details.

## Example Request

<mark style="color:blue;">`GET`</mark> `https://api.akenza.io/v3/assets`

This request will fetch all Assets in a workspace using an API Key for authentication.

#### Query Parameters

| Name        | Type   | Description      |
| ----------- | ------ | ---------------- |
| workspaceId | string | The Workspace Id |

#### Headers

| Name      | Type   | Description        |
| --------- | ------ | ------------------ |
| x-api-key | string | The API Key Secret |

{% tabs %}
{% tab title="200 Returns a paginated list of Assets." %}

```
{
   "content":[
      {
         "id":"02d2327fedce2128",
         "name":"some device",
         "description":null,
         "type":"DEVICE",
         ...
      }
   ],
   "pageable":{
      ...
   },
   "totalPages":1,
   "totalElements":1,
   "last":true,
   "number":0,
   "sort":{
      ...
   },
   "size":25,
   "numberOfElements":1,
   "first":true,
   "empty":false
}
```

{% endtab %}

{% tab title="403 Returns an error object with the status and reason if e.g. the API Key permissions don't allow access to the Asset List. " %}

```
{
    "timestamp": "2021-02-19T15:06:56.928+00:00",
    "path": "/v3/assets",
    "status": 403,
    "error": "Forbidden",
    "message": "Permission denied",
    "requestId": "64fa58b0-18361",
    "errorId": "33a00d16-6a22-4687-99ca-90bb448e5eb2",
    "traceId": "8a7c4ea8ae80a5e4"
}
```

{% endtab %}
{% endtabs %}

## Backfilling

Backfilling allows adding data to a device using an http endpoint. It is possible to backfill data individually or in bulk for a single device.

All data sent this way will be processed by the output connectors and rules, therefore the body has to match the output of the device type script. If not specified the `timestamp` will be set to the current time and the `topic` to default.

The example requests can be found in the [akenza api documentation](https://docs.api.akenza.io/#4ce13d02-8eb7-42be-a661-a7abd767ae91)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.akenza.io/akenza.io/get-started/reference/api-documentation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
