8 Service APIs
This section provides a reference for APIs that should be implemented by this Building Block.
8.1 Service Access
8.2 Directory Services
8.2.1 Member Discovery
Clients of the security server have the capability to obtain a list
of potential service providers within a GovStack instance, including
both members and applications.
To do so, they should initiate an HTTP GET request to the security
server.
The specific request URL will be either http://SECURITYSERVER/listClients
or https://SECURITYSERVER/listClients, depending on whether HTTPS
protocol usage is enabled for interaction.
When submitting this request, the placeholder SECURITYSERVER must be
replased with the actual address of the security server. One can also
retrieve a list of clients from other federated GovStack instances
by adding an additional HTTP parameter:
instanceId - a code of the instance.
For instance, if you wish to fetch the list of clients associated with the
instance labeled as ABC, your request URL should take the form of
http://SECURITYSERVER/listClients?instanceId=ABC.
List of Clients of GovStack
Error in request
Internal error
8.2.2 Service Discovery
This function provides a list of all REST services and service endpoints offered by a service provider.
List of REST services and endpoints for a service provider
Error in request
Internal error
This function provides a list of REST services and service endpoints offered by a service provider that the caller has permission to invoke.
List of allowed REST services and endpoints for a service provider
Error in request
Internal error
This metaservice is designed to retrieve service descriptions for
REST services.
It provides the OpenAPI service description for a specific REST service.
To use this service, the query parameters should include serviceCode=xxx,
where xxx corresponds to the service code of the particular REST service
for which you desire to obtain the service description.
OpenAPI description of the specified REST service
Error in request
Internal error
8.3 Pub/Sub Service
8.3.1 Subscriber API
Return list of my subscriptions in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
List of my subscriptions
newBirthPUSHPossible values: Subscription missing
Internal error
Subscribe caller to {eventType} in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
newBirthPUSHPossible values: Subscription created
No content
Invalid request
Subscription already exists
Internal error
No content
Return details of subscription to {eventType} in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
Subscription details
newBirthPUSHPossible values: Subscription missing
Internal error
Update details of subscription to {eventType} in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
newBirthPUSHPossible values: Subscription details
Invalid request
Subscription missing
Internal error
No content
Unsubscribe
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
Subscription deleted
Subscription missing
Internal error
No content
8.3.2 PULL delivery mode API
Return next unacknowledged event of type defined by {eventType} and located in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
Event
42newBirth{"dateTime":"2023-05-01T11:25:00+02:00","gender":"M","mother":"Jane Doe","place":"City Hospital","details":{"weight":3200,"length":49,"eyesColor":"brown"}}No event available
Invalid request
Internal error
Acknowledge receiving of event from the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
event id
Event acknowledged
no event available
invalid request
No content
8.3.3 Publisher API
Publish event in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
newBirth{"dateTime":"2023-05-01T11:25:00+02:00","gender":"M","mother":"Jane Doe","place":"City Hospital","details":{"weight":3200,"length":49,"eyesColor":"brown"}}Event accepted for publishing. Returning event id
Invalid request
Unknown event type
Internal error
Return event status info. Event is located in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
event id of event
Event status
42newBirth{"dateTime":"2023-05-01T11:25:00+02:00","gender":"M","mother":"Jane Doe","place":"City Hospital","details":{"weight":3200,"length":49,"eyesColor":"brown"}}Event missing
Internal error
Stop processing of the event. Event is located in the room {applicationId}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
event id of event
Event processing stopped
Event missing
Internal error
No content
8.3.4 Event Type API
Create new event type in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
newBirth{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "dateTime": { "type": "string", "format": "date-time" }, "gender": { "type": "string", "enum": ["M", "F"] }, "mother": { "type": "string" }, "place": { "type": "string" }, "id": { "type": "integer" }, "details": { "type": "object", "properties": { "weight": { "type": "number" }, "length": { "type": "number" }, "eyesColor": { "type": "string" } }, "required": ["weight", "length", "eyesColor"] } }, "required": ["dateTime", "gender", "mother", "place"] }Event type created
No content
Invalid request
Event type already exists
Internal error
No content
Return list of event types located in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
Event type list
Event types does not defined
Internal error
Return event type description. Event type is located in the room {applicationCode}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
Event type details
newBirth{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "dateTime": { "type": "string", "format": "date-time" }, "gender": { "type": "string", "enum": ["M", "F"] }, "mother": { "type": "string" }, "place": { "type": "string" }, "id": { "type": "integer" }, "details": { "type": "object", "properties": { "weight": { "type": "number" }, "length": { "type": "number" }, "eyesColor": { "type": "string" } }, "required": ["weight", "length", "eyesColor"] } }, "required": ["dateTime", "gender", "mother", "place"] }Event type does not defined
Internal error
Delete event type in the room {applicationId}
Certs are exchanged between parties and stored in configuration to have fixed one-to-one connection
Event type deleted
Event type missing
Internal error
No content
8.4 Logging Services
8.5 Monitoring Services
8.6 Management API
8.6.1 Configuration Management
Configuration description of IM is returned in form of file
- : Grants read access to IM configuration
List of IM configuration
Subdomain for GovStack instance to run in
sample.sandbox.govstack.globalName of GovStack instance
nowherelandInternal error
Create new instance of IM
- : Grants write access to IM configuration
Creates Central Servers if init=true
falseSubdomain for GovStack instance to run in
sample.sandbox.govstack.globalName of GovStack instance
nowherelandIM starts configuration creation
Error in request
Internal error
Update IM configuration. Not described parts are not changed
- : Grants write access to IM configuration
Subdomain for GovStack instance to run in
sample.sandbox.govstack.globalName of GovStack instance
nowherelandIM starts configuration update
Error in request
Internal error
Replace IM configuration. Not described parts are deleted
- : Grants permission to create IM configuration
Subdomain for GovStack instance to run in
sample.sandbox.govstack.globalName of GovStack instance
nowherelandIM starts configuration creation
Error in request
Internal error
8.6.2 Management of Access Rights
This API takes provided filters from query parameters and returns a subset of access policies configured on the IM building block, based on the filters.
The result is paged, with page size based on the number of service and allowed application pairs. For example, when pageSize = 10 and the IM BB defines three services: A, B and C, each of which has 8 clients, the result will be split over 3 pages:
Page 1: Service A, with all of its 8 allowed applications, Service B with 2 allowed applications.
Page 2: Service B, with 6 allowed applications left over, Service C with 4 applications.
Page 3: Service C, with 4 applications.
Implementations can define additional query parameters for result display (such as ordering) and how next page tokens are implemented. It is expected that the next page token is not readable by API users and will be provided verbatim when querying the next page of results.
- : Grants permission to see what services are allowed
Filter by member class
Filter by member code
Filter by application ID
Filter by service ID
Number of access rights returned on one page
100Handle for the next page, if the result spans multiple pages. If not specified, there are no more results.
OK
Caller does not have permissions to view access rights
- : Grants permission to allow/deny IM services
Kind of organisation. Namespace for organisation {code}
GOVRegistration number (or identifier) of the organisation in {memberClass} namespace
7001Name of application
CitizensRegistryName of service/API
registrationOK
No content
Caller does not have the necessary permissions to update access rights
No content
- : Grants permission to allow/deny IM services
Kind of organisation. Namespace for organisation {code}
GOVRegistration number (or identifier) of the organisation in {memberClass} namespace
7001Name of application
CitizensRegistryName of service/API
registrationOK
No content
Caller does not have the necessary permissions to update access rights
No content
Last updated
Was this helpful?