8 Service APIs
This section provides a reference for APIs that should be implemented by this Building Block. The APIs defined here establish a blueprint for how the Building Block will interact with other Building Blocks. Additional APIs may be implemented by the Building Block, but the listed APIs define a minimal set of functionality that should be provided by any implementation of this Building Block.
The GovStack non-functional requirements document provides additional information on how 'adaptors' may be used to translate an existing API to the patterns described here. This section also provides guidance on how candidate products are tested and how GovStack validates a product's API against the API specifications defined here.
All APIs will be defined using the OpenAPI (Swagger) standard. The API definitions will be hosted outside of this document. This section may provide a brief description of required APIs.
This section will primarily contain links to the GitHub repository for OpenAPI definition (yaml) files as well as to a website hosted by GovStack that provides a live API documentation portal.
Note that APIs should be grouped by functional area (from sections 4 and 6) where appropriate.
OpenAPI links to the GitHub repository can be made in an interactive way using the GitBook OpenAPI widget, linking to the GitHub repo version of the .yaml file, remembering to link to the “raw” url. An example from the Registries BB is shown below and can be replaced.
8.1 Administrative APIs
create a new event, in eventList with given eventDetails, returns new event id or failure error code
healthngoadmin1Organizersuccess
ID of created event
eventId:12345Invalid request
No permission
one or more specified inputs not found
Unexpected error
POST /event/new?requestorId=healthngoadmin1&requestToken=Organizer&query=[object+Object] HTTP/1.1
Accept: */*
eventId:12345changes values of specific details (as given by eventDetails) of given event (selected by eventFilter) in eventList and returns success or error code
healthngoadmin1Organizer12345success, event updated
No content
Invalid request
No permission
one or more specified inputs not found
Unexpected error
PUT /event/modifications?requestorId=healthngoadmin1&requestToken=Organizer&eventId=12345&query=[object+Object] HTTP/1.1
Accept: */*
No content
healthngoadmin1Organizer12345success, event cancelled
No content
Invalid request
No permission
one or more specified inputs not found
Unexpected error
DELETE /event?requestorId=healthngoadmin1&requestToken=Organizer&eventId=12345 HTTP/1.1
Accept: */*
No content
8.2 User APIs
Last updated
Was this helpful?