---js const pagination = { data: 'apiSpec.modules', size: 1, alias: 'module', } const eleventyComputed = { title: (data) => `${data.module.name} - API reference`, permalink: (data) => `/developers/api/reference/${data.module.slug}/`, } --- {% from "partials/api-schema.njk" import schema %}

{{ module.name }}

{% if module.description %}

{{ module.description }}

{% endif %}

All modules ยท {{ module.operationCount }} method{{ 's' if module.operationCount != 1 }}

Every call is an HTTP POST. The response body is the JSON-RPC envelope { "id", "jsonrpc", "result" }; the Result schema below describes result. Errors come back as HTTP 500 with an rpc_error body.

{% for op in module.operations %}

{{ op.method }}

{% if op.summary %}

{{ op.summary }}

{% endif %}

POST {{ op.route }}

{% if op.description %}

{{ op.description }}

{% endif %} {% if op.auth %}

Auth: send the header Authorization: Token <session_id> (see API keys).

{% endif %} {% if op.errorCodes.length %}

Throws: {%- for code in op.errorCodes %} {{ code }}{{ ',' if not loop.last }}{% endfor %} (error codes)

{% endif %}

Request body

{% if op.requestSchema %} {{ schema(op.requestSchema, apiSpec.schemas) }} {% else %}

No request body.

{% endif %}

Result

{{ schema(op.resultSchema, apiSpec.schemas) }}
{% endfor %}