10 Service APIs
This section describes external APIs that must be implemented by the IM building block. Additional APIs may be implemented by the building block (all APIs must adhere to the standards and protocols defined), but the listed APIs define a minimal set that must be provided by any implementation.
The majority of functions provided by the IM building block are either defined in the “service access flow” or configured by the administrator via the web UI. There is, however, a “Directory Service” which can provide listings of clients, methods, and available API specs for services on the information mediator. The directory is managed by admins of members. The directory service centralizes and offers knowledge of all enrolled members and their services along with information necessary to bind a third party application as a consumer of that service. These services are described here:
and changes to the API definitions can be made by submitting a pull request on this repository.
The Swagger variant is available here: https://app.swaggerhub.com/apis/GovStack/gov-stack_im_service_metadata_api/0.3
The services can be accessed via the following Service APIs:
At development time, to see which organizations are available on GovStack, an administrator of application A sends a GET request to the security server:
url-of-local-information-mediator-security-server/r1/listClients
The response is an array of organizations with descriptions.
get
https://SECURITYSERVER/r1
/listClients
List of Clients of GovStack
At development time, an administrator at application A sends a GET request to the security server:
url-of-local-information-mediator-security-server/r1/INDIA/GOV/MEMBER/APPLICATION/{listMethods || allowedMethods}
The response is an array of services (either all services, or services that the requester is authorized to access via “allowedMethods”).
get
https://SECURITYSERVER/r1
/{GovStackInstance}/{memberClass}/{memberCode}/{applicationCode}/listMethods
List REST services and endpoints for a service provider
get
https://SECURITYSERVER/r1
/{GovStackInstance}/{memberClass}/{memberCode}/{applicationCode}/allowedMethods
List of allowed REST services and endpoints for a service provider
At development time, to learn about an available service, an administrator at application A sends a GET request to the security server:
url-of-local-information-mediator-security-server/r1/INDIA/GOV/MEMBER/APPLICATION/getOpenApi?serviceCode=SERVICE
The response is an OpenAPI specification, detailing the endpoints and requirements for that service/API of requested Service of Application.
get
https://SECURITYSERVER/r1
/{GovStackInstance}/{memberClass}/{memberCode}/{applicationCode}/getOpenAPI
Returns OpenAPI service description for a REST service
At debugging time, to learn about system performance or retrieve an audit log, an administrator may send a request to the reporting API.
The response is <audit trail>, <metrics> , etc.
At debugging time, to learn about system performance or retrieve an audit log, an administrator may send a request to the reporting API.
The response is
<audit trail>
, <metrics>
, etc.10.5 Service Access API
The full technical specification on how to call service is presented in the “Detailed Flows” section below 13.1.6 Sending a message from A to B.
The full API definition of all available services can be produced from the set of all available OpenAPI descriptions. For that one need in all occurrences of:
“path”: { “<some-value>”: … }
prepend <some-value> with
{GovStackInstance}/{memberClass}/{member}/{application}/{service}/ extending this way the path with these details.
To broadcast a message to a Room, the service access API must be followed and the service requested must be the service implementing event type.
Last modified 9mo ago