@abgov/adsp-sdk-mcp-server 1.35.0 → 1.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"openapi":"3.0.0","info":{"title":"Status service","version":"0.0.0","description":"The status service provides the capability to monitor the health of applications and services, and to\npublish _status_ information about them. Along with the Tenant Admin Webapp, it allows you to\n* manage which applications and services will be monitored,\n* control application monitoring,\n* access an application's published status,\n* manage public notices regarding the application's status.\n\nPlease use the [Tenant Admin Webapp](https://adsp.alberta.ca) to manage the applications and services\nthat you wish to be monitored. For more information on how the _Status Service_ works, please see the\n[Status Service tutorial](https://govalta.github.io/adsp-monorepo/tutorials/status-service/Introduction.html).\n"},"paths":{"/notice/v1/notices":{"get":{"tags":["Notices"],"description":"Retrieves notices, newest first. Anonymous requests are accepted.\n- Anonymous requests read published notices; set `name` to read only the notices of that tenant (the name must\n be the name of an existing tenant).\n\n- Authenticated tenant users read the published notices of the tenant of their token; `name` is ignored.\n- Users with the status-admin role read all notices of the tenant of their token, or the notices in `mode`.\n","security":[{},{"accessToken":[]}],"parameters":[{"name":"top","description":"Number of results to read.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":50,"example":10}},{"name":"after","description":"Number of results to skip, as returned in the _next_ query string of a previous page.","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":10}},{"name":"mode","description":"Mode of notices to read. Only used for users with the status-admin role; `active` reads all notices except archived ones.\n","in":"query","required":false,"schema":{"type":"string","enum":["active","draft","published","archived"]}},{"name":"name","description":"Name of the tenant to read published notices for (case insensitive). Only used for anonymous requests.","in":"query","required":false,"schema":{"type":"string"},"example":"my-tenant"}],"responses":{"200":{"description":"Notices successfully retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"description":"A list of notices that match the query","type":"array","items":{"$ref":"#/components/schemas/Notice"}},"page":{"$ref":"#/components/schemas/Page"}}},"example":{"results":[{"id":"6730c4f1a2b3c4d5e6f70812","message":"My Application will be down for weekly maintenance during the following hours.","tennantServRef":[{"id":"my-application","name":"My Application"}],"isAllApplications":false,"startDate":"2026-11-15T02:00:00.000Z","endDate":"2026-11-15T04:00:00.000Z","mode":"published","created":"2026-11-10T16:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","tenantName":"My Tenant"}],"page":{"after":0,"size":1,"next":null,"total":1}}}}}}},"post":{"tags":["Notices"],"description":"Creates a notice in draft mode for the tenant of the token. Requires the status-admin role.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message","tennantServRef","startDate","endDate"],"properties":{"message":{"type":"string"},"tennantServRef":{"description":"Applications the notice applies to. Send an empty array with isAllApplications set to true for all applications.","type":"array","items":{"$ref":"#/components/schemas/NoticeApplicationRef"}},"isAllApplications":{"type":"boolean","default":false},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}},"example":{"message":"My Application will be down for weekly maintenance during the following hours.","tennantServRef":[{"id":"my-application","name":"My Application"}],"isAllApplications":false,"startDate":"2026-11-15T02:00:00.000Z","endDate":"2026-11-15T04:00:00.000Z"}}}},"responses":{"201":{"description":"Notice successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"}}}},"/notice/v1/notices/{id}":{"parameters":[{"$ref":"#/components/parameters/StatusNoticeId"}],"get":{"tags":["Notices"],"description":"Retrieves a notice of the tenant of the token. Requires an authenticated tenant user; published notices can be read by any user of the tenant, and other notices require the status-admin role.\n","responses":{"200":{"description":"Notice successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}},"patch":{"tags":["Notices"],"description":"Updates a notice of the tenant of the token. Requires the status-admin role. All fields of a draft notice can be updated, and a draft notice can be published but not archived. Only the mode of a published notice can be updated, to archive it or return it to draft. Archived notices cannot be updated. Publishing a notice sends the application-notice-published event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"tennantServRef":{"type":"array","items":{"$ref":"#/components/schemas/NoticeApplicationRef"}},"isAllApplications":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"mode":{"type":"string","enum":["draft","published","archived"]}}},"examples":{"edit":{"summary":"Edit a draft notice","value":{"message":"My Application will be down for maintenance during the following hours.","endDate":"2026-11-15T05:00:00.000Z"}},"publish":{"summary":"Publish a draft notice","value":{"mode":"published"}},"archive":{"summary":"Archive a published notice","value":{"mode":"archived"}}}}}},"responses":{"200":{"description":"Notice successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"400":{"description":"The mode is not valid, or the change is not allowed for the current mode of the notice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"Value not valid for Update notice: Archived notice cannot be updated."}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}},"delete":{"tags":["Notices"],"description":"Deletes a draft notice of the tenant of the token. Requires the status-admin role. Published and archived notices cannot be deleted and respond 401.\n","responses":{"200":{"description":"Notice successfully deleted. The response is the deleted notice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/public_status/v1/applications/{tenant}":{"get":{"tags":["Application Status"],"description":"Retrieves the applications of a tenant and their published statuses, sorted by name. Public; anonymous requests are accepted and any bearer token is ignored. The tenant is identified by name in the path.\n","security":[{}],"parameters":[{"name":"tenant","description":"Name of the tenant to retrieve applications for (case insensitive).","in":"path","required":true,"schema":{"type":"string"},"example":"my-tenant"}],"responses":{"200":{"description":"Successfully retrieved statuses.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Public-application"}}}}},"404":{"description":"Tenant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"tenant with ID 'my-tenant' could not be found."}}}}}}},"/status/v1/applications":{"get":{"tags":["Application Monitoring"],"description":"Retrieves the applications of the tenant, with their statuses. Requires an authenticated tenant user; no specific role is required. The tenant is the tenant of the token; tokens without a tenant context respond 401.\n","responses":{"200":{"description":"Applications retrieved successfully.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Application"}}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"}}},"post":{"tags":["Application Monitoring"],"description":"Adds an application to the tenant for monitoring. The application key is generated from the name (in kebab case) if it is not provided. Monitoring is not enabled until requested.\n\nRequires an authenticated tenant user; no specific role is required. The application is added to the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApplicationInput"},{"type":"object","properties":{"appKey":{"type":"string","description":"Key of the application. Generated from the name if not set.","example":"my-application"},"status":{"type":"string","description":"Initial published status of the application.","enum":["operational","reported-issues","maintenance","outage"]}}}]},"example":{"name":"My Application","description":"Online application for a benefit program.","endpoint":{"url":"https://my-application.alberta.ca/health"},"monitorOnly":false,"status":"operational"}}}},"responses":{"201":{"description":"Application added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"},"example":{"appKey":"my-application","name":"My Application","description":"Online application for a benefit program.","monitorOnly":false,"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","metadata":"","enabled":false,"statusTimestamp":null,"status":"operational","internalStatus":"stopped","endpoint":{"status":"offline","url":"https://my-application.alberta.ca/health"}}}}},"400":{"$ref":"#/components/responses/StatusBadRequest"},"401":{"$ref":"#/components/responses/StatusUnauthorized"}}}},"/status/v1/applications/endpoint-status-entries":{"get":{"tags":["Application Monitoring"],"description":"Retrieves the raw results of the health check _pings_ recorded in the last `ageInMinutes` minutes. Requires an authenticated tenant user; no specific role is required.\n","parameters":[{"name":"ageInMinutes","description":"Number of minutes to read results for.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":31,"example":20}}],"responses":{"200":{"description":"Data retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PingData"}}}}}}}},"/status/v1/applications/{appKey}":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"put":{"tags":["Application Monitoring"],"description":"Replaces the configuration of an application. Send every field to keep; fields left out are removed. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApplicationInput"},{"type":"object","properties":{"autoChangeStatus":{"type":"boolean","description":"If true, health checks change the status from operational to reported-issues after failing for 5 minutes, and back to operational after succeeding for 5 minutes.\n"}}}]},"example":{"name":"My Application","description":"Online application for a benefit program.","endpoint":{"url":"https://my-application.alberta.ca/health"},"monitorOnly":false,"autoChangeStatus":true}}}},"responses":{"200":{"description":"Application updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}},"delete":{"tags":["Application Monitoring"],"description":"Deletes an application with its status and health check results, and stops monitoring it if monitoring is enabled. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","responses":{"204":{"description":"Application deleted."},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/disable":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Monitoring"],"description":"Turns off monitoring of the application. Health checks stop when the service next reloads its health checks (every 5 minutes); use the toggle operation to stop them immediately. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","responses":{"200":{"description":"Monitoring has been disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/enable":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Monitoring"],"description":"Turns on monitoring of the application. Health checks start when the service next reloads its health checks (every 5 minutes); use the toggle operation to start them immediately. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","responses":{"200":{"description":"Monitoring has been enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/endpoint-status-entries":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"get":{"tags":["Application Monitoring"],"description":"Retrieves the raw results of the health check _pings_ of the application, newest first. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","parameters":[{"name":"topValue","description":"Number of results to read.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":200,"example":20}}],"responses":{"200":{"description":"Data retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PingData"}}}}},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/status":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Status"],"description":"Sets the published status of the application, and sends the application-status-changed event. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"The published status to set.","type":"string","enum":["operational","reported-issues","maintenance","outage"]}}},"example":{"status":"maintenance"}}}},"responses":{"200":{"description":"Successfully updated status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/toggle":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Monitoring"],"description":"Toggles monitoring of the application, from enabled to disabled or vice versa, and sends the health-check-started or health-check-stopped event that starts or stops the health checks. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","responses":{"200":{"description":"Monitoring has been toggled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/webhook/{id}/test/{eventName}":{"get":{"tags":["Application Monitoring"],"description":"Sends a test monitored-service-down or monitored-service-up event to a webhook of a monitored application. The webhook is read from the push service configuration of the tenant. The response is sent after a 2 second delay. Requires an authenticated tenant user; no specific role is required. The webhook and its application must belong to the tenant of the token.\n","parameters":[{"name":"id","description":"ID of the webhook.","in":"path","required":true,"schema":{"type":"string"},"example":"my-application-webhook"},{"name":"eventName","description":"Event to send. monitored-service-down sends a service down event; any other value sends a service up event.\n","in":"path","required":true,"schema":{"type":"string"},"example":"monitored-service-down"}],"responses":{"200":{"description":"Test event sent. The response is a text summary of the event, including the application and webhook.","content":{"application/json":{"schema":{"type":"string"},"example":"event is sent - app: {\"appKey\":\"my-application\", ...}, user: {...}, webhook: {...}"}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"StatusAppKey":{"name":"appKey","description":"Key of the application, as returned in `appKey` when the application was added.","in":"path","required":true,"schema":{"type":"string"},"example":"my-application"},"StatusNoticeId":{"name":"id","description":"ID of the notice.","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"example":"6730c4f1a2b3c4d5e6f70812"}},"schemas":{"Application":{"type":"object","properties":{"appKey":{"description":"A unique ID generated when the application is added to the Status Service for monitoring.","example":"my-application","type":"string"},"name":{"description":"The name of the application being monitored. The name must be unique for your Tenant.","example":"My Application","type":"string"},"description":{"description":"An optional, brief, description of the application being monitored.","type":"string","example":"Online application for a benefit program."},"status":{"description":"The published status of the application, set via the API or through the Tenant Admin Webapp. An empty string means no status has been set.\n","type":"string","enum":["operational","reported-issues","maintenance","outage",""],"example":"operational"},"monitorOnly":{"description":"If true, the application is not displayed on the public status page.","type":"boolean","example":false},"autoChangeStatus":{"description":"If true, health checks change the status from operational to reported-issues after failing for 5 minutes, and back to operational after succeeding for 5 minutes.\n","type":"boolean","example":false},"tenantId":{"description":"URN identifying the tenant to which the application belongs.","type":"string","example":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46"},"metadata":{"description":"Additional status information, if any.","example":""},"enabled":{"description":"Indicates whether or not monitoring (health checks) for the application has been turned on.","type":"boolean","example":true},"statusTimestamp":{"description":"Time the status was last set, in milliseconds since the epoch, or null if never set.","type":"number","nullable":true,"readOnly":true,"example":1794326400000},"internalStatus":{"description":"Health check state of the application.","type":"string","enum":["stopped","healthy","unhealthy","pending"],"readOnly":true,"example":"healthy"},"endpoint":{"type":"object","properties":{"url":{"description":"URL of the application endpoint that health checks request.","type":"string","example":"https://my-application.alberta.ca/health"},"status":{"description":"Result of the latest health check.","type":"string","enum":["online","offline","n/a","pending"],"readOnly":true,"example":"online"}}}},"example":{"appKey":"my-application","name":"My Application","description":"Online application for a benefit program.","monitorOnly":false,"autoChangeStatus":false,"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","metadata":"","enabled":true,"statusTimestamp":1794326400000,"status":"operational","internalStatus":"healthy","endpoint":{"status":"online","url":"https://my-application.alberta.ca/health"}}},"ApplicationInput":{"type":"object","required":["name","endpoint"],"properties":{"name":{"type":"string","description":"Name of the application. Must be unique for the tenant.","example":"My Application"},"description":{"type":"string","example":"Online application for a benefit program."},"endpoint":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL of the application endpoint that health checks request.","example":"https://my-application.alberta.ca/health"}}},"monitorOnly":{"type":"boolean","description":"If true, the application is not displayed on the public status page.","example":false}}},"Notice":{"description":"Detailed information to be posted about an application's status. The notice may include a message, a time period to which the notice applies, and the application status for the period.","type":"object","properties":{"id":{"description":"ID of the notice.","type":"string","readOnly":true,"example":"6730c4f1a2b3c4d5e6f70812"},"message":{"description":"The message portion the notice.","type":"string","example":"My Application will be down for weekly maintenance during the following hours."},"tennantServRef":{"description":"The tennantServRef (sic) identifies which applications the notice applies to. Use isAllApplications for a notice that applies to all applications of the tenant.\n","type":"array","items":{"$ref":"#/components/schemas/NoticeApplicationRef"}},"isAllApplications":{"description":"Indicates the notice applies to all applications of the tenant.","type":"boolean","example":false},"startDate":{"description":"The start of the time period to which the notice applies.","type":"string","format":"date-time","example":"2026-11-15T02:00:00.000Z"},"endDate":{"description":"The end of the time period to which the notice applies.","type":"string","format":"date-time","example":"2026-11-15T04:00:00.000Z"},"mode":{"description":"A notice is created in draft mode, can be published, and a published notice can be archived. Only published notices are displayed on the public status page.\n","type":"string","enum":["draft","published","archived"],"readOnly":true,"example":"draft"},"created":{"description":"Time the notice was created.","type":"string","format":"date-time","readOnly":true,"example":"2026-11-10T16:00:00.000Z"},"tenantId":{"description":"URN identifying the tenant of the notice.","type":"string","readOnly":true,"example":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46"},"tenantName":{"description":"Name of the tenant of the notice.","type":"string","readOnly":true,"example":"My Tenant"}},"example":{"id":"6730c4f1a2b3c4d5e6f70812","message":"My Application will be down for weekly maintenance during the following hours.","tennantServRef":[{"id":"my-application","name":"My Application"}],"isAllApplications":false,"startDate":"2026-11-15T02:00:00.000Z","endDate":"2026-11-15T04:00:00.000Z","mode":"draft","created":"2026-11-10T16:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","tenantName":"My Tenant"}},"NoticeApplicationRef":{"type":"object","properties":{"id":{"description":"The application's appKey (or ID).","type":"string","example":"my-application"},"name":{"description":"The name of the Application.","type":"string","example":"My Application"}}},"Page":{"description":"Page descriptor, used when paging through a list of items.","type":"object","properties":{"after":{"description":"Number of items skipped before this page.","type":"number","example":0},"size":{"description":"The number of list items fetched.","type":"number","example":10},"next":{"description":"Query string for the next page (for example `after=10&top=10`), or null if this is the last page.\n","type":"string","nullable":true,"example":"after=10&top=10"},"total":{"description":"The total number of items in the list.","type":"number","example":231}},"example":{"after":0,"size":10,"next":"after=10&top=10","total":231}},"PingData":{"type":"object","properties":{"url":{"description":"The URL pinged.","type":"string","example":"https://my-application.alberta.ca/health"},"ok":{"description":"The success of the ping; set to false if the ping resulted in a 400 or 500 error.","type":"boolean","example":true},"timestamp":{"description":"The time of the ping, in milliseconds since the epoch.","type":"number","example":1794326400000},"responseTime":{"description":"The response time of the ping, in ms.","type":"number","example":178},"status":{"description":"The HTTP status code of the response, or a description of the error if there was no response.","oneOf":[{"type":"number"},{"type":"string"}],"example":200},"applicationId":{"description":"The application key, AKA application ID.","type":"string","example":"my-application"},"appKey":{"description":"The application key; same value as applicationId.","type":"string","example":"my-application"}},"example":{"url":"https://my-application.alberta.ca/health","ok":true,"timestamp":1794326400000,"responseTime":178,"status":200,"applicationId":"my-application","appKey":"my-application"}},"Public-application":{"type":"object","properties":{"id":{"description":"A unique ID used to identify an application; the application key.","example":"my-application","type":"string"},"name":{"description":"The name of the application being monitored. The name must be unique for your Tenant.","example":"My Application","type":"string"},"description":{"description":"An optional, brief, description of the application being monitored.","type":"string","example":"Online application for a benefit program."},"status":{"description":"The published status of the application, set via the API or through the Tenant Admin Webapp. An empty string means no status has been set.\n","type":"string","enum":["operational","reported-issues","maintenance","outage",""],"example":"operational"},"monitorOnly":{"description":"If true, the application is monitored but not meant to be displayed on the public status page. Clients displaying statuses should filter these out.\n","type":"boolean","example":false},"lastUpdated":{"description":"Timestamp indicating when the status was last updated, or null if never set.","type":"string","format":"date-time","nullable":true,"example":"2026-11-10T16:00:00.000Z"}},"example":{"id":"my-application","name":"My Application","description":"Online application for a benefit program.","status":"operational","monitorOnly":false,"lastUpdated":"2026-11-10T16:00:00.000Z"}},"StatusError":{"type":"object","properties":{"errorMessage":{"type":"string"}},"example":{"errorMessage":"Status application with ID 'my-application' could not be found."}}},"responses":{"StatusBadRequest":{"description":"Request is invalid, for example it would create a duplicate application or an invalid notice mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"Value not valid for status-service: Duplicate Application Name My Application"}}}},"StatusNotFound":{"description":"The resource was not found in the tenant of the request. Resources of other tenants also respond 404.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"Status application with ID 'my-application' could not be found."}}}},"StatusUnauthorized":{"description":"Request does not include a valid bearer token, the token has no tenant context, or the user does not have the role required for the operation. Anonymous requests receive a plain `Unauthorized` text body; the other cases receive an `errorMessage`. Role checks in this API respond with 401 rather than 403.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"missing tenant id"}}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Application Monitoring","description":"To control application _monitoring_. Note: You can manage which applications are monitored through the [Tenant Admin Webapp](https://adsp.alberta.ca)."},{"name":"Application Status","description":"To manage an application's published _status_"},{"name":"Notices","description":"To access and manage application _notices_. Note: You can also manage notices through the [Tenant Admin Webapp](https://adsp.alberta.ca)."}]}
|
|
1
|
+
{"openapi":"3.0.0","info":{"title":"Status service","version":"0.0.0","description":"The status service provides the capability to monitor the health of applications and services, and to\npublish _status_ information about them. Along with the Tenant Admin Webapp, it allows you to\n* manage which applications and services will be monitored,\n* control application monitoring,\n* access an application's published status,\n* manage public notices regarding the application's status.\n\nPlease use the [Tenant Admin Webapp](https://adsp.alberta.ca) to manage the applications and services\nthat you wish to be monitored. For more information on how the _Status Service_ works, please see the\n[Status Service tutorial](https://govalta.github.io/adsp-monorepo/tutorials/status-service/Introduction.html).\n"},"paths":{"/notice/v1/notices":{"get":{"tags":["Notices"],"description":"Retrieves notices, newest first. Anonymous requests are accepted.\n- Anonymous requests read published notices; set `name` to read only the notices of that tenant (the name must\n be the name of an existing tenant).\n\n- Authenticated tenant users read the published notices of the tenant of their token; `name` is ignored.\n- Users with the status-admin role read all notices of the tenant of their token, or the notices in `mode`.\n","security":[{},{"accessToken":[]}],"parameters":[{"name":"top","description":"Number of results to read.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":50,"example":10}},{"name":"after","description":"Number of results to skip, as returned in the _next_ query string of a previous page.","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"example":10}},{"name":"mode","description":"Mode of notices to read. Only used for users with the status-admin role; `active` reads all notices except archived ones.\n","in":"query","required":false,"schema":{"type":"string","enum":["active","draft","published","archived"]}},{"name":"name","description":"Name of the tenant to read published notices for (case insensitive). Only used for anonymous requests.","in":"query","required":false,"schema":{"type":"string"},"example":"my-tenant"}],"responses":{"200":{"description":"Notices successfully retrieved.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"description":"A list of notices that match the query","type":"array","items":{"$ref":"#/components/schemas/Notice"}},"page":{"$ref":"#/components/schemas/Page"}}},"example":{"results":[{"id":"6730c4f1a2b3c4d5e6f70812","message":"My Application will be down for weekly maintenance during the following hours.","tennantServRef":[{"id":"my-application","name":"My Application"}],"isAllApplications":false,"startDate":"2026-11-15T02:00:00.000Z","endDate":"2026-11-15T04:00:00.000Z","mode":"published","created":"2026-11-10T16:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","tenantName":"My Tenant"}],"page":{"after":0,"size":1,"next":null,"total":1}}}}}}},"post":{"tags":["Notices"],"description":"Creates a notice in draft mode for the tenant of the token. Requires the status-admin role.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["message","tennantServRef","startDate","endDate"],"properties":{"message":{"type":"string"},"tennantServRef":{"description":"Applications the notice applies to. Send an empty array with isAllApplications set to true for all applications.","type":"array","items":{"$ref":"#/components/schemas/NoticeApplicationRef"}},"isAllApplications":{"type":"boolean","default":false},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}},"example":{"message":"My Application will be down for weekly maintenance during the following hours.","tennantServRef":[{"id":"my-application","name":"My Application"}],"isAllApplications":false,"startDate":"2026-11-15T02:00:00.000Z","endDate":"2026-11-15T04:00:00.000Z"}}}},"responses":{"201":{"description":"Notice successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"}}}},"/notice/v1/notices/{id}":{"parameters":[{"$ref":"#/components/parameters/StatusNoticeId"}],"get":{"tags":["Notices"],"description":"Retrieves a notice of the tenant of the token. Requires an authenticated tenant user; published notices can be read by any user of the tenant, and other notices require the status-admin role.\n","responses":{"200":{"description":"Notice successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}},"patch":{"tags":["Notices"],"description":"Updates a notice of the tenant of the token. Requires the status-admin role. All fields of a draft notice can be updated, and a draft notice can be published but not archived. Only the mode of a published notice can be updated, to archive it or return it to draft. Archived notices cannot be updated. Publishing a notice sends the application-notice-published event.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"tennantServRef":{"type":"array","items":{"$ref":"#/components/schemas/NoticeApplicationRef"}},"isAllApplications":{"type":"boolean"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"mode":{"type":"string","enum":["draft","published","archived"]}}},"examples":{"edit":{"summary":"Edit a draft notice","value":{"message":"My Application will be down for maintenance during the following hours.","endDate":"2026-11-15T05:00:00.000Z"}},"publish":{"summary":"Publish a draft notice","value":{"mode":"published"}},"archive":{"summary":"Archive a published notice","value":{"mode":"archived"}}}}}},"responses":{"200":{"description":"Notice successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"400":{"description":"The mode is not valid, or the change is not allowed for the current mode of the notice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"Value not valid for Update notice: Archived notice cannot be updated."}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}},"delete":{"tags":["Notices"],"description":"Deletes a draft notice of the tenant of the token. Requires the status-admin role. Published and archived notices cannot be deleted and respond 401.\n","responses":{"200":{"description":"Notice successfully deleted. The response is the deleted notice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notice"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/public_status/v1/applications/{tenant}":{"get":{"tags":["Application Status"],"description":"Retrieves the applications of a tenant and their published statuses, sorted by name. Public; anonymous requests are accepted and any bearer token is ignored. The tenant is identified by name in the path.\n","security":[{}],"parameters":[{"name":"tenant","description":"Name of the tenant to retrieve applications for (case insensitive).","in":"path","required":true,"schema":{"type":"string"},"example":"my-tenant"}],"responses":{"200":{"description":"Successfully retrieved statuses.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Public-application"}}}}},"404":{"description":"Tenant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"tenant with ID 'my-tenant' could not be found."}}}}}}},"/status/v1/applications":{"get":{"tags":["Application Monitoring"],"description":"Retrieves the applications of the tenant, with their statuses. Requires an authenticated tenant user; no specific role is required. The tenant is the tenant of the token; tokens without a tenant context respond 401.\n","responses":{"200":{"description":"Applications retrieved successfully.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Application"}}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"}}},"post":{"tags":["Application Monitoring"],"description":"Adds an application to the tenant for monitoring. The application key is generated from the name (in kebab case) if it is not provided. Monitoring is not enabled until requested.\n\nRequires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The application is added to the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApplicationInput"},{"type":"object","properties":{"appKey":{"type":"string","description":"Key of the application. Generated from the name if not set.","example":"my-application"},"status":{"type":"string","description":"Initial published status of the application.","enum":["operational","reported-issues","maintenance","outage"]}}}]},"example":{"name":"My Application","description":"Online application for a benefit program.","endpoint":{"url":"https://my-application.alberta.ca/health"},"monitorOnly":false,"status":"operational"}}}},"responses":{"201":{"description":"Application added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"},"example":{"appKey":"my-application","name":"My Application","description":"Online application for a benefit program.","monitorOnly":false,"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","metadata":"","enabled":false,"statusTimestamp":null,"status":"operational","internalStatus":"stopped","endpoint":{"status":"offline","url":"https://my-application.alberta.ca/health"}}}}},"400":{"$ref":"#/components/responses/StatusBadRequest"},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"}}}},"/status/v1/applications/endpoint-status-entries":{"get":{"tags":["Application Monitoring"],"description":"Retrieves the raw results of the health check _pings_ recorded in the last `ageInMinutes` minutes. Requires an authenticated tenant user; no specific role is required.\n","parameters":[{"name":"ageInMinutes","description":"Number of minutes to read results for.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":31,"example":20}}],"responses":{"200":{"description":"Data retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PingData"}}}}}}}},"/status/v1/applications/{appKey}":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"put":{"tags":["Application Monitoring"],"description":"Replaces the configuration of an application. Send every field to keep; fields left out are removed. Requires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The application must belong to the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApplicationInput"},{"type":"object","properties":{"autoChangeStatus":{"type":"boolean","description":"If true, health checks change the status from operational to reported-issues after failing for 5 minutes, and back to operational after succeeding for 5 minutes.\n"}}}]},"example":{"name":"My Application","description":"Online application for a benefit program.","endpoint":{"url":"https://my-application.alberta.ca/health"},"monitorOnly":false,"autoChangeStatus":true}}}},"responses":{"200":{"description":"Application updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"},"404":{"$ref":"#/components/responses/StatusNotFound"}}},"delete":{"tags":["Application Monitoring"],"description":"Deletes an application with its status and health check results, and stops monitoring it if monitoring is enabled. Requires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The application must belong to the tenant of the token.\n","responses":{"204":{"description":"Application deleted."},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/disable":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Monitoring"],"description":"Turns off monitoring of the application. Health checks stop when the service next reloads its health checks (every 5 minutes); use the toggle operation to stop them immediately. Requires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The application must belong to the tenant of the token.\n","responses":{"200":{"description":"Monitoring has been disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/enable":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Monitoring"],"description":"Turns on monitoring of the application. Health checks start when the service next reloads its health checks (every 5 minutes); use the toggle operation to start them immediately. Requires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The application must belong to the tenant of the token.\n","responses":{"200":{"description":"Monitoring has been enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/endpoint-status-entries":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"get":{"tags":["Application Monitoring"],"description":"Retrieves the raw results of the health check _pings_ of the application, newest first. Requires an authenticated tenant user; no specific role is required. The application must belong to the tenant of the token.\n","parameters":[{"name":"topValue","description":"Number of results to read.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":200,"example":20}}],"responses":{"200":{"description":"Data retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PingData"}}}}},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/status":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Status"],"description":"Sets the published status of the application, and sends the application-status-changed event. Requires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The application must belong to the tenant of the token.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"The published status to set.","type":"string","enum":["operational","reported-issues","maintenance","outage"]}}},"example":{"status":"maintenance"}}}},"responses":{"200":{"description":"Successfully updated status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/applications/{appKey}/toggle":{"parameters":[{"$ref":"#/components/parameters/StatusAppKey"}],"patch":{"tags":["Application Monitoring"],"description":"Toggles monitoring of the application, from enabled to disabled or vice versa, and sends the health-check-started or health-check-stopped event that starts or stops the health checks. Requires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The application must belong to the tenant of the token.\n","responses":{"200":{"description":"Monitoring has been toggled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}},"/status/v1/webhook/{id}/test/{eventName}":{"get":{"tags":["Application Monitoring"],"description":"Sends a test monitored-service-down or monitored-service-up event to a webhook of a monitored application. The webhook is read from the push service configuration of the tenant. The response is sent after a 2 second delay. Requires the urn:ads:platform:status-service:status-admin role; users without it receive 403. The webhook and its application must belong to the tenant of the token.\n","parameters":[{"name":"id","description":"ID of the webhook.","in":"path","required":true,"schema":{"type":"string"},"example":"my-application-webhook"},{"name":"eventName","description":"Event to send. monitored-service-down sends a service down event; any other value sends a service up event.\n","in":"path","required":true,"schema":{"type":"string"},"example":"monitored-service-down"}],"responses":{"200":{"description":"Test event sent. The response is a text summary of the event, including the application and webhook.","content":{"application/json":{"schema":{"type":"string"},"example":"event is sent - app: {\"appKey\":\"my-application\", ...}, user: {...}, webhook: {...}"}}},"401":{"$ref":"#/components/responses/StatusUnauthorized"},"403":{"$ref":"#/components/responses/StatusForbidden"},"404":{"$ref":"#/components/responses/StatusNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"StatusAppKey":{"name":"appKey","description":"Key of the application, as returned in `appKey` when the application was added.","in":"path","required":true,"schema":{"type":"string"},"example":"my-application"},"StatusNoticeId":{"name":"id","description":"ID of the notice.","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"},"example":"6730c4f1a2b3c4d5e6f70812"}},"schemas":{"Application":{"type":"object","properties":{"appKey":{"description":"A unique ID generated when the application is added to the Status Service for monitoring.","example":"my-application","type":"string"},"name":{"description":"The name of the application being monitored. The name must be unique for your Tenant.","example":"My Application","type":"string"},"description":{"description":"An optional, brief, description of the application being monitored.","type":"string","example":"Online application for a benefit program."},"status":{"description":"The published status of the application, set via the API or through the Tenant Admin Webapp. An empty string means no status has been set.\n","type":"string","enum":["operational","reported-issues","maintenance","outage",""],"example":"operational"},"monitorOnly":{"description":"If true, the application is not displayed on the public status page.","type":"boolean","example":false},"autoChangeStatus":{"description":"If true, health checks change the status from operational to reported-issues after failing for 5 minutes, and back to operational after succeeding for 5 minutes.\n","type":"boolean","example":false},"tenantId":{"description":"URN identifying the tenant to which the application belongs.","type":"string","example":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46"},"metadata":{"description":"Additional status information, if any.","example":""},"enabled":{"description":"Indicates whether or not monitoring (health checks) for the application has been turned on.","type":"boolean","example":true},"statusTimestamp":{"description":"Time the status was last set, in milliseconds since the epoch, or null if never set.","type":"number","nullable":true,"readOnly":true,"example":1794326400000},"internalStatus":{"description":"Health check state of the application.","type":"string","enum":["stopped","healthy","unhealthy","pending"],"readOnly":true,"example":"healthy"},"endpoint":{"type":"object","properties":{"url":{"description":"URL of the application endpoint that health checks request.","type":"string","example":"https://my-application.alberta.ca/health"},"status":{"description":"Result of the latest health check.","type":"string","enum":["online","offline","n/a","pending"],"readOnly":true,"example":"online"}}}},"example":{"appKey":"my-application","name":"My Application","description":"Online application for a benefit program.","monitorOnly":false,"autoChangeStatus":false,"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","metadata":"","enabled":true,"statusTimestamp":1794326400000,"status":"operational","internalStatus":"healthy","endpoint":{"status":"online","url":"https://my-application.alberta.ca/health"}}},"ApplicationInput":{"type":"object","required":["name","endpoint"],"properties":{"name":{"type":"string","description":"Name of the application. Must be unique for the tenant.","example":"My Application"},"description":{"type":"string","example":"Online application for a benefit program."},"endpoint":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL of the application endpoint that health checks request.","example":"https://my-application.alberta.ca/health"}}},"monitorOnly":{"type":"boolean","description":"If true, the application is not displayed on the public status page.","example":false}}},"Notice":{"description":"Detailed information to be posted about an application's status. The notice may include a message, a time period to which the notice applies, and the application status for the period.","type":"object","properties":{"id":{"description":"ID of the notice.","type":"string","readOnly":true,"example":"6730c4f1a2b3c4d5e6f70812"},"message":{"description":"The message portion the notice.","type":"string","example":"My Application will be down for weekly maintenance during the following hours."},"tennantServRef":{"description":"The tennantServRef (sic) identifies which applications the notice applies to. Use isAllApplications for a notice that applies to all applications of the tenant.\n","type":"array","items":{"$ref":"#/components/schemas/NoticeApplicationRef"}},"isAllApplications":{"description":"Indicates the notice applies to all applications of the tenant.","type":"boolean","example":false},"startDate":{"description":"The start of the time period to which the notice applies.","type":"string","format":"date-time","example":"2026-11-15T02:00:00.000Z"},"endDate":{"description":"The end of the time period to which the notice applies.","type":"string","format":"date-time","example":"2026-11-15T04:00:00.000Z"},"mode":{"description":"A notice is created in draft mode, can be published, and a published notice can be archived. Only published notices are displayed on the public status page.\n","type":"string","enum":["draft","published","archived"],"readOnly":true,"example":"draft"},"created":{"description":"Time the notice was created.","type":"string","format":"date-time","readOnly":true,"example":"2026-11-10T16:00:00.000Z"},"tenantId":{"description":"URN identifying the tenant of the notice.","type":"string","readOnly":true,"example":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46"},"tenantName":{"description":"Name of the tenant of the notice.","type":"string","readOnly":true,"example":"My Tenant"}},"example":{"id":"6730c4f1a2b3c4d5e6f70812","message":"My Application will be down for weekly maintenance during the following hours.","tennantServRef":[{"id":"my-application","name":"My Application"}],"isAllApplications":false,"startDate":"2026-11-15T02:00:00.000Z","endDate":"2026-11-15T04:00:00.000Z","mode":"draft","created":"2026-11-10T16:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61e9adcc9423490012a9ae46","tenantName":"My Tenant"}},"NoticeApplicationRef":{"type":"object","properties":{"id":{"description":"The application's appKey (or ID).","type":"string","example":"my-application"},"name":{"description":"The name of the Application.","type":"string","example":"My Application"}}},"Page":{"description":"Page descriptor, used when paging through a list of items.","type":"object","properties":{"after":{"description":"Number of items skipped before this page.","type":"number","example":0},"size":{"description":"The number of list items fetched.","type":"number","example":10},"next":{"description":"Query string for the next page (for example `after=10&top=10`), or null if this is the last page.\n","type":"string","nullable":true,"example":"after=10&top=10"},"total":{"description":"The total number of items in the list.","type":"number","example":231}},"example":{"after":0,"size":10,"next":"after=10&top=10","total":231}},"PingData":{"type":"object","properties":{"url":{"description":"The URL pinged.","type":"string","example":"https://my-application.alberta.ca/health"},"ok":{"description":"The success of the ping; set to false if the ping resulted in a 400 or 500 error.","type":"boolean","example":true},"timestamp":{"description":"The time of the ping, in milliseconds since the epoch.","type":"number","example":1794326400000},"responseTime":{"description":"The response time of the ping, in ms.","type":"number","example":178},"status":{"description":"The HTTP status code of the response, or a description of the error if there was no response.","oneOf":[{"type":"number"},{"type":"string"}],"example":200},"applicationId":{"description":"The application key, AKA application ID.","type":"string","example":"my-application"},"appKey":{"description":"The application key; same value as applicationId.","type":"string","example":"my-application"}},"example":{"url":"https://my-application.alberta.ca/health","ok":true,"timestamp":1794326400000,"responseTime":178,"status":200,"applicationId":"my-application","appKey":"my-application"}},"Public-application":{"type":"object","properties":{"id":{"description":"A unique ID used to identify an application; the application key.","example":"my-application","type":"string"},"name":{"description":"The name of the application being monitored. The name must be unique for your Tenant.","example":"My Application","type":"string"},"description":{"description":"An optional, brief, description of the application being monitored.","type":"string","example":"Online application for a benefit program."},"status":{"description":"The published status of the application, set via the API or through the Tenant Admin Webapp. An empty string means no status has been set.\n","type":"string","enum":["operational","reported-issues","maintenance","outage",""],"example":"operational"},"monitorOnly":{"description":"If true, the application is monitored but not meant to be displayed on the public status page. Clients displaying statuses should filter these out.\n","type":"boolean","example":false},"lastUpdated":{"description":"Timestamp indicating when the status was last updated, or null if never set.","type":"string","format":"date-time","nullable":true,"example":"2026-11-10T16:00:00.000Z"}},"example":{"id":"my-application","name":"My Application","description":"Online application for a benefit program.","status":"operational","monitorOnly":false,"lastUpdated":"2026-11-10T16:00:00.000Z"}},"StatusError":{"type":"object","properties":{"errorMessage":{"type":"string"}},"example":{"errorMessage":"Status application with ID 'my-application' could not be found."}}},"responses":{"StatusBadRequest":{"description":"Request is invalid, for example it would create a duplicate application or an invalid notice mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"Value not valid for status-service: Duplicate Application Name My Application"}}}},"StatusForbidden":{"description":"User does not have the status-admin role in the tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"User Test User (ID: tester) not permitted to modify status applications."}}}},"StatusNotFound":{"description":"The resource was not found in the tenant of the request. Resources of other tenants also respond 404.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"Status application with ID 'my-application' could not be found."}}}},"StatusUnauthorized":{"description":"Request does not include a valid bearer token, the token has no tenant context, or the user does not have the role required for the operation. Anonymous requests receive a plain `Unauthorized` text body; the other cases receive an `errorMessage`. Notice role checks respond with 401; application role checks respond with 403.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"},"example":{"errorMessage":"missing tenant id"}}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Application Monitoring","description":"To control application _monitoring_. Note: You can manage which applications are monitored through the [Tenant Admin Webapp](https://adsp.alberta.ca)."},{"name":"Application Status","description":"To manage an application's published _status_"},{"name":"Notices","description":"To access and manage application _notices_. Note: You can also manage notices through the [Tenant Admin Webapp](https://adsp.alberta.ca)."}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"openapi":"3.0.0","info":{"title":"Value service","version":"0.0.0","description":"The Value service provides a time-series append only store for json documents."},"paths":{"/value/v1/definitions":{"get":{"tags":["Value definition"],"description":"Retrieves the tenant and core value definitions, grouped by namespace. Requires the value-reader or value-writer role. Tenant users receive the definitions of their own tenant; core users with the role receive those of the tenant set by tenantId, or only core definitions (with an empty tenant) when it is not set.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"}],"responses":{"200":{"description":"Value definitions successfully retrieved.","content":{"application/json":{"example":{"tenant":{"test-service":{"name":"test-service","definitions":{"response-time":{"name":"response-time","description":"Response time of the test service.","jsonSchema":{"type":"number"}}}}},"core":{}},"schema":{"type":"object","properties":{"tenant":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ValueNamespace"}},"core":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ValueNamespace"}}}}}}},"400":{"description":"tenantId is not a valid tenant URN.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"ADSP ID (not-a-tenant) must begin with: urn:ads:"}}}},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}},"post":{"tags":["Value definition"],"description":"Creates a value definition in the tenant configuration, adding the namespace if it does not exist. Requires the value-writer role and a tenant context: tenant users create definitions in their own tenant, and core users must set tenantId. The JSON schema must be a valid JSON schema. Responds 409 if a tenant or core definition with the same namespace and name already exists.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"namespace":"test-service","name":"response-time","description":"Response time of the test service.","jsonSchema":{"type":"number"},"sendWriteEvent":false},"schema":{"allOf":[{"$ref":"#/components/schemas/ValueDefinition"},{"type":"object","properties":{"namespace":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"}},"required":["namespace","name","jsonSchema"]}]}}}},"responses":{"201":{"description":"Value definition successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueDefinitionResponse"}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"409":{"$ref":"#/components/responses/ValueDefinitionConflict"}}}},"/value/v1/definitions/{namespace}/{name}":{"parameters":[{"name":"namespace","description":"Namespace of the value definition.","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"example":"test-service"},{"name":"name","description":"Name of the value definition.","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"example":"response-time"},{"$ref":"#/components/parameters/ValueTenantId"}],"get":{"tags":["Value definition"],"description":"Retrieves a value definition. The tenant definition is returned if it exists, otherwise the core definition. Requires the value-reader or value-writer role. Tenant users read their own tenant's definitions; core users read those of the tenant set by tenantId, or only core definitions when it is not set. Definitions of other tenants respond 404.\n","responses":{"200":{"description":"Value definition successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueDefinitionResponse"}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"$ref":"#/components/responses/ValueDefinitionNotFound"}}},"patch":{"tags":["Value definition"],"description":"Updates a tenant value definition. Properties not included in the request are left unchanged. Requires the value-writer role and a tenant context: tenant users update their own tenant's definitions, and core users must set tenantId. Core definitions and definitions of other tenants respond 404. The JSON schema must be a valid JSON schema.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"description":"Response time of the test service in milliseconds."},"schema":{"$ref":"#/components/schemas/ValueDefinitionUpdate"}}}},"responses":{"200":{"description":"Value definition successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueDefinitionResponse"}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"$ref":"#/components/responses/ValueDefinitionNotFound"}}},"delete":{"tags":["Value definition"],"description":"Deletes a tenant value definition. The namespace is removed when its last definition is deleted. Requires the value-writer role and a tenant context: tenant users delete their own tenant's definitions, and core users must set tenantId. Core definitions and definitions of other tenants respond 404.\n","responses":{"200":{"description":"Value definition successfully deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}},"example":{"deleted":true}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"$ref":"#/components/responses/ValueDefinitionNotFound"}}}},"/value/v1/event-resources/distinct-count":{"get":{"tags":["Value"],"description":"Counts the distinct resources a tenant's events named over a period, for example the PDF templates used by pdf-service events. Answered from a daily rollup of the event log; the current day, and any history the rollup has not reached yet, are read from the event log for that span only. Only the resources the rollup maintains are accepted: templateId for pdf-service and definitionId for form-service events. Requires the value-reader role and a tenant context: tenant users count their own tenant, and core users must set tenantId.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"},{"name":"namespace","description":"Namespace of the events, which is the service that sends them.","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"pdf-service"},{"name":"contextKey","description":"Event log context property that names the resource.","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"templateId"},{"name":"names","description":"Comma separated event names to count across. Defaults to every event the rollup maintains for the namespace, and responds 400 if it names any other.\n","in":"query","required":false,"schema":{"type":"string"},"example":"pdf-generation-queued,pdf-generated,pdf-generation-failed"},{"name":"intervalMin","description":"Inclusive start of the period (ISO 8601).","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"example":"2025-11-01T00:00:00.000Z"},{"name":"intervalMax","description":"Exclusive end of the period (ISO 8601). The period can be at most 731 days.","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"example":"2026-11-01T00:00:00.000Z"}],"responses":{"200":{"description":"Distinct resources counted.","content":{"application/json":{"example":{"namespace":"pdf-service","contextKey":"templateId","names":["pdf-generation-queued","pdf-generated","pdf-generation-failed"],"intervalMin":"2025-11-01T00:00:00.000Z","intervalMax":"2026-11-01T00:00:00.000Z","count":12},"schema":{"type":"object","properties":{"namespace":{"type":"string"},"contextKey":{"type":"string"},"names":{"type":"array","items":{"type":"string"}},"intervalMin":{"type":"string","format":"date-time"},"intervalMax":{"type":"string","format":"date-time"},"count":{"type":"integer","description":"Number of distinct resources named by the events in the period."}}}}}},"400":{"description":"A parameter failed validation, tenant context is missing, the namespace and contextKey are not rolled up, names includes an event that is not rolled up, or the period is empty or longer than 731 days.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Distinct templateId is not rolled up for test-service events."}}}},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/service-metric-rollups/run":{"post":{"tags":["Value"],"description":"Manually triggers service metric rollup processing for completed days. Requires the value-writer role. Core users with the role can roll up a specific tenant by setting tenantId in the body, or all tenants by leaving it out; tenant users are always restricted to their own tenant and tenantId is ignored. The current partial day and future days cannot be rolled up.\n","requestBody":{"required":false,"content":{"application/json":{"example":{"start":"2026-09-01","end":"2026-09-07","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"schema":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"First completed day to roll up (ISO 8601). Defaults to end when only end is supplied, and to the configured trailing window when neither is supplied.\n"},"end":{"type":"string","format":"date","description":"Last completed day to roll up (ISO 8601). Defaults to start when only start is supplied."},"tenantId":{"type":"string","description":"Tenant ID to roll up. Only used for core users."}}}}}},"responses":{"200":{"description":"Service metric rollup completed.","content":{"application/json":{"example":{"start":"2026-09-01","end":"2026-09-07","tenant":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","rollups":42},"schema":{"type":"object","properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"},"tenant":{"type":"string","nullable":true,"description":"Tenant ID that was rolled up, or null when all tenants were rolled up."},"rollups":{"type":"integer","description":"Number of rollup rows written."}}}}}},"400":{"description":"start or end is not an ISO 8601 date, start is after end, or the range includes the current partial day or a future day.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Cannot roll up the current partial day or a future day."}}}},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values":{"get":{"tags":["Value"],"description":"Reads the latest record of each value definition in a namespace. Requires the value-reader role. Only values with a tenant or core value definition are returned. Acts on the tenant of the caller's token; core users reading a tenant's values should read each value with GET /value/v1/{namespace}/values/{name} and tenantId.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"name":"names","in":"query","description":"Comma-separated names of the values to read. Defaults to every value defined in the namespace.","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}},"example":["response-time","error-count"]}],"responses":{"200":{"description":"Values successfully read, keyed by namespace and then value name.","content":{"application/json":{"example":{"test-service":{"response-time":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120}}},"schema":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Value"}}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"description":"The namespace has no value definitions, or none of the requested names has a value definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"namespace with ID 'test-service' could not be found."}}}}}}},"/value/v1/{namespace}/values/{name}":{"parameters":[{"name":"namespace","description":"Namespace of the stored value. This path value is always event-service for event log records; it is not the optional event namespace filter exposed by the event service.\n","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"test-service"},{"name":"name","description":"Name of the stored value. This path value is always event for event log records; it is not the optional event name filter exposed by the event service.\n","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"response-time"}],"get":{"tags":["Value"],"description":"Reads records of a namespace value, newest first unless order is asc. Requires the value-reader role, or the export-service export-job role. Only records of the tenant are returned; tenant users read their own tenant and core users with the role read the tenant set by tenantId. Core users can also leave out tenantId to read the records of all tenants, which is how the event service reads the event log. Tenant users without a tenant context get 400. A value that has no records responds 200 with an empty array. Event log consumers should use the event service API, where event namespace and name are optional query filters.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"},{"name":"top","description":"Number of results to read. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000,"default":10}},{"name":"after","description":"Cursor for the next set of results; set it to page.next of the previous response.","in":"query","required":false,"schema":{"type":"string","description":"Base64 encoded number of records to skip."},"example":"MTA="},{"name":"order","description":"Timestamp order of the results; asc reads oldest first. Defaults to desc. Reading the oldest end of a large result set in asc order avoids skipping over the newer records.\n","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"correlationId","description":"Correlation ID associated with the values.","in":"query","required":false,"schema":{"type":"string"},"example":"request-1"},{"name":"context","description":"JSON object of context values the records must contain. Must be valid JSON. Every supplied property must match (AND). For event log records, namespace and name identify the event definition.\n","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"example":{"namespace":"support-program","name":"application-submitted"}}}}},{"name":"timestampMin","description":"Inclusive min value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-09-01T00:00:00.000Z"},{"name":"timestampMax","description":"Inclusive max value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-10-01T00:00:00.000Z"},{"name":"payloadPath","description":"Dot-separated property path within an event payload. Must be supplied with payloadValue and with both timestampMin and timestampMax. Cannot be combined with payload.\n","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*(\\.[A-Za-z_][A-Za-z0-9_-]*)*$","example":"applicant.contact.email"}},{"name":"payloadValue","description":"Exact JSON scalar at payloadPath. JSON numbers, booleans, null, and quoted strings are parsed as their JSON types; other input is treated as a string. Must be supplied with payloadPath.\n","in":"query","required":false,"schema":{"type":"string","example":"test.user@gov.ab.ca"}},{"name":"payload","description":"JSON object that the event payload must contain. Nested objects and multiple properties are supported, and every supplied property must match (AND). Additional event payload properties are ignored. Requires both timestampMin and timestampMax and cannot be combined with payloadPath or payloadValue.\n","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"applicationId":"12345","status":"submitted"}}}}},{"name":"value","description":"Filter to records with a payload targetId equal to this value (used for event log records). Must not contain double quotes.\n","in":"query","required":false,"schema":{"type":"string"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"},{"name":"url","description":"Filter to records with a payload URL equal to this value (used for event log records). Must not contain double quotes.\n","in":"query","required":false,"schema":{"type":"string"},"example":"https://my-application.alberta.ca/applications"}],"responses":{"200":{"description":"Value successfully read.","content":{"application/json":{"example":{"test-service":{"response-time":[{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120}]},"page":{"after":null,"next":"MTA=","size":1}},"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/ValuePage"}},"additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Value"}}}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}},"post":{"tags":["Value"],"description":"Writes one or more records of a namespace value. Requires the value-writer role. Tenant users write to their own tenant; core users with the role write to the tenant set by tenantId in the body or query, and get 400 without one. A tenant user who sets a tenantId other than their own gets 403. The body can be a value envelope (with value, context, correlationId, timestamp and metrics), a bare JSON object which is written as the value, or an array of either. A value does not need a definition. If the value has a definition, records that fail its schema are skipped, and a value-written event is sent for each record when the definition has sendWriteEvent set. Responds with an array when the request body is an array.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"examples":{"envelope":{"summary":"Value with envelope","value":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120,"metrics":{"response-time":120}}},"bare":{"summary":"Bare value object","value":{"responseTime":120}},"batch":{"summary":"Batch of values","value":[{"value":120},{"value":95}]},"core":{"summary":"Core user writing to a tenant","value":{"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","value":120}}},"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Value"},{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant to write to. Only core users can write to a tenant other than their own."}}}]},{"type":"object"},{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Value"},{"type":"object"}]}}]}}}},"responses":{"200":{"description":"Value successfully written.","content":{"application/json":{"example":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120},"schema":{"oneOf":[{"$ref":"#/components/schemas/Value"},{"type":"array","items":{"$ref":"#/components/schemas/Value"}}]}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/count":{"parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"}],"get":{"tags":["Value"],"description":"Counts records of a namespace value in a tenant. Requires the value-reader role and a tenant context: tenant users count their own tenant, and core users must set tenantId.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"},{"name":"correlationId","description":"Correlation ID associated with the values.","in":"query","required":false,"schema":{"type":"string"},"example":"request-1"},{"name":"context","description":"JSON object of context values the records must contain. Must be valid JSON. Every supplied property must match (AND). For event log records, namespace and name identify the event definition.\n","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"example":{"namespace":"support-program","name":"application-submitted"}}}}},{"name":"timestampMin","description":"Inclusive min value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-09-01T00:00:00.000Z"},{"name":"timestampMax","description":"Inclusive max value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-10-01T00:00:00.000Z"}],"responses":{"200":{"description":"Value successfully read.","content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string"},"name":{"type":"string"},"count":{"type":"integer"}}},"example":{"namespace":"test-service","name":"response-time","count":1024}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/metrics":{"get":{"tags":["Value"],"description":"Retrieves interval aggregates of every metric of a value, keyed by metric name. Requires the value-reader role and a tenant context: tenant users read their own tenant, and core users must set tenantId. Paging is over metric interval rows, newest first.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"},{"$ref":"#/components/parameters/ValueTenantId"},{"$ref":"#/components/parameters/MetricInterval"},{"$ref":"#/components/parameters/MetricTop"},{"$ref":"#/components/parameters/MetricAfter"},{"name":"criteria","description":"JSON criteria for the read. Must be valid JSON.","in":"query","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricCriteria"}}}}],"responses":{"200":{"description":"Metrics successfully read.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/MetricPage"}},"additionalProperties":{"$ref":"#/components/schemas/Metric"}},"example":{"response-time:avg":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]},"page":{"after":null,"next":"MQ==","size":1,"intervalMax":"2026-09-24T00:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/metrics/{metric}":{"get":{"tags":["Value"],"description":"Retrieves interval aggregates of a single metric of a value. Requires the value-reader role and a tenant context: tenant users read their own tenant, and core users must set tenantId. A metric without records responds 200 with no values.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"},{"name":"metric","description":"Name of the metric to read.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"example":"response-time:avg"},{"$ref":"#/components/parameters/ValueTenantId"},{"$ref":"#/components/parameters/MetricInterval"},{"$ref":"#/components/parameters/MetricTop"},{"$ref":"#/components/parameters/MetricAfter"},{"name":"criteria","description":"JSON criteria for the read; metricLike is not used. Must be valid JSON.","in":"query","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricCriteria"}}}}],"responses":{"200":{"description":"Metric successfully read.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Metric"},{"type":"object","properties":{"page":{"$ref":"#/components/schemas/MetricPage"}}}]},"example":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}],"page":{"after":null,"next":"MQ==","size":1,"intervalMax":"2026-09-24T00:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/platform-metrics":{"get":{"tags":["Value"],"description":"Retrieves interval aggregates of a value's metrics across all tenants, labelled by tenant. Requires the value-platform-metrics-reader role and is only accessible to core users; tenant users get 403 even with the role. Always reads the materialised metric rollups and is not paginated.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"},{"$ref":"#/components/parameters/MetricInterval"},{"name":"criteria","description":"JSON criteria for the read. Must be valid JSON.","in":"query","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricCriteria"}}}}],"responses":{"200":{"description":"Platform metrics successfully read.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlatformMetric"}},"example":{"response-time:avg":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"description":"User is not a core user with the value-platform-metrics-reader role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to read platform metrics."}}}}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"ValueBadRequest":{"description":"Request is invalid, for example a path or query parameter failed validation or tenant context is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Tenant context is required for operation."}}}},"ValueDefinitionConflict":{"description":"Value definition already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Value definition 'test-service:response-time' already exists."}}}},"ValueDefinitionNotFound":{"description":"Value definition not found in the tenant (or, for reads, in the core definitions).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"value definition with ID 'test-service:response-time' could not be found."}}}},"ValueForbidden":{"description":"User does not have the role required for the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to read values."}}}},"ValueNotFound":{"description":"Namespace or value definition not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"namespace with ID 'test-service' could not be found."}}}},"ValueUnauthorized":{"description":"Request does not include a valid bearer token."}},"schemas":{"Metric":{"type":"object","properties":{"name":{"type":"string"},"values":{"type":"array","description":"Interval aggregates, newest first.","items":{"$ref":"#/components/schemas/MetricIntervalValue"}}},"example":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]}},"MetricCriteria":{"type":"object","description":"Must be valid JSON. Without intervalMin and intervalMax, the last month is read. intervalMin and intervalMax must be ISO 8601 date-times.\n","properties":{"metricLike":{"type":"string","description":"Only read metrics whose name contains this text. Not used when reading a single metric."},"intervalMax":{"type":"string","format":"date-time"},"intervalMin":{"type":"string","format":"date-time"}},"example":{"metricLike":"response-time","intervalMin":"2026-09-01T00:00:00.000Z","intervalMax":"2026-10-01T00:00:00.000Z"}},"MetricIntervalValue":{"type":"object","properties":{"interval":{"type":"string","format":"date-time","description":"Start of the interval."},"avg":{"type":"number","nullable":true},"sum":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"count":{"type":"number"}},"example":{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}},"MetricPage":{"allOf":[{"$ref":"#/components/schemas/ValuePage"},{"type":"object","properties":{"intervalMax":{"type":"string","format":"date-time","readOnly":true,"description":"End of the window actually read. It is snapped back to the start of the interval in progress, so only whole intervals are returned.\n"}}}],"example":{"after":null,"next":"MQ==","size":1,"intervalMax":"2026-09-24T00:00:00.000Z"}},"PlatformMetric":{"type":"object","properties":{"name":{"type":"string"},"values":{"type":"array","items":{"$ref":"#/components/schemas/PlatformMetricIntervalValue"}}},"example":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]}},"PlatformMetricIntervalValue":{"allOf":[{"$ref":"#/components/schemas/MetricIntervalValue"},{"type":"object","properties":{"tenantId":{"type":"string"}}}],"example":{"interval":"2026-09-23T00:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}},"Value":{"type":"object","properties":{"correlationId":{"type":"string","nullable":true,"description":"Correlation ID that links related records, for example the records of one request."},"context":{"type":"object","description":"Context of the record, used to filter reads.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]}},"timestamp":{"type":"string","format":"date-time","description":"Time of the record. Defaults to the time of the write."},"value":{"description":"The recorded value; any JSON value. Validated against the value definition schema, if there is one."},"metrics":{"type":"object","writeOnly":true,"description":"Metric name to number. Numeric entries are recorded as metrics of the value and aggregated into intervals; other entries are ignored. Not returned with the record.\n","additionalProperties":{"type":"number"}}},"example":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120}},"ValueDefinition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"displayName":{"type":"string"},"description":{"type":"string"},"jsonSchema":{"type":"object","description":"JSON schema that written values are validated against."},"sendWriteEvent":{"type":"boolean","description":"Whether a value-written event is sent when a value is written."}},"example":{"name":"response-time","displayName":"Response time","description":"Response time of the test service.","jsonSchema":{"type":"number"},"sendWriteEvent":false}},"ValueDefinitionResponse":{"allOf":[{"$ref":"#/components/schemas/ValueDefinition"},{"type":"object","properties":{"namespace":{"type":"string"},"isCore":{"type":"boolean","description":"Whether the definition is a core (platform) definition rather than a tenant definition."}}}],"example":{"namespace":"test-service","name":"response-time","displayName":"Response time","description":"Response time of the test service.","jsonSchema":{"type":"number"},"sendWriteEvent":false,"isCore":false}},"ValueDefinitionUpdate":{"type":"object","properties":{"displayName":{"type":"string"},"description":{"type":"string"},"jsonSchema":{"type":"object"},"sendWriteEvent":{"type":"boolean"}},"example":{"description":"Response time of the test service in milliseconds."}},"ValueError":{"type":"object","properties":{"errorMessage":{"type":"string"}},"example":{"errorMessage":"Tenant context is required for operation."}},"ValueNamespace":{"type":"object","properties":{"name":{"type":"string"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ValueDefinition"}}},"example":{"name":"test-service","definitions":{"response-time":{"name":"response-time","description":"Response time of the test service.","jsonSchema":{"type":"number"}}}}},"ValuePage":{"type":"object","properties":{"after":{"type":"string","nullable":true,"description":"Cursor the page was read after."},"next":{"type":"string","description":"Cursor for the next page; absent when there are no more results."},"size":{"type":"number","description":"Number of results in the page."}},"example":{"after":null,"next":"MTA=","size":10}}},"parameters":{"MetricAfter":{"name":"after","description":"Cursor for the next set of results; set it to page.next of the previous response.","in":"query","required":false,"schema":{"type":"string","description":"Base64 encoded number of rows to skip."},"example":"MTAw"},"MetricInterval":{"name":"interval","description":"Interval to aggregate metrics into. Defaults to daily. Any other value responds 400 with \"Interval value is not recognized.\"\n","in":"query","required":false,"schema":{"type":"string","default":"daily","enum":["one_minute","five_minutes","hourly","daily","weekly","monthly"]}},"MetricTop":{"name":"top","description":"Number of metric interval rows to read. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000,"default":100}},"ValueNameParam":{"name":"name","description":"Name of the value within the namespace.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"response-time"},"ValueNamespaceParam":{"name":"namespace","description":"Namespace of the value, for example the name of the service that writes it.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"test-service"},"ValueTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Only used for core (platform) users; tenant users always act on the tenant of their token and this parameter is ignored. Responds 400 if it is not a valid tenant URN.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}}},"security":[{"accessToken":[]}],"tags":[{"name":"Value","description":"API to store and retrieve values."},{"name":"Value definition","description":"API to manage value definitions."}]}
|
|
1
|
+
{"openapi":"3.0.0","info":{"title":"Value service","version":"0.0.0","description":"The Value service provides a time-series append only store for json documents."},"paths":{"/value/v1/definitions":{"get":{"tags":["Value definition"],"description":"Retrieves the tenant and core value definitions, grouped by namespace. Requires the value-reader or value-writer role. Tenant users receive the definitions of their own tenant; core users with the role receive those of the tenant set by tenantId, or only core definitions (with an empty tenant) when it is not set.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"}],"responses":{"200":{"description":"Value definitions successfully retrieved.","content":{"application/json":{"example":{"tenant":{"test-service":{"name":"test-service","definitions":{"response-time":{"name":"response-time","description":"Response time of the test service.","jsonSchema":{"type":"number"}}}}},"core":{}},"schema":{"type":"object","properties":{"tenant":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ValueNamespace"}},"core":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ValueNamespace"}}}}}}},"400":{"description":"tenantId is not a valid tenant URN.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"ADSP ID (not-a-tenant) must begin with: urn:ads:"}}}},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}},"post":{"tags":["Value definition"],"description":"Creates a value definition in the tenant configuration, adding the namespace if it does not exist. Requires the value-writer role and a tenant context: tenant users create definitions in their own tenant, and core users must set tenantId. The JSON schema must be a valid JSON schema. Responds 409 if a tenant or core definition with the same namespace and name already exists.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"namespace":"test-service","name":"response-time","description":"Response time of the test service.","jsonSchema":{"type":"number"},"sendWriteEvent":false},"schema":{"allOf":[{"$ref":"#/components/schemas/ValueDefinition"},{"type":"object","properties":{"namespace":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"}},"required":["namespace","name","jsonSchema"]}]}}}},"responses":{"201":{"description":"Value definition successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueDefinitionResponse"}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"409":{"$ref":"#/components/responses/ValueDefinitionConflict"}}}},"/value/v1/definitions/{namespace}/{name}":{"parameters":[{"name":"namespace","description":"Namespace of the value definition.","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"example":"test-service"},{"name":"name","description":"Name of the value definition.","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"example":"response-time"},{"$ref":"#/components/parameters/ValueTenantId"}],"get":{"tags":["Value definition"],"description":"Retrieves a value definition. The tenant definition is returned if it exists, otherwise the core definition. Requires the value-reader or value-writer role. Tenant users read their own tenant's definitions; core users read those of the tenant set by tenantId, or only core definitions when it is not set. Definitions of other tenants respond 404.\n","responses":{"200":{"description":"Value definition successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueDefinitionResponse"}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"$ref":"#/components/responses/ValueDefinitionNotFound"}}},"patch":{"tags":["Value definition"],"description":"Updates a tenant value definition. Properties not included in the request are left unchanged. Requires the value-writer role and a tenant context: tenant users update their own tenant's definitions, and core users must set tenantId. Core definitions and definitions of other tenants respond 404. The JSON schema must be a valid JSON schema.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"description":"Response time of the test service in milliseconds."},"schema":{"$ref":"#/components/schemas/ValueDefinitionUpdate"}}}},"responses":{"200":{"description":"Value definition successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueDefinitionResponse"}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"$ref":"#/components/responses/ValueDefinitionNotFound"}}},"delete":{"tags":["Value definition"],"description":"Deletes a tenant value definition. The namespace is removed when its last definition is deleted. Requires the value-writer role and a tenant context: tenant users delete their own tenant's definitions, and core users must set tenantId. Core definitions and definitions of other tenants respond 404.\n","responses":{"200":{"description":"Value definition successfully deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}},"example":{"deleted":true}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"$ref":"#/components/responses/ValueDefinitionNotFound"}}}},"/value/v1/event-resources/distinct-count":{"get":{"tags":["Value"],"description":"Counts the distinct resources a tenant's events named over a period, for example the PDF templates used by pdf-service events. Answered from a daily rollup of the event log; the current day, and any history the rollup has not reached yet, are read from the event log for that span only. Only the resources the rollup maintains are accepted: templateId for pdf-service and definitionId for form-service events. Requires the value-reader role and a tenant context: tenant users count their own tenant, and core users must set tenantId.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"},{"name":"namespace","description":"Namespace of the events, which is the service that sends them.","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"pdf-service"},{"name":"contextKey","description":"Event log context property that names the resource.","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"templateId"},{"name":"names","description":"Comma separated event names to count across. Defaults to every event the rollup maintains for the namespace, and responds 400 if it names any other.\n","in":"query","required":false,"schema":{"type":"string"},"example":"pdf-generation-queued,pdf-generated,pdf-generation-failed"},{"name":"intervalMin","description":"Inclusive start of the period (ISO 8601).","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"example":"2025-11-01T00:00:00.000Z"},{"name":"intervalMax","description":"Exclusive end of the period (ISO 8601).","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"example":"2026-11-01T00:00:00.000Z"}],"responses":{"200":{"description":"Distinct resources counted.","content":{"application/json":{"example":{"namespace":"pdf-service","contextKey":"templateId","names":["pdf-generation-queued","pdf-generated","pdf-generation-failed"],"intervalMin":"2025-11-01T00:00:00.000Z","intervalMax":"2026-11-01T00:00:00.000Z","count":12},"schema":{"type":"object","properties":{"namespace":{"type":"string"},"contextKey":{"type":"string"},"names":{"type":"array","items":{"type":"string"}},"intervalMin":{"type":"string","format":"date-time"},"intervalMax":{"type":"string","format":"date-time"},"count":{"type":"integer","description":"Number of distinct resources named by the events in the period."}}}}}},"400":{"description":"A parameter failed validation, tenant context is missing, the namespace and contextKey are not rolled up, names includes an event that is not rolled up, or the period is not valid timestamps or is empty.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Distinct templateId is not rolled up for test-service events."}}}},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/service-metric-rollups/run":{"post":{"tags":["Value"],"description":"Manually triggers service metric rollup processing for completed days. Requires the value-writer role. Core users with the role can roll up a specific tenant by setting tenantId in the body, or all tenants by leaving it out; tenant users are always restricted to their own tenant and tenantId is ignored. The current partial day and future days cannot be rolled up.\n","requestBody":{"required":false,"content":{"application/json":{"example":{"start":"2026-09-01","end":"2026-09-07","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"schema":{"type":"object","properties":{"start":{"type":"string","format":"date","description":"First completed day to roll up (ISO 8601). Defaults to end when only end is supplied, and to the configured trailing window when neither is supplied.\n"},"end":{"type":"string","format":"date","description":"Last completed day to roll up (ISO 8601). Defaults to start when only start is supplied."},"tenantId":{"type":"string","description":"Tenant ID to roll up. Only used for core users."}}}}}},"responses":{"200":{"description":"Service metric rollup completed.","content":{"application/json":{"example":{"start":"2026-09-01","end":"2026-09-07","tenant":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","rollups":42},"schema":{"type":"object","properties":{"start":{"type":"string","format":"date"},"end":{"type":"string","format":"date"},"tenant":{"type":"string","nullable":true,"description":"Tenant ID that was rolled up, or null when all tenants were rolled up."},"rollups":{"type":"integer","description":"Number of rollup rows written."}}}}}},"400":{"description":"start or end is not an ISO 8601 date, start is after end, or the range includes the current partial day or a future day.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Cannot roll up the current partial day or a future day."}}}},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values":{"get":{"tags":["Value"],"description":"Reads the latest record of each value definition in a namespace. Requires the value-reader role. Only values with a tenant or core value definition are returned. Acts on the tenant of the caller's token; core users reading a tenant's values should read each value with GET /value/v1/{namespace}/values/{name} and tenantId.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"name":"names","in":"query","description":"Comma-separated names of the values to read. Defaults to every value defined in the namespace.","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}},"example":["response-time","error-count"]}],"responses":{"200":{"description":"Values successfully read, keyed by namespace and then value name.","content":{"application/json":{"example":{"test-service":{"response-time":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120}}},"schema":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Value"}}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"},"404":{"description":"The namespace has no value definitions, or none of the requested names has a value definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"namespace with ID 'test-service' could not be found."}}}}}}},"/value/v1/{namespace}/values/{name}":{"parameters":[{"name":"namespace","description":"Namespace of the stored value. This path value is always event-service for event log records; it is not the optional event namespace filter exposed by the event service.\n","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"test-service"},{"name":"name","description":"Name of the stored value. This path value is always event for event log records; it is not the optional event name filter exposed by the event service.\n","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"response-time"}],"get":{"tags":["Value"],"description":"Reads records of a namespace value, newest first unless order is asc. Requires the value-reader role, or the export-service export-job role. Only records of the tenant are returned; tenant users read their own tenant and core users with the role read the tenant set by tenantId. Core users can also leave out tenantId to read the records of all tenants, which is how the event service reads the event log. Tenant users without a tenant context get 400. A value that has no records responds 200 with an empty array. Event log consumers should use the event service API, where event namespace and name are optional query filters.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"},{"name":"top","description":"Number of results to read. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000,"default":10}},{"name":"after","description":"Cursor for the next set of results; set it to page.next of the previous response.","in":"query","required":false,"schema":{"type":"string","description":"Base64 encoded number of records to skip."},"example":"MTA="},{"name":"order","description":"Timestamp order of the results; asc reads oldest first. Defaults to desc. Reading the oldest end of a large result set in asc order avoids skipping over the newer records.\n","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"correlationId","description":"Correlation ID associated with the values.","in":"query","required":false,"schema":{"type":"string"},"example":"request-1"},{"name":"context","description":"JSON object of context values the records must contain. Must be valid JSON. Every supplied property must match (AND). For event log records, namespace and name identify the event definition.\n","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"example":{"namespace":"support-program","name":"application-submitted"}}}}},{"name":"timestampMin","description":"Inclusive min value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-09-01T00:00:00.000Z"},{"name":"timestampMax","description":"Inclusive max value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-10-01T00:00:00.000Z"},{"name":"payloadPath","description":"Dot-separated property path within an event payload. Must be supplied with payloadValue and with both timestampMin and timestampMax. Cannot be combined with payload.\n","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*(\\.[A-Za-z_][A-Za-z0-9_-]*)*$","example":"applicant.contact.email"}},{"name":"payloadValue","description":"Exact JSON scalar at payloadPath. JSON numbers, booleans, null, and quoted strings are parsed as their JSON types; other input is treated as a string. Must be supplied with payloadPath.\n","in":"query","required":false,"schema":{"type":"string","example":"test.user@gov.ab.ca"}},{"name":"payload","description":"JSON object that the event payload must contain. Nested objects and multiple properties are supported, and every supplied property must match (AND). Additional event payload properties are ignored. Requires both timestampMin and timestampMax and cannot be combined with payloadPath or payloadValue.\n","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"example":{"applicationId":"12345","status":"submitted"}}}}},{"name":"value","description":"Filter to records with a payload targetId equal to this value (used for event log records). Must not contain double quotes.\n","in":"query","required":false,"schema":{"type":"string"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"},{"name":"url","description":"Filter to records with a payload URL equal to this value (used for event log records). Must not contain double quotes.\n","in":"query","required":false,"schema":{"type":"string"},"example":"https://my-application.alberta.ca/applications"}],"responses":{"200":{"description":"Value successfully read.","content":{"application/json":{"example":{"test-service":{"response-time":[{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120}]},"page":{"after":null,"next":"MTA=","size":1}},"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/ValuePage"}},"additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/Value"}}}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}},"post":{"tags":["Value"],"description":"Writes one or more records of a namespace value. Requires the value-writer role. Tenant users write to their own tenant; core users with the role write to the tenant set by tenantId in the body or query, and get 400 without one. A tenant user who sets a tenantId other than their own gets 403. The body can be a value envelope (with value, context, correlationId, timestamp and metrics), a bare JSON object which is written as the value, or an array of either. A value does not need a definition. If the value has a definition, records that fail its schema are skipped, and a value-written event is sent for each record when the definition has sendWriteEvent set. Responds with an array when the request body is an array.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"examples":{"envelope":{"summary":"Value with envelope","value":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120,"metrics":{"response-time":120}}},"bare":{"summary":"Bare value object","value":{"responseTime":120}},"batch":{"summary":"Batch of values","value":[{"value":120},{"value":95}]},"core":{"summary":"Core user writing to a tenant","value":{"tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","value":120}}},"schema":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/Value"},{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant to write to. Only core users can write to a tenant other than their own."}}}]},{"type":"object"},{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/Value"},{"type":"object"}]}}]}}}},"responses":{"200":{"description":"Value successfully written.","content":{"application/json":{"example":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120},"schema":{"oneOf":[{"$ref":"#/components/schemas/Value"},{"type":"array","items":{"$ref":"#/components/schemas/Value"}}]}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/count":{"parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"}],"get":{"tags":["Value"],"description":"Counts records of a namespace value in a tenant. Requires the value-reader role and a tenant context: tenant users count their own tenant, and core users must set tenantId.\n","parameters":[{"$ref":"#/components/parameters/ValueTenantId"},{"name":"correlationId","description":"Correlation ID associated with the values.","in":"query","required":false,"schema":{"type":"string"},"example":"request-1"},{"name":"context","description":"JSON object of context values the records must contain. Must be valid JSON. Every supplied property must match (AND). For event log records, namespace and name identify the event definition.\n","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]},"example":{"namespace":"support-program","name":"application-submitted"}}}}},{"name":"timestampMin","description":"Inclusive min value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-09-01T00:00:00.000Z"},{"name":"timestampMax","description":"Inclusive max value of timestamp (ISO 8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"example":"2026-10-01T00:00:00.000Z"}],"responses":{"200":{"description":"Value successfully read.","content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string"},"name":{"type":"string"},"count":{"type":"integer"}}},"example":{"namespace":"test-service","name":"response-time","count":1024}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/metrics":{"get":{"tags":["Value"],"description":"Retrieves interval aggregates of every metric of a value, keyed by metric name. Requires the value-reader role and a tenant context: tenant users read their own tenant, and core users must set tenantId. Paging is over metric interval rows, newest first.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"},{"$ref":"#/components/parameters/ValueTenantId"},{"$ref":"#/components/parameters/MetricInterval"},{"$ref":"#/components/parameters/MetricTop"},{"$ref":"#/components/parameters/MetricAfter"},{"name":"criteria","description":"JSON criteria for the read. Must be valid JSON.","in":"query","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricCriteria"}}}}],"responses":{"200":{"description":"Metrics successfully read.","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"$ref":"#/components/schemas/MetricPage"}},"additionalProperties":{"$ref":"#/components/schemas/Metric"}},"example":{"response-time:avg":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]},"page":{"after":null,"next":"MQ==","size":1,"intervalMax":"2026-09-24T00:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/metrics/{metric}":{"get":{"tags":["Value"],"description":"Retrieves interval aggregates of a single metric of a value. Requires the value-reader role and a tenant context: tenant users read their own tenant, and core users must set tenantId. A metric without records responds 200 with no values.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"},{"name":"metric","description":"Name of the metric to read.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":100},"example":"response-time:avg"},{"$ref":"#/components/parameters/ValueTenantId"},{"$ref":"#/components/parameters/MetricInterval"},{"$ref":"#/components/parameters/MetricTop"},{"$ref":"#/components/parameters/MetricAfter"},{"name":"criteria","description":"JSON criteria for the read; metricLike is not used. Must be valid JSON.","in":"query","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricCriteria"}}}}],"responses":{"200":{"description":"Metric successfully read.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Metric"},{"type":"object","properties":{"page":{"$ref":"#/components/schemas/MetricPage"}}}]},"example":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}],"page":{"after":null,"next":"MQ==","size":1,"intervalMax":"2026-09-24T00:00:00.000Z"}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"$ref":"#/components/responses/ValueForbidden"}}}},"/value/v1/{namespace}/values/{name}/platform-metrics":{"get":{"tags":["Value"],"description":"Retrieves interval aggregates of a value's metrics across all tenants, labelled by tenant. Requires the value-platform-metrics-reader role and is only accessible to core users; tenant users get 403 even with the role. Always reads the materialised metric rollups and is not paginated.\n","parameters":[{"$ref":"#/components/parameters/ValueNamespaceParam"},{"$ref":"#/components/parameters/ValueNameParam"},{"$ref":"#/components/parameters/MetricInterval"},{"name":"criteria","description":"JSON criteria for the read. Must be valid JSON.","in":"query","required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricCriteria"}}}}],"responses":{"200":{"description":"Platform metrics successfully read.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PlatformMetric"}},"example":{"response-time:avg":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]}}}}},"400":{"$ref":"#/components/responses/ValueBadRequest"},"401":{"$ref":"#/components/responses/ValueUnauthorized"},"403":{"description":"User is not a core user with the value-platform-metrics-reader role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to read platform metrics."}}}}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"ValueBadRequest":{"description":"Request is invalid, for example a path or query parameter failed validation or tenant context is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Tenant context is required for operation."}}}},"ValueDefinitionConflict":{"description":"Value definition already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"Value definition 'test-service:response-time' already exists."}}}},"ValueDefinitionNotFound":{"description":"Value definition not found in the tenant (or, for reads, in the core definitions).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"value definition with ID 'test-service:response-time' could not be found."}}}},"ValueForbidden":{"description":"User does not have the role required for the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to read values."}}}},"ValueNotFound":{"description":"Namespace or value definition not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueError"},"example":{"errorMessage":"namespace with ID 'test-service' could not be found."}}}},"ValueUnauthorized":{"description":"Request does not include a valid bearer token."}},"schemas":{"Metric":{"type":"object","properties":{"name":{"type":"string"},"values":{"type":"array","description":"Interval aggregates, newest first.","items":{"$ref":"#/components/schemas/MetricIntervalValue"}}},"example":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]}},"MetricCriteria":{"type":"object","description":"Must be valid JSON. Without intervalMin and intervalMax, the last month is read. intervalMin and intervalMax must be ISO 8601 date-times.\n","properties":{"metricLike":{"type":"string","description":"Only read metrics whose name contains this text. Not used when reading a single metric."},"intervalMax":{"type":"string","format":"date-time"},"intervalMin":{"type":"string","format":"date-time"}},"example":{"metricLike":"response-time","intervalMin":"2026-09-01T00:00:00.000Z","intervalMax":"2026-10-01T00:00:00.000Z"}},"MetricIntervalValue":{"type":"object","properties":{"interval":{"type":"string","format":"date-time","description":"Start of the interval."},"avg":{"type":"number","nullable":true},"sum":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"count":{"type":"number"}},"example":{"interval":"2026-09-23T00:00:00.000Z","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}},"MetricPage":{"allOf":[{"$ref":"#/components/schemas/ValuePage"},{"type":"object","properties":{"intervalMax":{"type":"string","format":"date-time","readOnly":true,"description":"End of the window actually read. It is snapped back to the start of the interval in progress, so only whole intervals are returned.\n"}}}],"example":{"after":null,"next":"MQ==","size":1,"intervalMax":"2026-09-24T00:00:00.000Z"}},"PlatformMetric":{"type":"object","properties":{"name":{"type":"string"},"values":{"type":"array","items":{"$ref":"#/components/schemas/PlatformMetricIntervalValue"}}},"example":{"name":"response-time:avg","values":[{"interval":"2026-09-23T00:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}]}},"PlatformMetricIntervalValue":{"allOf":[{"$ref":"#/components/schemas/MetricIntervalValue"},{"type":"object","properties":{"tenantId":{"type":"string"}}}],"example":{"interval":"2026-09-23T00:00:00.000Z","tenantId":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","avg":118.5,"sum":1185,"min":80,"max":240,"count":10}},"Value":{"type":"object","properties":{"correlationId":{"type":"string","nullable":true,"description":"Correlation ID that links related records, for example the records of one request."},"context":{"type":"object","description":"Context of the record, used to filter reads.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]}},"timestamp":{"type":"string","format":"date-time","description":"Time of the record. Defaults to the time of the write."},"value":{"description":"The recorded value; any JSON value. Validated against the value definition schema, if there is one."},"metrics":{"type":"object","writeOnly":true,"description":"Metric name to number. Numeric entries are recorded as metrics of the value and aggregated into intervals; other entries are ignored. Not returned with the record.\n","additionalProperties":{"type":"number"}}},"example":{"correlationId":"request-1","context":{"endpoint":"/api/v1/items"},"timestamp":"2026-09-24T17:00:00.000Z","value":120}},"ValueDefinition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9-_ ]{1,50}$"},"displayName":{"type":"string"},"description":{"type":"string"},"jsonSchema":{"type":"object","description":"JSON schema that written values are validated against."},"sendWriteEvent":{"type":"boolean","description":"Whether a value-written event is sent when a value is written."}},"example":{"name":"response-time","displayName":"Response time","description":"Response time of the test service.","jsonSchema":{"type":"number"},"sendWriteEvent":false}},"ValueDefinitionResponse":{"allOf":[{"$ref":"#/components/schemas/ValueDefinition"},{"type":"object","properties":{"namespace":{"type":"string"},"isCore":{"type":"boolean","description":"Whether the definition is a core (platform) definition rather than a tenant definition."}}}],"example":{"namespace":"test-service","name":"response-time","displayName":"Response time","description":"Response time of the test service.","jsonSchema":{"type":"number"},"sendWriteEvent":false,"isCore":false}},"ValueDefinitionUpdate":{"type":"object","properties":{"displayName":{"type":"string"},"description":{"type":"string"},"jsonSchema":{"type":"object"},"sendWriteEvent":{"type":"boolean"}},"example":{"description":"Response time of the test service in milliseconds."}},"ValueError":{"type":"object","properties":{"errorMessage":{"type":"string"}},"example":{"errorMessage":"Tenant context is required for operation."}},"ValueNamespace":{"type":"object","properties":{"name":{"type":"string"},"definitions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ValueDefinition"}}},"example":{"name":"test-service","definitions":{"response-time":{"name":"response-time","description":"Response time of the test service.","jsonSchema":{"type":"number"}}}}},"ValuePage":{"type":"object","properties":{"after":{"type":"string","nullable":true,"description":"Cursor the page was read after."},"next":{"type":"string","description":"Cursor for the next page; absent when there are no more results."},"size":{"type":"number","description":"Number of results in the page."}},"example":{"after":null,"next":"MTA=","size":10}}},"parameters":{"MetricAfter":{"name":"after","description":"Cursor for the next set of results; set it to page.next of the previous response.","in":"query","required":false,"schema":{"type":"string","description":"Base64 encoded number of rows to skip."},"example":"MTAw"},"MetricInterval":{"name":"interval","description":"Interval to aggregate metrics into. Defaults to daily. Any other value responds 400 with \"Interval value is not recognized.\"\n","in":"query","required":false,"schema":{"type":"string","default":"daily","enum":["one_minute","five_minutes","hourly","daily","weekly","monthly"]}},"MetricTop":{"name":"top","description":"Number of metric interval rows to read. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000,"default":100}},"ValueNameParam":{"name":"name","description":"Name of the value within the namespace.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"response-time"},"ValueNamespaceParam":{"name":"namespace","description":"Namespace of the value, for example the name of the service that writes it.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50},"example":"test-service"},"ValueTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Only used for core (platform) users; tenant users always act on the tenant of their token and this parameter is ignored. Responds 400 if it is not a valid tenant URN.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}}},"security":[{"accessToken":[]}],"tags":[{"name":"Value","description":"API to store and retrieve values."},{"name":"Value definition","description":"API to manage value definitions."}]}
|
|
@@ -135,7 +135,7 @@ The resources rolled up are the `resource` entries of the service metric rollup
|
|
|
135
135
|
|
|
136
136
|
The job runs alongside the metric interval rollups, under `METRIC_INTERVAL_ROLLUP_JOB_ENABLED`, `METRIC_INTERVAL_ROLLUP_MAX_CHUNK_HOURS` (bounded to between a day and a week) and `METRIC_INTERVAL_ROLLUP_STATEMENT_TIMEOUT_MS`, on ticks offset two minutes from theirs and under its own advisory lock. It moves each source's coverage forward over closed days — a day is rolled up an hour after it ends, so events timestamped just before midnight land in it — and backward through history, recorded in `event_resource_rollup_coverage`. Walking back starts from the newest event log chunk below coverage, read from chunk metadata, so a span of years with no data at all, such as between a stray old event and the rest of the log, is crossed in a single step.
|
|
137
137
|
|
|
138
|
-
`GET /value/v1/event-resources/distinct-count` reads the count for a `namespace`, `contextKey`, optional comma separated `names` (defaulting to every event rolled up for the namespace) and a period from `intervalMin` (inclusive) to `intervalMax` (exclusive),
|
|
138
|
+
`GET /value/v1/event-resources/distinct-count` reads the count for a `namespace`, `contextKey`, optional comma separated `names` (defaulting to every event rolled up for the namespace) and a period from `intervalMin` (inclusive) to `intervalMax` (exclusive), of any length. Whole days inside coverage come from the rollup; the current day, and any history the backfill has not reached yet, are read from the event log for that span alone, and the two are combined before counting. The read is bounded by `EVENT_RESOURCE_READ_STATEMENT_TIMEOUT_MS` (default 60000) rather than by the length of the period. Only the sources above and their own events are accepted, since the rollup has no rows for anything else and would undercount.
|
|
139
139
|
|
|
140
140
|
```sql
|
|
141
141
|
SELECT namespace, context_key, covered_from, covered_to, updated_at
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/adsp-sdk-mcp-server",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - MCP server for ADSP documentation and Node SDK reference lookup.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|
package/provenance.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "release",
|
|
3
|
-
"builtAt": "2026-11-
|
|
4
|
-
"sourceCommit": "
|
|
5
|
-
"latestRelease": "1.
|
|
6
|
-
"docsCommit": "
|
|
3
|
+
"builtAt": "2026-11-17T19:55:21.424Z",
|
|
4
|
+
"sourceCommit": "a4f8cd4f675199b445c3cedb2dc41dc3d1473bbe",
|
|
5
|
+
"latestRelease": "1.35.1",
|
|
6
|
+
"docsCommit": "7d598d35f78054bdf81b2ebd03a4abf216c33fea",
|
|
7
7
|
"sdk": {
|
|
8
8
|
"version": "2.36.1",
|
|
9
9
|
"commit": "dd58a2b854c4406b42c0604dba3fa4b941038d6c",
|