From fd7b299442c95e6d3a870aefa51b04f38b2c70e2 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 26 Feb 2021 06:25:08 +0330 Subject: added a health endpoint. change endpoint name to alert. added a health endpoint.maybe a travis fix? --- api/hived.postman_collection.json | 32 +++++++++++++++++++--- api/swagger.yaml | 56 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 84 insertions(+), 4 deletions(-) (limited to 'api') diff --git a/api/hived.postman_collection.json b/api/hived.postman_collection.json index 3cab1e7..c6e3121 100644 --- a/api/hived.postman_collection.json +++ b/api/hived.postman_collection.json @@ -51,14 +51,40 @@ "response": [] }, { - "name": "addalert", + "name": "alert-post", "request": { "method": "GET", "header": [], "url": "" }, "response": [] + }, + { + "name": "alert-delete", + "request": { + "method": "GET", + "header": [], + "url": "" + }, + "response": [] + }, + { + "name": "ex", + "request": { + "method": "GET", + "header": [], + "url": "" + }, + "response": [] + }, + { + "name": "health", + "request": { + "method": "GET", + "header": [], + "url": null + }, + "response": [] } - ], - "protocolProfileBehavior": {} + ] } \ No newline at end of file diff --git a/api/swagger.yaml b/api/swagger.yaml index 9100e82..fb59e08 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -70,7 +70,7 @@ paths: properties: ratio: type: number - /addalerts: + /alerts: post: description: Add alerts to the alertmanager's list requestBody: @@ -99,3 +99,57 @@ paths: type: string isSuccessful: type: boolean + delete: + description: Remove an alert from alertmanager's list + parameters: + - name : id + in: query + description: the name of the alert that should be deleted + schema: + type: string + responses: + '200': + description: successful delete + content: + application/json: + schema: + type: object + properties: + err: + type: string + isSuccessful: + type: string + /ex: + get: + description: Returns the list of currencies that are available for trade + responses: + '200': + description: seccussful update + content: + application/json: + schema: + type: object + properties: + err: + type: string + isSuccessful: + type: boolean + tradaeble: + type: array + items: + type: string + /health: + get: + description: Returns the health status of hived + responses: + '200': + description: successful response + content: + application/json: + schema: + type: object + properties: + isOK: + type: boolean + Err: + type: string -- cgit v1.2.3