2015-11-15 16:49:22 +00:00
|
|
|
{% import 'tables.tmpl' as tables -%}
|
|
|
|
|
2015-06-01 11:03:42 +00:00
|
|
|
``{{endpoint.method}} {{endpoint.path}}``
|
|
|
|
{{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
|
2015-12-10 14:47:14 +00:00
|
|
|
{% if "deprecated" in endpoint and endpoint.deprecated -%}
|
|
|
|
.. WARNING::
|
|
|
|
This API is deprecated and will be removed from a future release.
|
|
|
|
|
|
|
|
{% endif -%}
|
2015-06-01 11:03:42 +00:00
|
|
|
|
2016-07-08 10:57:40 +00:00
|
|
|
{{endpoint.desc}}
|
2015-06-01 13:34:13 +00:00
|
|
|
|
2015-06-01 13:20:24 +00:00
|
|
|
{{":Rate-limited: Yes." if endpoint.rate_limited else "" }}
|
|
|
|
{{":Requires auth: Yes." if endpoint.requires_auth else "" }}
|
2015-06-01 13:34:13 +00:00
|
|
|
|
2018-08-31 12:55:27 +00:00
|
|
|
.. class:: httpheaders
|
|
|
|
|
|
|
|
Request format:
|
|
|
|
|
2015-11-11 11:39:40 +00:00
|
|
|
{% if (endpoint.req_param_by_loc | length) %}
|
2015-11-15 16:49:22 +00:00
|
|
|
{{ tables.split_paramtable(endpoint.req_param_by_loc) }}
|
2016-01-07 22:46:22 +00:00
|
|
|
{% if (endpoint.req_body_tables) %}
|
2016-01-07 22:04:30 +00:00
|
|
|
{% for table in endpoint.req_body_tables -%}
|
2018-08-30 16:01:27 +00:00
|
|
|
{{ tables.paramtable(table.rows, caption=(table.title or "")) }}
|
2018-08-29 15:38:59 +00:00
|
|
|
|
2016-01-07 22:04:30 +00:00
|
|
|
{% endfor -%}
|
|
|
|
{% endif -%}
|
2016-01-07 22:46:22 +00:00
|
|
|
|
2015-11-11 11:39:40 +00:00
|
|
|
{% else %}
|
|
|
|
`No parameters`
|
|
|
|
{% endif %}
|
2015-06-01 11:03:42 +00:00
|
|
|
|
2017-11-03 16:31:41 +00:00
|
|
|
{% if endpoint.res_headers is not none -%}
|
2018-08-31 12:55:27 +00:00
|
|
|
|
|
|
|
.. class:: httpheaders
|
|
|
|
|
|
|
|
Response headers:
|
2016-10-13 16:11:18 +00:00
|
|
|
|
2017-11-03 16:31:41 +00:00
|
|
|
{{ tables.paramtable(endpoint.res_headers.rows) }}
|
2016-10-13 16:11:18 +00:00
|
|
|
{% endif -%}
|
|
|
|
|
2015-06-02 11:03:10 +00:00
|
|
|
{% if endpoint.res_tables|length > 0 -%}
|
2018-08-31 12:55:27 +00:00
|
|
|
|
|
|
|
.. class:: httpheaders
|
|
|
|
|
|
|
|
Response format:
|
2015-06-01 14:54:16 +00:00
|
|
|
|
2015-06-02 11:03:10 +00:00
|
|
|
{% for table in endpoint.res_tables -%}
|
|
|
|
|
2018-08-30 16:01:27 +00:00
|
|
|
{{ tables.paramtable(table.rows, caption=(table.title or "")) }}
|
2018-08-29 15:38:59 +00:00
|
|
|
|
2015-06-02 11:03:10 +00:00
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
{% endif -%}
|
2015-06-01 14:54:16 +00:00
|
|
|
|
2018-08-31 12:55:27 +00:00
|
|
|
.. class:: httpheaders
|
|
|
|
|
|
|
|
Example request:
|
2015-10-26 17:25:33 +00:00
|
|
|
|
|
|
|
.. code:: http
|
2015-06-01 13:20:24 +00:00
|
|
|
|
|
|
|
{{endpoint.example.req | indent_block(2)}}
|
|
|
|
|
2016-05-06 14:42:31 +00:00
|
|
|
{% if endpoint.responses|length > 0 -%}
|
2018-08-31 12:55:27 +00:00
|
|
|
|
|
|
|
.. class:: httpheaders
|
|
|
|
|
|
|
|
Response{{"s" if endpoint.responses|length > 1 else "" }}:
|
2015-06-01 13:20:24 +00:00
|
|
|
|
2015-09-07 16:14:36 +00:00
|
|
|
{% endif -%}
|
|
|
|
|
2016-05-06 14:42:31 +00:00
|
|
|
{% for res in endpoint.responses -%}
|
2015-09-07 16:14:36 +00:00
|
|
|
|
|
|
|
**Status code {{res["code"]}}:**
|
|
|
|
|
|
|
|
{{res["description"]}}
|
|
|
|
|
2016-05-06 14:42:31 +00:00
|
|
|
{% if res["example"] -%}
|
|
|
|
|
2018-08-31 12:55:27 +00:00
|
|
|
.. class:: httpheaders
|
|
|
|
|
|
|
|
Example
|
2015-09-18 16:26:10 +00:00
|
|
|
|
|
|
|
.. code:: json
|
2015-09-07 16:14:36 +00:00
|
|
|
|
|
|
|
{{res["example"] | indent_block(2)}}
|
|
|
|
|
2016-05-06 14:42:31 +00:00
|
|
|
{% endif -%}
|
2016-01-13 15:55:51 +00:00
|
|
|
|
2016-05-06 14:42:31 +00:00
|
|
|
{% endfor %}
|