From 8fa161df36fa21cfffdde80141d81fb26e98e7ce Mon Sep 17 00:00:00 2001 From: Jamie Li Date: Mon, 17 Jul 2023 11:22:16 -0700 Subject: [PATCH 1/3] Add the /event endpoint to Callback API.yml --- openapi/anchor-platform/Callbacks API.yml | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/openapi/anchor-platform/Callbacks API.yml b/openapi/anchor-platform/Callbacks API.yml index 37bdd8315..8cb675cfd 100644 --- a/openapi/anchor-platform/Callbacks API.yml +++ b/openapi/anchor-platform/Callbacks API.yml @@ -466,3 +466,34 @@ paths: application/json: schema: $ref: './schemas.yml#/components/schemas/Error' + /event: + post: + tags: + - Events + - SEP-24 + - SEP-31 + summary: Receive a event from the anchor platform. + operationId: postEvent + description: | + Receive a JSON object representing an event. + requestBody: + content: + application/json: + schema: + type: object + properties: + timestamp: + type: string + description: | + `timestamp` the current Unix timestamp (number of seconds since epoch) at the time the callback is sent. + payload: + $ref: './schemas.yml#/components/schemas/Event' + responses: + '200': + description: The event is successfully processed and ready to receive next event. The response body is empty. + '400': + description: The event is invalid or rejected. The response body contains the error message. + + + + From feb05c2c2b6b9288aa23b4d7874ee3aa8e5764b3 Mon Sep 17 00:00:00 2001 From: Jamie Li Date: Mon, 17 Jul 2023 11:37:03 -0700 Subject: [PATCH 2/3] Changed /event to /events --- openapi/anchor-platform/Callbacks API.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/anchor-platform/Callbacks API.yml b/openapi/anchor-platform/Callbacks API.yml index 8cb675cfd..a6d77cd2e 100644 --- a/openapi/anchor-platform/Callbacks API.yml +++ b/openapi/anchor-platform/Callbacks API.yml @@ -466,7 +466,7 @@ paths: application/json: schema: $ref: './schemas.yml#/components/schemas/Error' - /event: + /events: post: tags: - Events From 1ff4471c0adf54a0e7536ccf2e99f2d8a549cd3b Mon Sep 17 00:00:00 2001 From: Jamie Li Date: Tue, 18 Jul 2023 09:02:12 -0700 Subject: [PATCH 3/3] Changed /events to /event --- openapi/anchor-platform/Callbacks API.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/anchor-platform/Callbacks API.yml b/openapi/anchor-platform/Callbacks API.yml index a6d77cd2e..a4a086d18 100644 --- a/openapi/anchor-platform/Callbacks API.yml +++ b/openapi/anchor-platform/Callbacks API.yml @@ -466,7 +466,7 @@ paths: application/json: schema: $ref: './schemas.yml#/components/schemas/Error' - /events: + /event: post: tags: - Events @@ -485,7 +485,7 @@ paths: timestamp: type: string description: | - `timestamp` the current Unix timestamp (number of seconds since epoch) at the time the callback is sent. + `timestamp` the current Unix timestamp (number of seconds since epoch) at the time event is sent. payload: $ref: './schemas.yml#/components/schemas/Event' responses: