Difference between revisions of "Template: Web API"
From Genesys Documentation
(Created page with "<noinclude> == Usage == Use this template to build page content via Cargo queries for a specific Web API. {{Web_API |name= Name of API |category= (optional) category to sort...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Use this template to build page content via Cargo queries for a specific Web API. | Use this template to build page content via Cargo queries for a specific Web API. | ||
+ | <source> | ||
{{Web_API | {{Web_API | ||
|name= Name of API | |name= Name of API | ||
Line 8: | Line 9: | ||
|apibasepath= base URL used for API requests | |apibasepath= base URL used for API requests | ||
}} | }} | ||
+ | </source> | ||
Cargo queries will return all API requests and related info for the matching API name and category (if provided; otherwise category is ignored and all API requests are returned). | Cargo queries will return all API requests and related info for the matching API name and category (if provided; otherwise category is ignored and all API requests are returned). | ||
Line 13: | Line 15: | ||
Swagger content API definition is broken into three parts for Cargo storage: API request details; API request parameters; API request responses. | Swagger content API definition is broken into three parts for Cargo storage: API request details; API request parameters; API request responses. | ||
− | < | + | <source> |
{{Web_API_Request | {{Web_API_Request | ||
|apibasepath= base URL used for API requests | |apibasepath= base URL used for API requests | ||
Line 45: | Line 47: | ||
|example= | |example= | ||
}} | }} | ||
− | </ | + | </source> |
</noinclude> | </noinclude> | ||
+ | <includeonly> | ||
=={{#if: {{{category}}} | {{{category}}} | {{{name}}} }}== | =={{#if: {{{category}}} | {{{category}}} | {{{name}}} }}== | ||
− | ===Base path: {{apibasepath}}=== | + | ===Base path: {{{apibasepath}}}=== |
<!-- | <!-- | ||
Line 85: | Line 88: | ||
</source> | </source> | ||
--> | --> | ||
+ | </includeonly> |
Latest revision as of 15:38, November 6, 2023
Usage[edit source]
Use this template to build page content via Cargo queries for a specific Web API.
{{Web_API
|name= Name of API
|category= (optional) category to sort API queries into
|apibasepath= base URL used for API requests
}}
Cargo queries will return all API requests and related info for the matching API name and category (if provided; otherwise category is ignored and all API requests are returned).
Swagger content API definition is broken into three parts for Cargo storage: API request details; API request parameters; API request responses.
{{Web_API_Request
|apibasepath= base URL used for API requests
|apipath= added to base path to create the full API request URL
|apitype= DELETE, GET, POST, PUT
|category= (optional) category to sort API queries into
|summary= short description used in abbreviated form
|description= long description
|usage=
}}
{{Web_API_Parameter
|apibasepath= base URL used for API requests
|apipath= added to base path to create the full API request URL
|apitype= DELETE, GET, POST, PUT
|name=
|default=
|description=
|parametertype=
|datatype=
|required=
|example=
}}
{{Web_API_Response
|apibasepath= base URL used for API requests
|apipath= added to base path to create the full API request URL
|apitype= DELETE, GET, POST, PUT
|code=
|reason=
|example=
}}