--- a/readme.md
+++ b/readme.md
@@ -59,7 +59,6 @@
{
"rulesID": 11,
"description": "New Rule",
- "parameters": "slumptest,corrigir",
"parameter": "slumptest",
"conditionValue": ">",
"controlValue": "5",
@@ -78,9 +77,9 @@
#### URL Parameters
Resource Parameter | Description
----- | ----
-api_version | Identifies the API version that will be used for the request
-app_id | Identifies the APP
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
+app_id | Identifies the APP.
#### Return Payload
@@ -97,7 +96,6 @@
{
"rulesID": 11,
"description": "New Rule",
- "parameters": "slumptest,corrigir",
"parameter": "slumptest",
"conditionValue": ">",
"controlValue": "5",
@@ -110,9 +108,9 @@
#### Return Codes
Code | Description
---- | ---
-200 | Data found.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+---- | -----------
+200 | Data Found.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Enabler 2 - Get Notifications
@@ -151,9 +149,9 @@
#### URL Parameters
Resource Parameter | Description
----- | ----
-api_version | Identifies the API version that will be used for the request
-app_id | Identifies the APP to show the notifications
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
+app_id | Identifies the APP to show the notifications.
#### Return Payload
@@ -201,11 +199,10 @@
```
#### Return Codes
-
-Code | Description
----- | ----
-200 | Data Found.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+Code | Description
+---- | -----------
+200 | Data Found.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Enabler 2 - Get Apps
@@ -229,8 +226,8 @@
"data": [
{
"token": "Es5zfsco57fieoQcDJZuIZxFZWv4HQbBYgUXRgqodQp",
- "appID": "MiguelID",
- "developerID": "miguel.rodrigues@knowledgebiz.pt"
+ "appID": "myawesomeappid",
+ "developerID": "david.aleixo@knowledgebiz.pt"
}
]
}
@@ -244,9 +241,9 @@
#### URL Parameters
Resource Parameter | Description
----- | ----
-api_version | Identifies the API version that will be used for the request
-developer_id | Identifies the Developer
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
+developer_id | Identifies the Developer.
#### Return Payload
@@ -270,15 +267,15 @@
#### Return Codes
Code | Description
---- | ---
-200 | Data Found.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+---- | -----------
+200 | Data Found.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Enabler 2 - Delete vApp
```http
-DELETE /api/vf-os-enabler/v0/delete/myawesomeappid
+DELETE /api/vf-os-enabler/v0/app/myawesomeappid
Accept: */*
```
@@ -298,15 +295,15 @@
Use this API call whenever is needed to delete vApp.
#### Request
-`GET /api/vf-os-enabler/<api_version>/delete/<app_id>`
-
-
-#### URL Parameters
-
-Resource Parameter | Description
----- | ----
-api_version | Identifies the API version that will be used for the request
-app_id | Identifies the APP
+`GET /api/vf-os-enabler/<api_version>/app/<app_id>`
+
+
+#### URL Parameters
+
+Resource Parameter | Description
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
+app_id | Identifies the APP.
#### Return Payload
@@ -322,17 +319,18 @@
```
#### Return Codes
-Code | Description
---- | ---
-200 | vApp deleted successfully.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+
+Code | Description
+---- | ---
+200 | vApp deleted successfully.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Enabler 2 - Delete Rules
```http
-DELETE /api/vf-os-enabler/v0/deleteRule/1
+DELETE /api/vf-os-enabler/v0/rule/1
Accept: */*
```
@@ -352,15 +350,15 @@
Use this API call whenever is needed to delete rule of vApp.
#### Request
-`GET /api/vf-os-enabler/<api_version>/deleteRule/<rule_id>`
-
-
-#### URL Parameters
-
-Resource Parameter | Description
----- | ----
-api_version | Identifies the API version that will be used for the request
-rule_id | Identifies the Rule
+`GET /api/vf-os-enabler/<api_version>/rule/<rule_id>`
+
+
+#### URL Parameters
+
+Resource Parameter | Description
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
+rule_id | Identifies the Rule.
#### Return Payload
@@ -377,9 +375,9 @@
#### Return Codes
Code | Description
---- | ---
-200 | Rule deleted successfully.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+---- | -----------
+200 | Rule deleted successfully.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Enabler 2 - Create Notifications
@@ -406,21 +404,21 @@
Use this API call whenever is needed to create a new notification.
#### Request
-`POST /api/vf-os-enabler/<api_version>/enabler/notifications`
-
-#### URL Parameters
-
-Resource Parameter | Description
----- | ----
-api_version | Identifies the API version that will be used for the request
+`POST /api/vf-os-enabler/<api_version>/notifications`
+
+#### URL Parameters
+
+Resource Parameter | Description
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
#### JSON Body Payload
-Name | Required | Type | Description
-------- | ----------- | ---- |
-emailTo | Yes | JSON | JSON document where is the value of emailTo.
-token | Yes | JSON | JSON document where is the value of token.
-body | Yes | JSON | JSON document where is the value of subject and subjectValue.
+Name | Required | Type | Description
+------- | ----------- | ------ | -----------
+emailTo | Yes | STRING | String where is the emails.
+token | Yes | STRING | String where is the token.
+body | Yes | JSON | JSON document where is the subject and subjectValue.
Example of JSON body payload structure:
` {
@@ -458,8 +456,8 @@
#### Return Codes
Code | Description
---- | ----
-200 | Notification created successfully.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+200 | Notification created successfully.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Enabler 2 - Register vApp
@@ -469,7 +467,7 @@
Accept: */*
Content-Type: application/json; charset=utf-8
-{"body":[{"my_key":"my_value"},{"my_key":"my_value"}]}
+{"appID":["my_appID1","my_appID2"],"developerID":["my_developerID","my_developerID"]}
```
```http
@@ -489,19 +487,32 @@
Use this API call whenever is needed to create vApp.
#### Request
-`POST /api/vf-os-enabler/<api_version>/enabler/register`
-
-#### URL Parameters
-
-Resource Parameter | Description
----- | ----
-api_version | Identifies the API version that will be used for the request
+`POST /api/vf-os-enabler/<api_version>/register`
+
+#### URL Parameters
+
+Resource Parameter | Description
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
#### JSON Body Payload
-Name | Required | Type | Description
----- | ---- | ---- | ---
-body | Yes | JSON | JSON document where the custom notification parameters are. Example: [{"appID" : "KBZ"},{"developerID" : "miguel.rodrigues@knowledgebiz.pt"}]
+Name | Required | Type | Description
+------------- | ----------- | ------ | -----------
+appID | Yes | STRING | String where is the appID.
+developerID | Yes | STRING | String where is the developerID.
+
+Example of JSON body payload structure:
+` {
+ "appID": [
+ "string",
+ "string"
+ ],
+ "developerID": [
+ "string",
+ "string"
+ ],
+ }`
#### Return Payload
@@ -521,8 +532,8 @@
#### Return Codes
Code | Description
---- | ----
-200 | vApp created successfully.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+200 | vApp created successfully.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Enabler 2 - Create Rules
@@ -531,7 +542,7 @@
Accept: */*
Content-Type: application/json; charset=utf-8
-{"body":[{"my_key":"my_value"},{"my_key":"my_value"},{"my_key":"my_value"},{"my_key":"my_value"},{"my_key":"my_value"},{"my_key":"my_value"},{"my_key":"my_value"]}
+{"appID":"my_appID","description":"my_description","parameter":"my_parameter","conditionValue":"my_conditionValue","controlValue":"my_controlValue","notificationType":"my_notificationType"}
```
```http
@@ -550,37 +561,52 @@
Use this API call whenever is needed to create a rule of vApp.
#### Request
-`POST /api/vf-os-enabler/<api_version>/enabler/rules`
-
-#### URL Parameters
-
-Resource Parameter | Description
+`POST /api/vf-os-enabler/<api_version>/notification/rules/`
+
+#### URL Parameters
+
+Resource Parameter | Description
+------------------ | -----------
+api_version | Identifies the API version that will be used for the request.
+
+#### JSON Body Payload
+
+Name | Required | Type | Description
+---------------- | -------- | ------ | -----------
+appID | Yes | STRING | String where is the vAppID.
+description | Yes | STRING | String where is the description.
+parameter | Yes | STRING | String where is the parameter for the rule.
+conditionValue | Yes | STRING | String where is the conditionValue (>, <, >=, <=, ==).
+controlValue | Yes | STRING | String where is the controlValue (Threshold).
+notificationType | Yes | STRING | String where is the Notification Type (1 - Notify End of Month, 2 - Notify End of Two Weeks, 3 - Notify End of Week, 4 - Notify End of Three Days, 5 - Notify Immediately).
+
+Example of JSON body payload structure:
+` {
+ "appID": "string",
+ "description": "string",
+ "parameter": "string",
+ "conditionValue": "string",
+ "controlValue": "string",
+ "notificationType": "string"
+ }`
+
+#### Return Payload
+
+The API response will contain a JSON document with the property `success`: **true**, **false** and the `reason` if the `success` became **false**.
+
+Example:
+
+```json
+{
+ "success": true
+}
+```
+
+#### Return Codes
+Code | Description
---- | ----
-api_version | Identifies the API version that will be used for the request
-
-#### JSON Body Payload
-
-Name | Required | Type | Description
----- | ---- | ---- | ---
-body | Yes | JSON | JSON document where the custom notification parameters are. Example: [{"appID" : "KBZ"},{"description" : "So many Tests"},{"parameter" : "Test"},{"conditionValue" : ">"},{"controlValue" : "100"},{"notificationType" : "5"}]
-
-#### Return Payload
-
-The API response will contain a JSON document with the property `success`: **true**, **false** and the `reason` if the `success` became **false**.
-
-Example:
-
-```json
-{
- "success": true
-}
-```
-
-#### Return Codes
-Code | Description
----- | ----
-200 | Rule created successfully.
-500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
+200 | Rule created successfully.
+500 | Internal Server Error - There was an unexpected error at some point during the processing of the request.
### Powered by: