From f737055b74a862385792bd28bef0feb1204b4c3f Mon Sep 17 00:00:00 2001 From: Cale Short Date: Tue, 1 Oct 2019 11:53:46 -0400 Subject: [PATCH] Add two rest api method templates --- _template/Methods/rest-api-method1.md | 54 +++++++++++++++++++ _template/Methods/rest-api-method2.md | 75 +++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) create mode 100644 _template/Methods/rest-api-method1.md create mode 100644 _template/Methods/rest-api-method2.md diff --git a/_template/Methods/rest-api-method1.md b/_template/Methods/rest-api-method1.md new file mode 100644 index 0000000000..d905479e8f --- /dev/null +++ b/_template/Methods/rest-api-method1.md @@ -0,0 +1,54 @@ +--- +pagename: Rest API Methods Template +redirect_from: + - a-link-which-will-redirect-to-this-page.html +sitesection: Documents +categoryname: Highest level sidebar category the document is under. eg. "Conversational AI" +documentname: 2nd folder level under the category. Usually the ProductName. eg. "Templates" +subfoldername: optional lowest level folder possible. eg. "Methods" +permalink: documentname-subfoldername-pagename.html +indicator: accepts "messaging" "chat" or "both" +--- + +Explain what this method does. + +{: .important} +Perhaps note that the developer should see the [introduction](introduction-to-this-product.html) to this product if they have not yet? + +### Request + +| Method | URL | +| --- | --- | +| GET | https://base/product/api/account/accountID/methodname?param1=value¶m2=value | + +#### Request Query Parameters + +| Name | Description | Type / Value | Required | +| --- | --- | --- | --- | +| param1 | This parameter specifies something | number | Yes | +| param2 | This specifies something else | string | No | + +### Response + +Explain generally what you will get back from this method. + +| Property Name | Description | Type / Value | Optional | +| --- | --- | --- | +| myprop | Tells you something | number | No | +| myobject | Contains info on something | object | No | +| info1 | Tells you stuff | string | No | +| info2 | Tells you things | string | Yes | + +#### Response Example + +```json +{ + "myprop": 4, + "myobject": { + "info1": "stuff", + "info2": "things" + } +} +``` + + diff --git a/_template/Methods/rest-api-method2.md b/_template/Methods/rest-api-method2.md new file mode 100644 index 0000000000..6bf55fa0c1 --- /dev/null +++ b/_template/Methods/rest-api-method2.md @@ -0,0 +1,75 @@ +--- +pagename: Rest API Method Two Template +redirect_from: + - a-link-which-will-redirect-to-this-page.html +sitesection: Documents +categoryname: Highest level sidebar category the document is under. eg. "Conversational AI" +documentname: 2nd folder level under the category. Usually the ProductName. eg. "Templates" +subfoldername: optional lowest level folder possible. eg. "Methods" +permalink: documentname-subfoldername-pagename.html +indicator: accepts "messaging" "chat" or "both" +--- + +Explain what this method does. + +{: .important} +Perhaps note that the developer should see the [introduction](introduction-to-this-product.html) to this product if they have not yet? + +### Request + +| Method | URL | +| --- | --- | +| POST | https://base/product/api/account/accountID/methodname?param1=value¶m2=value | + +#### Request Query Parameters + +| Name | Description | Type / Value | Required | +| --- | --- | --- | --- | +| param1 | This parameter specifies something | number | Yes | +| param2 | This specifies something else | string | No | + +#### Request Body + +Explain what the POST body payload is for. + +| Property Name | Description | Type / Value | Required | +| --- | --- | --- | --- | +| filter | filters something | boolean | No | +| start | specifies a timerange | object | Yes | +| from | timerange starting point | number | Yes | +| to | timerange ending point | number | No | + +##### Request Body Example + +```json +{ + "filter": true, + "start": { + "from": 1437054059354, + "to": 1437661693023 + } +} +``` + +### Response + +Explain generally what you will get back from this method. + +| Property Name | Description | Type / Value | Optional | +| --- | --- | --- | +| myprop | Tells you something | number | No | +| myobject | Contains info on something | object | No | +| info1 | Tells you stuff | string | No | +| info2 | Tells you things | string | Yes | + +#### Response Example + +```json +{ + "myprop": 4, + "myobject": { + "info1": "stuff", + "info2": "things" + } +} +```