diff --git a/.github/workflows/validate-api.yml b/.github/workflows/validate-api.yml
new file mode 100644
index 0000000..acb2894
--- /dev/null
+++ b/.github/workflows/validate-api.yml
@@ -0,0 +1,29 @@
+name: Validate OpenAPI Spec
+on:
+ push:
+ paths:
+ - 'api/**'
+ - '.spectral.yml'
+ pull_request:
+ paths:
+ - 'api/**'
+ - '.spectral.yml'
+
+jobs:
+ validate:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Spectral
+ run: npm install -g @stoplight/spectral-cli
+
+ - name: Lint OpenAPI spec
+ run: spectral lint api/Govstack_scheduler_BB_APIs.json --ruleset .spectral.yml
+
+ - name: Check for stale API files
+ run: |
+ STALE=$(find spec/.gitbook/assets -name '*scheduler_api*' 2>/dev/null | wc -l)
+ if [ "$STALE" -gt 0 ]; then
+ echo "::warning::Found $STALE stale API files in spec/.gitbook/assets/"
+ fi
diff --git a/.spectral.yml b/.spectral.yml
new file mode 100644
index 0000000..34e75f2
--- /dev/null
+++ b/.spectral.yml
@@ -0,0 +1,77 @@
+extends:
+ - "spectral:oas"
+
+rules:
+ # Built-in rules
+ oas3-api-servers: warn
+ operation-operationId: error
+ oas3-valid-schema-example: warn
+
+ # Custom: security schemes must be defined
+ security-schemes-defined:
+ description: securitySchemes must be defined and not empty
+ severity: error
+ given: "$.components"
+ then:
+ field: securitySchemes
+ function: truthy
+
+ # Custom: global security must be defined
+ global-security-defined:
+ description: Top-level security block must be defined
+ severity: error
+ given: "$"
+ then:
+ field: security
+ function: truthy
+
+ # Custom: no auth tokens in query string
+ no-query-string-auth:
+ description: Auth parameters must not be passed as query strings
+ severity: error
+ given: "$.paths.*.*.parameters[?(@.in=='query')]"
+ then:
+ field: name
+ function: pattern
+ functionOptions:
+ notMatch: "[Tt]oken|[Aa]uth|[Kk]ey|[Ss]ecret|[Pp]assword"
+
+ # Custom: valid media type keys in response content
+ valid-media-type:
+ description: Response content-type keys must use standard media types
+ severity: error
+ given: "$.paths.*.*.responses.*.content"
+ then:
+ function: schema
+ functionOptions:
+ schema:
+ type: object
+ propertyNames:
+ pattern: "^(application|text|image|audio|video|multipart|font)/"
+
+ # Custom: POST create endpoints should return 201
+ post-create-returns-201:
+ description: Non-search POST endpoints should return 201
+ severity: warn
+ given: "$.paths[?(!@property.match(/search|availability/))].post.responses"
+ then:
+ field: "201"
+ function: truthy
+
+ # Custom: DELETE should return 204
+ delete-returns-204:
+ description: DELETE endpoints should return 204
+ severity: warn
+ given: "$.paths.*.delete.responses"
+ then:
+ field: "204"
+ function: truthy
+
+ # Custom: operations should have 401 response
+ has-401-response:
+ description: Operations should define a 401 response
+ severity: warn
+ given: "$.paths.*.*.responses"
+ then:
+ field: "401"
+ function: truthy
diff --git a/api/Govstack_scheduler_BB_APIs.json b/api/Govstack_scheduler_BB_APIs.json
index 40cc39a..9f01705 100644
--- a/api/Govstack_scheduler_BB_APIs.json
+++ b/api/Govstack_scheduler_BB_APIs.json
@@ -1,3759 +1,3445 @@
{
- "openapi" : "3.0.1",
- "info" : {
- "title" : "Govstack Scheduler API",
- "description" : "Interfaces to services rendered by Scheduler building block",
- "termsOfService" : "TBD",
- "contact" : {
- "email" : "psramkumar2@gmail.com"
+ "openapi": "3.0.1",
+ "info": {
+ "title": "Govstack Scheduler API",
+ "description": "Interfaces to services rendered by Scheduler building block",
+ "termsOfService": "TBD",
+ "contact": {
+ "email": "psramkumar2@gmail.com"
},
- "license" : {
- "name" : "Apache 2.0",
- "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
+ "license": {
+ "name": "Apache 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
- "version" : "1.0.0"
+ "version": "1.0.0"
},
- "externalDocs" : {
- "description" : "Find out more about scheduler",
- "url" : "https://www.govstack.global/"
+ "externalDocs": {
+ "description": "Find out more about scheduler",
+ "url": "https://www.govstack.global/"
},
- "servers" : [ {
- "url" : "http://ss2.egovstack.net/r1/eGovStack/COM/11222456/SchedulerBB/creg/",
- "description" : "Scheduler BB Security server"
- } ],
- "tags" : [ {
- "name" : "event",
- "description" : "event management API"
- }, {
- "name" : "entity",
- "description" : "entity management API"
- }, {
- "name" : "alert_schedule",
- "description" : "alert_schedule management API"
- }, {
- "name" : "resource",
- "description" : "resource management API"
- }, {
- "name" : "subscribers",
- "description" : "subscriber management API"
- }, {
- "name" : "message",
- "description" : "message management API"
- }, {
- "name" : "log",
- "description" : "log management API"
- }, {
- "name" : "affiliation",
- "description" : "affiliation management API"
- }, {
- "name" : "appointment",
- "description" : "appointment management API"
- } ],
- "paths" : {
- "/event/new" : {
- "post" : {
- "tags" : [ "event" ],
- "summary" : "create a new event, in event_list with given event_details, returns new event id or failure error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/event_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created event",
- "example" : "event_id:12345"
+ "servers": [
+ {
+ "url": "https://{host}/api/v1/scheduler",
+ "description": "Scheduler BB API server",
+ "variables": {
+ "host": {
+ "default": "example.govstack.global",
+ "description": "Hostname of the Scheduler BB deployment"
+ }
+ }
+ }
+ ],
+ "tags": [
+ {
+ "name": "event",
+ "description": "event management API"
+ },
+ {
+ "name": "entity",
+ "description": "entity management API"
+ },
+ {
+ "name": "alert_schedule",
+ "description": "alert_schedule management API"
+ },
+ {
+ "name": "resource",
+ "description": "resource management API"
+ },
+ {
+ "name": "subscriber",
+ "description": "subscriber management API"
+ },
+ {
+ "name": "message",
+ "description": "message management API"
+ },
+ {
+ "name": "log",
+ "description": "log management API"
+ },
+ {
+ "name": "affiliation",
+ "description": "affiliation management API"
+ },
+ {
+ "name": "appointment",
+ "description": "appointment management API"
+ }
+ ],
+ "paths": {
+ "/event": {
+ "post": {
+ "tags": [
+ "event"
+ ],
+ "summary": "create a new event, in event_list with given event_details, returns new event id or failure error code",
+ "description": "create a new event, in event_list with given event_details, returns new event id or failure error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created event",
+ "example": "event_id:12345"
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/event/modifications" : {
- "put" : {
- "tags" : [ "event" ],
- "summary" : "changes values of specific details (as given by event_details) of given event (selected by event_filter)in event_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "event_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "12345"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/event_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, event updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/event_new_qry"
+ }
+ }
}
- }
+ },
+ "operationId": "createEvent"
}
},
- "/event" : {
- "delete" : {
- "tags" : [ "event" ],
- "summary" : "delete a predefined event in event_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "event_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "12345"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, event cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "/event/{event_id}": {
+ "put": {
+ "tags": [
+ "event"
+ ],
+ "summary": "changes values of specific details (as given by event_details) of given event (selected by event_filter)in event_list and returns success or error code",
+ "description": "changes values of specific details (as given by event_details) of given event (selected by event_filter)in event_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "event_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the event"
}
- }
- }
- },
- "/event/list_details" : {
- "get" : {
- "tags" : [ "event" ],
- "summary" : "get list of events filetered by criteria in event_filter and return info specified by event_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/event_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,event_list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/event_list"
- }
- }
- }
- }
+ ],
+ "responses": {
+ "200": {
+ "description": "success, event updated"
+ },
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
},
- "400" : {
- "description" : "Invalid request"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "403" : {
- "description" : "No permission"
+ "default": {
+ "description": "Unexpected error"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/appointment/new" : {
- "post" : {
- "tags" : [ "appointment" ],
- "summary" : "create a new appointment, in appointment_list with given appointment_details, returns new appointment id or failure error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/appointment_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created appointment",
- "example" : "[Event_id:12345,appointment_id:1]"
- }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/event_modify_qry"
}
}
+ }
+ },
+ "operationId": "updateEvent"
+ },
+ "delete": {
+ "tags": [
+ "event"
+ ],
+ "summary": "delete a predefined event in event_list and returns success or error code",
+ "description": "delete a predefined event in event_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "event_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the event"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
},
- "400" : {
- "description" : "Invalid request"
+ "403": {
+ "description": "No permission"
},
- "403" : {
- "description" : "No permission"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "default": {
+ "description": "Unexpected error"
},
- "default" : {
- "description" : "Unexpected error"
- }
- }
- }
- },
- "/appointment/modifications" : {
- "put" : {
- "tags" : [ "appointment" ],
- "summary" : "changes values of specific details (as given by appointment_details) of given appointment (selected by appointment_filter)in appointment_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "appointment_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/appointment_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, appointment updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
- }
- }
- }
- },
- "/appointment" : {
- "delete" : {
- "tags" : [ "appointment" ],
- "summary" : "delete a predefined appointment in appointment_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "appointment_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, appointment cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "204": {
+ "description": "Resource deleted successfully"
+ },
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "operationId": "deleteEvent"
}
},
- "/appointment/list_details" : {
- "get" : {
- "tags" : [ "appointment" ],
- "summary" : "get list of appointments filetered by criteria in appointment_filter and return info specified by appointment_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/appointment_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,appointment_list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/appointment_list"
+ "/event/search": {
+ "post": {
+ "tags": [
+ "event"
+ ],
+ "summary": "get list of events filetered by criteria in event_filter and return info specified by event_details_required with success or error code",
+ "description": "get list of events filetered by criteria in event_filter and return info specified by event_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,event_list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/event_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
}
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
},
- "403" : {
- "description" : "No permission"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "default": {
+ "description": "Unexpected error"
},
- "default" : {
- "description" : "Unexpected error"
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/event_get_details_qry"
+ }
+ }
+ }
+ },
+ "operationId": "searchEvents",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
+ },
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
+ }
+ ]
}
},
- "/entity/new" : {
- "post" : {
- "tags" : [ "entity" ],
- "summary" : "create a new entity, in entity_list with given entity_details, returns new entity id or entity error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/entity_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created entity",
- "example" : "entity_name:xyz hospital,entity_id:67890"
+ "/entity": {
+ "post": {
+ "tags": [
+ "entity"
+ ],
+ "summary": "create a new entity, in entity_list with given entity_details, returns new entity id or entity error code",
+ "description": "create a new entity, in entity_list with given entity_details, returns new entity id or entity error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created entity",
+ "example": "entity_name:xyz hospital,entity_id:67890"
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/entity/modifications" : {
- "put" : {
- "tags" : [ "entity" ],
- "summary" : "changes values of specific details (as given by entity_details) of given entity (selected by entity_filter)in entity_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "entity_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "67890"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/entity_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, entity updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/entity_new_qry"
+ }
+ }
}
- }
+ },
+ "operationId": "createEntity"
}
},
- "/entity" : {
- "delete" : {
- "tags" : [ "entity" ],
- "summary" : "delete a predefined entity in entity_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "entity_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "67890"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, entity cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "/entity/{entity_id}": {
+ "put": {
+ "tags": [
+ "entity"
+ ],
+ "summary": "changes values of specific details (as given by entity_details) of given entity (selected by entity_filter)in entity_list and returns success or error code",
+ "description": "changes values of specific details (as given by entity_details) of given entity (selected by entity_filter)in entity_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "entity_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the entity"
}
- }
- }
- },
- "/entity/list_details" : {
- "get" : {
- "tags" : [ "entity" ],
- "summary" : "get list of entities filetered by criteria in entity_filter and return info specified by entity_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/entity_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,entity list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/entity_list"
- }
- }
+ ],
+ "responses": {
+ "200": {
+ "description": "success, entity updated"
+ },
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/entity_modify_qry"
}
}
+ }
+ },
+ "operationId": "updateEntity"
+ },
+ "delete": {
+ "tags": [
+ "entity"
+ ],
+ "summary": "delete a predefined entity in entity_list and returns success or error code",
+ "description": "delete a predefined entity in entity_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "entity_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the entity"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "400" : {
- "description" : "Invalid request"
+ "default": {
+ "description": "Unexpected error"
},
- "403" : {
- "description" : "No permission"
+ "204": {
+ "description": "Resource deleted successfully"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "operationId": "deleteEntity"
}
},
- "/resource/new" : {
- "post" : {
- "tags" : [ "resource" ],
- "summary" : "create a new resource, in resource_list with given resource_details, returns new resource id or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/resource_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created resource",
- "example" : "resource_name:xyz hospital,resource_id:54321"
+ "/entity/search": {
+ "post": {
+ "tags": [
+ "entity"
+ ],
+ "summary": "get list of entities filetered by criteria in entity_filter and return info specified by entity_details_required with success or error code",
+ "description": "get list of entities filetered by criteria in entity_filter and return info specified by entity_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,entity list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/entity_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
+ }
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "403" : {
- "description" : "No permission"
+ "default": {
+ "description": "Unexpected error"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/resource/modifications" : {
- "put" : {
- "tags" : [ "resource" ],
- "summary" : "changes values of specific details (as given by resource_details) of given resource (selected by resource_filter)in resource_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "resource_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "54321"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/resource_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, resource updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/entity_get_details_qry"
+ }
+ }
}
- }
- }
- },
- "/resource" : {
- "delete" : {
- "tags" : [ "resource" ],
- "summary" : "delete a predefined resource in resource_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "resource_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "54321"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, resource cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "operationId": "searchEntities",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
+ },
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
}
- }
+ ]
}
},
- "/resource/list_details" : {
- "get" : {
- "tags" : [ "resource" ],
- "summary" : "get list of entities filetered by criteria in resource_filter and return info specified by resource_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/resource_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,resource list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/resource_list"
- }
+ "/resource": {
+ "post": {
+ "tags": [
+ "resource"
+ ],
+ "summary": "create a new resource, in resource_list with given resource_details, returns new resource id or error code",
+ "description": "create a new resource, in resource_list with given resource_details, returns new resource id or error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created resource",
+ "example": "resource_name:xyz hospital,resource_id:54321"
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/resource_new_qry"
+ }
+ }
+ }
+ },
+ "operationId": "createResource"
}
},
- "/resource/availability" : {
- "get" : {
- "tags" : [ "resource" ],
- "summary" : "get details of resources matching criteria given by free_resource_filter, that are free(unallocated) in a given date range and entity and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/resource_get_availability_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,resource list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/free_resource_list"
- }
- }
+ "/resource/{resource_id}": {
+ "put": {
+ "tags": [
+ "resource"
+ ],
+ "summary": "changes values of specific details (as given by resource_details) of given resource (selected by resource_filter)in resource_list and returns success or error code",
+ "description": "changes values of specific details (as given by resource_details) of given resource (selected by resource_filter)in resource_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "resource_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the resource"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success, resource updated"
+ },
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/resource_modify_qry"
}
}
+ }
+ },
+ "operationId": "updateResource"
+ },
+ "delete": {
+ "tags": [
+ "resource"
+ ],
+ "summary": "delete a predefined resource in resource_list and returns success or error code",
+ "description": "delete a predefined resource in resource_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "resource_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the resource"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
},
- "400" : {
- "description" : "Invalid request"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "403" : {
- "description" : "No permission"
+ "default": {
+ "description": "Unexpected error"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "204": {
+ "description": "Resource deleted successfully"
},
- "default" : {
- "description" : "Unexpected error"
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "operationId": "deleteResource"
}
},
- "/subscriber/new" : {
- "post" : {
- "tags" : [ "subscriber" ],
- "summary" : "create a new subscriber, in subscriber_list with given subscriber_details, returns new subscriber id or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/subscriber_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created subscriber",
- "example" : "subscriber_name:xyz hospital,subscriber_id:12345"
+ "/resource/search": {
+ "post": {
+ "tags": [
+ "resource"
+ ],
+ "summary": "get list of entities filetered by criteria in resource_filter and return info specified by resource_details_required with success or error code",
+ "description": "get list of entities filetered by criteria in resource_filter and return info specified by resource_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,resource list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/resource_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
+ }
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
},
- "403" : {
- "description" : "No permission"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "default": {
+ "description": "Unexpected error"
},
- "default" : {
- "description" : "Unexpected error"
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/subscriber/modifications" : {
- "put" : {
- "tags" : [ "subscriber" ],
- "summary" : "changes values of specific details (as given by subscriber_details) of given subscriber (selected by subscriber_filter)in subscriber_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "subscriber_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "12345"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/subscriber_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, subscriber updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/resource_get_details_qry"
+ }
+ }
}
- }
- }
- },
- "/subscriber" : {
- "delete" : {
- "tags" : [ "subscriber" ],
- "summary" : "delete a predefined subscriber in subscriber_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "subscriber_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "12345"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, subscriber cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "operationId": "searchResources",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
+ },
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
}
- }
+ ]
}
},
- "/subscriber/list_details" : {
- "get" : {
- "tags" : [ "subscriber" ],
- "summary" : "get list of entities filetered by criteria in subscriber_filter and return info specified by subscriber_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/subscriber_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,message list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/subscriber_list"
+ "/resource/availability": {
+ "post": {
+ "tags": [
+ "resource"
+ ],
+ "summary": "get details of resources matching criteria given by free_resource_filter, that are free(unallocated) in a given date range and entity and returns success or error code",
+ "description": "get details of resources matching criteria given by free_resource_filter, that are free(unallocated) in a given date range and entity and returns success or error code",
+ "responses": {
+ "200": {
+ "description": "success,resource list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/free_resource_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
}
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "400": {
+ "description": "Invalid request"
},
- "403" : {
- "description" : "No permission"
+ "403": {
+ "description": "No permission"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "default" : {
- "description" : "Unexpected error"
+ "default": {
+ "description": "Unexpected error"
+ },
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/resource_get_availability_qry"
+ }
+ }
+ }
+ },
+ "operationId": "searchResourceAvailability",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
+ },
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
+ }
+ ]
}
},
- "/message/new" : {
- "post" : {
- "tags" : [ "message" ],
- "summary" : "create a new message, in message_list with given message_details, returns new message id or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/message_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created message",
- "example" : "message_name:xyz hospital,message_id:1"
+ "/subscriber": {
+ "post": {
+ "tags": [
+ "subscriber"
+ ],
+ "summary": "create a new subscriber, in subscriber_list with given subscriber_details, returns new subscriber id or error code",
+ "description": "create a new subscriber, in subscriber_list with given subscriber_details, returns new subscriber id or error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created subscriber",
+ "example": "subscriber_name:xyz hospital,subscriber_id:12345"
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/message/modifications" : {
- "put" : {
- "tags" : [ "message" ],
- "summary" : "changes values of specific details (as given by message_details) of given message (selected by message_filter)in message_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "message_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/message_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, message updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/subscriber_new_qry"
+ }
+ }
}
- }
+ },
+ "operationId": "createSubscriber"
}
},
- "/message" : {
- "delete" : {
- "tags" : [ "message" ],
- "summary" : "delete a predefined message in message_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "message_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, message cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "/subscriber/{subscriber_id}": {
+ "put": {
+ "tags": [
+ "subscriber"
+ ],
+ "summary": "changes values of specific details (as given by subscriber_details) of given subscriber (selected by subscriber_filter)in subscriber_list and returns success or error code",
+ "description": "changes values of specific details (as given by subscriber_details) of given subscriber (selected by subscriber_filter)in subscriber_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "subscriber_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the subscriber"
}
- }
- }
- },
- "/message/list_details" : {
- "get" : {
- "tags" : [ "message" ],
- "summary" : "get list of entities filetered by criteria in message_filter and return info specified by message_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/message_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,message list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/message_list"
- }
- }
- }
- }
+ ],
+ "responses": {
+ "200": {
+ "description": "success, subscriber updated"
+ },
+ "400": {
+ "description": "Invalid request"
},
- "400" : {
- "description" : "Invalid request"
+ "403": {
+ "description": "No permission"
},
- "403" : {
- "description" : "No permission"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "default": {
+ "description": "Unexpected error"
},
- "default" : {
- "description" : "Unexpected error"
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/affiliation/new" : {
- "post" : {
- "tags" : [ "affiliation" ],
- "summary" : "create a new affiliation, in affiliation_list with given affiliation_details, returns new affiliation id or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/affiliation_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created affiliation",
- "example" : "affiliation_name:xyz hospital,affiliation_id:1"
- }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/subscriber_modify_qry"
}
}
+ }
+ },
+ "operationId": "updateSubscriber"
+ },
+ "delete": {
+ "tags": [
+ "subscriber"
+ ],
+ "summary": "delete a predefined subscriber in subscriber_list and returns success or error code",
+ "description": "delete a predefined subscriber in subscriber_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "subscriber_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the subscriber"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
},
- "400" : {
- "description" : "Invalid request"
+ "403": {
+ "description": "No permission"
},
- "403" : {
- "description" : "No permission"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "default": {
+ "description": "Unexpected error"
},
- "default" : {
- "description" : "Unexpected error"
- }
- }
- }
- },
- "/affiliation/modifications" : {
- "put" : {
- "tags" : [ "affiliation" ],
- "summary" : "changes values of specific details (as given by affiliation_details) of given affiliation (selected by affiliation_filter)in affiliation_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "affiliation_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/affiliation_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, affiliation updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
- }
- }
- }
- },
- "/affiliation" : {
- "delete" : {
- "tags" : [ "affiliation" ],
- "summary" : "delete a predefined affiliation in affiliation_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "affiliation_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, affiliation cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "204": {
+ "description": "Resource deleted successfully"
+ },
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "operationId": "deleteSubscriber"
}
},
- "/affiliation/list_details" : {
- "get" : {
- "tags" : [ "affiliation" ],
- "summary" : "get list of entities filetered by criteria in affiliation_filter and return info specified by affiliation_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/affiliation_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,affiliation list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/affiliation_list"
+ "/subscriber/search": {
+ "post": {
+ "tags": [
+ "subscriber"
+ ],
+ "summary": "get list of entities filetered by criteria in subscriber_filter and return info specified by subscriber_details_required with success or error code",
+ "description": "get list of entities filetered by criteria in subscriber_filter and return info specified by subscriber_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success, subscriber list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/subscriber_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
}
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "400": {
+ "description": "Invalid request"
},
- "403" : {
- "description" : "No permission"
+ "403": {
+ "description": "No permission"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "default" : {
- "description" : "Unexpected error"
+ "default": {
+ "description": "Unexpected error"
+ },
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/subscriber_get_details_qry"
+ }
+ }
+ }
+ },
+ "operationId": "searchSubscribers",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
+ },
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
+ }
+ ]
}
},
- "/alert_schedule/new" : {
- "post" : {
- "tags" : [ "alert_schedule" ],
- "summary" : "create a new alert_schedule, in alert_schedule_list with given alert_schedule_details, returns new alert_schedule id or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/alert_schedule_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created alert_schedule",
- "example" : "alert_schedule_name:xyz hospital,alert_schedule_id:1"
+ "/message": {
+ "post": {
+ "tags": [
+ "message"
+ ],
+ "summary": "create a new message, in message_list with given message_details, returns new message id or error code",
+ "description": "create a new message, in message_list with given message_details, returns new message id or error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created message",
+ "example": "message_name:xyz hospital,message_id:1"
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/alert_schedule/modifications" : {
- "put" : {
- "tags" : [ "alert_schedule" ],
- "summary" : "changes values of specific details (as given by alert_schedule_details) of given alert_schedule (selected by alert_schedule_filter)in alert_schedule_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string"
- },
- "example" : "Organizer"
- }, {
- "name" : "alert_schedule_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/alert_schedule_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, alert_schedule updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/message_new_qry"
+ }
+ }
}
- }
+ },
+ "operationId": "createMessage"
}
},
- "/alert_schedule" : {
- "delete" : {
- "tags" : [ "alert_schedule" ],
- "summary" : "delete a predefined alert_schedule in alert_schedule_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "alert_schedule_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, alert_schedule cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "/message/{message_id}": {
+ "put": {
+ "tags": [
+ "message"
+ ],
+ "summary": "changes values of specific details (as given by message_details) of given message (selected by message_filter)in message_list and returns success or error code",
+ "description": "changes values of specific details (as given by message_details) of given message (selected by message_filter)in message_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "message_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the message"
}
- }
- }
- },
- "/alert_schedule/list_details" : {
- "get" : {
- "tags" : [ "alert_schedule" ],
- "summary" : "get list of entities filetered by criteria in alert_schedule_filter and return info specified by alert_schedule_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/alert_schedule_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,alert_schedule list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/alert_schedule_list"
- }
- }
+ ],
+ "responses": {
+ "200": {
+ "description": "success, message updated"
+ },
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "401": {
+ "description": "Authentication required or token invalid"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/message_modify_qry"
}
}
+ }
+ },
+ "operationId": "updateMessage"
+ },
+ "delete": {
+ "tags": [
+ "message"
+ ],
+ "summary": "delete a predefined message in message_list and returns success or error code",
+ "description": "delete a predefined message in message_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "message_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the message"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "400" : {
- "description" : "Invalid request"
+ "default": {
+ "description": "Unexpected error"
},
- "403" : {
- "description" : "No permission"
+ "204": {
+ "description": "Resource deleted successfully"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "operationId": "deleteMessage"
}
},
- "/log/new" : {
- "post" : {
- "tags" : [ "log" ],
- "summary" : "create a new log, in log_list with given log_details, returns new log id or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/log_new_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success",
- "content" : {
- "application/json" : {
- "schema" : {
- "type" : "string",
- "description" : "ID of created log",
- "example" : "log_name:xyz hospital,log_id:1"
+ "/message/search": {
+ "post": {
+ "tags": [
+ "message"
+ ],
+ "summary": "get list of entities filetered by criteria in message_filter and return info specified by message_details_required with success or error code",
+ "description": "get list of entities filetered by criteria in message_filter and return info specified by message_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,message list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/message_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
+ }
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "403" : {
- "description" : "No permission"
+ "default": {
+ "description": "Unexpected error"
},
- "404" : {
- "description" : "one or more specified inputs not found"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
- }
- },
- "/log/modifications" : {
- "put" : {
- "tags" : [ "log" ],
- "summary" : "changes values of specific details (as given by log_details) of given log (selected by log_filter)in log_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "log_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/log_modify_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, log updated"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/message_get_details_qry"
+ }
+ }
}
- }
- }
- },
- "/log" : {
- "delete" : {
- "tags" : [ "log" ],
- "summary" : "delete a predefined log in log_list and returns success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "log_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "1"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success, log cancelled"
- },
- "400" : {
- "description" : "Invalid request"
- },
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ },
+ "operationId": "searchMessages",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
+ },
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
}
- }
+ ]
}
},
- "/log/list_details" : {
- "get" : {
- "tags" : [ "log" ],
- "summary" : "get list of entities filetered by criteria in log_filter and return info specified by log_details_required with success or error code",
- "parameters" : [ {
- "name" : "requestor_id",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "healthngoadmin1"
- }
- }, {
- "name" : "request_token",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "type" : "string",
- "example" : "Organizer"
- }
- }, {
- "name" : "qry",
- "in" : "query",
- "required" : true,
- "style" : "form",
- "explode" : true,
- "schema" : {
- "$ref" : "#/components/schemas/log_get_details_qry"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "success,log list",
- "content" : {
- "json" : {
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/log_list"
- }
+ "/affiliation": {
+ "post": {
+ "tags": [
+ "affiliation"
+ ],
+ "summary": "create a new affiliation, in affiliation_list with given affiliation_details, returns new affiliation id or error code",
+ "description": "create a new affiliation, in affiliation_list with given affiliation_details, returns new affiliation id or error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created affiliation",
+ "example": "affiliation_name:xyz hospital,affiliation_id:1"
}
}
}
},
- "400" : {
- "description" : "Invalid request"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "403" : {
- "description" : "No permission"
- },
- "404" : {
- "description" : "one or more specified inputs not found"
- },
- "default" : {
- "description" : "Unexpected error"
+ "500": {
+ "description": "Internal server error"
}
- }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/affiliation_new_qry"
+ }
+ }
+ }
+ },
+ "operationId": "createAffiliation"
}
- }
- },
- "components" : {
- "schemas" : {
- "entity_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
+ },
+ "/affiliation/{affiliation_id}": {
+ "put": {
+ "tags": [
+ "affiliation"
+ ],
+ "summary": "changes values of specific details (as given by affiliation_details) of given affiliation (selected by affiliation_filter)in affiliation_list and returns success or error code",
+ "description": "changes values of specific details (as given by affiliation_details) of given affiliation (selected by affiliation_filter)in affiliation_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "affiliation_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- "details" : {
- "$ref" : "#/components/schemas/entity_details"
- }
+ "description": "Unique identifier of the affiliation"
}
- }
- },
- "entity_details" : {
- "type" : "object",
- "properties" : {
- "category" : {
- "type" : "string",
- "example" : "hospital"
+ ],
+ "responses": {
+ "200": {
+ "description": "success, affiliation updated"
+ },
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
},
- "name" : {
- "type" : "string",
- "example" : "abc"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "phone" : {
- "type" : "string",
- "example" : "+911234567890"
+ "default": {
+ "description": "Unexpected error"
},
- "email" : {
- "type" : "string",
- "example" : "info@xyz.com"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "website" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.abc.com"
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "entity_filter" : {
- "type" : "object",
- "properties" : {
- "entity_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/affiliation_modify_qry"
+ }
+ }
+ }
+ },
+ "operationId": "updateAffiliation"
+ },
+ "delete": {
+ "tags": [
+ "affiliation"
+ ],
+ "summary": "delete a predefined affiliation in affiliation_list and returns success or error code",
+ "description": "delete a predefined affiliation in affiliation_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "affiliation_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- "example" : "[67890,12121]"
+ "description": "Unique identifier of the affiliation"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
},
- "category" : {
- "type" : "string",
- "example" : "hospital"
+ "403": {
+ "description": "No permission"
},
- "name" : {
- "type" : "string",
- "example" : "abc"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "phone" : {
- "type" : "string",
- "example" : "+911234567890"
+ "default": {
+ "description": "Unexpected error"
},
- "email" : {
- "type" : "string",
- "example" : "info@xyz.com"
+ "204": {
+ "description": "Resource deleted successfully"
},
- "website" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.abc.com"
- }
- }
- },
- "entity_details_required" : {
- "type" : "object",
- "properties" : {
- "entity_id" : {
- "type" : "boolean",
- "example" : false
- },
- "category" : {
- "type" : "boolean",
- "example" : true
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "name" : {
- "type" : "boolean",
- "example" : true
+ "500": {
+ "description": "Internal server error"
+ }
+ },
+ "operationId": "deleteAffiliation"
+ }
+ },
+ "/affiliation/search": {
+ "post": {
+ "tags": [
+ "affiliation"
+ ],
+ "summary": "get list of entities filetered by criteria in affiliation_filter and return info specified by affiliation_details_required with success or error code",
+ "description": "get list of entities filetered by criteria in affiliation_filter and return info specified by affiliation_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,affiliation list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/affiliation_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
+ }
+ }
+ }
+ }
},
- "phone" : {
- "type" : "boolean",
- "example" : true
+ "400": {
+ "description": "Invalid request"
},
- "email" : {
- "type" : "boolean",
- "example" : true
+ "403": {
+ "description": "No permission"
},
- "website" : {
- "type" : "boolean",
- "example" : true
- }
- }
- },
- "appointment_creation_details" : {
- "type" : "object",
- "properties" : {
- "exclusive" : {
- "type" : "boolean",
- "example" : "true"
- },
- "event_ids" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- },
- "example" : "[1]"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "participant_type" : {
- "type" : "string",
- "example" : "subscriber"
+ "default": {
+ "description": "Unexpected error"
},
- "participant_id" : {
- "type" : "string",
- "example" : "12345"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "participant_entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "appointment_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "appointment_id" : {
- "type" : "string",
- "example" : "1"
- },
- "details" : {
- "$ref" : "#/components/schemas/appointment_details"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/affiliation_get_details_qry"
+ }
}
}
- }
- },
- "appointment_details" : {
- "type" : "object",
- "properties" : {
- "exclusive" : {
- "type" : "boolean",
- "example" : "true"
- },
- "event_id" : {
- "type" : "string",
- "example" : "1"
- },
- "participant_type" : {
- "type" : "string",
- "example" : "subscriber"
- },
- "participant_id" : {
- "type" : "string",
- "example" : "12345"
+ },
+ "operationId": "searchAffiliations",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
},
- "status_id" : {
- "type" : "string",
- "example" : "confirmed"
- },
- "participant_entity_id" : {
- "type" : "string",
- "example" : "67890"
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
}
- }
- },
- "appointment_filter" : {
- "type" : "object",
- "properties" : {
- "exclusive" : {
- "type" : "boolean",
- "example" : "true"
- },
- "appointment_id" : {
- "type" : "string",
- "example" : "1"
- },
- "participant_type" : {
- "type" : "string",
- "example" : "subscriber"
- },
- "participant_id" : {
- "type" : "string",
- "example" : "12345"
- },
- "participant_entity_id" : {
- "type" : "string",
- "example" : "67890"
- },
- "status" : {
- "type" : "string",
- "example" : "confirmed"
+ ]
+ }
+ },
+ "/alert_schedule": {
+ "post": {
+ "tags": [
+ "alert_schedule"
+ ],
+ "summary": "create a new alert_schedule, in alert_schedule_list with given alert_schedule_details, returns new alert_schedule id or error code",
+ "description": "create a new alert_schedule, in alert_schedule_list with given alert_schedule_details, returns new alert_schedule id or error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created alert_schedule",
+ "example": "alert_schedule_name:xyz hospital,alert_schedule_id:1"
+ }
+ }
+ }
},
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T09:00:00"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T17:00:00"
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "appointment_details_required" : {
- "type" : "object",
- "properties" : {
- "exclusive" : {
- "type" : "boolean",
- "example" : "true"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/alert_schedule_new_qry"
+ }
+ }
+ }
+ },
+ "operationId": "createAlertSchedule"
+ }
+ },
+ "/alert_schedule/{alert_schedule_id}": {
+ "put": {
+ "tags": [
+ "alert_schedule"
+ ],
+ "summary": "changes values of specific details (as given by alert_schedule_details) of given alert_schedule (selected by alert_schedule_filter)in alert_schedule_list and returns success or error code",
+ "description": "changes values of specific details (as given by alert_schedule_details) of given alert_schedule (selected by alert_schedule_filter)in alert_schedule_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "alert_schedule_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the alert schedule"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success, alert_schedule updated"
},
- "appointment_id" : {
- "type" : "boolean",
- "example" : true
+ "400": {
+ "description": "Invalid request"
},
- "event_details" : {
- "type" : "boolean",
- "example" : true
+ "403": {
+ "description": "No permission"
},
- "participant_type" : {
- "type" : "boolean",
- "example" : true
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "participant_id" : {
- "type" : "boolean",
- "example" : true
+ "default": {
+ "description": "Unexpected error"
},
- "status" : {
- "type" : "boolean",
- "example" : true
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "participant_entity_id" : {
- "type" : "boolean",
- "example" : true
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "resource_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "resource_id" : {
- "type" : "string",
- "example" : "54321"
- },
- "details" : {
- "$ref" : "#/components/schemas/resource_details"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/alert_schedule_modify_qry"
+ }
}
}
- }
- },
- "resource_details" : {
- "type" : "object",
- "properties" : {
- "name" : {
- "type" : "string",
- "example" : "psrk"
+ },
+ "operationId": "updateAlertSchedule"
+ },
+ "delete": {
+ "tags": [
+ "alert_schedule"
+ ],
+ "summary": "delete a predefined alert_schedule in alert_schedule_list and returns success or error code",
+ "description": "delete a predefined alert_schedule in alert_schedule_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "alert_schedule_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the alert schedule"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
},
- "category" : {
- "type" : "string",
- "example" : "doctor"
+ "403": {
+ "description": "No permission"
},
- "phone" : {
- "type" : "string",
- "example" : "+911234567890"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "email" : {
- "type" : "string",
- "example" : "doctor1@xyz.com"
+ "default": {
+ "description": "Unexpected error"
},
- "alert_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "psrk@gmail.com"
+ "204": {
+ "description": "Resource deleted successfully"
},
- "alert_preference" : {
- "type" : "string",
- "example" : "phone"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "status_poll_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.doctor1.com"
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "resource_filter" : {
- "type" : "object",
- "properties" : {
- "resource_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- },
- "example" : "[54321,31313]"
+ },
+ "operationId": "deleteAlertSchedule"
+ }
+ },
+ "/alert_schedule/search": {
+ "post": {
+ "tags": [
+ "alert_schedule"
+ ],
+ "summary": "get list of entities filetered by criteria in alert_schedule_filter and return info specified by alert_schedule_details_required with success or error code",
+ "description": "get list of entities filetered by criteria in alert_schedule_filter and return info specified by alert_schedule_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,alert_schedule list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/alert_schedule_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
+ }
+ }
+ }
+ }
},
- "name" : {
- "type" : "string",
- "example" : "psrk"
+ "400": {
+ "description": "Invalid request"
},
- "category" : {
- "type" : "string",
- "example" : "doctor"
+ "403": {
+ "description": "No permission"
},
- "phone" : {
- "type" : "string",
- "example" : "+911234567890"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "email" : {
- "type" : "string",
- "example" : "abc@gmail.com"
+ "default": {
+ "description": "Unexpected error"
},
- "alert_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.doctor1.com"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "alert_preference" : {
- "type" : "string",
- "example" : " phone"
+ "500": {
+ "description": "Internal server error"
+ }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/alert_schedule_get_details_qry"
+ }
+ }
+ }
+ },
+ "operationId": "searchAlertSchedules",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
},
- "status_poll_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.doctor1.com"
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
}
- }
- },
- "resource_details_required" : {
- "type" : "object",
- "properties" : {
- "resource_id" : {
- "type" : "boolean",
- "example" : true
+ ]
+ }
+ },
+ "/log": {
+ "post": {
+ "tags": [
+ "log"
+ ],
+ "summary": "create a new log, in log_list with given log_details, returns new log id or error code",
+ "description": "create a new log, in log_list with given log_details, returns new log id or error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created log",
+ "example": "log_name:xyz hospital,log_id:1"
+ }
+ }
+ }
},
- "name" : {
- "type" : "boolean",
- "example" : true
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "category" : {
- "type" : "boolean",
- "example" : true
+ "500": {
+ "description": "Internal server error"
+ }
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/log_new_qry"
+ }
+ }
+ }
+ },
+ "operationId": "createLog"
+ }
+ },
+ "/log/search": {
+ "post": {
+ "tags": [
+ "log"
+ ],
+ "summary": "get list of entities filetered by criteria in log_filter and return info specified by log_details_required with success or error code",
+ "description": "get list of entities filetered by criteria in log_filter and return info specified by log_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,log list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/log_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid request"
},
- "phone" : {
- "type" : "boolean",
- "example" : true
+ "403": {
+ "description": "No permission"
},
- "email" : {
- "type" : "boolean",
- "example" : true
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "alert_url" : {
- "type" : "boolean",
- "example" : true
+ "default": {
+ "description": "Unexpected error"
},
- "alert_preference" : {
- "type" : "boolean",
- "example" : true
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "status_poll_url" : {
- "type" : "boolean",
- "example" : true
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "subscriber_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "subscriber_id" : {
- "type" : "string",
- "example" : "12345"
- },
- "details" : {
- "$ref" : "#/components/schemas/subscriber_details"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/log_get_details_qry"
+ }
}
}
- }
- },
- "subscriber_details" : {
- "type" : "object",
- "properties" : {
- "name" : {
- "type" : "string",
- "example" : "abc"
- },
- "category" : {
- "type" : "string",
- "example" : "patient"
- },
- "phone" : {
- "type" : "string",
- "example" : "+911234567890"
- },
- "email" : {
- "type" : "string",
- "example" : "abc@gmail.com"
+ },
+ "operationId": "searchLogs",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
},
- "alert_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.abc.com"
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
+ }
+ ]
+ }
+ },
+ "/appointment": {
+ "post": {
+ "tags": [
+ "appointment"
+ ],
+ "summary": "create a new appointment, in appointment_list with given appointment_details, returns new appointment id or failure error code",
+ "description": "create a new appointment, in appointment_list with given appointment_details, returns new appointment id or failure error code",
+ "responses": {
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
+ },
+ "404": {
+ "description": "one or more specified inputs not found"
+ },
+ "default": {
+ "description": "Unexpected error"
+ },
+ "201": {
+ "description": "Resource created successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "description": "ID of created appointment",
+ "example": "[Event_id:12345,appointment_id:1]"
+ }
+ }
+ }
},
- "alert_preference" : {
- "type" : "string",
- "example" : "phone"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "status_poll_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.abc.com"
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "subscriber_filter" : {
- "type" : "object",
- "properties" : {
- "subscriber_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/appointment_new_qry"
+ }
+ }
+ }
+ },
+ "operationId": "createAppointment"
+ }
+ },
+ "/appointment/{appointment_id}": {
+ "put": {
+ "tags": [
+ "appointment"
+ ],
+ "summary": "changes values of specific details (as given by appointment_details) of given appointment (selected by appointment_filter)in appointment_list and returns success or error code",
+ "description": "changes values of specific details (as given by appointment_details) of given appointment (selected by appointment_filter)in appointment_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "appointment_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
},
- "example" : "[12345, 41414]"
- },
- "category" : {
- "type" : "string",
- "example" : "patient"
+ "description": "Unique identifier of the appointment"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "success, appointment updated"
},
- "name" : {
- "type" : "string",
- "example" : "abc"
+ "400": {
+ "description": "Invalid request"
},
- "phone" : {
- "type" : "string",
- "example" : "+911234567890"
+ "403": {
+ "description": "No permission"
},
- "email" : {
- "type" : "string",
- "example" : "abc@gmail.com"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "alert_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.abc.com"
+ "default": {
+ "description": "Unexpected error"
},
- "alert_preference" : {
- "type" : "string",
- "example" : " phone"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "status_poll_url" : {
- "type" : "string",
- "format" : "url",
- "example" : "www.abc.com"
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "subscriber_details_required" : {
- "type" : "object",
- "properties" : {
- "subscriber_id" : {
- "type" : "boolean",
- "example" : true
- },
- "category" : {
- "type" : "boolean",
- "example" : true
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/appointment_modify_qry"
+ }
+ }
+ }
+ },
+ "operationId": "updateAppointment"
+ },
+ "delete": {
+ "tags": [
+ "appointment"
+ ],
+ "summary": "delete a predefined appointment in appointment_list and returns success or error code",
+ "description": "delete a predefined appointment in appointment_list and returns success or error code",
+ "parameters": [
+ {
+ "name": "appointment_id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier of the appointment"
+ }
+ ],
+ "responses": {
+ "400": {
+ "description": "Invalid request"
},
- "name" : {
- "type" : "boolean",
- "example" : true
+ "403": {
+ "description": "No permission"
},
- "phone" : {
- "type" : "boolean",
- "example" : true
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "email" : {
- "type" : "boolean",
- "example" : true
+ "default": {
+ "description": "Unexpected error"
},
- "alert_url" : {
- "type" : "boolean",
- "example" : true
+ "204": {
+ "description": "Resource deleted successfully"
},
- "alert_preference" : {
- "type" : "boolean",
- "example" : true
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "status_poll_url" : {
- "type" : "boolean",
- "example" : true
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "event_creation_details" : {
- "type" : "object",
- "properties" : {
- "name" : {
- "type" : "string",
- "example" : "abc medical camp"
- },
- "description" : {
- "type" : "string",
- "example" : "medical camp for senior citizens"
- },
- "category" : {
- "type" : "string",
- "example" : "doctor_consultation"
- },
- "host_entity_id" : {
- "type" : "string",
- "example" : "67890"
- },
- "slots" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:00:00"
- },
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:30:00"
+ },
+ "operationId": "deleteAppointment"
+ }
+ },
+ "/appointment/search": {
+ "post": {
+ "tags": [
+ "appointment"
+ ],
+ "summary": "get list of appointments filetered by criteria in appointment_filter and return info specified by appointment_details_required with success or error code",
+ "description": "get list of appointments filetered by criteria in appointment_filter and return info specified by appointment_details_required with success or error code",
+ "responses": {
+ "200": {
+ "description": "success,appointment_list",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/appointment_details"
+ }
+ },
+ "pagination": {
+ "$ref": "#/components/schemas/pagination_metadata"
+ }
+ }
}
}
}
},
- "deadline" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:10:00"
+ "400": {
+ "description": "Invalid request"
+ },
+ "403": {
+ "description": "No permission"
},
- "subscriber_limit" : {
- "type" : "string",
- "example" : "1"
+ "404": {
+ "description": "one or more specified inputs not found"
},
- "terms" : {
- "type" : "string",
- "example" : "non refundable"
+ "default": {
+ "description": "Unexpected error"
},
- "status" : {
- "type" : "string",
- "example" : "open"
+ "401": {
+ "description": "Authentication required or token invalid"
},
- "venue" : {
- "$ref" : "#/components/schemas/venue"
+ "500": {
+ "description": "Internal server error"
}
- }
- },
- "event_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "event_id" : {
- "type" : "string",
- "example" : "12345"
- },
- "details" : {
- "$ref" : "#/components/schemas/event_details"
+ },
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/appointment_get_details_qry"
+ }
}
}
- }
- },
- "event_details" : {
- "type" : "object",
- "properties" : {
- "name" : {
- "type" : "string",
- "example" : "abc medical camp"
- },
- "description" : {
- "type" : "string",
- "example" : "medical camp for senior citizens"
- },
- "category" : {
- "type" : "string",
- "example" : "doctor_consultation"
+ },
+ "operationId": "searchAppointments",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/PageParam"
},
- "host_entity_id" : {
- "type" : "string",
- "example" : "67890"
- },
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:00:00"
- },
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:30:00"
+ {
+ "$ref": "#/components/parameters/PageSizeParam"
+ }
+ ]
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "entity_details": {
+ "type": "object",
+ "properties": {
+ "category": {
+ "type": "string",
+ "example": "hospital"
+ },
+ "name": {
+ "type": "string",
+ "example": "abc"
+ },
+ "phone": {
+ "type": "string",
+ "example": "+911234567890"
+ },
+ "email": {
+ "type": "string",
+ "example": "info@xyz.com"
+ },
+ "website": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.abc.com"
+ }
+ },
+ "required": [
+ "name",
+ "category"
+ ]
+ },
+ "entity_filter": {
+ "type": "object",
+ "properties": {
+ "entity_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "67890",
+ "12121"
+ ]
},
- "deadline" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:10:00"
+ "category": {
+ "type": "string",
+ "example": "hospital"
},
- "subscriber_limit" : {
- "type" : "string",
- "example" : "1"
+ "name": {
+ "type": "string",
+ "example": "abc"
},
- "terms" : {
- "type" : "string",
- "example" : "non refundable"
+ "phone": {
+ "type": "string",
+ "example": "+911234567890"
},
- "status" : {
- "type" : "string",
- "example" : "open"
+ "email": {
+ "type": "string",
+ "example": "info@xyz.com"
},
- "venue" : {
- "$ref" : "#/components/schemas/venue"
+ "website": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.abc.com"
}
}
},
- "event_filter" : {
- "type" : "object",
- "properties" : {
- "event_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- },
- "example" : "[12345,51515]"
- },
- "description" : {
- "type" : "string",
- "example" : "medical camp for senior citizens"
- },
- "name" : {
- "type" : "string",
- "example" : "doctor_consultation"
- },
- "category" : {
- "type" : "string",
- "example" : "opd_physician_consultation"
+ "entity_details_required": {
+ "type": "object",
+ "properties": {
+ "entity_id": {
+ "type": "boolean",
+ "example": false
},
- "host_entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "category": {
+ "type": "boolean",
+ "example": true
},
- "subscriber_limit" : {
- "type" : "string",
- "example" : "1"
+ "name": {
+ "type": "boolean",
+ "example": true
},
- "terms" : {
- "type" : "string",
- "example" : "non refundable"
+ "phone": {
+ "type": "boolean",
+ "example": true
},
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T09:00:00"
+ "email": {
+ "type": "boolean",
+ "example": true
},
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T17:00:00"
- },
- "venue" : {
- "$ref" : "#/components/schemas/venue"
+ "website": {
+ "type": "boolean",
+ "example": true
}
}
},
- "event_details_required" : {
- "type" : "object",
- "properties" : {
- "event_id" : {
- "type" : "boolean",
- "example" : true
- },
- "description" : {
- "type" : "boolean",
- "example" : true
- },
- "name" : {
- "type" : "boolean",
- "example" : true
- },
- "category" : {
- "type" : "boolean",
- "example" : true
+ "appointment_creation_details": {
+ "type": "object",
+ "properties": {
+ "exclusive": {
+ "type": "boolean",
+ "example": true
},
- "host_entity_id" : {
- "type" : "boolean",
- "example" : true
- },
- "period" : {
- "type" : "boolean",
- "example" : true
+ "event_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "1"
+ ]
+ },
+ "participant_type": {
+ "type": "string",
+ "example": "subscriber"
+ },
+ "participant_id": {
+ "type": "string",
+ "example": "12345"
+ },
+ "participant_entity_id": {
+ "type": "string",
+ "example": "67890"
+ }
+ },
+ "required": [
+ "event_ids",
+ "participant_type",
+ "participant_id"
+ ]
+ },
+ "appointment_details": {
+ "type": "object",
+ "properties": {
+ "exclusive": {
+ "type": "boolean",
+ "example": true
},
- "venue" : {
- "type" : "boolean",
- "example" : true
+ "event_id": {
+ "type": "string",
+ "example": "1"
},
- "deadline" : {
- "type" : "boolean",
- "example" : true
+ "participant_type": {
+ "type": "string",
+ "example": "subscriber"
},
- "subscriber_limit" : {
- "type" : "boolean",
- "example" : true
+ "participant_id": {
+ "type": "string",
+ "example": "12345"
},
- "terms" : {
- "type" : "boolean",
- "example" : true
+ "status_id": {
+ "type": "string",
+ "example": "confirmed"
},
- "status" : {
- "type" : "boolean",
- "example" : true
+ "participant_entity_id": {
+ "type": "string",
+ "example": "67890"
}
}
},
- "affiliation_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "affiliation_id" : {
- "type" : "string",
- "example" : "1"
- },
- "details" : {
- "$ref" : "#/components/schemas/affiliation_details"
- }
- }
- }
- },
- "affiliation_details" : {
- "type" : "object",
- "properties" : {
- "resource_id" : {
- "type" : "string",
- "example" : "12345"
+ "appointment_filter": {
+ "type": "object",
+ "properties": {
+ "exclusive": {
+ "type": "boolean",
+ "example": true
},
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "appointment_id": {
+ "type": "string",
+ "example": "1"
},
- "resource_category" : {
- "type" : "string",
- "example" : "physician"
+ "participant_type": {
+ "type": "string",
+ "example": "subscriber"
+ },
+ "participant_id": {
+ "type": "string",
+ "example": "12345"
+ },
+ "participant_entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "status": {
+ "type": "string",
+ "example": "confirmed"
+ },
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T09:00:00"
+ },
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T17:00:00"
+ }
+ }
+ },
+ "appointment_details_required": {
+ "type": "object",
+ "properties": {
+ "exclusive": {
+ "type": "boolean",
+ "example": true
+ },
+ "appointment_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "event_details": {
+ "type": "boolean",
+ "example": true
+ },
+ "participant_type": {
+ "type": "boolean",
+ "example": true
+ },
+ "participant_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "status": {
+ "type": "boolean",
+ "example": true
+ },
+ "participant_entity_id": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ },
+ "resource_details": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "psrk"
+ },
+ "category": {
+ "type": "string",
+ "example": "doctor"
+ },
+ "phone": {
+ "type": "string",
+ "example": "+911234567890"
+ },
+ "email": {
+ "type": "string",
+ "example": "doctor1@xyz.com"
+ },
+ "alert_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.doctor1.com/alerts"
},
- "work_days_hours" : {
- "$ref" : "#/components/schemas/days_hours"
- }
- }
- },
- "days_hours" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "day_of_week" : {
- "type" : "string",
- "example" : "[monday"
- },
- "start_time" : {
- "type" : "string",
- "example" : "09:00:00"
- },
- "end_time" : {
- "type" : "string",
- "example" : "17:00:00"
- }
- }
- }
- },
- "affiliation_filter" : {
- "type" : "object",
- "properties" : {
- "affiliation_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
+ "alert_preference": {
+ "type": "string",
+ "example": "phone"
+ },
+ "status_poll_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.doctor1.com/status"
+ }
+ },
+ "required": [
+ "name",
+ "category"
+ ]
+ },
+ "resource_filter": {
+ "type": "object",
+ "properties": {
+ "resource_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
},
- "example" : "[1,2]"
+ "example": [
+ "54321",
+ "31313"
+ ]
},
- "resource_id" : {
- "type" : "string",
- "example" : "12345"
+ "name": {
+ "type": "string",
+ "example": "psrk"
},
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "category": {
+ "type": "string",
+ "example": "doctor"
},
- "category" : {
- "type" : "string",
- "example" : "physician"
+ "phone": {
+ "type": "string",
+ "example": "+911234567890"
+ },
+ "email": {
+ "type": "string",
+ "example": "abc@gmail.com"
+ },
+ "alert_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.doctor1.com/alerts"
+ },
+ "alert_preference": {
+ "type": "string",
+ "example": "phone"
+ },
+ "status_poll_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.doctor1.com/status"
+ }
+ }
+ },
+ "resource_details_required": {
+ "type": "object",
+ "properties": {
+ "resource_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "name": {
+ "type": "boolean",
+ "example": true
+ },
+ "category": {
+ "type": "boolean",
+ "example": true
+ },
+ "phone": {
+ "type": "boolean",
+ "example": true
+ },
+ "email": {
+ "type": "boolean",
+ "example": true
+ },
+ "alert_url": {
+ "type": "boolean",
+ "example": true
+ },
+ "alert_preference": {
+ "type": "boolean",
+ "example": true
+ },
+ "status_poll_url": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ },
+ "subscriber_details": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "abc"
+ },
+ "category": {
+ "type": "string",
+ "example": "patient"
+ },
+ "phone": {
+ "type": "string",
+ "example": "+911234567890"
+ },
+ "email": {
+ "type": "string",
+ "example": "abc@gmail.com"
+ },
+ "alert_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.example.com/alerts"
+ },
+ "alert_preference": {
+ "type": "string",
+ "example": "phone"
+ },
+ "status_poll_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.example.com/status"
+ }
+ },
+ "required": [
+ "name"
+ ]
+ },
+ "subscriber_filter": {
+ "type": "object",
+ "properties": {
+ "subscriber_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "12345",
+ "41414"
+ ]
},
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T09:00:00"
+ "category": {
+ "type": "string",
+ "example": "patient"
},
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T17:00:00"
- }
- }
- },
- "affiliation_details_required" : {
- "type" : "object",
- "properties" : {
- "affiliation_id" : {
- "type" : "boolean",
- "example" : true
+ "name": {
+ "type": "string",
+ "example": "abc"
},
- "resource_id" : {
- "type" : "boolean",
- "example" : true
+ "phone": {
+ "type": "string",
+ "example": "+911234567890"
},
- "entity_id" : {
- "type" : "boolean",
- "example" : true
+ "email": {
+ "type": "string",
+ "example": "abc@gmail.com"
},
- "category" : {
- "type" : "boolean",
- "example" : true
+ "alert_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.example.com/alerts"
},
- "work_days_hours" : {
- "type" : "boolean",
- "example" : true
- }
- }
- },
- "alert_schedule_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "alert_schedule_id" : {
- "type" : "string",
- "example" : "1"
- },
- "details" : {
- "$ref" : "#/components/schemas/alert_schedule_details"
- }
+ "alert_preference": {
+ "type": "string",
+ "example": "phone"
+ },
+ "status_poll_url": {
+ "type": "string",
+ "format": "uri",
+ "example": "https://www.example.com/status"
}
}
},
- "alert_schedule_details" : {
- "type" : "object",
- "properties" : {
- "event_id" : {
- "type" : "string",
- "example" : "12345"
+ "subscriber_details_required": {
+ "type": "object",
+ "properties": {
+ "subscriber_id": {
+ "type": "boolean",
+ "example": true
},
- "target_category" : {
- "type" : "string",
- "example" : "subscriber"
+ "category": {
+ "type": "boolean",
+ "example": true
},
- "message_id" : {
- "type" : "string",
- "example" : "1"
+ "name": {
+ "type": "boolean",
+ "example": true
},
- "alert_datetime" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T09:00:00"
- }
- }
- },
- "alert_schedule_filter" : {
- "type" : "object",
- "properties" : {
- "alert_schedule_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- },
- "example" : "[1,2]"
+ "phone": {
+ "type": "boolean",
+ "example": true
},
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "email": {
+ "type": "boolean",
+ "example": true
},
- "target_category" : {
- "type" : "string",
- "example" : "subscriber"
+ "alert_url": {
+ "type": "boolean",
+ "example": true
},
- "message_id" : {
- "type" : "string",
- "example" : "1"
+ "alert_preference": {
+ "type": "boolean",
+ "example": true
},
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T09:00:00"
- },
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T13:30:00"
+ "status_poll_url": {
+ "type": "boolean",
+ "example": true
}
}
},
- "alert_schedule_details_required" : {
- "type" : "object",
- "properties" : {
- "alert_schedule_id" : {
- "type" : "boolean",
- "example" : true
+ "event_creation_details": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "abc medical camp"
},
- "entity_id" : {
- "type" : "boolean",
- "example" : true
+ "description": {
+ "type": "string",
+ "example": "medical camp for senior citizens"
},
- "message_id" : {
- "type" : "boolean",
- "example" : true
+ "category": {
+ "type": "string",
+ "example": "doctor_consultation"
},
- "alert_datetime" : {
- "type" : "boolean",
- "example" : true
- }
- }
- },
- "message_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "message_id" : {
- "type" : "string",
- "example" : "1"
+ "host_entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "slots": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/time_slot"
},
- "details" : {
- "$ref" : "#/components/schemas/message_details"
- }
- }
- }
- },
- "message_details" : {
- "type" : "object",
- "properties" : {
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "minItems": 1,
+ "description": "One or more time slots. Each slot produces a separate event with its own event_id."
+ },
+ "deadline": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T11:10:00"
+ },
+ "subscriber_limit": {
+ "type": "integer",
+ "example": 1
+ },
+ "terms": {
+ "type": "string",
+ "example": "non refundable"
+ },
+ "status": {
+ "type": "string",
+ "example": "open"
+ },
+ "venue": {
+ "$ref": "#/components/schemas/venue"
+ }
+ },
+ "required": [
+ "name",
+ "category",
+ "host_entity_id",
+ "slots"
+ ]
+ },
+ "event_details": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "abc medical camp"
+ },
+ "description": {
+ "type": "string",
+ "example": "medical camp for senior citizens"
+ },
+ "category": {
+ "type": "string",
+ "example": "doctor_consultation"
+ },
+ "host_entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "slot": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/time_slot"
+ }
+ ],
+ "description": "The time slot for this event (one event per slot from the creation request)"
+ },
+ "deadline": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T11:10:00"
+ },
+ "subscriber_limit": {
+ "type": "integer",
+ "example": 1
},
- "category" : {
- "type" : "string",
- "example" : "reminder"
+ "terms": {
+ "type": "string",
+ "example": "non refundable"
},
- "message_body" : {
- "type" : "string",
- "example" : "you have doctor consultation today"
+ "status": {
+ "type": "string",
+ "example": "open"
+ },
+ "venue": {
+ "$ref": "#/components/schemas/venue"
}
}
},
- "message_filter" : {
- "type" : "object",
- "properties" : {
- "message_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
+ "event_filter": {
+ "type": "object",
+ "properties": {
+ "event_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
},
- "example" : "[1,2]"
+ "example": [
+ "12345",
+ "51515"
+ ]
},
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "description": {
+ "type": "string",
+ "example": "medical camp for senior citizens"
},
- "category" : {
- "type" : "string",
- "example" : "reminder"
+ "name": {
+ "type": "string",
+ "example": "doctor_consultation"
},
- "message_body" : {
- "type" : "string",
- "example" : "you have doctor consultation today"
- }
- }
- },
- "message_details_required" : {
- "type" : "object",
- "properties" : {
- "message_id" : {
- "type" : "boolean",
- "example" : true
+ "category": {
+ "type": "string",
+ "example": "opd_physician_consultation"
},
- "entity_id" : {
- "type" : "boolean",
- "example" : true
+ "host_entity_id": {
+ "type": "string",
+ "example": "67890"
},
- "category" : {
- "type" : "boolean",
- "example" : true
+ "subscriber_limit": {
+ "type": "integer",
+ "example": 1
+ },
+ "terms": {
+ "type": "string",
+ "example": "non refundable"
+ },
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T09:00:00"
+ },
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T17:00:00"
+ },
+ "venue": {
+ "$ref": "#/components/schemas/venue"
+ }
+ }
+ },
+ "event_details_required": {
+ "type": "object",
+ "properties": {
+ "event_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "description": {
+ "type": "boolean",
+ "example": true
+ },
+ "name": {
+ "type": "boolean",
+ "example": true
+ },
+ "category": {
+ "type": "boolean",
+ "example": true
+ },
+ "host_entity_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "period": {
+ "type": "boolean",
+ "example": true
+ },
+ "venue": {
+ "type": "boolean",
+ "example": true
+ },
+ "deadline": {
+ "type": "boolean",
+ "example": true
+ },
+ "subscriber_limit": {
+ "type": "boolean",
+ "example": true
+ },
+ "terms": {
+ "type": "boolean",
+ "example": true
+ },
+ "status": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ },
+ "affiliation_details": {
+ "type": "object",
+ "properties": {
+ "resource_id": {
+ "type": "string",
+ "example": "12345"
+ },
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
},
- "message_body" : {
- "type" : "boolean",
- "example" : true
+ "resource_category": {
+ "type": "string",
+ "example": "physician"
+ },
+ "work_days_hours": {
+ "$ref": "#/components/schemas/days_hours"
}
- }
+ },
+ "required": [
+ "resource_id",
+ "entity_id"
+ ]
},
- "log_list" : {
- "type" : "array",
- "items" : {
- "type" : "object",
- "properties" : {
- "log_id" : {
- "type" : "string",
- "example" : "1"
+ "days_hours": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "day_of_week": {
+ "type": "string",
+ "example": "monday"
+ },
+ "start_time": {
+ "type": "string",
+ "example": "09:00:00"
},
- "details" : {
- "$ref" : "#/components/schemas/log_details"
+ "end_time": {
+ "type": "string",
+ "example": "17:00:00"
}
}
}
},
- "log_details" : {
- "type" : "object",
- "properties" : {
- "logger_role" : {
- "type" : "string",
- "example" : "resource"
- },
- "logger_id" : {
- "type" : "string",
- "example" : "1"
- },
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
- },
- "log_category" : {
- "type" : "string",
- "example" : "attendance"
- },
- "datetime" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:00:00"
- },
- "log_data" : {
- "type" : "string",
- "example" : "event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended"
- }
- }
- },
- "log_filter" : {
- "type" : "object",
- "properties" : {
- "log_id" : {
- "type" : "array",
- "items" : {
- "type" : "string"
+ "affiliation_filter": {
+ "type": "object",
+ "properties": {
+ "affiliation_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
},
- "example" : "[1,2]"
+ "example": [
+ "1",
+ "2"
+ ]
+ },
+ "resource_id": {
+ "type": "string",
+ "example": "12345"
+ },
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "category": {
+ "type": "string",
+ "example": "physician"
+ },
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T09:00:00"
+ },
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T17:00:00"
+ }
+ }
+ },
+ "affiliation_details_required": {
+ "type": "object",
+ "properties": {
+ "affiliation_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "resource_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "entity_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "category": {
+ "type": "boolean",
+ "example": true
+ },
+ "work_days_hours": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ },
+ "alert_schedule_details": {
+ "type": "object",
+ "properties": {
+ "event_id": {
+ "type": "string",
+ "example": "12345"
+ },
+ "target_category": {
+ "type": "string",
+ "example": "subscriber"
+ },
+ "message_id": {
+ "type": "string",
+ "example": "1"
+ },
+ "alert_datetime": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T09:00:00"
+ }
+ },
+ "required": [
+ "event_id",
+ "message_id",
+ "alert_datetime"
+ ]
+ },
+ "alert_schedule_filter": {
+ "type": "object",
+ "properties": {
+ "alert_schedule_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "1",
+ "2"
+ ]
+ },
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "target_category": {
+ "type": "string",
+ "example": "subscriber"
+ },
+ "message_id": {
+ "type": "string",
+ "example": "1"
+ },
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T09:00:00"
+ },
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T13:30:00"
+ }
+ }
+ },
+ "alert_schedule_details_required": {
+ "type": "object",
+ "properties": {
+ "alert_schedule_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "entity_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "message_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "alert_datetime": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ },
+ "message_details": {
+ "type": "object",
+ "properties": {
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "category": {
+ "type": "string",
+ "example": "reminder"
+ },
+ "message_body": {
+ "type": "string",
+ "example": "you have doctor consultation today"
+ }
+ },
+ "required": [
+ "category",
+ "message_body"
+ ]
+ },
+ "message_filter": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "1",
+ "2"
+ ]
+ },
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "category": {
+ "type": "string",
+ "example": "reminder"
+ },
+ "message_body": {
+ "type": "string",
+ "example": "you have doctor consultation today"
+ }
+ }
+ },
+ "message_details_required": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "entity_id": {
+ "type": "boolean",
+ "example": true
+ },
+ "category": {
+ "type": "boolean",
+ "example": true
+ },
+ "message_body": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ },
+ "log_details": {
+ "type": "object",
+ "properties": {
+ "logger_role": {
+ "type": "string",
+ "example": "resource"
+ },
+ "logger_id": {
+ "type": "string",
+ "example": "1"
+ },
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
+ },
+ "log_category": {
+ "type": "string",
+ "example": "attendance"
+ },
+ "datetime": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T11:00:00"
+ },
+ "log_data": {
+ "type": "string",
+ "example": "event_id:12345,subscriber_id:1,token:a2s3x2fer,status:attended"
+ }
+ },
+ "required": [
+ "logger_id",
+ "log_category",
+ "datetime"
+ ]
+ },
+ "log_filter": {
+ "type": "object",
+ "properties": {
+ "log_id": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "1",
+ "2"
+ ]
},
- "entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
},
- "category" : {
- "type" : "string",
- "example" : "attendance"
+ "category": {
+ "type": "string",
+ "example": "attendance"
},
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:00:00"
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T11:00:00"
},
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-15T11:30:00"
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T11:30:00"
}
}
},
- "log_details_required" : {
- "type" : "object",
- "properties" : {
- "log_id" : {
- "type" : "boolean",
- "example" : true
+ "log_details_required": {
+ "type": "object",
+ "properties": {
+ "log_id": {
+ "type": "boolean",
+ "example": true
},
- "logger_category" : {
- "type" : "boolean",
- "example" : true
+ "logger_category": {
+ "type": "boolean",
+ "example": true
},
- "logger_id" : {
- "type" : "boolean",
- "example" : true
+ "logger_id": {
+ "type": "boolean",
+ "example": true
},
- "entity_id" : {
- "type" : "boolean",
- "example" : true
+ "entity_id": {
+ "type": "boolean",
+ "example": true
},
- "log_category" : {
- "type" : "boolean",
- "example" : true
+ "log_category": {
+ "type": "boolean",
+ "example": true
},
- "datetime" : {
- "type" : "boolean",
- "example" : true
+ "datetime": {
+ "type": "boolean",
+ "example": true
},
- "log_data" : {
- "type" : "boolean",
- "example" : true
+ "log_data": {
+ "type": "boolean",
+ "example": true
}
}
},
- "free_resource_list" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/components/schemas/free_resource_details"
- }
- },
- "free_resource_details" : {
- "type" : "object",
- "properties" : {
- "resource_id" : {
- "type" : "string",
- "example" : "1"
- },
- "resource_name" : {
- "type" : "string",
- "example" : "abc"
- },
- "free_slots" : {
- "type" : "array",
- "items" : {
- "type" : "string",
- "example" : "{[2018-02-15T11:00:00to2018-02-15T11:09:00:00],[2018-02-22T11:00:00to2018-02-22T11:17:00:00]}"
+ "free_resource_details": {
+ "type": "object",
+ "properties": {
+ "resource_id": {
+ "type": "string",
+ "example": "1"
+ },
+ "resource_name": {
+ "type": "string",
+ "example": "abc"
+ },
+ "free_slots": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/time_slot"
}
}
}
},
- "free_resource_filter" : {
- "type" : "object",
- "properties" : {
- "category" : {
- "type" : "string",
- "example" : "doctor"
+ "free_resource_filter": {
+ "type": "object",
+ "properties": {
+ "category": {
+ "type": "string",
+ "example": "doctor"
},
- "Entity_id" : {
- "type" : "string",
- "example" : "67890"
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-14T09:00:00"
},
- "from" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-14T09:00:00"
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-18T13:30:00"
},
- "to" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2018-02-18T13:30:00"
+ "resource_id": {
+ "type": "string",
+ "example": "1"
},
- "resource_id" : {
- "type" : "string",
- "example" : "1"
+ "entity_id": {
+ "type": "string",
+ "example": "67890"
}
}
},
- "venue" : {
- "type" : "object",
- "properties" : {
- "building" : {
- "type" : "string",
- "example" : "xyz"
+ "venue": {
+ "type": "object",
+ "properties": {
+ "building": {
+ "type": "string",
+ "example": "xyz"
},
- "street" : {
- "type" : "string",
- "example" : "7th main"
+ "street": {
+ "type": "string",
+ "example": "7th main"
},
- "area" : {
- "type" : "string",
- "example" : "wilson garden"
+ "area": {
+ "type": "string",
+ "example": "wilson garden"
},
- "city" : {
- "type" : "string",
- "example" : "bangalore"
+ "city": {
+ "type": "string",
+ "example": "bangalore"
},
- "state" : {
- "type" : "string",
- "example" : "karnataka"
+ "state": {
+ "type": "string",
+ "example": "karnataka"
},
- "country" : {
- "type" : "string",
- "example" : "india"
+ "country": {
+ "type": "string",
+ "example": "india"
},
- "lat" : {
- "type" : "string",
- "example" : "0.001"
+ "lat": {
+ "type": "number",
+ "example": 0.001
},
- "long" : {
- "type" : "string",
- "example" : "0.002"
+ "long": {
+ "type": "number",
+ "example": 0.002
}
}
},
- "event_new_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/event_creation_details"
+ "event_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/event_creation_details"
}
}
},
- "event_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/event_details"
+ "event_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/event_details"
}
}
},
- "event_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "event_filter" : {
- "$ref" : "#/components/schemas/event_filter"
+ "event_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "event_filter": {
+ "$ref": "#/components/schemas/event_filter"
},
- "event_details_required" : {
- "$ref" : "#/components/schemas/event_details_required"
+ "event_details_required": {
+ "$ref": "#/components/schemas/event_details_required"
}
}
},
- "entity_new_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/entity_details"
+ "entity_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/entity_details"
}
}
},
- "entity_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/entity_details"
+ "entity_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/entity_details"
}
}
},
- "entity_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "entity_filter" : {
- "$ref" : "#/components/schemas/entity_filter"
+ "entity_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "entity_filter": {
+ "$ref": "#/components/schemas/entity_filter"
},
- "entity_details_required" : {
- "$ref" : "#/components/schemas/entity_details_required"
+ "entity_details_required": {
+ "$ref": "#/components/schemas/entity_details_required"
}
}
},
- "resource_new_qry" : {
- "type" : "object",
- "properties" : {
- "resource_details" : {
- "$ref" : "#/components/schemas/resource_details"
+ "resource_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/resource_details"
}
}
},
- "resource_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/resource_details"
+ "resource_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/resource_details"
}
}
},
- "resource_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "resource_filter" : {
- "$ref" : "#/components/schemas/resource_filter"
+ "resource_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "resource_filter": {
+ "$ref": "#/components/schemas/resource_filter"
},
- "resource_details_required" : {
- "$ref" : "#/components/schemas/resource_details_required"
+ "resource_details_required": {
+ "$ref": "#/components/schemas/resource_details_required"
}
}
},
- "resource_get_availability_qry" : {
- "type" : "object",
- "properties" : {
- "free_resource_filter" : {
- "$ref" : "#/components/schemas/free_resource_filter"
+ "resource_get_availability_qry": {
+ "type": "object",
+ "properties": {
+ "free_resource_filter": {
+ "$ref": "#/components/schemas/free_resource_filter"
}
}
},
- "subscriber_new_qry" : {
- "type" : "object",
- "properties" : {
- "subscriber_details" : {
- "$ref" : "#/components/schemas/subscriber_details"
+ "subscriber_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/subscriber_details"
}
}
},
- "subscriber_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/subscriber_details"
+ "subscriber_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/subscriber_details"
}
}
},
- "subscriber_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "subscriber_filter" : {
- "$ref" : "#/components/schemas/subscriber_filter"
+ "subscriber_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "subscriber_filter": {
+ "$ref": "#/components/schemas/subscriber_filter"
},
- "subscriber_details_required" : {
- "$ref" : "#/components/schemas/subscriber_details_required"
+ "subscriber_details_required": {
+ "$ref": "#/components/schemas/subscriber_details_required"
}
}
},
- "message_new_qry" : {
- "type" : "object",
- "properties" : {
- "message_details" : {
- "$ref" : "#/components/schemas/message_details"
+ "message_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/message_details"
}
}
},
- "message_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/message_details"
+ "message_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/message_details"
}
}
},
- "message_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "message_filter" : {
- "$ref" : "#/components/schemas/message_filter"
+ "message_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "message_filter": {
+ "$ref": "#/components/schemas/message_filter"
},
- "message_details_required" : {
- "$ref" : "#/components/schemas/message_details_required"
+ "message_details_required": {
+ "$ref": "#/components/schemas/message_details_required"
}
}
},
- "affiliation_new_qry" : {
- "type" : "object",
- "properties" : {
- "affiliation_details" : {
- "$ref" : "#/components/schemas/affiliation_details"
+ "affiliation_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/affiliation_details"
}
}
},
- "affiliation_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/affiliation_details"
+ "affiliation_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/affiliation_details"
}
}
},
- "affiliation_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "affiliation_filter" : {
- "$ref" : "#/components/schemas/affiliation_filter"
+ "affiliation_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "affiliation_filter": {
+ "$ref": "#/components/schemas/affiliation_filter"
},
- "affiliation_details_required" : {
- "$ref" : "#/components/schemas/affiliation_details_required"
+ "affiliation_details_required": {
+ "$ref": "#/components/schemas/affiliation_details_required"
}
}
},
- "alert_schedule_new_qry" : {
- "type" : "object",
- "properties" : {
- "alert_schedule_details" : {
- "$ref" : "#/components/schemas/alert_schedule_details"
+ "alert_schedule_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/alert_schedule_details"
}
}
},
- "alert_schedule_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/alert_schedule_details"
+ "alert_schedule_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/alert_schedule_details"
}
}
},
- "alert_schedule_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "alert_schedule_filter" : {
- "$ref" : "#/components/schemas/alert_schedule_filter"
+ "alert_schedule_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "alert_schedule_filter": {
+ "$ref": "#/components/schemas/alert_schedule_filter"
},
- "alert_schedule_details_required" : {
- "$ref" : "#/components/schemas/alert_schedule_details_required"
+ "alert_schedule_details_required": {
+ "$ref": "#/components/schemas/alert_schedule_details_required"
}
}
},
- "log_new_qry" : {
- "type" : "object",
- "properties" : {
- "log_details" : {
- "$ref" : "#/components/schemas/log_details"
+ "log_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/log_details"
}
}
},
- "log_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/log_details"
+ "log_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "log_filter": {
+ "$ref": "#/components/schemas/log_filter"
+ },
+ "log_details_required": {
+ "$ref": "#/components/schemas/log_details_required"
}
}
},
- "log_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "log_filter" : {
- "$ref" : "#/components/schemas/log_filter"
- },
- "log_details_required" : {
- "$ref" : "#/components/schemas/log_details_required"
+ "appointment_new_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/appointment_creation_details"
}
}
},
- "appointment_new_qry" : {
- "type" : "object",
- "properties" : {
- "appointment_details" : {
- "$ref" : "#/components/schemas/appointment_creation_details"
+ "appointment_modify_qry": {
+ "type": "object",
+ "properties": {
+ "details": {
+ "$ref": "#/components/schemas/appointment_details"
}
}
},
- "appointment_modify_qry" : {
- "type" : "object",
- "properties" : {
- "details" : {
- "$ref" : "#/components/schemas/appointment_details"
+ "appointment_get_details_qry": {
+ "type": "object",
+ "properties": {
+ "appointment_filter": {
+ "$ref": "#/components/schemas/appointment_filter"
+ },
+ "appointment_details_required": {
+ "$ref": "#/components/schemas/appointment_details_required"
}
}
},
- "appointment_get_details_qry" : {
- "type" : "object",
- "properties" : {
- "appointment_filter" : {
- "$ref" : "#/components/schemas/appointment_filter"
+ "time_slot": {
+ "type": "object",
+ "properties": {
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T11:00:00Z"
},
- "appointment_details_required" : {
- "$ref" : "#/components/schemas/appointment_details_required"
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "example": "2018-02-15T11:30:00Z"
}
- }
+ },
+ "required": [
+ "from",
+ "to"
+ ]
+ },
+ "pagination_metadata": {
+ "type": "object",
+ "properties": {
+ "page": {
+ "type": "integer",
+ "example": 1
+ },
+ "page_size": {
+ "type": "integer",
+ "example": 20
+ },
+ "total": {
+ "type": "integer",
+ "example": 354
+ }
+ },
+ "required": [
+ "page",
+ "page_size",
+ "total"
+ ]
+ }
+ },
+ "securitySchemes": {
+ "bearerAuth": {
+ "type": "http",
+ "scheme": "bearer",
+ "bearerFormat": "JWT",
+ "description": "JWT token as specified in section 5.1.4"
}
+ },
+ "parameters": {
+ "PageParam": {
+ "name": "page",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "minimum": 1,
+ "default": 1
+ },
+ "description": "Page number (1-based)"
+ },
+ "PageSizeParam": {
+ "name": "page_size",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 100,
+ "default": 20
+ },
+ "description": "Number of items per page"
+ }
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
}
- }
+ ]
}
diff --git a/api/test.txt b/api/test.txt
deleted file mode 100644
index 8b13789..0000000
--- a/api/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/spec/7-data-structures.md b/spec/7-data-structures.md
index 2d1ce88..b1cc96c 100644
--- a/spec/7-data-structures.md
+++ b/spec/7-data-structures.md
@@ -28,7 +28,7 @@ The proposed resource model showing the relationship between data objects that a
| Status | String | pending/started/completed/no-show/etc. |
| HostEntityId | Integer | id of the entity which is organizing the event |
| Event Name | String | name may show event type and branding |
-| SubscriberLimit | String | Maximum number of subscribers allowed |
+| SubscriberLimit | Integer | Maximum number of subscribers allowed |
| Terms | String | Any conditions and instructions for to subscribers for participation in an event |
| Category | string | category of the event (e.g. consultation, training, salary payments, etc.) |
diff --git a/spec/8-service-apis.md b/spec/8-service-apis.md
index 45bf29e..f04c490 100644
--- a/spec/8-service-apis.md
+++ b/spec/8-service-apis.md
@@ -18,183 +18,175 @@ The tests for the Scheduler Building Block can be found in [this GitHub reposito
### 8.1 Event Management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event/{event_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event/{event_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/event/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.2 Entity Management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity/{entity_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity/{entity_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/entity/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.3 Alert Schedule Management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule/{alert_schedule_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule/{alert_schedule_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/alert_schedule/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.4 Alert Message Management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message/{message_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message/{message_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/message/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.5 Resource management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/{resource_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/{resource_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/availability" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/resource/availability" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.6 Subscriber management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber/{subscriber_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber/{subscriber_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/subscriber/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.7 Affiliation management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation/{affiliation_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation/{affiliation_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/affiliation/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.8 Appointment management
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment/{appointment_id}" method="put" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment" method="delete" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment/{appointment_id}" method="delete" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment/list_details" method="get" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/appointment/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
### 8.9 Status Logging and Reporting
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/log/new" method="post" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/log" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/log/modifications" method="put" %}
+{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/log/search" method="post" %}
[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
{% endswagger %}
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/log" method="delete" %}
-[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
-{% endswagger %}
-
-{% swagger src="https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json" path="/log/list_details" method="get" %}
-[https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json](https://raw.githubusercontent.com/GovStackWorkingGroup/bb-scheduler/main/api/Govstack_scheduler_BB_APIs.json)
-{% endswagger %}
-
-## **4.10 Information Mediator Interface**
+## **8.10 Information Mediator Interface**
This Services APIs is not yet specified, but it should be the purpose of a next iteration of the Scheduler Building Block Specification.
-## **4.11 PubSub Interface**
+## **8.11 PubSub Interface**
This Services APIs is not yet specified, but it should be the purpose of a next iteration of the Scheduler Building Block Specification.
-## **4.12 Messaging interface**
+## **8.12 Messaging interface**
This Services APIs is not yet specified, but it should be the purpose of a next iteration of the Scheduler Building Block Specification.
-## **4.13 Scheduler Administration**
+## **8.13 Scheduler Administration**
This Services APIs is not yet specified, but it should be the purpose of a next iteration of the Scheduler Building Block Specification.
diff --git a/spec/9-workflows.md b/spec/9-workflows.md
index e0f3b94..8a5e06a 100644
--- a/spec/9-workflows.md
+++ b/spec/9-workflows.md
@@ -46,7 +46,7 @@ An organizer can use this workflow to create a new event in the system. The Orga
sequenceDiagram
Organizer->>Host_App: Submit details of
new event
-Host_App->>Scheduler: Post/entity/new
{Event_Details}
+Host_App->>Scheduler: POST /event
{Event_Details}
alt: if given entity/
is already registered
and event is
not duplicate
note over Scheduler: Generate unique Event_Id
Scheduler->>EventList: Add new event
{Details, unique Event_Id}
@@ -65,20 +65,20 @@ Organizer can request the cancellation of a prescheduled event through the host
```mermaid
sequenceDiagram
Organizer->>Host_App: Request Cancellation of selected event
- Host_App->>Scheduler: Delete/event{event_Id}
- Scheduler->>Alert_Schedule_List: Get/Alert_Schedule/List_details {Alert_Schedule_id} in {event_id}
+ Host_App->>Scheduler: DELETE /event/{event_id}
+ Scheduler->>Alert_Schedule_List: POST /alert_schedule/search {Alert_Schedule_id} in {event_id}
loop for each Alert_Schedule_id:
- Scheduler->>Alert_Schedule_List: Delete/Alert_Schedule/{event_id}
+ Scheduler->>Alert_Schedule_List: DELETE /alert_schedule/{alert_schedule_id}
end
- Scheduler->>Appointment_List: Get/appointment/List_details {appointment_id} in {event_id}
+ Scheduler->>Appointment_List: POST /appointment/search {appointment_id} in {event_id}
loop for each appointment id:
- Scheduler->>Appointment_List: Delete/appointment/ {appointment_id}
+ Scheduler->>Appointment_List: DELETE /appointment/{appointment_id}
end
loop for each target
alt if participant type = resource:
- Scheduler->>Resource_List: Get/Resource/List_Details{Resource_id}
+ Scheduler->>Resource_List: POST /resource/search{Resource_id}
else if participant type = Subscriber:
- Scheduler->>Subscriber_List: Get/Subscriber/List_Details{Subscriber_id}
+ Scheduler->>Subscriber_List: POST /subscriber/search{Subscriber_id}
end
opt if prefered channel= "direct"
Scheduler->>Target_BB/App: notify cancellation[url]
@@ -90,7 +90,7 @@ sequenceDiagram
Scheduler->>messaging BB: notify cancellation[messaging BB]
end
end
- Scheduler->>Event_List: delete/event in {event_id}
+ Scheduler->>Event_List: DELETE /event/{event_id}
Scheduler->>Host_App: return success or error
Host_App->>Organizer: confirm deletion or error information
@@ -105,9 +105,9 @@ In some scenarios, one may search for events of a specific category involving a
```mermaid
sequenceDiagram
Organizer->>Host_App:Submit category,
resource_id,
datetime_range,
event_type
-Host_App->>Scheduler:Get/appointment/list_details
{event_id} in {entity_id,event_type,
paticipant_id=resource_id,
paticipant_type='resource',
from_datetime,to_datetime)
+Host_App->>Scheduler:POST /appointment/search
{event_id} in {entity_id,event_type,
paticipant_id=resource_id,
paticipant_type='resource',
from_datetime,to_datetime)
Scheduler-->Host_app: return ids of
matching events
-Host_App->>Scheduler:Get/event/list_details
in {event_ids, status='open'}
+Host_App->>Scheduler:POST /event/search
in {event_ids, status='open'}
Scheduler->>Host_App: return details of
specific events with
status=open
Host_App->> Organizer: Publish event details
@@ -122,7 +122,7 @@ A new entity that can use the Scheduler must be registered by the administrator
```mermaid
sequenceDiagram
Adminstrator->>Host_App:Request addition of
given Entity and
entity profile
-Host_App->>Scheduler:Post:/entity/new
{entity_details}
+Host_App->>Scheduler:POST /entity
{entity_details}
Scheduler->>Entity_List: Store new entity profile
and generate new entity id
Entity_List->>Scheduler: Return new template id
or error(if entity
exists already)
Host_App->>Adminstrator: confirm template
registration and prompt
for registration of
"organizer" resource
@@ -137,8 +137,8 @@ An organizer may schedule different alert messages to be sent to subscribers and
```mermaid
sequenceDiagram
Organizer->>Host_App: request new alert
schedule with chosen
message, epoch
,target type,event
-Host_App->>Scheduler:Post/alert_schedule/new
{alert_schedule_details}
-Scheduler->>Event_List: Get/event/list_details
{period} in {event_id}
+Host_App->>Scheduler:POST /alert_schedule
{alert_schedule_details}
+Scheduler->>Event_List: POST /event/search
{period} in {event_id}
alt if entity not found
or event has ended
Scheduler->>Host_App: return error code
Host_App->>Organizer: publish error
@@ -158,25 +158,25 @@ The Scheduler's internal tracker keeps fetching (with a predefined interval) a l
sequenceDiagram
loop for each interval(x minutes)
note over Scheduler: update datetime
range by interval
- Scheduler->>Alert_Schedule_List:Get/alert_schedule/list_details
{datetime,message_id
target_type,event_id}
in {datetime_range}
+ Scheduler->>Alert_Schedule_List:POST /alert_schedule/search
{datetime,message_id
target_type,event_id}
in {datetime_range}
Alert_Schedule_List-->Scheduler:Details of all alerts
falling within given
date-time range
loop for each alert,
- Scheduler->>message_list:Get/message/list_details
<{message}in{message_id}:
+ Scheduler->>message_list:POST /message/search
<{message}in{message_id}:
message_list->Scheduler: return message
to be sent
alt if target_category is resource or both
- Scheduler->>appointment_list:Get/appintment/list_details
<{participant_id}in{event_id,
partipant_type=resource}
+ Scheduler->>appointment_list:POST /appointment/search
<{participant_id}in{event_id,
partipant_type=resource}
appointment_list->>Scheduler:return resource_ids of event
loop for each resource
- Scheduler->>Resource_list:/resource/list_details
{phone,url,email,
preffered channel}in
{resource_id}
+ Scheduler->>Resource_list:/resource/search
{phone,url,email,
preffered channel}in
{resource_id}
Resource_list->>Scheduler:return {phone,url,email,
preffered channel}
note over Scheduler: append resource
info to target list
end
end
alt if target_category is subscriber or both
- Scheduler->>event_list:Get/event/list_details
<{participant_id}in{event_id,
partipant_type=subscriber}
+ Scheduler->>event_list:POST /event/search
<{participant_id}in{event_id,
partipant_type=subscriber}
event_list->>Scheduler:return resource_ids of event
loop for each subscriber
- Scheduler->>subscriber_list:/subscriber/list_details
{phone,url,email,
preffered channel}in
{subscriber_id=target_id}
+ Scheduler->>subscriber_list:/subscriber/search
{phone,url,email,
preffered channel}in
{subscriber_id=target_id}
subscriber_list->>Scheduler:return {phone,url,email,
preffered channel}
note over Scheduler: append resource
info to target list
end
@@ -208,7 +208,7 @@ Several predefined templates of alert messages can be stored in a Message List s
```mermaid
sequenceDiagram
Organizer->>Host_App:Request addition of
given alert template
-Host_App->>Scheduler:Post:/Alert_Template/new{message_details}
+Host_App->>Scheduler:POST /message
{message_details}
Scheduler->>message_List:Store new template
and generate
new template id
Scheduler->>Host_App:Return new template ID
Host_App->>Organizer: confirm template registration
@@ -223,7 +223,7 @@ An organizer must register into the scheduler various categories of resources {p
```mermaid
sequenceDiagram
Adminstrator/Organizer->>Host_App:Request addition of
given Resource as
Organizer in given entity
-Host_App->>Scheduler:Post:/resource/new
{entity_id,resouce_details}
+Host_App->>Scheduler:POST /resource
{entity_id,resouce_details}
Scheduler->>Resource_List: Store new resource profile
note over Resource_List: if matching resource
exists fetch resource_id,
else store deteails and
generate new id
Resource_List->>Scheduler: return Resource_Id
@@ -239,11 +239,11 @@ An organizer may use a host application to seek the Scheduler for availability w
```mermaid
sequenceDiagram
Organizer->>Host_App: Request resource availability
-Host_App->>Scheduler: Get/resource/availablity:
{free_resource_details}
in{Entity_id,Resource_Id
from_datetime,
to_date_time}
-Scheduler->>Affiliation_List: Get/affiliation/list_details
{Workdays_hours}
in{resource_id, Entity_id}
+Host_App->>Scheduler: POST /resource/availability
{free_resource_details}
in{Entity_id,Resource_Id
from_datetime,
to_date_time}
+Scheduler->>Affiliation_List: POST /affiliation/search
{Workdays_hours}
in{resource_id, Entity_id}
Affiliation_List->>Scheduler: returns workdays_hours
note over Scheduler: calculate affiliated
dates in given
date-time range.
-Scheduler->>Appointment_List: Get/appointment/list_details
{start,end}in{participant_id=
resource_id, participant_type='resource,
Entity_id,Event_type,datetime range}
+Scheduler->>Appointment_List: POST /appointment/search
{start,end}in{participant_id=
resource_id, participant_type='resource,
Entity_id,Event_type,datetime range}
Appointment_List->>Scheduler: returns starting
and ending time
of appointments
note over Scheduler: calculate free slots
(affiliated time
zones - booked slots)
Scheduler->>Host_App: Return Array{resource id,free_slots}
@@ -259,7 +259,7 @@ A subscriber can be registered into the scheduler with relevant details, either
```mermaid
sequenceDiagram
Organizer->>Host_App:Request addition of
given Subscriber
-Host_App->>Scheduler:Post:/Subscriber/new
{Subscriber_details}
+Host_App->>Scheduler:POST /subscriber
{Subscriber_details}
Scheduler->>Subscriber_List: Store new Subscriber profile
note over Subscriber_List: if matching Subscriber
exists fetch Subscriber_id,
else store deteails and
generate new id
Subscriber_List->>Scheduler: return Subscriber_Id
@@ -294,17 +294,17 @@ An organizer may enrol a subscriber or resource to a specific event through a ho
```mermaid
sequenceDiagram
Organizer->>Host_App:request enrollment
of chosen participant
to chosen event
-Host_App->>Scheduler:Get/event/list_details
{event_type,from,to,
status} in {event_id}
+Host_App->>Scheduler:POST /event/search
{event_type,from,to,
status} in {event_id}
Scheduler->>Host_App: return requested
event details for
given event ids
alt if subscriber_limit >0 and event_status = 'open'
- Host_App->> Scheduler: put/event/modifications
{subscriber_limit-1}in{event_id}
+ Host_App->> Scheduler: PUT /event/{event_id}
{subscriber_limit-1}in{event_id}
Scheduler->>Host_App: return success
- Host_App->>Scheduler:Post/Appointment/new
{event_id,event_type,
participant_type,participant_id,
from,to,deadline}
+ Host_App->>Scheduler:POST /appointment
{event_id,event_type,
participant_type,participant_id,
from,to,deadline}
alt if participant type is "resource"
- Scheduler->>Resource_List: Get/Resource/list_details
{resource_details} in {Resouce_id=
participant_id}
+ Scheduler->>Resource_List: POST /resource/search
{resource_details} in {Resouce_id=
participant_id}
Resource_List->>Scheduler:return target details
Resource or error
else if participant type is "subscriber"
- Scheduler->>Subscriber_List: Get/Resource/list_details
{subcriber_details} in {Resouce_id=
participant_id}
+ Scheduler->>Subscriber_List: POST /resource/search
{subcriber_details} in {Resouce_id=
participant_id}
Subscriber_List->>Scheduler:return target details
subscriber or error
end
Scheduler->>Messaging_BB: send appointment id
with event details
to subscriber
@@ -320,7 +320,7 @@ An organizer may cancel an existing appointment of a resource or a subscriber fo
```mermaid
sequenceDiagram
Organizer->>Host_App: request deletion
of appointment
of selected
resource/subscriber
in selected event
required details
-Host_App->>Scheduler: Delete/appointment
{event_Id,participant_type
, participant_id}
+Host_App->>Scheduler: DELETE /appointment/{appointment_id}
{event_Id,participant_type
, participant_id}
Scheduler->>Appointment_List: mark matching appointment
as cancelled
alt If event or participant not found
Scheduler->>Host_App: publish error
@@ -339,7 +339,7 @@ In this workflow, a simple case of extracting chosen type of log in a given time
```mermaid
sequenceDiagram
Organizer->>Host_App: request logs in
given period,
entity_id,log category
-Host_App->>Scheduler:Get/log/list_details
{details} in {entity_id,
datetime_range,
log_category}
+Host_App->>Scheduler:POST /log/search
{details} in {entity_id,
datetime_range,
log_category}
Scheduler->>Log_List:Fetch matching
log entries
Log_List->>Scheduler:return error or
null or any
matching logs
Scheduler->>Host_App:Return error or
list of logs