@abgov/adsp-sdk-mcp-server 1.32.2 → 1.34.0
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.
- package/assets/api-specs/form-service.json +1 -1
- package/assets/api-specs/index.json +1 -1
- package/assets/api-specs/tenant-management-api.json +1 -1
- package/assets/docs/services/task-service.md +38 -0
- package/assets/docs/services/tenant-service.md +59 -40
- package/package.json +1 -1
- package/provenance.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"openapi":"3.0.0","info":{"title":"Form service","version":"1.0.0","description":""},"paths":{"/form/v1/definitions":{"get":{"tags":["Form"],"description":"Retrieves the form definitions of the tenant, with optional name search. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`) in the tenant; core users are not accepted, and anonymous requests respond 403.\n","parameters":[{"name":"top","description":"Number of definitions to return in a page. Passed to the configuration service, which accepts 1 to 1000.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","description":"Search for form definitions by name (partial match, case-insensitive).","in":"query","required":false,"schema":{"type":"string"}},{"name":"createDateAfter","description":"Only include definitions created on or after this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createDateBefore","description":"Only include definitions created on or before this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successfully retrieved form definitions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a new form definition in the tenant. Requires the form-service admin role\n(`urn:ads:platform:form-service:form-admin`). Core users with the role must set `tenantId`.\n\nOnly `name` and `description` are accepted in the request body. All other fields are set automatically:\n- `id`: auto-generated from `name` in kebab-case\n- `anonymousApply`: `false`\n- `applicantRoles`, `assessorRoles`, and `clerkRoles`: `[]`\n- `securityClassification`: `protected b`\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionCreate"}}}},"responses":{"201":{"description":"Successfully created the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Validation failed, the ID could not be generated from the provided name, or the configuration service rejected the definition.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition ID could not be generated from the provided name."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"409":{"description":"Form definition with the generated ID already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition with ID 'business-licence-application' already exists."}}}}}}},"/form/v1/definitions/{definitionId}":{"get":{"tags":["Form"],"description":"Retrieves a form definition, with its current scheduled intake if it uses scheduled intakes. Requires the form-service admin or intake-application role, or one of the definition's applicant or clerk roles, in the tenant of the definition.\n\nIf the definition allows anonymous applications, any user can read it and the request does not need a bearer token. Anonymous requests have no token to determine the tenant from, so they must include the tenantId query parameter.\n","security":[{},{"accessToken":[]}],"parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"version","description":"Revision of the form definition to retrieve. Defaults to the active revision.","in":"query","required":false,"schema":{"type":"number"}},{"name":"tenantId","description":"ID of the tenant of the definition. Required for anonymous requests and core users; ignored for tenant users.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}],"responses":{"200":{"description":"Successfully retrieved a form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the tenant cannot be determined for an anonymous request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot determine tenant context of request."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"patch":{"tags":["Form"],"description":"Partially updates an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only the provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPatch"}}}},"responses":{"200":{"description":"Successfully patched the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"put":{"tags":["Form"],"description":"Replaces a form definition with the request body, creating it if it does not exist. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The `id` of the definition is taken from the path.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"},"example":{"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}}},"submissionRecords":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"delete":{"tags":["Form"],"description":"Deletes a form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Deleting a definition that does not exist also responds 204.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the form definition."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/access-requests":{"post":{"tags":["Form registration"],"description":"Submits a request for access to a restricted form. Requires the `form-access-requester` role (`urn:ads:platform:form-service:form-access-requester`) or the `form-admin` role; core users with either role must set `tenantId`. The form definition must have registration enabled, otherwise the request responds 400. The registration is created with status `pending`. Only one pending registration is allowed per email address and form.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationCreate"}}}},"responses":{"201":{"description":"Successfully submitted the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationSubmitted"}}}},"400":{"description":"Request is invalid, the answers don't match the registration questions, the form definition doesn't accept access requests, or the request has no tenant context.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition 'medical-intake' does not accept registrations."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"},"409":{"description":"A pending access request already exists for this email address and form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"A pending registration already exists for this email address and form."}}}}}},"get":{"tags":["Form registration"],"description":"Retrieves the access requests of a form definition, newest first. Requires the `form-access-reader`, `form-access-writer` or `form-admin` role; core users with any of these roles must set `tenantId`. Only requests of the caller's tenant are returned.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"},{"name":"status","description":"Only return requests with this status.","in":"query","required":false,"schema":{"type":"string","enum":["pending","approved","denied"]}},{"name":"top","description":"Maximum number of results to return. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor of the page to return, from the next value of the previous page.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the access requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/access-requests/{id}":{"get":{"tags":["Form registration"],"description":"Retrieves the latest access request for an email address. Users can retrieve their own request (matching the email of their token); retrieving the request of another email address requires the `form-access-reader`, `form-access-writer` or `form-admin` role. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"id","description":"Email address of the applicant. Matched without regard to case.","in":"path","required":true,"schema":{"type":"string","format":"email"},"example":"test.user@gov.ab.ca"},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistration"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"description":"Form definition not found, or there is no access request for the email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"registration with ID 'test.user@gov.ab.ca' could not be found."}}}}}},"patch":{"tags":["Form registration"],"description":"Approves or denies a pending access request, and records the reviewing administrator and the review time. Requires the `form-access-writer` or `form-admin` role; core users with either role must set `tenantId`. Requests that are no longer pending respond 409. Requests of another tenant or form definition respond 404.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"id","description":"ID of the access request.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationReview"}}}},"responses":{"200":{"description":"Successfully updated the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistration"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"description":"Form definition or access request not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"registration with ID '6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01' could not be found."}}}},"409":{"description":"The access request has already been approved or denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Registration has already been approved."}}}}}}},"/form/v1/definitions/{definitionId}/lifecycle":{"patch":{"tags":["Form"],"description":"Partially updates the lifecycle settings of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowAnonymousApplication":{"type":"boolean","description":"Whether anonymous (unauthenticated) applicants can submit the form."},"allowMultipleFormsPerApplicant":{"type":"boolean","description":"Whether an applicant can submit more than one form. When false, only one form per applicant is allowed."},"createSupportTopic":{"type":"boolean","description":"Whether a support topic is created for each new form."},"securityClassification":{"type":"string","enum":["protected a","protected b","protected c","public"],"description":"Security classification of the form definition."}}},"example":{"allowAnonymousApplication":false,"allowMultipleFormsPerApplicant":true,"createSupportTopic":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated lifecycle settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/roles":{"put":{"tags":["Form"],"description":"Replaces the applicant, assessor, and clerk roles of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The provided roles replace the existing roles entirely; any role array omitted from the request is reset to empty.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"applicantRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to apply. Replaces the existing applicant roles entirely."},"assessorRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to assess submissions. Replaces the existing assessor roles entirely."},"clerkRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to act as clerks. Replaces the existing clerk roles entirely."}}},"example":{"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":["business-licence-clerk"]}}}},"responses":{"200":{"description":"Successfully replaced form definition roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/schedule":{"put":{"tags":["Form schedules"],"description":"Updates the scheduled intake period of a form definition, by updating its event in the calendar service. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Responds with the form definition and its updated intake. A definition that does not exist responds 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutIntakeParameters"}}}},"responses":{"200":{"description":"Successfully updated the intake schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the form definition does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition not found"}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/schemas":{"put":{"tags":["Form"],"description":"Updates the data and UI schemas for an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data-schema":{"type":"object","description":"JSON Schema describing the shape of the form data. If omitted, the existing data schema is preserved."},"ui-schema":{"type":"object","description":"UI schema describing the layout and controls of the form. If omitted, the existing UI schema is preserved."}}},"example":{"data-schema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"ui-schema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]}}}}},"responses":{"204":{"description":"Schemas updated successfully. No content is returned."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/submission-actions":{"patch":{"tags":["Form"],"description":"Partially updates the actions invoked when a form is submitted. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged. Properties other than those listed respond 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"createPDF":{"type":"boolean","description":"Whether to generate a submission PDF using the default submitted-form template."},"createSubmissionRecords":{"type":"boolean","description":"Whether to create submission records when the form is submitted."},"event":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Custom submission event in namespace:name format. Set to null to clear."},"includeDataInEvent":{"type":"boolean","description":"Whether submitted form data is included in the submission event payload."},"taskQueue":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Queue task target in queueNameSpace:queueName format. Set to null to clear."},"dispositionStates":{"type":"array","items":{"type":"object","required":["name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}}},"example":{"createPDF":true,"createSubmissionRecords":true,"event":"business-licence:application-received","includeDataInEvent":false,"taskQueue":"business-licence:intake","dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."},{"id":"rejected","name":"Rejected","description":"Licence is rejected."}]}}}},"responses":{"200":{"description":"Successfully updated submission actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms":{"get":{"tags":["Form"],"description":"Find forms. Users with the form-service admin role, or the export-service export-job role, can find all forms of the tenant. When the criteria include definitionIdEquals, users with one of that definition's assessor roles can find its submitted forms. Other users only find the forms they created, and cannot use includeData. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of forms to return in a page. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"includeData","description":"Flag indicating if form data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created' or 'status' for form fields, and 'data.' followed by\nthe path into the form data for a data value (e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for the forms to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"anonymousApplicantEquals":{"type":"boolean"},"definitionIdEquals":{"type":"string"},"statusEquals":{"type":"string","enum":["draft","locked","submitted","archived"]},"lastAccessedBefore":{"type":"string","format":"date-time"},"lockedBefore":{"type":"string","format":"date-time"},"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"},"hashEquals":{"type":"string"},"dataCriteria":{"type":"object","description":"Values to match in the form data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","statusEquals":"submitted"}}}}],"responses":{"200":{"description":"Successfully retrieved forms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a draft form of a definition in the tenant, optionally with data, and optionally submits it straight away. Requires one of the definition's applicant or clerk roles; if the definition allows anonymous applications, the form-service intake-application role is also accepted. When the definition uses scheduled intakes, forms can only be created during an active intake, unless the user has the form-service form-tester role or the request is a dry run.\n\nAn applicant who creates their own form is set as the form's applicant (and notified by email) when applicant information is included or the definition allows one form per applicant. Clerks and intake applications can provide the details of the applicant they act for.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definitionId":{"type":"string","minLength":1,"maxLength":50},"applicant":{"type":"object","properties":{"id":{"type":"string","description":"ID of an existing notification service subscriber to use as the applicant."},"userId":{"type":"string"},"addressAs":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"}},"required":["channel","address"]}}}},"data":{"type":"object","description":"Initial form data. File references can be embedded as file-service URNs."},"files":{"type":"object","deprecated":true,"description":"Not used; file references are resolved from the data.","additionalProperties":{"type":"string"}},"submit":{"type":"boolean","description":"Submit the form immediately after it is created."},"dryRun":{"type":"boolean","description":"Validate and simulate the request without saving the form."}},"required":["definitionId"]},"examples":{"applicant":{"summary":"Applicant creates their own draft","value":{"definitionId":"business-licence-application"}},"anonymousApplicant":{"summary":"Intake application creates a draft for an anonymous applicant","value":{"definitionId":"business-licence-application","applicant":{"addressAs":"Test User","channels":[{"channel":"email","address":"test.user@gov.ab.ca"}]}}},"createAndSubmit":{"summary":"Create with data and submit","value":{"definitionId":"business-licence-application","data":{"businessName":"Example Bakery Ltd."},"submit":true}}}}}},"responses":{"200":{"description":"Successfully created a form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the definition has no active intake, or the data is not valid for the definition when the form is submitted.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot create form as there is no active intake."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms/{formId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves a form, and its submission if it is submitted. Requires the form-service admin or intake-application role, one of the definition's clerk or assessor roles, or one of its applicant roles for the form's creator (unless the form is archived). Including the data needs the form data access described for `GET /form/v1/forms/{formId}/data`, and fails for locked forms. Core users must set `tenantId`.\n","parameters":[{"name":"includeData","description":"Flag indicating if data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form"],"description":"Executes a form operation. The user must be able to read the form (see `GET /form/v1/forms/{formId}`), and\neach operation needs a further role:\n- `send-code`: the form-service intake-application role. Sends a verification code to the applicant.\n- `unlock`: the form-service admin role. Only locked forms can be unlocked.\n- `submit`: one of the definition's clerk roles, or an applicant role for the form's creator. Only draft forms\n can be submitted, and the data must be valid for the definition's data schema.\n- `to-draft`: the form-service admin role or one of the definition's assessor roles. Only submitted forms can be\n set back to draft.\n- `archive`: the form-service admin role.\n\nCore users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnlockFormOperation"},{"$ref":"#/components/schemas/SubmitFormOperation"},{"$ref":"#/components/schemas/ArchiveFormOperation"},{"$ref":"#/components/schemas/SendCodeOperation"},{"$ref":"#/components/schemas/SetToDraftOperation"}],"discriminator":{"propertyName":"operation","mapping":{"unlock":"#/components/schemas/UnlockFormOperation","submit":"#/components/schemas/SubmitFormOperation","archive":"#/components/schemas/ArchiveFormOperation","send-code":"#/components/schemas/SendCodeOperation","to-draft":"#/components/schemas/SetToDraftOperation"}}},"examples":{"submit":{"summary":"Submit the form","value":{"operation":"submit"}},"sendCode":{"summary":"Send a verification code to the applicant","value":{"operation":"send-code"}},"unlock":{"summary":"Unlock a locked form","value":{"operation":"unlock"}},"toDraft":{"summary":"Set a submitted form back to draft","value":{"operation":"to-draft"}},"archive":{"summary":"Archive the form","value":{"operation":"archive"}}}}}},"responses":{"200":{"description":"Successfully executed operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the form is not in a status that allows the operation, or the data is not valid for the definition on submit.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot submit form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form"],"description":"Deletes a form and its files. Requires the form-service admin role. Draft forms can also be deleted by users with one of the definition's clerk roles, and by their creator with one of the definition's applicant roles. The user must also be able to read the form (see `GET /form/v1/forms/{formId}`). Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully deleted the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/data":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves form data. Requires the form-service admin role, one of the definition's applicant roles for the form's creator, one of its clerk roles while the form is a draft, or one of its assessor roles once it is submitted. Alternatively, a user with the form-service intake-application role can provide the verification code sent to the applicant. Locked forms cannot be read. Core users must set `tenantId`.\n","parameters":[{"name":"code","description":"Verification code sent to the applicant with the send-code operation.","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":10}}],"responses":{"200":{"description":"Successfully retrieved the form data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is locked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Locked form cannot be read."}}}},"401":{"description":"Request does not include a valid bearer token, or the provided code could not be verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Provided code could not be verified."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"put":{"tags":["Form"],"description":"Sets the form data of a draft form. Requires one of the definition's clerk roles, or one of its applicant roles for the form's creator. Files that are no longer referenced in the data are deleted. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Form data. File references can be embedded directly as file-service URNs anywhere in this object."}},"required":["data"]},"example":{"data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}}}},"responses":{"200":{"description":"Successfully updated the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is not a draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot update form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves submissions of a specified form matching search criteria. Requires the form-service admin role,\none of the form definition's assessor roles, or the export-service export-job role. Core users must set\n`tenantId`.\n","parameters":[{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form Submission"],"description":"Update the form disposition for the form submission. Requires the form-service admin role or one of the definition's assessor roles. The status must match the ID or name of one of the definition's disposition states. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully updated the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dispositionStatus":{"type":"string","minLength":1},"dispositionReason":{"type":"string","minLength":1}},"required":["dispositionStatus","dispositionReason"]},"example":{"dispositionStatus":"approved","dispositionReason":"Application meets all eligibility criteria."}}}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"post":{"tags":["Form Submission"],"description":"Adds a reviewer note to the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000}},"required":["content"]},"example":{"content":"Called applicant to confirm their mailing address."}}}},"responses":{"200":{"description":"Successfully added the note to the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes/{noteId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"name":"noteId","description":"ID of the note.","required":true,"in":"path","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/FormTenantId"}],"delete":{"tags":["Form Submission"],"description":"Removes a reviewer note from the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully removed the note from the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/registers":{"get":{"tags":["Form"],"description":"Retrieves the data registers that have both a definition and a data document, i.e. the registers manageable through this API. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the list of data registers.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataRegister"}},"example":[{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}]}}},"400":{"description":"Request has no tenant context. A core user must specify the tenantId query parameter."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"502":{"description":"configuration-service returned an unexpected error."}}},"post":{"tags":["Form"],"description":"Creates a new data register: its definition in the shared platform/configuration-service document, followed by its entries in a data-register/<name> configuration document. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterCreate"},"example":{"name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"201":{"description":"Successfully created the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"409":{"description":"A data register with this name already exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/registers/{name}":{"get":{"tags":["Form"],"description":"Retrieves a data register by name. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; it must have both a definition and a data document to be considered to exist.\n"},"502":{"description":"configuration-service returned an unexpected error."}}},"patch":{"tags":["Form"],"description":"Updates the description and/or entries of an existing data register. Only provided fields are changed: sending description alone leaves the entries unchanged, and vice versa. Entries are written to the latest revision; if an older revision is pinned as active, the pin moves to that revision so the new entries are live. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterUpdate"},"example":{"description":"Updated list of weekdays","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"200":{"description":"Successfully updated the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found."},"502":{"description":"configuration-service returned an unexpected error."}}},"delete":{"tags":["Form"],"description":"Deletes a data register: its entries and its definition. Removes whichever of the two parts still exists, so a retry after a partial failure succeeds. Forms that reference the register in a dropdown or list will lose its options. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register to delete.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the data register."},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; neither a definition nor a data document exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/submissions":{"get":{"tags":["Form Submission"],"description":"Retrieves submissions of the tenant matching search criteria. Requires the form-service admin role or the\nexport-service export-job role. Users with one of a definition's assessor roles can retrieve its submissions by\nincluding definitionIdEquals in the criteria. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form Submission"],"description":"Deletes a form submission. Requires the form-service admin role. Core users must set `tenantId`. A submission that does not exist responds 200 with `deleted: false`.\n","responses":{"200":{"description":"Successfully deleted the form submission, or no submission was found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"FormDefinitionIdPath":{"name":"definitionId","description":"ID of the form definition.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z0-9-]+$"},"example":"business-licence-application"},"FormIdPath":{"name":"formId","description":"ID of the form.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f"},"FormSubmissionIdPath":{"name":"submissionId","description":"ID of the form submission.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"FormTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Required for core (platform) users. Tenant users always act on the tenant of their token, and this parameter is ignored for them.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"FormBadRequest":{"description":"Request is invalid, for example a path, query, or body parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Validation failed with error(s): formId (params) - Invalid value"}}}},"FormDefinitionNotFound":{"description":"Form definition not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"form definition with ID 'business-licence-application' could not be found."}}}},"FormForbidden":{"description":"User does not have the role required for the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to find submissions."}}}},"FormNotFound":{"description":"Form definition, form, or submission not found. Forms and submissions of another tenant also respond 404.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form submission with ID '5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f' could not be found."}}}},"FormUnauthorized":{"description":"Request does not include a valid bearer token."}},"schemas":{"ArchiveFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["archive"]}}},"DataRegister":{"type":"object","required":["name"],"properties":{"namespace":{"type":"string","description":"Namespace of the data register. Always data-register."},"name":{"type":"string","description":"Name of the data register."},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"List of values stored in the register, from its active revision, or its latest revision if none is active.\n","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}},"DataRegisterCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the data register. Unique within the tenant. 1 to 50 letters, numbers, spaces, hyphens and underscores, not starting or ending with a space.\n","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"Initial list of values stored in the register. Defaults to an empty array.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"DataRegisterUpdate":{"type":"object","description":"Partial update payload for a data register. Only provided fields are changed; omitting entries leaves the existing entries unchanged.\n","properties":{"description":{"type":"string","description":"Updated description for the register."},"entries":{"type":"array","description":"Replacement list of values for the register.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"Form":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"jobId":{"type":"string","nullable":true,"description":"ID of the PDF generation job, when submitting the form generates a PDF."},"definition":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}},"applicant":{"type":"object","nullable":true,"properties":{"addressAs":{"type":"string"}}},"status":{"type":"string","enum":["draft","locked","submitted","archived"]},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"formDraftUrl":{"type":"string","description":"URL of the draft form in the application, based on the definition's formDraftUrlTemplate."},"data":{"type":"object","description":"Form data; only included when requested with includeData."},"files":{"type":"object","description":"Form files as file-service URNs; only included when requested with includeData.","additionalProperties":{"type":"string"}},"dryRun":{"type":"boolean","description":"Indicates the form was created as a dry run and was not saved."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"lastAccessed":{"type":"string","format":"date-time"},"locked":{"type":"string","format":"date-time","nullable":true},"submitted":{"type":"string","format":"date-time","nullable":true},"submission":{"type":"object","description":"submission for the form if form is submitted.","properties":{"id":{"type":"string"},"urn":{"type":"string"}}}},"example":{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","jobId":null,"securityClassification":"protected b","definition":{"id":"business-licence-application","name":"Business licence application","description":"Application for a municipal business licence."},"formDraftUrl":"https://form.alberta.ca/business-licence-application/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","status":"draft","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"locked":null,"submitted":null,"lastAccessed":"2026-10-02T15:04:05.000Z","applicant":{"addressAs":"Test User"}}},"FormData":{"type":"object","properties":{"id":{"type":"string","description":"ID of the form."},"data":{"type":"object"},"files":{"type":"object","description":"File-service URNs of the files referenced in the data, keyed by their path in the data.","additionalProperties":{"type":"string"}}},"example":{"id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"},"files":{"proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}},"FormDefinition":{"type":"object","required":["name","anonymousApply","applicantRoles","assessorRoles"],"properties":{"id":{"type":"string","readOnly":true,"description":"Unique identifier for the form definition. Generated from the name in kebab-case when the definition is created, and taken from the path on update.\n"},"revision":{"type":"number","readOnly":true,"description":"Revision of the definition in the configuration service."},"created":{"type":"string","format":"date-time","readOnly":true,"description":"Date the form definition (latest revision) was created. Only returned when listing definitions."},"name":{"type":"string"},"description":{"type":"string"},"anonymousApply":{"type":"boolean","default":false,"description":"Whether anonymous (unauthenticated) applicants can submit the form. Defaults to false."},"oneFormPerApplicant":{"type":"boolean"},"applicantRoles":{"type":"array","description":"Roles allowed to submit the form.","items":{"type":"string"}},"assessorRoles":{"type":"array","description":"Roles allowed to assess submitted forms.","items":{"type":"string"}},"clerkRoles":{"type":"array","description":"Roles allowed to fill in and submit forms on behalf of applicants.","items":{"type":"string"}},"formDraftUrlTemplate":{"type":"string","minLength":6,"maxLength":500,"pattern":"^https?://.+$","description":"Optional URL template for linking applicants back to their draft. Use '{{ id }}' as a placeholder for the form ID (e.g. https://example.com/form/{{ id }}). Must be between 6 and 500 characters.\n"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"},"dispositionStates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}},"generatesPdf":{"type":"boolean","readOnly":true,"description":"Whether a PDF is generated for submissions. Anonymous application definitions never generate one."},"submissionRecords":{"type":"boolean"},"submissionPdfTemplate":{"type":"string","writeOnly":true,"description":"PDF service template used for the submission PDF. Not returned by the form APIs."},"scheduledIntakes":{"type":"boolean","description":"Allow this form definition to accept schedule intakes"},"supportTopic":{"type":"boolean"},"registeredId":{"type":"string","readOnly":true},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"],"writeOnly":true,"description":"The security classification for the form definition. Not returned by the form definition APIs."},"queueTaskToProcess":{"type":"object","writeOnly":true,"description":"Task queue that a task is created in for each submission. Not returned by the form APIs.","properties":{"queueNameSpace":{"type":"string"},"queueName":{"type":"string"}}},"customSubmissionEvent":{"type":"object","writeOnly":true,"description":"Additional event sent when a form is submitted. Not returned by the form APIs.","properties":{"namespace":{"type":"string"},"name":{"type":"string"}}},"includeDataInSubmission":{"type":"boolean","writeOnly":true,"description":"Whether submitted data is included in the form-submitted event. Not returned by the form APIs."},"reviewConfiguration":{"type":"object","description":"Ordered form data fields shown as columns in the Form Admin submission and form lists.","additionalProperties":false,"properties":{"columns":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","description":"Dot-separated path of a leaf field in the form data schema.","minLength":1}}}},"questionsEmail":{"type":"string","description":"Address that applicant questions are forwarded to while no reviewer is part of the conversation. Not returned by the form APIs."}}},"registration":{"type":"object","description":"Restricts the form to approved users. When enabled, users submit an access request answering the registration questions, and an administrator approves or denies it.\n","additionalProperties":false,"required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Whether the form is restricted and accepts access requests. Defaults to false."},"accessGroup":{"type":"string","writeOnly":true,"minLength":1,"maxLength":255,"description":"Keycloak group containing the roles needed to access the form. Not returned by the form APIs.\n"},"dataSchema":{"type":"object","description":"JSON schema (draft-07) of the registration questions. Must not define firstName, lastName or email, which are standard fields of every access request.\n"},"uiSchema":{"type":"object","description":"Layout of the registration questions."}}},"dryRun":{"type":"boolean"},"intake":{"type":"object","readOnly":true,"nullable":true,"properties":{"urn":{"type":"string","description":"The urn of the form schedule intake"},"name":{"type":"string","description":"The description of the form schedule intake"},"description":{"type":"string","description":"The description of the form schedule intake"},"start":{"type":"string","format":"date-time","description":"The start date time of the form schedule intake"},"end":{"type":"string","format":"date-time","description":"The end date time of the form schedule intake"},"isAllDay":{"type":"boolean","description":"Is form schedule intake all day"},"isUpcoming":{"type":"boolean","description":"Is the form schedule intake upcoming"}}}},"example":{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"uiSchema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]},"dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."}],"generatesPdf":true,"submissionRecords":true,"scheduledIntakes":false,"supportTopic":false,"reviewConfiguration":{"columns":[{"path":"businessName"}]},"registration":{"enabled":false},"intake":null}},"FormDefinitionCreate":{"type":"object","description":"Payload for creating a new form definition. Only name and description are accepted; all other fields are set to defaults.","required":["name"],"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"additionalProperties":false,"example":{"name":"Business licence application","description":"Application for a municipal business licence."}},"FormDefinitionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormDefinition"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"created":"2026-09-14T16:20:00.000Z"}],"page":{"next":"MTA=","size":1,"total":24}}},"FormDefinitionPatch":{"type":"object","description":"Partial update payload for a form definition. Only provided fields will be updated; omitted fields will not be changed.","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"}},"additionalProperties":false,"example":{"description":"Application for a municipal business licence, including home-based businesses."}},"FormDeleteResult":{"type":"object","properties":{"deleted":{"type":"boolean"}},"example":{"deleted":true}},"FormDisposition":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"reason":{"type":"string"},"date":{"type":"string","format":"date-time"}}},"FormError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"FormPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Form"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","definition":{"id":"business-licence-application","name":"Business licence application"},"status":"submitted","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"submitted":"2026-10-03T09:30:00.000Z"}],"page":{"next":"MTA=","size":1,"total":312}}},"FormRegistration":{"type":"object","description":"A request for access to a restricted form.","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"formDefinitionId":{"type":"string","readOnly":true},"status":{"type":"string","enum":["pending","approved","denied"],"readOnly":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","description":"Email address of the applicant, stored in lower case."},"data":{"type":"object","description":"Answers to the registration questions of the form definition."},"submittedAt":{"type":"string","format":"date-time","readOnly":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true,"readOnly":true,"description":"Date the request was approved or denied."},"reviewedBy":{"type":"object","nullable":true,"readOnly":true,"description":"Administrator who approved or denied the request.","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"example":{"id":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01","formDefinitionId":"medical-intake","status":"approved","firstName":"Test","lastName":"User","email":"test.user@gov.ab.ca","data":{"profession":"physician","registrationNumber":"12345"},"submittedAt":"2026-11-12T16:00:00.000Z","reviewedAt":"2026-11-13T09:30:00.000Z","reviewedBy":{"id":"1c0fa56b-f818-4cc7-9254-7513aecb5d9f","name":"Admin User"}}},"FormRegistrationCreate":{"type":"object","additionalProperties":false,"required":["firstName","lastName","email"],"properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","maxLength":254},"data":{"type":"object","description":"Answers to the registration questions. Validated against the registration data schema of the form definition; properties the schema does not define respond 400.\n"}},"example":{"firstName":"Test","lastName":"User","email":"test.user@gov.ab.ca","data":{"profession":"physician","registrationNumber":"12345"}}},"FormRegistrationPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormRegistration"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}}},"FormRegistrationReview":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["pending","approved","denied"]}},"example":{"status":"approved"}},"FormRegistrationSubmitted":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"formDefinitionId":{"type":"string"},"status":{"type":"string","enum":["pending"]},"submittedAt":{"type":"string","format":"date-time"}},"example":{"id":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01","formDefinitionId":"medical-intake","status":"pending","submittedAt":"2026-11-12T16:00:00.000Z"}},"FormResultsPageInfo":{"type":"object","properties":{"after":{"type":"string","description":"Cursor of this page."},"next":{"type":"string","description":"Cursor of the next page. Not set on the last page."},"size":{"type":"number","description":"Number of results in this page."},"total":{"type":"number","description":"Total number of available results before filters are applied."}},"example":{"next":"MTA=","size":1,"total":24}},"FormSubmission":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"formId":{"type":"string"},"formDefinitionId":{"type":"string"},"formDefinitionRevision":{"type":"number","description":"Revision of the form definition the form was submitted with."},"formData":{"type":"object"},"formFiles":{"type":"object","additionalProperties":{"type":"string"}},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"hash":{"type":"string","description":"Hash of the submitted data."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updatedBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updated":{"type":"string","format":"date-time"},"disposition":{"$ref":"#/components/schemas/FormDisposition"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmissionNote"}}},"example":{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"formFiles":{},"securityClassification":"protected b","hash":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12","created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"updated":"2026-10-06T14:00:00.000Z","updatedBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"},"disposition":{"id":"9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a","status":"Approved","reason":"Application meets all eligibility criteria.","date":"2026-10-06T14:00:00.000Z"},"notes":[{"id":"7b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","content":"Called applicant to confirm their mailing address.","created":"2026-10-05T10:15:00.000Z","createdBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"}}]}},"FormSubmissionCriteria":{"type":"object","properties":{"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"dispositioned":{"type":"boolean"},"dispositionStatusEquals":{"type":"string"},"dispositionDateBefore":{"type":"string","format":"date-time"},"dispositionDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"}}},"FormSubmissionNote":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"FormSubmissionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"disposition":null,"notes":[]}],"page":{"next":"MTAw","size":1,"total":87}}},"PutIntakeParameters":{"type":"object","description":"Payload for updating schedule intake","required":["name","calendarEventId","start","end"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"calendarEventId":{"type":"integer","description":"ID of the calendar service event for the intake period."}},"example":{"name":"Spring intake","calendarEventId":42,"start":"2026-10-01T15:00:00.000Z","end":"2026-10-31T23:00:00.000Z"}},"SendCodeOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["send-code"]}}},"SetToDraftOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["to-draft"]}}},"SubmitFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["submit"]},"dryRun":{"type":"boolean","description":"Validate and simulate the submission without saving it."}}},"UnlockFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["unlock"]}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Form","description":"API to managed forms."},{"name":"Form Submission","description":"API to review and disposition form submissions."},{"name":"Form schedules","description":"API to manage the scheduled intake periods of form definitions."},{"name":"Form registration","description":"API to request access to restricted forms and to approve or deny those requests."}]}
|
|
1
|
+
{"openapi":"3.0.0","info":{"title":"Form service","version":"1.0.0","description":""},"paths":{"/form/v1/definitions":{"get":{"tags":["Form"],"description":"Retrieves the form definitions of the tenant, with optional name search. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`) in the tenant; core users are not accepted, and anonymous requests respond 403.\n","parameters":[{"name":"top","description":"Number of definitions to return in a page. Passed to the configuration service, which accepts 1 to 1000.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"name","description":"Search for form definitions by name (partial match, case-insensitive).","in":"query","required":false,"schema":{"type":"string"}},{"name":"createDateAfter","description":"Only include definitions created on or after this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"createDateBefore","description":"Only include definitions created on or before this date (ISO-8601).","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Successfully retrieved form definitions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a new form definition in the tenant. Requires the form-service admin role\n(`urn:ads:platform:form-service:form-admin`). Core users with the role must set `tenantId`.\n\nOnly `name` and `description` are accepted in the request body. All other fields are set automatically:\n- `id`: auto-generated from `name` in kebab-case\n- `anonymousApply`: `false`\n- `applicantRoles`, `assessorRoles`, and `clerkRoles`: `[]`\n- `securityClassification`: `protected b`\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionCreate"}}}},"responses":{"201":{"description":"Successfully created the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Validation failed, the ID could not be generated from the provided name, or the configuration service rejected the definition.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition ID could not be generated from the provided name."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"409":{"description":"Form definition with the generated ID already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition with ID 'business-licence-application' already exists."}}}}}}},"/form/v1/definitions/{definitionId}":{"get":{"tags":["Form"],"description":"Retrieves a form definition, with its current scheduled intake if it uses scheduled intakes. Requires the form-service admin or intake-application role, or one of the definition's applicant or clerk roles, in the tenant of the definition.\n\nIf the definition allows anonymous applications, any user can read it and the request does not need a bearer token. Anonymous requests have no token to determine the tenant from, so they must include the tenantId query parameter.\n","security":[{},{"accessToken":[]}],"parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"version","description":"Revision of the form definition to retrieve. Defaults to the active revision.","in":"query","required":false,"schema":{"type":"number"}},{"name":"tenantId","description":"ID of the tenant of the definition. Required for anonymous requests and core users; ignored for tenant users.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}],"responses":{"200":{"description":"Successfully retrieved a form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the tenant cannot be determined for an anonymous request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot determine tenant context of request."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"patch":{"tags":["Form"],"description":"Partially updates an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only the provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinitionPatch"}}}},"responses":{"200":{"description":"Successfully patched the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}},"put":{"tags":["Form"],"description":"Replaces a form definition with the request body, creating it if it does not exist. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The `id` of the definition is taken from the path.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"},"example":{"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}}},"submissionRecords":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated the form definition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"delete":{"tags":["Form"],"description":"Deletes a form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Deleting a definition that does not exist also responds 204.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the form definition."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/access-requests":{"post":{"tags":["Form registration"],"description":"Submits a request for access to a restricted form. Requires the `form-access-requester` role (`urn:ads:platform:form-service:form-access-requester`) or the `form-admin` role; core users with either role must set `tenantId`. The form definition must have registration enabled, otherwise the request responds 400. The registration is created with status `pending`. Only one pending registration is allowed per email address and form.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationCreate"}}}},"responses":{"201":{"description":"Successfully submitted the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationSubmitted"}}}},"400":{"description":"Request is invalid, the answers don't match the registration questions, the form definition doesn't accept access requests, or the request has no tenant context.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition 'medical-intake' does not accept registrations."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"},"409":{"description":"A pending access request already exists for this email address and form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"A pending registration already exists for this email address and form."}}}}}},"get":{"tags":["Form registration"],"description":"Retrieves the access requests of a form definition, newest first. Requires the `form-access-reader`, `form-access-writer` or `form-admin` role; core users with any of these roles must set `tenantId`. Only requests of the caller's tenant are returned.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"},{"name":"status","description":"Only return requests with this status.","in":"query","required":false,"schema":{"type":"string","enum":["pending","approved","denied"]}},{"name":"top","description":"Maximum number of results to return. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor of the page to return, from the next value of the previous page.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the access requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/access-requests/{id}":{"get":{"tags":["Form registration"],"description":"Retrieves the latest access request for an email address. Users can retrieve their own request (matching the email of their token); retrieving the request of another email address requires the `form-access-reader`, `form-access-writer` or `form-admin` role. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"id","description":"Email address of the applicant. Matched without regard to case.","in":"path","required":true,"schema":{"type":"string","format":"email"},"example":"test.user@gov.ab.ca"},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistration"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"description":"Form definition not found, or there is no access request for the email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"registration with ID 'test.user@gov.ab.ca' could not be found."}}}}}},"patch":{"tags":["Form registration"],"description":"Approves or denies a pending access request, and records the reviewing administrator and the review time. Requires the `form-access-writer` or `form-admin` role; core users with either role must set `tenantId`. Requests that are no longer pending respond 409. Requests of another tenant or form definition respond 404.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"name":"id","description":"ID of the access request.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistrationReview"}}}},"responses":{"200":{"description":"Successfully updated the access request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRegistration"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"description":"Form definition or access request not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"registration with ID '6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01' could not be found."}}}},"409":{"description":"The access request has already been approved or denied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Registration has already been approved."}}}}}}},"/form/v1/definitions/{definitionId}/lifecycle":{"patch":{"tags":["Form"],"description":"Partially updates the lifecycle settings of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowAnonymousApplication":{"type":"boolean","description":"Whether anonymous (unauthenticated) applicants can submit the form."},"allowMultipleFormsPerApplicant":{"type":"boolean","description":"Whether an applicant can submit more than one form. When false, only one form per applicant is allowed."},"createSupportTopic":{"type":"boolean","description":"Whether a support topic is created for each new form."},"securityClassification":{"type":"string","enum":["protected a","protected b","protected c","public"],"description":"Security classification of the form definition."}}},"example":{"allowAnonymousApplication":false,"allowMultipleFormsPerApplicant":true,"createSupportTopic":true,"securityClassification":"protected b"}}}},"responses":{"200":{"description":"Successfully updated lifecycle settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/roles":{"put":{"tags":["Form"],"description":"Replaces the applicant, assessor, and clerk roles of an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. The provided roles replace the existing roles entirely; any role array omitted from the request is reset to empty.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"applicantRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to apply. Replaces the existing applicant roles entirely."},"assessorRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to assess submissions. Replaces the existing assessor roles entirely."},"clerkRoles":{"type":"array","items":{"type":"string"},"description":"Roles permitted to act as clerks. Replaces the existing clerk roles entirely."}}},"example":{"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":["business-licence-clerk"]}}}},"responses":{"200":{"description":"Successfully replaced form definition roles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/schedule":{"put":{"tags":["Form schedules"],"description":"Updates the scheduled intake period of a form definition, by updating its event in the calendar service. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Responds with the form definition and its updated intake. A definition that does not exist responds 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutIntakeParameters"}}}},"responses":{"200":{"description":"Successfully updated the intake schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"description":"Request is invalid, or the form definition does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form definition not found"}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/definitions/{definitionId}/schemas":{"put":{"tags":["Form"],"description":"Updates the data and UI schemas for an existing form definition. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data-schema":{"type":"object","description":"JSON Schema describing the shape of the form data. If omitted, the existing data schema is preserved."},"ui-schema":{"type":"object","description":"UI schema describing the layout and controls of the form. If omitted, the existing UI schema is preserved."}}},"example":{"data-schema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"ui-schema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]}}}}},"responses":{"204":{"description":"Schemas updated successfully. No content is returned."},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/definitions/{definitionId}/submission-actions":{"patch":{"tags":["Form"],"description":"Partially updates the actions invoked when a form is submitted. Requires the form-service admin role (`urn:ads:platform:form-service:form-admin`); core users with the role must set `tenantId`. Only provided fields are changed; omitted fields are left unchanged. Properties other than those listed respond 400.\n","parameters":[{"$ref":"#/components/parameters/FormDefinitionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"createPDF":{"type":"boolean","description":"Whether to generate a submission PDF using the default submitted-form template."},"createSubmissionRecords":{"type":"boolean","description":"Whether to create submission records when the form is submitted."},"event":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Custom submission event in namespace:name format. Set to null to clear."},"includeDataInEvent":{"type":"boolean","description":"Whether submitted form data is included in the submission event payload."},"taskQueue":{"type":"string","nullable":true,"pattern":"^[^:]+:[^:]+$","description":"Queue task target in queueNameSpace:queueName format. Set to null to clear."},"dispositionStates":{"type":"array","items":{"type":"object","required":["name"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}}}},"example":{"createPDF":true,"createSubmissionRecords":true,"event":"business-licence:application-received","includeDataInEvent":false,"taskQueue":"business-licence:intake","dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."},{"id":"rejected","name":"Rejected","description":"Licence is rejected."}]}}}},"responses":{"200":{"description":"Successfully updated submission actions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDefinition"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms":{"get":{"tags":["Form"],"description":"Find forms. Users with the form-service admin role, or the export-service export-job role, can find all forms of the tenant. When the criteria include definitionIdEquals, users with one of that definition's assessor roles can find its submitted forms. Other users only find the forms they created, and cannot use includeData. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of forms to return in a page. Defaults to 10.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"includeData","description":"Flag indicating if form data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created' or 'status' for form fields, and 'data.' followed by\nthe path into the form data for a data value (e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for the forms to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"anonymousApplicantEquals":{"type":"boolean"},"definitionIdEquals":{"type":"string"},"statusEquals":{"type":"string","enum":["draft","locked","submitted","archived"]},"lastAccessedBefore":{"type":"string","format":"date-time"},"lockedBefore":{"type":"string","format":"date-time"},"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"},"hashEquals":{"type":"string"},"dataCriteria":{"type":"object","description":"Values to match in the form data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","statusEquals":"submitted"}}}}],"responses":{"200":{"description":"Successfully retrieved forms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}},"post":{"tags":["Form"],"description":"Creates a draft form of a definition in the tenant, optionally with data, and optionally submits it straight away. Requires one of the definition's applicant or clerk roles; if the definition allows anonymous applications, the form-service intake-application role is also accepted. When the definition uses scheduled intakes, forms can only be created during an active intake, unless the user has the form-service form-tester role or the request is a dry run.\n\nAn applicant who creates their own form is set as the form's applicant (and notified by email) when applicant information is included or the definition allows one form per applicant. Clerks and intake applications can provide the details of the applicant they act for.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definitionId":{"type":"string","minLength":1,"maxLength":50},"applicant":{"type":"object","properties":{"id":{"type":"string","description":"ID of an existing notification service subscriber to use as the applicant."},"userId":{"type":"string"},"addressAs":{"type":"string"},"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"address":{"type":"string"}},"required":["channel","address"]}}}},"data":{"type":"object","description":"Initial form data. File references can be embedded as file-service URNs."},"files":{"type":"object","deprecated":true,"description":"Not used; file references are resolved from the data.","additionalProperties":{"type":"string"}},"submit":{"type":"boolean","description":"Submit the form immediately after it is created."},"dryRun":{"type":"boolean","description":"Validate and simulate the request without saving the form."}},"required":["definitionId"]},"examples":{"applicant":{"summary":"Applicant creates their own draft","value":{"definitionId":"business-licence-application"}},"anonymousApplicant":{"summary":"Intake application creates a draft for an anonymous applicant","value":{"definitionId":"business-licence-application","applicant":{"addressAs":"Test User","channels":[{"channel":"email","address":"test.user@gov.ab.ca"}]}}},"createAndSubmit":{"summary":"Create with data and submit","value":{"definitionId":"business-licence-application","data":{"businessName":"Example Bakery Ltd."},"submit":true}}}}}},"responses":{"200":{"description":"Successfully created a form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the definition has no active intake, or the data is not valid for the definition when the form is submitted.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot create form as there is no active intake."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormDefinitionNotFound"}}}},"/form/v1/forms/{formId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves a form, and its submission if it is submitted. Requires the form-service admin or intake-application role, one of the definition's clerk or assessor roles, or one of its applicant roles for the form's creator (unless the form is archived). Including the data needs the form data access described for `GET /form/v1/forms/{formId}/data`, and fails for locked forms. Core users must set `tenantId`.\n","parameters":[{"name":"includeData","description":"Flag indicating if data should be included in results.","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form"],"description":"Executes a form operation. The user must be able to read the form (see `GET /form/v1/forms/{formId}`), and\neach operation needs a further role:\n- `send-code`: the form-service intake-application role. Sends a verification code to the applicant.\n- `unlock`: the form-service admin role. Only locked forms can be unlocked.\n- `submit`: one of the definition's clerk roles, or an applicant role for the form's creator. Only draft forms\n can be submitted, and the data must be valid for the definition's data schema.\n- `to-draft`: the form-service admin role or one of the definition's assessor roles. Only submitted forms can be\n set back to draft.\n- `archive`: the form-service admin role.\n\nCore users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnlockFormOperation"},{"$ref":"#/components/schemas/SubmitFormOperation"},{"$ref":"#/components/schemas/ArchiveFormOperation"},{"$ref":"#/components/schemas/SendCodeOperation"},{"$ref":"#/components/schemas/SetToDraftOperation"}],"discriminator":{"propertyName":"operation","mapping":{"unlock":"#/components/schemas/UnlockFormOperation","submit":"#/components/schemas/SubmitFormOperation","archive":"#/components/schemas/ArchiveFormOperation","send-code":"#/components/schemas/SendCodeOperation","to-draft":"#/components/schemas/SetToDraftOperation"}}},"examples":{"submit":{"summary":"Submit the form","value":{"operation":"submit"}},"sendCode":{"summary":"Send a verification code to the applicant","value":{"operation":"send-code"}},"unlock":{"summary":"Unlock a locked form","value":{"operation":"unlock"}},"toDraft":{"summary":"Set a submitted form back to draft","value":{"operation":"to-draft"}},"archive":{"summary":"Archive the form","value":{"operation":"archive"}}}}}},"responses":{"200":{"description":"Successfully executed operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"description":"Request is invalid, the form is not in a status that allows the operation, or the data is not valid for the definition on submit.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot submit form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form"],"description":"Deletes a form and its files. Requires the form-service admin role. Draft forms can also be deleted by users with one of the definition's clerk roles, and by their creator with one of the definition's applicant roles. The user must also be able to read the form (see `GET /form/v1/forms/{formId}`). Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully deleted the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/data":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form"],"description":"Retrieves form data. Requires the form-service admin role, one of the definition's applicant roles for the form's creator, one of its clerk roles while the form is a draft, or one of its assessor roles once it is submitted. Alternatively, a user with the form-service intake-application role can provide the verification code sent to the applicant. Locked forms cannot be read. Core users must set `tenantId`.\n","parameters":[{"name":"code","description":"Verification code sent to the applicant with the send-code operation.","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":10}}],"responses":{"200":{"description":"Successfully retrieved the form data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is locked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Locked form cannot be read."}}}},"401":{"description":"Request does not include a valid bearer token, or the provided code could not be verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Provided code could not be verified."}}}},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"put":{"tags":["Form"],"description":"Sets the form data of a draft form. Requires one of the definition's clerk roles, or one of its applicant roles for the form's creator. Files that are no longer referenced in the data are deleted. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Form data. File references can be embedded directly as file-service URNs anywhere in this object."}},"required":["data"]},"example":{"data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}}}},"responses":{"200":{"description":"Successfully updated the form.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormData"}}}},"400":{"description":"Request is invalid, or the form is not a draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Cannot update form not in draft."}}}},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves submissions of a specified form matching search criteria. Requires the form-service admin role,\none of the form definition's assessor roles, or the export-service export-job role. Core users must set\n`tenantId`.\n","parameters":[{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"post":{"tags":["Form Submission"],"description":"Update the form disposition for the form submission. Requires the form-service admin role or one of the definition's assessor roles. The status must match the ID or name of one of the definition's disposition states. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully updated the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dispositionStatus":{"type":"string","minLength":1},"dispositionReason":{"type":"string","minLength":1}},"required":["dispositionStatus","dispositionReason"]},"example":{"dispositionStatus":"approved","dispositionReason":"Application meets all eligibility criteria."}}}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"post":{"tags":["Form Submission"],"description":"Adds a reviewer note to the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000}},"required":["content"]},"example":{"content":"Called applicant to confirm their mailing address."}}}},"responses":{"200":{"description":"Successfully added the note to the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/forms/{formId}/submissions/{submissionId}/notes/{noteId}":{"parameters":[{"$ref":"#/components/parameters/FormIdPath"},{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"name":"noteId","description":"ID of the note.","required":true,"in":"path","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/FormTenantId"}],"delete":{"tags":["Form Submission"],"description":"Removes a reviewer note from the form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully removed the note from the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}}},"/form/v1/registers":{"get":{"tags":["Form"],"description":"Retrieves the data registers that have both a definition and a data document, i.e. the registers manageable through this API. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the list of data registers.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataRegister"}},"example":[{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}]}}},"400":{"description":"Request has no tenant context. A core user must specify the tenantId query parameter."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"502":{"description":"configuration-service returned an unexpected error."}}},"post":{"tags":["Form"],"description":"Creates a new data register: its definition in the shared platform/configuration-service document, followed by its entries in a data-register/<name> configuration document. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterCreate"},"example":{"name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"201":{"description":"Successfully created the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"409":{"description":"A data register with this name already exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/registers/{name}":{"get":{"tags":["Form"],"description":"Retrieves a data register by name. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"200":{"description":"Successfully retrieved the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; it must have both a definition and a data document to be considered to exist.\n"},"502":{"description":"configuration-service returned an unexpected error."}}},"patch":{"tags":["Form"],"description":"Updates the description and/or entries of an existing data register. Only provided fields are changed: sending description alone leaves the entries unchanged, and vice versa. Entries are written to the latest revision; if an older revision is pinned as active, the pin moves to that revision so the new entries are live. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegisterUpdate"},"example":{"description":"Updated list of weekdays","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}}}},"responses":{"200":{"description":"Successfully updated the data register.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRegister"}}}},"400":{"description":"Request is not valid or has no tenant context, or configuration-service rejected the request.\n"},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found."},"502":{"description":"configuration-service returned an unexpected error."}}},"delete":{"tags":["Form"],"description":"Deletes a data register: its entries and its definition. Removes whichever of the two parts still exists, so a retry after a partial failure succeeds. Forms that reference the register in a dropdown or list will lose its options. Requires the form-service admin role or the configuration-service configuration-admin role. Core users with either role must set `tenantId`.\n","parameters":[{"name":"name","description":"Name of the data register to delete.","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"}},{"$ref":"#/components/parameters/FormTenantId"}],"responses":{"204":{"description":"Successfully deleted the data register."},"400":{"description":"Name is not valid, or the request has no tenant context."},"401":{"description":"User is not authenticated."},"403":{"description":"User is not authorized. Requires the form-service admin or configuration-admin role."},"404":{"description":"No data register with this name was found; neither a definition nor a data document exists."},"502":{"description":"configuration-service returned an unexpected error."}}}},"/form/v1/submissions":{"get":{"tags":["Form Submission"],"description":"Retrieves submissions of the tenant matching search criteria. Requires the form-service admin role or the\nexport-service export-job role. Users with one of a definition's assessor roles can retrieve its submissions by\nincluding definitionIdEquals in the criteria. Core users must set `tenantId`.\n","parameters":[{"$ref":"#/components/parameters/FormTenantId"},{"name":"top","description":"Number of submissions to return in a page. Defaults to 100.","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":5000}},{"name":"after","description":"Cursor for retrieving additional pages.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortBy","description":"Column to sort results on. Use 'created', 'submissionStatus', or 'disposition' for submission\nfields, and 'data.' followed by the path into the form data for a data value\n(e.g. 'data.applicant.lastName').\n","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"sortDirection","description":"Direction of the sort. Defaults to descending.","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"criteria","description":"Criteria for form submissions to retrieve, as JSON. Date values must be ISO-8601 strings.","in":"query","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"createDateBefore":{"description":"The form submission create date that it was created before.","type":"string","format":"date-time"},"createDateAfter":{"description":"The form submission create date that it was created after.","type":"string","format":"date-time"},"dispositionStatusEquals":{"description":"The disposition status for the form submission.","type":"string"},"dispositionDateBefore":{"description":"The disposition before date for the form submission was updated.","type":"string","format":"date-time"},"dispositionDateAfter":{"description":"The disposition after date for the form submission was updated","type":"string","format":"date-time"},"createdByIdEquals":{"description":"Name of the user the form submission was created by.","type":"string"},"definitionIdEquals":{"description":"ID of the form definition of the submissions.","type":"string"},"submissionStatusEquals":{"description":"The status of the form submission.","type":"string"},"dispositioned":{"description":"True to only include submissions with a disposition; false to only include submissions without one.","type":"boolean"},"dataCriteria":{"description":"Values to match in the submission data, keyed by the path into the data (e.g. 'applicant.lastName'). Text values are case-insensitive partial matches.\n","type":"object","additionalProperties":true}}},"example":{"definitionIdEquals":"business-licence-application","dispositioned":false}}}}],"responses":{"200":{"description":"Successfully retrieves the form submissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionPage"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}},"/form/v1/submissions/{submissionId}":{"parameters":[{"$ref":"#/components/parameters/FormSubmissionIdPath"},{"$ref":"#/components/parameters/FormTenantId"}],"get":{"tags":["Form Submission"],"description":"Retrieves a form submission. Requires the form-service admin role or one of the definition's assessor roles. Core users must set `tenantId`.\n","responses":{"200":{"description":"Successfully retrieved the form submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"},"404":{"$ref":"#/components/responses/FormNotFound"}}},"delete":{"tags":["Form Submission"],"description":"Deletes a form submission. Requires the form-service admin role. Core users must set `tenantId`. A submission that does not exist responds 200 with `deleted: false`.\n","responses":{"200":{"description":"Successfully deleted the form submission, or no submission was found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDeleteResult"}}}},"400":{"$ref":"#/components/responses/FormBadRequest"},"401":{"$ref":"#/components/responses/FormUnauthorized"},"403":{"$ref":"#/components/responses/FormForbidden"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"parameters":{"FormDefinitionIdPath":{"name":"definitionId","description":"ID of the form definition.","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z0-9-]+$"},"example":"business-licence-application"},"FormIdPath":{"name":"formId","description":"ID of the form.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f"},"FormSubmissionIdPath":{"name":"submissionId","description":"ID of the form submission.","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"example":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"},"FormTenantId":{"name":"tenantId","description":"ID of the tenant to act on. Required for core (platform) users. Tenant users always act on the tenant of their token, and this parameter is ignored for them.\n","in":"query","required":false,"schema":{"type":"string"},"example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"}},"responses":{"FormBadRequest":{"description":"Request is invalid, for example a path, query, or body parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Validation failed with error(s): formId (params) - Invalid value"}}}},"FormDefinitionNotFound":{"description":"Form definition not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"form definition with ID 'business-licence-application' could not be found."}}}},"FormForbidden":{"description":"User does not have the role required for the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"User Test User (ID: 1234) not permitted to find submissions."}}}},"FormNotFound":{"description":"Form definition, form, or submission not found. Forms and submissions of another tenant also respond 404.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormError"},"example":{"errorMessage":"Form submission with ID '5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f' could not be found."}}}},"FormUnauthorized":{"description":"Request does not include a valid bearer token."}},"schemas":{"ArchiveFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["archive"]}}},"DataRegister":{"type":"object","required":["name"],"properties":{"namespace":{"type":"string","description":"Namespace of the data register. Always data-register."},"name":{"type":"string","description":"Name of the data register."},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"List of values stored in the register, from its active revision, or its latest revision if none is active.\n","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"example":{"namespace":"data-register","name":"weekdays","description":"Days of the week","entries":["Monday","Tuesday","Wednesday","Thursday","Friday"]}},"DataRegisterCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the data register. Unique within the tenant. 1 to 50 letters, numbers, spaces, hyphens and underscores, not starting or ending with a space.\n","pattern":"^[a-zA-Z0-9\\-_](?:[a-zA-Z0-9\\-_ ]{0,48}[a-zA-Z0-9\\-_])?$"},"description":{"type":"string","description":"Human-readable description of what the register contains."},"entries":{"type":"array","description":"Initial list of values stored in the register. Defaults to an empty array.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"DataRegisterUpdate":{"type":"object","description":"Partial update payload for a data register. Only provided fields are changed; omitting entries leaves the existing entries unchanged.\n","properties":{"description":{"type":"string","description":"Updated description for the register."},"entries":{"type":"array","description":"Replacement list of values for the register.","items":{"oneOf":[{"type":"string"},{"type":"object"}]}}},"additionalProperties":false},"Form":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"jobId":{"type":"string","nullable":true,"description":"ID of the PDF generation job, when submitting the form generates a PDF."},"definition":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}},"applicant":{"type":"object","nullable":true,"properties":{"addressAs":{"type":"string"}}},"status":{"type":"string","enum":["draft","locked","submitted","archived"]},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"formDraftUrl":{"type":"string","description":"URL of the draft form in the application, based on the definition's formDraftUrlTemplate."},"data":{"type":"object","description":"Form data; only included when requested with includeData."},"files":{"type":"object","description":"Form files as file-service URNs; only included when requested with includeData.","additionalProperties":{"type":"string"}},"dryRun":{"type":"boolean","description":"Indicates the form was created as a dry run and was not saved."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"lastAccessed":{"type":"string","format":"date-time"},"locked":{"type":"string","format":"date-time","nullable":true},"submitted":{"type":"string","format":"date-time","nullable":true},"submission":{"type":"object","description":"submission for the form if form is submitted.","properties":{"id":{"type":"string"},"urn":{"type":"string"}}}},"example":{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","jobId":null,"securityClassification":"protected b","definition":{"id":"business-licence-application","name":"Business licence application","description":"Application for a municipal business licence."},"formDraftUrl":"https://form.alberta.ca/business-licence-application/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","status":"draft","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"locked":null,"submitted":null,"lastAccessed":"2026-10-02T15:04:05.000Z","applicant":{"addressAs":"Test User"}}},"FormData":{"type":"object","properties":{"id":{"type":"string","description":"ID of the form."},"data":{"type":"object"},"files":{"type":"object","description":"File-service URNs of the files referenced in the data, keyed by their path in the data.","additionalProperties":{"type":"string"}}},"example":{"id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","data":{"businessName":"Example Bakery Ltd.","proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"},"files":{"proofOfRegistration":"urn:ads:platform:file-service:v1:/files/3c2b1a0f-9e8d-4c7b-a6f5-e4d3c2b1a0f9"}}},"FormDefinition":{"type":"object","required":["name","anonymousApply","applicantRoles","assessorRoles"],"properties":{"id":{"type":"string","readOnly":true,"description":"Unique identifier for the form definition. Generated from the name in kebab-case when the definition is created, and taken from the path on update.\n"},"revision":{"type":"number","readOnly":true,"description":"Revision of the definition in the configuration service."},"created":{"type":"string","format":"date-time","readOnly":true,"description":"Date the form definition (latest revision) was created. Only returned when listing definitions."},"name":{"type":"string"},"description":{"type":"string"},"anonymousApply":{"type":"boolean","default":false,"description":"Whether anonymous (unauthenticated) applicants can submit the form. Defaults to false."},"oneFormPerApplicant":{"type":"boolean"},"applicantRoles":{"type":"array","description":"Roles allowed to submit the form.","items":{"type":"string"}},"assessorRoles":{"type":"array","description":"Roles allowed to assess submitted forms.","items":{"type":"string"}},"clerkRoles":{"type":"array","description":"Roles allowed to fill in and submit forms on behalf of applicants.","items":{"type":"string"}},"formDraftUrlTemplate":{"type":"string","minLength":6,"maxLength":500,"pattern":"^https?://.+$","description":"Optional URL template for linking applicants back to their draft. Use '{{ id }}' as a placeholder for the form ID (e.g. https://example.com/form/{{ id }}). Must be between 6 and 500 characters.\n"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"},"dispositionStates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}}}},"generatesPdf":{"type":"boolean","readOnly":true,"description":"Whether a PDF is generated for submissions. Anonymous application definitions never generate one."},"submissionRecords":{"type":"boolean"},"submissionPdfTemplate":{"type":"string","writeOnly":true,"description":"PDF service template used for the submission PDF. Not returned by the form APIs."},"scheduledIntakes":{"type":"boolean","description":"Allow this form definition to accept schedule intakes"},"supportTopic":{"type":"boolean"},"registeredId":{"type":"string","readOnly":true},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"],"writeOnly":true,"description":"The security classification for the form definition. Not returned by the form definition APIs."},"queueTaskToProcess":{"type":"object","writeOnly":true,"description":"Task queue that a task is created in for each submission. Not returned by the form APIs.","properties":{"queueNameSpace":{"type":"string"},"queueName":{"type":"string"}}},"customSubmissionEvent":{"type":"object","writeOnly":true,"description":"Additional event sent when a form is submitted. Not returned by the form APIs.","properties":{"namespace":{"type":"string"},"name":{"type":"string"}}},"includeDataInSubmission":{"type":"boolean","writeOnly":true,"description":"Whether submitted data is included in the form-submitted event. Not returned by the form APIs."},"reviewConfiguration":{"type":"object","description":"Ordered form data fields shown as columns in the Form Admin submission and form lists.","additionalProperties":false,"properties":{"columns":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","description":"Dot-separated path of a leaf field in the form data schema.","minLength":1}}}},"questionsEmail":{"type":"string","description":"Address that applicant questions are forwarded to while no reviewer is part of the conversation. Not returned by the form APIs."}}},"registration":{"type":"object","description":"Restricts the form to approved users. When enabled, users submit an access request answering the registration questions, and an administrator approves or denies it.\n","additionalProperties":false,"required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Whether the form is restricted and accepts access requests. Defaults to false."},"accessGroup":{"type":"string","writeOnly":true,"minLength":1,"maxLength":255,"description":"Keycloak group containing the roles needed to access the form. Not returned by the form APIs.\n"},"dataSchema":{"type":"object","description":"JSON schema (draft-07) of the registration questions. Must not define firstName, lastName or email, which are standard fields of every access request.\n"},"uiSchema":{"type":"object","description":"Layout of the registration questions."}}},"dryRun":{"type":"boolean"},"intake":{"type":"object","readOnly":true,"nullable":true,"properties":{"urn":{"type":"string","description":"The urn of the form schedule intake"},"name":{"type":"string","description":"The description of the form schedule intake"},"description":{"type":"string","description":"The description of the form schedule intake"},"start":{"type":"string","format":"date-time","description":"The start date time of the form schedule intake"},"end":{"type":"string","format":"date-time","description":"The end date time of the form schedule intake"},"isAllDay":{"type":"boolean","description":"Is form schedule intake all day"},"isUpcoming":{"type":"boolean","description":"Is the form schedule intake upcoming"}}}},"example":{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"oneFormPerApplicant":true,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"formDraftUrlTemplate":"https://form.alberta.ca/business-licence-application/{{ id }}","dataSchema":{"type":"object","properties":{"businessName":{"type":"string"}},"required":["businessName"]},"uiSchema":{"type":"VerticalLayout","elements":[{"type":"Control","scope":"#/properties/businessName"}]},"dispositionStates":[{"id":"approved","name":"Approved","description":"Licence is approved."}],"generatesPdf":true,"submissionRecords":true,"scheduledIntakes":false,"supportTopic":false,"reviewConfiguration":{"columns":[{"path":"businessName"}]},"registration":{"enabled":false},"intake":null}},"FormDefinitionCreate":{"type":"object","description":"Payload for creating a new form definition. Only name and description are accepted; all other fields are set to defaults.","required":["name"],"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"additionalProperties":false,"example":{"name":"Business licence application","description":"Application for a municipal business licence."}},"FormDefinitionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormDefinition"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"id":"business-licence-application","revision":3,"name":"Business licence application","description":"Application for a municipal business licence.","anonymousApply":false,"applicantRoles":["business-licence-applicant"],"assessorRoles":["business-licence-assessor"],"clerkRoles":[],"created":"2026-09-14T16:20:00.000Z"}],"page":{"next":"MTA=","size":1,"total":24}}},"FormDefinitionPatch":{"type":"object","description":"Partial update payload for a form definition. Only provided fields will be updated; omitted fields will not be changed.","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"dataSchema":{"type":"object"},"uiSchema":{"type":"object"},"registration":{"type":"object","description":"Access request settings, merged into the existing settings. Omitted properties keep their current value, and enabled defaults to false for definitions that have no registration settings yet.\n","additionalProperties":false,"properties":{"enabled":{"type":"boolean","description":"Whether the form is restricted and accepts access requests."},"accessGroup":{"type":"string","writeOnly":true,"minLength":1,"maxLength":255,"description":"Keycloak group containing the roles needed to access the form. Not returned by the form APIs.\n"},"dataSchema":{"type":"object","description":"JSON schema (draft-07) of the registration questions. Must not define firstName, lastName or email, which are standard fields of every access request.\n"},"uiSchema":{"type":"object","description":"Layout of the registration questions."}}}},"additionalProperties":false,"example":{"description":"Application for a municipal business licence, including home-based businesses."}},"FormDeleteResult":{"type":"object","properties":{"deleted":{"type":"boolean"}},"example":{"deleted":true}},"FormDisposition":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"reason":{"type":"string"},"date":{"type":"string","format":"date-time"}}},"FormError":{"type":"object","properties":{"errorMessage":{"type":"string"}}},"FormPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Form"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/forms/5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","id":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","definition":{"id":"business-licence-application","name":"Business licence application"},"status":"submitted","created":"2026-10-02T15:04:05.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"submitted":"2026-10-03T09:30:00.000Z"}],"page":{"next":"MTA=","size":1,"total":312}}},"FormRegistration":{"type":"object","description":"A request for access to a restricted form.","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"formDefinitionId":{"type":"string","readOnly":true},"status":{"type":"string","enum":["pending","approved","denied"],"readOnly":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string","format":"email","description":"Email address of the applicant, stored in lower case."},"data":{"type":"object","description":"Answers to the registration questions of the form definition."},"submittedAt":{"type":"string","format":"date-time","readOnly":true},"reviewedAt":{"type":"string","format":"date-time","nullable":true,"readOnly":true,"description":"Date the request was approved or denied."},"reviewedBy":{"type":"object","nullable":true,"readOnly":true,"description":"Administrator who approved or denied the request.","properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"example":{"id":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01","formDefinitionId":"medical-intake","status":"approved","firstName":"Test","lastName":"User","email":"test.user@gov.ab.ca","data":{"profession":"physician","registrationNumber":"12345"},"submittedAt":"2026-11-12T16:00:00.000Z","reviewedAt":"2026-11-13T09:30:00.000Z","reviewedBy":{"id":"1c0fa56b-f818-4cc7-9254-7513aecb5d9f","name":"Admin User"}}},"FormRegistrationCreate":{"type":"object","additionalProperties":false,"required":["firstName","lastName","email"],"properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email","maxLength":254},"data":{"type":"object","description":"Answers to the registration questions. Validated against the registration data schema of the form definition; properties the schema does not define respond 400.\n"}},"example":{"firstName":"Test","lastName":"User","email":"test.user@gov.ab.ca","data":{"profession":"physician","registrationNumber":"12345"}}},"FormRegistrationPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormRegistration"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}}},"FormRegistrationReview":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["pending","approved","denied"]}},"example":{"status":"approved"}},"FormRegistrationSubmitted":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"formDefinitionId":{"type":"string"},"status":{"type":"string","enum":["pending"]},"submittedAt":{"type":"string","format":"date-time"}},"example":{"id":"6f1c2a9e-3b4d-4c8e-9a2f-1d5e7b8c9a01","formDefinitionId":"medical-intake","status":"pending","submittedAt":"2026-11-12T16:00:00.000Z"}},"FormResultsPageInfo":{"type":"object","properties":{"after":{"type":"string","description":"Cursor of this page."},"next":{"type":"string","description":"Cursor of the next page. Not set on the last page."},"size":{"type":"number","description":"Number of results in this page."},"total":{"type":"number","description":"Total number of available results before filters are applied."}},"example":{"next":"MTA=","size":1,"total":24}},"FormSubmission":{"type":"object","properties":{"urn":{"type":"string"},"id":{"type":"string"},"formId":{"type":"string"},"formDefinitionId":{"type":"string"},"formDefinitionRevision":{"type":"number","description":"Revision of the form definition the form was submitted with."},"formData":{"type":"object"},"formFiles":{"type":"object","additionalProperties":{"type":"string"}},"securityClassification":{"type":"string","enum":["public","protected a","protected b","protected c"]},"hash":{"type":"string","description":"Hash of the submitted data."},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updatedBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"updated":{"type":"string","format":"date-time"},"disposition":{"$ref":"#/components/schemas/FormDisposition"},"notes":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmissionNote"}}},"example":{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"formFiles":{},"securityClassification":"protected b","hash":"2fd4e1c67a2d28fced849ee1bb76e7391b93eb12","created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"updated":"2026-10-06T14:00:00.000Z","updatedBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"},"disposition":{"id":"9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a","status":"Approved","reason":"Application meets all eligibility criteria.","date":"2026-10-06T14:00:00.000Z"},"notes":[{"id":"7b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e","content":"Called applicant to confirm their mailing address.","created":"2026-10-05T10:15:00.000Z","createdBy":{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","name":"Test Assessor"}}]}},"FormSubmissionCriteria":{"type":"object","properties":{"createDateBefore":{"type":"string","format":"date-time"},"createDateAfter":{"type":"string","format":"date-time"},"dispositioned":{"type":"boolean"},"dispositionStatusEquals":{"type":"string"},"dispositionDateBefore":{"type":"string","format":"date-time"},"dispositionDateAfter":{"type":"string","format":"date-time"},"createdByIdEquals":{"type":"string"}}},"FormSubmissionNote":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"created":{"type":"string","format":"date-time"},"createdBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}},"FormSubmissionPage":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}},"page":{"$ref":"#/components/schemas/FormResultsPageInfo"}},"example":{"results":[{"urn":"urn:ads:platform:form-service:v1:/submissions/6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","id":"6a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","formId":"5f1e2d3c-4b5a-4f6e-8d7c-9b0a1c2d3e4f","formDefinitionId":"business-licence-application","formDefinitionRevision":3,"formData":{"businessName":"Example Bakery Ltd."},"created":"2026-10-03T09:30:00.000Z","createdBy":{"id":"0f9e8d7c-6b5a-4f3e-9d2c-1b0a9f8e7d6c","name":"Test User"},"disposition":null,"notes":[]}],"page":{"next":"MTAw","size":1,"total":87}}},"PutIntakeParameters":{"type":"object","description":"Payload for updating schedule intake","required":["name","calendarEventId","start","end"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"calendarEventId":{"type":"integer","description":"ID of the calendar service event for the intake period."}},"example":{"name":"Spring intake","calendarEventId":42,"start":"2026-10-01T15:00:00.000Z","end":"2026-10-31T23:00:00.000Z"}},"SendCodeOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["send-code"]}}},"SetToDraftOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["to-draft"]}}},"SubmitFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["submit"]},"dryRun":{"type":"boolean","description":"Validate and simulate the submission without saving it."}}},"UnlockFormOperation":{"type":"object","properties":{"operation":{"type":"string","enum":["unlock"]}}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Form","description":"API to managed forms."},{"name":"Form Submission","description":"API to review and disposition form submissions."},{"name":"Form schedules","description":"API to manage the scheduled intake periods of form definitions."},{"name":"Form registration","description":"API to request access to restricted forms and to approve or deny those requests."}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"openapi":"3.0.0","info":{"title":"Tenant management service","version":"0.0.0","description":"The tenant management service includes APIs for common platform capabilities like retrieving tenant information."},"paths":{"/api/tenant/v1":{"post":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use POST /api/tenant/v2/tenants, which shares this endpoint's implementation but also validates the name length and characters. Creates a tenant. Requires the core realm beta-tester or tenant-service-admin role; tenant users are rejected even with those roles.\n\nBy default a new realm is created for the tenant, with the current user as the administrator; the response is sent with status 202 while the realm is provisioned. Users with the tenant-service-admin role can instead set realm to associate the tenant with an existing realm, in which case adminEmail is required and the response is sent with status 200. Only tenant-service-admin users can set realm or adminEmail.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the tenant. Must be unique (ignoring case) and must not contain special characters such as ! & % - or /.\n"},"realm":{"type":"string","description":"Existing realm to associate with the tenant. Requires the tenant-service-admin role."},"adminEmail":{"type":"string","format":"email","description":"Email of the tenant administrator. Requires the tenant-service-admin role."}}},"examples":{"newRealm":{"summary":"Create a tenant with a new realm","value":{"name":"Test Tenant"}},"existingRealm":{"summary":"Associate an existing realm (tenant-service-admin only)","value":{"name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","adminEmail":"test.admin@gov.ab.ca"}}}}}},"responses":{"200":{"description":"Tenant is created with an existing realm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"202":{"description":"Tenant is created and its realm is being provisioned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"provisioning","adminEmail":"test.admin@gov.ab.ca"}}}},"400":{"description":"The name is missing, the name is invalid or already used, the administrator already has a tenant, or the realm is already associated with a tenant or set without adminEmail.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TenantV1ValidationError"},{"$ref":"#/components/schemas/TenantError"}]},"examples":{"missingName":{"summary":"Name is missing","value":{"success":false,"errors":[{"property":"name","constraints":{"isDefined":"name should not be null or undefined"}}]}},"nameUsed":{"summary":"Name is already used","value":{"errorMessage":"Value not valid for Tenant name: This tenant name has already been used. Please enter a different tenant name."}}}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"}}},"delete":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use DELETE /api/tenant/v2/tenants/{id}, after looking up the tenant ID with GET /api/tenant/v2/tenants?realm={realm}. Deletes the tenant with the given realm, and the realm. Requires the core realm tenant-service-admin role.\n","parameters":[{"in":"query","name":"realm","required":true,"description":"Realm of the tenant to delete.","schema":{"type":"string"},"example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}],"responses":{"200":{"description":"Tenant deletion completed. success is false if the realm or the tenant record wasn't deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeleteResult"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"description":"No tenant has the realm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"tenant with ID 'realm: 2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f' could not be found."}}}}}}},"/api/tenant/v1/email":{"post":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants?adminEmail={email}, which limits tenant users to their own tenant. Retrieves the tenant with the given administrator email. Available to any authenticated user of any tenant or the core realm; no role is required.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Email of the tenant administrator."}}},"example":{"email":"test.admin@gov.ab.ca"}}}},"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v1/name":{"post":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants?name={name}, which limits tenant users to their own tenant. Retrieves the tenant with the given name, ignoring case. Available to any authenticated user of any tenant or the core realm; no role is required.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the tenant."}}},"example":{"name":"Test Tenant"}}}},"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v1/realm/roles":{"get":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; there is no v2 replacement. Returns the Keycloak roles of the realm that issued the current user's token, which is the user's own tenant realm. Requires the tenant-admin role.\n","responses":{"200":{"description":"Roles of the realm.","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/TenantRealmRole"}}}},"example":{"roles":[{"id":"0b9a6c2e-7d4f-4e1a-9c3b-5a8d2f6e1c7b","name":"offline_access","description":"${role_offline-access}","composite":false,"clientRole":false,"containerId":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}]}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"}}}},"/api/tenant/v1/realm/{realm}":{"get":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants?realm={realm}, which limits tenant users to their own tenant. Retrieves a tenant by realm. Available to any authenticated user of any tenant or the core realm; no role is required.\n","parameters":[{"in":"path","name":"realm","required":true,"description":"Realm of the tenant.","schema":{"type":"string"},"example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}],"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResult"}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v1/user/default-idp":{"get":{"tags":["Tenant service"],"description":"Internal endpoint used by the tenant admin webapp. Checks if the given user in the core realm is linked to the default ADSP identity provider. Requires the tenant-admin role and is rate limited.\n","parameters":[{"in":"query","name":"userId","required":true,"description":"ID of the user in the core realm.","schema":{"type":"string"},"example":"3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a"}],"responses":{"200":{"description":"Whether the user is linked to the default identity provider in the core realm.","content":{"application/json":{"schema":{"type":"object","properties":{"hasDefaultIdpInCore":{"type":"boolean"}}},"example":{"hasDefaultIdpInCore":true}}}},"400":{"description":"userId is missing, or the identity providers of the user could not be read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TenantV1ValidationError"},{"$ref":"#/components/schemas/TenantError"}]},"examples":{"missingUserId":{"summary":"userId is missing","value":{"success":false,"errors":[{"property":"userId","constraints":{"isDefined":"userId should not be null or undefined"}}]}},"checkFailed":{"summary":"Identity providers could not be read","value":{"errorMessage":"Failed to check the goa-ad IdP in core for user 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a due to Request failed with status code 404"}}}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v1/user/id":{"get":{"tags":["Tenant service"],"description":"Internal endpoint used by the tenant admin webapp. Looks up the ID of the user with the given email in a realm, which defaults to the core realm. Requires the tenant-admin role and is rate limited.\n","parameters":[{"in":"query","name":"email","required":true,"description":"Email of the user.","schema":{"type":"string"},"example":"test.user@gov.ab.ca"},{"in":"query","name":"realm","required":false,"description":"Realm to look up the user in. Defaults to core.","schema":{"type":"string"},"example":"core"}],"responses":{"200":{"description":"ID of the user, or null if there is no user with the email.","content":{"application/json":{"schema":{"type":"object","properties":{"userIdInCore":{"type":"string","nullable":true}}},"example":{"userIdInCore":"3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v1/user/idp":{"delete":{"tags":["Tenant service"],"description":"Internal endpoint used by the tenant admin webapp. Removes the link between a user and an identity provider in a realm. Requires the tenant-admin role and is rate limited.\n","parameters":[{"in":"query","name":"userId","required":true,"description":"ID of the user in the realm.","schema":{"type":"string"},"example":"3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a"},{"in":"query","name":"realm","required":true,"description":"Realm of the user.","schema":{"type":"string"},"example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"},{"in":"query","name":"idpName","required":false,"description":"Alias of the identity provider. Defaults to goa-ad.","schema":{"type":"string"},"example":"goa-ad"}],"responses":{"200":{"description":"Identity provider link removed.","content":{"text/plain":{"schema":{"type":"string"},"example":"OK"}}},"400":{"description":"A required parameter is missing, or the identity provider link could not be removed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TenantV1ValidationError"},{"$ref":"#/components/schemas/TenantError"}]},"examples":{"missingRealm":{"summary":"realm is missing","value":{"success":false,"errors":[{"property":"realm","constraints":{"isDefined":"realm should not be null or undefined"}}]}},"removeFailed":{"summary":"Link could not be removed","value":{"errorMessage":"Failed to delete the IdP goa-ad from user 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a due to Request failed with status code 404"}}}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v1/{id}":{"get":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants/{id}, which limits tenant users to their own tenant. Retrieves a tenant by ID. Available to any authenticated user of any tenant or the core realm, and not limited to the user's own tenant; no role is required.\n","parameters":[{"in":"path","name":"id","required":true,"description":"ID of the tenant, without the URN prefix.","schema":{"type":"string"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"}],"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResult"}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v2/tenants":{"get":{"tags":["Tenant service"],"description":"Search for active tenants; tenants that are still provisioning are not included. No role is required. Authenticated tenant users only find their own tenant; authenticated core users, including service accounts, can find any tenant.\n\nAnonymous requests (without a valid bearer token) are allowed if they include the name or realm criteria, and the results do not include the administrator email.\n","security":[{},{"accessToken":[]}],"parameters":[{"in":"query","name":"name","schema":{"type":"string","minLength":1,"maxLength":50},"description":"Name of the tenant, matched as a whole and ignoring case.","example":"Test Tenant"},{"in":"query","name":"realm","schema":{"type":"string","minLength":1,"maxLength":50},"description":"Realm of the tenant.","example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"},{"in":"query","name":"adminEmail","schema":{"type":"string","format":"email"},"description":"Email of the tenant administrator. Anonymous requests must also include name or realm.","example":"test.admin@gov.ab.ca"}],"responses":{"200":{"description":"Matching tenants.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Tenant"}},"page":{"type":"object","properties":{"size":{"type":"number"}}}}},"examples":{"authenticated":{"summary":"Authenticated request","value":{"results":[{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}],"page":{"size":1}}},"anonymous":{"summary":"Anonymous request, without the administrator email","value":{"results":[{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active"}],"page":{"size":1}}}}}}},"400":{"$ref":"#/components/responses/TenantBadRequest"},"401":{"description":"Anonymous request does not include name or realm criteria.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Request must include realm id or name criteria."}}}}}},"post":{"tags":["Tenant service"],"description":"Create a tenant. Requires the core realm beta-tester or tenant-service-admin role; tenant users are rejected even with those roles.\n\nBy default a new realm is created for the tenant, with the current user as the administrator; the response is sent with status 202 while the realm is provisioned, and a beta-tester who is already the administrator of a tenant is rejected. Users with the tenant-service-admin role can instead set realm to associate the tenant with an existing realm, in which case adminEmail is required and the response is sent with status 200. Only tenant-service-admin users can set realm or adminEmail.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[0-9a-zA-Z _]{1,50}$","description":"Name of the tenant. Must be unique, ignoring case."},"realm":{"type":"string","nullable":true,"minLength":1,"maxLength":50,"description":"Existing realm to associate with the tenant. Requires the tenant-service-admin role."},"adminEmail":{"type":"string","nullable":true,"format":"email","description":"Email of the tenant administrator. Requires the tenant-service-admin role."}}},"examples":{"newRealm":{"summary":"Create a tenant with a new realm","value":{"name":"Test Tenant"}},"existingRealm":{"summary":"Associate an existing realm (tenant-service-admin only)","value":{"name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","adminEmail":"test.admin@gov.ab.ca"}}}}}},"responses":{"200":{"description":"Tenant created with an existing realm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"202":{"description":"Tenant created and its realm is being provisioned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"provisioning","adminEmail":"test.admin@gov.ab.ca"}}}},"400":{"description":"Request is invalid, for example the name is invalid or already used, the administrator already has a tenant, or the realm is already associated with a tenant or set without adminEmail.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"examples":{"invalidName":{"summary":"Name failed validation","value":{"errorMessage":"Validation failed with error(s): name (body) - Invalid value"}},"nameUsed":{"summary":"Name is already used","value":{"errorMessage":"Value not valid for Tenant name: This tenant name has already been used. Please enter a different tenant name."}},"adminHasTenant":{"summary":"Administrator already has a tenant","value":{"errorMessage":"test.admin@gov.ab.ca is the tenant admin in our record. One user can create only one realm."}}}}}},"401":{"description":"Request does not include a valid bearer token, the user does not have the required role, or a user without the tenant-service-admin role set realm or adminEmail.\n","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"},"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"tenant-service-admin role needed!"}}}}}}},"/api/tenant/v2/tenants/{id}":{"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"ID of the tenant, without the URN prefix.","example":"61f2e3a8c9b1d2e3f4a5b6c7"}],"get":{"tags":["Tenant service"],"description":"Retrieves a tenant. No role is required, but the request must be authenticated. Tenant users can only retrieve their own tenant, and get 403 for any other tenant ID; core users can retrieve any tenant.\n","responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"403":{"description":"Tenant user is not permitted to retrieve another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"User Test User (ID: 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a) not permitted to get tenant."}}}},"404":{"$ref":"#/components/responses/TenantNotFound"}}},"delete":{"tags":["Tenant service"],"description":"Deletes a tenant and its realm. Requires the core realm tenant-service-admin role, which can delete any tenant; tenant users are rejected.\n","responses":{"200":{"description":"Tenant deletion completed. success is false if the realm or the tenant record wasn't deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantDeleteResult"}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v2/tenants/{id}/name":{"parameters":[{"in":"path","name":"id","required":true,"description":"ID of the tenant, without the URN prefix.","schema":{"type":"string"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"}],"patch":{"tags":["Tenant service"],"description":"Update the tenant name. Requires the core realm tenant-service-admin role, which can rename any tenant; tenant users, including tenant administrators, are rejected. Rate limited.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[0-9a-zA-Z _]{1,50}$"}}},"example":{"name":"Renamed Tenant"}}}},"responses":{"200":{"description":"Updated tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Renamed Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}}}},"400":{"$ref":"#/components/responses/TenantBadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"TenantBadRequest":{"description":"Request is invalid, for example a parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Validation failed with error(s): name (body) - Invalid value"}}}},"TenantNotFound":{"description":"Tenant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Tenant with ID '61f2e3a8c9b1d2e3f4a5b6c7' could not be found."}}}},"TenantTooManyRequests":{"description":"Too many requests; limited to 200 requests per 5 minutes.","content":{"text/plain":{"schema":{"type":"string"},"example":"Too many requests, please try again later."}}},"TenantUnauthorized":{"description":"Request does not include a valid bearer token, or the user does not have the role required for the operation. Role checks in this API respond with 401 rather than 403.\n","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"}}},"TenantV1BadRequest":{"description":"A required parameter is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantV1ValidationError"}}}}},"schemas":{"Tenant":{"type":"object","properties":{"id":{"type":"string","readOnly":true,"description":"URN of the tenant.","example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"name":{"type":"string","example":"Test Tenant"},"realm":{"type":"string","description":"Keycloak realm of the tenant, which is the issuer of the tenant's access tokens.","example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"},"status":{"type":"string","readOnly":true,"enum":["provisioning","active"],"description":"Status of the tenant; a new tenant is provisioning until its realm has been created.","example":"active"},"adminEmail":{"type":"string","description":"Email of the tenant administrator. Not included for anonymous requests.","example":"test.admin@gov.ab.ca"}},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}},"TenantDeleteResult":{"type":"object","properties":{"deletedRealm":{"type":"boolean"},"deletedTenant":{"type":"boolean"},"success":{"type":"boolean"}},"example":{"deletedRealm":true,"deletedTenant":true,"success":true}},"TenantError":{"type":"object","properties":{"errorMessage":{"type":"string"}},"example":{"errorMessage":"Tenant with ID '61f2e3a8c9b1d2e3f4a5b6c7' could not be found."}},"TenantRealmRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"composite":{"type":"boolean"},"clientRole":{"type":"boolean"},"containerId":{"type":"string"}},"example":{"id":"0b9a6c2e-7d4f-4e1a-9c3b-5a8d2f6e1c7b","name":"offline_access","description":"${role_offline-access}","composite":false,"clientRole":false,"containerId":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}},"TenantResult":{"type":"object","properties":{"success":{"type":"boolean"},"tenant":{"$ref":"#/components/schemas/Tenant"}},"example":{"success":true,"tenant":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}}},"TenantV1ValidationError":{"type":"object","properties":{"success":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"property":{"type":"string"},"constraints":{"type":"object","additionalProperties":{"type":"string"}}}}}},"example":{"success":false,"errors":[{"property":"email","constraints":{"isDefined":"email should not be null or undefined"}}]}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Tenant service","description":"Tenant API to store and read tenant information."}]}
|
|
1
|
+
{"openapi":"3.0.0","info":{"title":"Tenant management service","version":"0.0.0","description":"The tenant management service includes APIs for common platform capabilities like retrieving tenant information."},"paths":{"/api/tenant/v1":{"post":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use POST /api/tenant/v2/tenants, which shares this endpoint's implementation but also validates the name length and characters. Creates a tenant. Requires the core realm beta-tester or tenant-service-admin role; tenant users are rejected even with those roles.\n\nBy default a new realm is created for the tenant, with the current user as the administrator; the response is sent with status 202 while the realm is provisioned. Users with the tenant-service-admin role can instead set realm to associate the tenant with an existing realm, in which case adminEmail is required and the response is sent with status 200. Only tenant-service-admin users can set realm or adminEmail.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the tenant. Must be unique (ignoring case) and must not contain special characters such as ! & % - or /.\n"},"realm":{"type":"string","description":"Existing realm to associate with the tenant. Requires the tenant-service-admin role."},"adminEmail":{"type":"string","format":"email","description":"Email of the tenant administrator. Requires the tenant-service-admin role."}}},"examples":{"newRealm":{"summary":"Create a tenant with a new realm","value":{"name":"Test Tenant"}},"existingRealm":{"summary":"Associate an existing realm (tenant-service-admin only)","value":{"name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","adminEmail":"test.admin@gov.ab.ca"}}}}}},"responses":{"200":{"description":"Tenant is created with an existing realm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"202":{"description":"Tenant is created and its realm is being provisioned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"provisioning","adminEmail":"test.admin@gov.ab.ca"}}}},"400":{"description":"The name is missing, the name is invalid or already used, the administrator already has a tenant, or the realm is already associated with a tenant or set without adminEmail.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TenantV1ValidationError"},{"$ref":"#/components/schemas/TenantError"}]},"examples":{"missingName":{"summary":"Name is missing","value":{"success":false,"errors":[{"property":"name","constraints":{"isDefined":"name should not be null or undefined"}}]}},"nameUsed":{"summary":"Name is already used","value":{"errorMessage":"Value not valid for Tenant name: This tenant name has already been used. Please enter a different tenant name."}}}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"}}},"delete":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use DELETE /api/tenant/v2/tenants/{id}, after looking up the tenant ID with GET /api/tenant/v2/tenants?realm={realm}. Archives the tenant with the given realm and disables the realm; the tenant is not deleted. Requires the core realm tenant-service-admin role.\n","parameters":[{"in":"query","name":"realm","required":true,"description":"Realm of the tenant to archive.","schema":{"type":"string"},"example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}],"responses":{"200":{"description":"The archived tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"description":"No tenant has the realm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"tenant with ID 'realm: 2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f' could not be found."}}}}}}},"/api/tenant/v1/email":{"post":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants?adminEmail={email}, which limits tenant users to their own tenant. Retrieves the tenant with the given administrator email. Available to any authenticated user of any tenant or the core realm; no role is required.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Email of the tenant administrator."}}},"example":{"email":"test.admin@gov.ab.ca"}}}},"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v1/name":{"post":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants?name={name}, which limits tenant users to their own tenant. Retrieves the tenant with the given name, ignoring case. Available to any authenticated user of any tenant or the core realm; no role is required.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name of the tenant."}}},"example":{"name":"Test Tenant"}}}},"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v1/realm/roles":{"get":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; there is no v2 replacement. Returns the Keycloak roles of the realm that issued the current user's token, which is the user's own tenant realm. Requires the tenant-admin role.\n","responses":{"200":{"description":"Roles of the realm.","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/TenantRealmRole"}}}},"example":{"roles":[{"id":"0b9a6c2e-7d4f-4e1a-9c3b-5a8d2f6e1c7b","name":"offline_access","description":"${role_offline-access}","composite":false,"clientRole":false,"containerId":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}]}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"}}}},"/api/tenant/v1/realm/{realm}":{"get":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants?realm={realm}, which limits tenant users to their own tenant. Retrieves a tenant by realm. Available to any authenticated user of any tenant or the core realm; no role is required.\n","parameters":[{"in":"path","name":"realm","required":true,"description":"Realm of the tenant.","schema":{"type":"string"},"example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}],"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResult"}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v1/user/default-idp":{"get":{"tags":["Tenant service"],"description":"Internal endpoint used by the tenant admin webapp. Checks if the given user in the core realm is linked to the default ADSP identity provider. Requires the tenant-admin role and is rate limited.\n","parameters":[{"in":"query","name":"userId","required":true,"description":"ID of the user in the core realm.","schema":{"type":"string"},"example":"3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a"}],"responses":{"200":{"description":"Whether the user is linked to the default identity provider in the core realm.","content":{"application/json":{"schema":{"type":"object","properties":{"hasDefaultIdpInCore":{"type":"boolean"}}},"example":{"hasDefaultIdpInCore":true}}}},"400":{"description":"userId is missing, or the identity providers of the user could not be read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TenantV1ValidationError"},{"$ref":"#/components/schemas/TenantError"}]},"examples":{"missingUserId":{"summary":"userId is missing","value":{"success":false,"errors":[{"property":"userId","constraints":{"isDefined":"userId should not be null or undefined"}}]}},"checkFailed":{"summary":"Identity providers could not be read","value":{"errorMessage":"Failed to check the goa-ad IdP in core for user 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a due to Request failed with status code 404"}}}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v1/user/id":{"get":{"tags":["Tenant service"],"description":"Internal endpoint used by the tenant admin webapp. Looks up the ID of the user with the given email in a realm, which defaults to the core realm. Requires the tenant-admin role and is rate limited.\n","parameters":[{"in":"query","name":"email","required":true,"description":"Email of the user.","schema":{"type":"string"},"example":"test.user@gov.ab.ca"},{"in":"query","name":"realm","required":false,"description":"Realm to look up the user in. Defaults to core.","schema":{"type":"string"},"example":"core"}],"responses":{"200":{"description":"ID of the user, or null if there is no user with the email.","content":{"application/json":{"schema":{"type":"object","properties":{"userIdInCore":{"type":"string","nullable":true}}},"example":{"userIdInCore":"3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a"}}}},"400":{"$ref":"#/components/responses/TenantV1BadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v1/user/idp":{"delete":{"tags":["Tenant service"],"description":"Internal endpoint used by the tenant admin webapp. Removes the link between a user and an identity provider in a realm. Requires the tenant-admin role and is rate limited.\n","parameters":[{"in":"query","name":"userId","required":true,"description":"ID of the user in the realm.","schema":{"type":"string"},"example":"3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a"},{"in":"query","name":"realm","required":true,"description":"Realm of the user.","schema":{"type":"string"},"example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"},{"in":"query","name":"idpName","required":false,"description":"Alias of the identity provider. Defaults to goa-ad.","schema":{"type":"string"},"example":"goa-ad"}],"responses":{"200":{"description":"Identity provider link removed.","content":{"text/plain":{"schema":{"type":"string"},"example":"OK"}}},"400":{"description":"A required parameter is missing, or the identity provider link could not be removed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TenantV1ValidationError"},{"$ref":"#/components/schemas/TenantError"}]},"examples":{"missingRealm":{"summary":"realm is missing","value":{"success":false,"errors":[{"property":"realm","constraints":{"isDefined":"realm should not be null or undefined"}}]}},"removeFailed":{"summary":"Link could not be removed","value":{"errorMessage":"Failed to delete the IdP goa-ad from user 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a due to Request failed with status code 404"}}}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v1/{id}":{"get":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants/{id}, which limits tenant users to their own tenant. Retrieves a tenant by ID. Available to any authenticated user of any tenant or the core realm, and not limited to the user's own tenant; no role is required.\n","parameters":[{"in":"path","name":"id","required":true,"description":"ID of the tenant, without the URN prefix.","schema":{"type":"string"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"}],"responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResult"}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v2/tenants":{"get":{"tags":["Tenant service"],"description":"Search for active tenants; tenants that are still provisioning or archived are not included. No role is required. Authenticated tenant users only find their own tenant; authenticated core users, including service accounts, can find any tenant.\n\nArchived tenants are only returned when status is archived, which requires the core realm tenant-service-admin role.\n\nAnonymous requests (without a valid bearer token) are allowed if they include the name or realm criteria, and the results do not include the administrator email.\n","security":[{},{"accessToken":[]}],"parameters":[{"in":"query","name":"name","schema":{"type":"string","minLength":1,"maxLength":50},"description":"Name of the tenant, matched as a whole and ignoring case.","example":"Test Tenant"},{"in":"query","name":"realm","schema":{"type":"string","minLength":1,"maxLength":50},"description":"Realm of the tenant.","example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"},{"in":"query","name":"adminEmail","schema":{"type":"string","format":"email"},"description":"Email of the tenant administrator. Anonymous requests must also include name or realm.","example":"test.admin@gov.ab.ca"},{"in":"query","name":"status","schema":{"type":"string","enum":["active","archived"]},"description":"Status of the tenants to find. Archived requires the core realm tenant-service-admin role."}],"responses":{"200":{"description":"Matching tenants.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Tenant"}},"page":{"type":"object","properties":{"size":{"type":"number"}}}}},"examples":{"authenticated":{"summary":"Authenticated request","value":{"results":[{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}],"page":{"size":1}}},"anonymous":{"summary":"Anonymous request, without the administrator email","value":{"results":[{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active"}],"page":{"size":1}}}}}}},"400":{"$ref":"#/components/responses/TenantBadRequest"},"401":{"description":"Anonymous request does not include name or realm criteria, or the request for archived tenants is not from a core tenant-service-admin.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Request must include realm id or name criteria."}}}}}},"post":{"tags":["Tenant service"],"description":"Create a tenant. Requires the core realm beta-tester or tenant-service-admin role; tenant users are rejected even with those roles.\n\nBy default a new realm is created for the tenant, with the current user as the administrator; the response is sent with status 202 while the realm is provisioned, and a beta-tester who is already the administrator of a tenant is rejected. Users with the tenant-service-admin role can instead set realm to associate the tenant with an existing realm, in which case adminEmail is required and the response is sent with status 200. Only tenant-service-admin users can set realm or adminEmail.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[0-9a-zA-Z _]{1,50}$","description":"Name of the tenant. Must be unique, ignoring case."},"realm":{"type":"string","nullable":true,"minLength":1,"maxLength":50,"description":"Existing realm to associate with the tenant. Requires the tenant-service-admin role."},"adminEmail":{"type":"string","nullable":true,"format":"email","description":"Email of the tenant administrator. Requires the tenant-service-admin role."}}},"examples":{"newRealm":{"summary":"Create a tenant with a new realm","value":{"name":"Test Tenant"}},"existingRealm":{"summary":"Associate an existing realm (tenant-service-admin only)","value":{"name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","adminEmail":"test.admin@gov.ab.ca"}}}}}},"responses":{"200":{"description":"Tenant created with an existing realm.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"202":{"description":"Tenant created and its realm is being provisioned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"provisioning","adminEmail":"test.admin@gov.ab.ca"}}}},"400":{"description":"Request is invalid, for example the name is invalid or already used, the administrator already has a tenant, or the realm is already associated with a tenant or set without adminEmail.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"examples":{"invalidName":{"summary":"Name failed validation","value":{"errorMessage":"Validation failed with error(s): name (body) - Invalid value"}},"nameUsed":{"summary":"Name is already used","value":{"errorMessage":"Value not valid for Tenant name: This tenant name has already been used. Please enter a different tenant name."}},"adminHasTenant":{"summary":"Administrator already has a tenant","value":{"errorMessage":"test.admin@gov.ab.ca is the tenant admin in our record. One user can create only one realm."}}}}}},"401":{"description":"Request does not include a valid bearer token, the user does not have the required role, or a user without the tenant-service-admin role set realm or adminEmail.\n","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"},"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"tenant-service-admin role needed!"}}}}}}},"/api/tenant/v2/tenants/{id}":{"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"ID of the tenant, without the URN prefix.","example":"61f2e3a8c9b1d2e3f4a5b6c7"}],"get":{"tags":["Tenant service"],"description":"Retrieves a tenant. No role is required, but the request must be authenticated. Tenant users can only retrieve their own tenant, and get 403 for any other tenant ID; core users can retrieve any tenant.\n","responses":{"200":{"description":"Tenant information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"403":{"description":"Tenant user is not permitted to retrieve another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"User Test User (ID: 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a) not permitted to get tenant."}}}},"404":{"$ref":"#/components/responses/TenantNotFound"}}},"delete":{"tags":["Tenant service"],"description":"Archives a tenant: its realm is disabled, so users can no longer sign in, and the tenant and realm are retained. Archiving an archived tenant has no effect. Use the restore endpoint to recover an archived tenant. Requires the core realm tenant-service-admin role, which can archive any tenant; tenant users are rejected.\n\nSet purge to true to permanently delete an archived tenant and its realm. Purge also requires the core realm tenant-purge role and responds 400 if the tenant is not archived.\n","parameters":[{"in":"query","name":"purge","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Permanently delete the archived tenant and its realm."}],"responses":{"200":{"description":"The archived tenant, or for purge the result of the deletion. success is false if the realm or the tenant record wasn't deleted.\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Tenant"},{"$ref":"#/components/schemas/TenantDeleteResult"}]}}}},"400":{"description":"Request is invalid, for example the tenant is not archived for purge, or is still provisioning.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Tenant must be archived before it can be purged."}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"403":{"description":"Purge was requested without the core realm tenant-purge role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"User Test User (ID: 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a) not permitted to purge tenant."}}}},"404":{"$ref":"#/components/responses/TenantNotFound"}}}},"/api/tenant/v2/tenants/{id}/name":{"parameters":[{"in":"path","name":"id","required":true,"description":"ID of the tenant, without the URN prefix.","schema":{"type":"string"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"}],"patch":{"tags":["Tenant service"],"description":"Update the tenant name. Requires the core realm tenant-service-admin role, which can rename any tenant; tenant users, including tenant administrators, are rejected. Rate limited.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[0-9a-zA-Z _]{1,50}$"}}},"example":{"name":"Renamed Tenant"}}}},"responses":{"200":{"description":"Updated tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Renamed Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}}}},"400":{"$ref":"#/components/responses/TenantBadRequest"},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v2/tenants/{id}/restore":{"parameters":[{"in":"path","name":"id","required":true,"description":"ID of the tenant, without the URN prefix.","schema":{"type":"string"},"example":"61f2e3a8c9b1d2e3f4a5b6c7"}],"post":{"tags":["Tenant service"],"description":"Restores an archived tenant: its realm is enabled again and its status is active. Requires the core realm tenant-service-admin role; tenant users are rejected.\n","responses":{"200":{"description":"The restored tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}}},"400":{"description":"The tenant is not archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Only an archived tenant can be restored."}}}},"401":{"$ref":"#/components/responses/TenantUnauthorized"},"404":{"$ref":"#/components/responses/TenantNotFound"}}}}},"components":{"securitySchemes":{"accessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"TenantBadRequest":{"description":"Request is invalid, for example a parameter failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Validation failed with error(s): name (body) - Invalid value"}}}},"TenantNotFound":{"description":"Tenant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"Tenant with ID '61f2e3a8c9b1d2e3f4a5b6c7' could not be found."}}}},"TenantTooManyRequests":{"description":"Too many requests; limited to 200 requests per 5 minutes.","content":{"text/plain":{"schema":{"type":"string"},"example":"Too many requests, please try again later."}}},"TenantUnauthorized":{"description":"Request does not include a valid bearer token, or the user does not have the role required for the operation. Role checks in this API respond with 401 rather than 403.\n","content":{"text/plain":{"schema":{"type":"string"},"example":"Unauthorized"}}},"TenantV1BadRequest":{"description":"A required parameter is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantV1ValidationError"}}}}},"schemas":{"Tenant":{"type":"object","properties":{"id":{"type":"string","readOnly":true,"description":"URN of the tenant.","example":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7"},"name":{"type":"string","example":"Test Tenant"},"realm":{"type":"string","description":"Keycloak realm of the tenant, which is the issuer of the tenant's access tokens.","example":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"},"status":{"type":"string","readOnly":true,"enum":["provisioning","active","archived"],"description":"Status of the tenant; a new tenant is provisioning until its realm has been created. An archived tenant has its realm disabled.\n","example":"active"},"adminEmail":{"type":"string","description":"Email of the tenant administrator. Not included for anonymous requests.","example":"test.admin@gov.ab.ca"},"deletedAt":{"type":"string","format":"date-time","readOnly":true,"description":"Time the tenant was archived. Only included for an archived tenant."}},"example":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}},"TenantDeleteResult":{"type":"object","properties":{"deletedRealm":{"type":"boolean"},"deletedTenant":{"type":"boolean"},"success":{"type":"boolean"}},"example":{"deletedRealm":true,"deletedTenant":true,"success":true}},"TenantError":{"type":"object","properties":{"errorMessage":{"type":"string"}},"example":{"errorMessage":"Tenant with ID '61f2e3a8c9b1d2e3f4a5b6c7' could not be found."}},"TenantRealmRole":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"composite":{"type":"boolean"},"clientRole":{"type":"boolean"},"containerId":{"type":"string"}},"example":{"id":"0b9a6c2e-7d4f-4e1a-9c3b-5a8d2f6e1c7b","name":"offline_access","description":"${role_offline-access}","composite":false,"clientRole":false,"containerId":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f"}},"TenantResult":{"type":"object","properties":{"success":{"type":"boolean"},"tenant":{"$ref":"#/components/schemas/Tenant"}},"example":{"success":true,"tenant":{"id":"urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7","name":"Test Tenant","realm":"2f6c8f1e-3b7a-4d5c-9e8f-1a2b3c4d5e6f","status":"active","adminEmail":"test.admin@gov.ab.ca"}}},"TenantV1ValidationError":{"type":"object","properties":{"success":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","properties":{"property":{"type":"string"},"constraints":{"type":"object","additionalProperties":{"type":"string"}}}}}},"example":{"success":false,"errors":[{"property":"email","constraints":{"isDefined":"email should not be null or undefined"}}]}}}},"security":[{"accessToken":[]}],"tags":[{"name":"Tenant service","description":"Tenant API to store and read tenant information."}]}
|
|
@@ -142,6 +142,44 @@ all of these events to users with the task-reader or task-admin role.
|
|
|
142
142
|
|
|
143
143
|
The task service doesn't consume events.
|
|
144
144
|
|
|
145
|
+
## Audit
|
|
146
|
+
|
|
147
|
+
The task service records audit events in the `task-service` namespace of the [audit service](audit-service.md), in
|
|
148
|
+
addition to the domain events above. Records are written to the tenant of the task, with the user or service account
|
|
149
|
+
making the request as the actor (service accounts have actor type `service`). All actions are version 1, use the
|
|
150
|
+
`task` resource type, and their retention class is derived from the category.
|
|
151
|
+
|
|
152
|
+
| Action | Category | Severity | Retention class | Recorded when |
|
|
153
|
+
| :---------------------- | :------------- | :------- | :-------------- | :------------------------------------------------------------------------------------- |
|
|
154
|
+
| `task.created` | administrative | info | compliance | A task is created in a queue. |
|
|
155
|
+
| `task.assigned` | administrative | info | compliance | A task is assigned to someone other than the requesting user, or unassigned. |
|
|
156
|
+
| `task.self-assigned` | administrative | info | compliance | A user assigns a task to themselves. |
|
|
157
|
+
| `task.started` | administrative | info | compliance | A task is started (Pending -> In Progress). |
|
|
158
|
+
| `task.completed` | administrative | info | compliance | A task is completed. |
|
|
159
|
+
| `task.cancelled` | administrative | warning | compliance | A task is cancelled. |
|
|
160
|
+
| `task.priority-changed` | administrative | info | compliance | The priority of a task changes, through the `set-priority` operation or a task update. |
|
|
161
|
+
| `task.deleted` | administrative | warning | compliance | A task is deleted. |
|
|
162
|
+
|
|
163
|
+
Each record uses the task ID and name as the resource, and the task's `recordId` (when set) as the correlation ID, so it
|
|
164
|
+
can be matched with the audit records of the domain record (for example a form submission). The metadata includes the
|
|
165
|
+
`queueNamespace`, `queueName`, `taskName` and `recordId`. In addition:
|
|
166
|
+
|
|
167
|
+
- `task.assigned` and `task.self-assigned` include the `assignedTo` and `previousAssignedTo` user `id` and `name` (or
|
|
168
|
+
`null`). The assignee email is not recorded.
|
|
169
|
+
- `task.cancelled` includes the `previousStatus` and `reasonProvided`. The cancellation reason is free text, so it is
|
|
170
|
+
not recorded; it remains in the `task-cancelled` event.
|
|
171
|
+
- `task.priority-changed` records the priority before and after as the change set. Setting the same priority is not
|
|
172
|
+
recorded.
|
|
173
|
+
|
|
174
|
+
Requests that are denied or fail validation are not recorded. Reading tasks, queues and metrics, and updating a task's
|
|
175
|
+
name, description, context or data are not audited. Queues are configured in the configuration service, which records
|
|
176
|
+
those changes as `configuration.updated`. The `Stopped` status is never set, so there is no audit action for it.
|
|
177
|
+
|
|
178
|
+
Audit failures are logged and do not fail the operation; pending events are delivered before the service shuts down.
|
|
179
|
+
The service account of task service needs the `audit-writer` role of `urn:ads:platform:audit-service`. Set
|
|
180
|
+
`TASK_AUDIT_ENABLED` to `false` to turn recording off; when unset it follows the SDK `AUDIT_ENABLED` variable (on by
|
|
181
|
+
default), and `true` forces it on. The action catalog is registered on startup either way.
|
|
182
|
+
|
|
145
183
|
## Code examples
|
|
146
184
|
|
|
147
185
|
### Configure a queue
|
|
@@ -5,104 +5,121 @@ parent: Services
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Tenant service
|
|
8
|
+
|
|
8
9
|
Tenant service provides the infrastructure for multi-tenancy in ADSP. It provides the APIs that allow for operations like creation of new tenants and lookup of tenants.
|
|
9
10
|
|
|
10
11
|
Tenant users and applications do not need to interact with tenant service directly.
|
|
11
12
|
|
|
12
13
|
## Client roles
|
|
14
|
+
|
|
13
15
|
client `urn:ads:platform:tenant-service`
|
|
14
16
|
|
|
15
|
-
| name
|
|
16
|
-
|
|
17
|
-
| tenant-admin
|
|
18
|
-
| platform-service | Service role for backend services that read tenants.
|
|
17
|
+
| name | description |
|
|
18
|
+
| :--------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| tenant-admin | Administrator role for tenant service. This role grants a user access to tenant administration. It is also a composite role that includes roles for configuration of other platform services. |
|
|
20
|
+
| platform-service | Service role for backend services that read tenants. |
|
|
19
21
|
|
|
20
22
|
Tenant service also checks two core realm roles. They are realm roles of the `core` realm, not client roles, and are not registered by tenant service:
|
|
21
23
|
|
|
22
|
-
| name
|
|
23
|
-
|
|
24
|
-
| tenant-service-admin | Platform administrator role. Allows creating tenants for any administrator or with an existing realm, renaming tenants, and
|
|
25
|
-
|
|
|
24
|
+
| name | description |
|
|
25
|
+
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| tenant-service-admin | Platform administrator role. Allows creating tenants for any administrator or with an existing realm, renaming tenants, and archiving, restoring, and listing archived tenants. |
|
|
27
|
+
| tenant-purge | Allows a `tenant-service-admin` to permanently delete (purge) an archived tenant. |
|
|
28
|
+
| beta-tester | Allows a core user to create a tenant with a new realm, with themselves as the administrator. |
|
|
26
29
|
|
|
27
30
|
No API operation checks the `platform-service` role: any authenticated core user or service account can read tenants. Services usually read tenants through the `tenantService` of the [Node.js SDK](../platform/platform-node-sdk.md) instead of calling the API.
|
|
28
31
|
|
|
29
32
|
## Tenancy
|
|
33
|
+
|
|
30
34
|
Tenant service manages the tenants themselves, so it doesn't use the `tenantId` query parameter of other services. Which tenants a request can see depends on who makes it:
|
|
31
35
|
|
|
32
36
|
- **Tenant users and service accounts** (with a token from a tenant realm) only find and retrieve their own tenant. `GET /api/tenant/v2/tenants` returns only their tenant, and `GET /api/tenant/v2/tenants/{id}` responds `403` for any other tenant ID.
|
|
33
|
-
- **Core users and service accounts** (with a token from the `core` realm) can find and retrieve any tenant. Creating, renaming, and
|
|
37
|
+
- **Core users and service accounts** (with a token from the `core` realm) can find and retrieve any tenant. Creating, renaming, archiving, and restoring tenants require a core user with the roles above; tenant users are rejected even if they hold a role with the same name.
|
|
34
38
|
- **Anonymous requests** can search `GET /api/tenant/v2/tenants` by `name` or `realm`. Results don't include the administrator email. This is how applications resolve a tenant name to its realm before a user signs in.
|
|
35
39
|
- **Deprecated v1 lookups** (`GET /api/tenant/v1/{id}`, `GET /api/tenant/v1/realm/{realm}`, `POST /api/tenant/v1/email`, `POST /api/tenant/v1/name`) are available to any authenticated user and aren't limited to the user's own tenant. Use the v2 endpoints instead.
|
|
36
40
|
|
|
37
41
|
Search results only include `active` tenants. A tenant that is still `provisioning` can be retrieved by ID, but isn't found by search.
|
|
38
42
|
|
|
39
43
|
## API overview
|
|
44
|
+
|
|
40
45
|
All endpoints are under `https://tenant-service.adsp.alberta.ca`. See the [API documentation](https://api.adsp.alberta.ca) for request and response schemas. Role checks in this API respond `401`, not `403`, when the user lacks the role.
|
|
41
46
|
|
|
42
|
-
| Endpoint
|
|
43
|
-
|
|
44
|
-
| `GET /api/tenant/v2/tenants`
|
|
45
|
-
| `POST /api/tenant/v2/tenants`
|
|
46
|
-
| `GET /api/tenant/v2/tenants/{id}`
|
|
47
|
-
| `PATCH /api/tenant/v2/tenants/{id}/name`
|
|
48
|
-
| `DELETE /api/tenant/v2/tenants/{id}`
|
|
47
|
+
| Endpoint | Purpose | Required role |
|
|
48
|
+
| :----------------------------------------- | :--------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- |
|
|
49
|
+
| `GET /api/tenant/v2/tenants` | Search for tenants by name, realm, or administrator email. `status=archived` finds archived tenants. | None; anonymous with `name` or `realm`. Archived: core `tenant-service-admin` |
|
|
50
|
+
| `POST /api/tenant/v2/tenants` | Create a tenant. | core `beta-tester` or `tenant-service-admin` |
|
|
51
|
+
| `GET /api/tenant/v2/tenants/{id}` | Retrieve a tenant. | Any authenticated user; tenant users only their own tenant |
|
|
52
|
+
| `PATCH /api/tenant/v2/tenants/{id}/name` | Rename a tenant. Rate limited. | core `tenant-service-admin` |
|
|
53
|
+
| `DELETE /api/tenant/v2/tenants/{id}` | Archive a tenant and disable its realm. With `?purge=true`, permanently delete an archived tenant and its realm. | core `tenant-service-admin`; purge also requires core `tenant-purge` |
|
|
54
|
+
| `POST /api/tenant/v2/tenants/{id}/restore` | Restore an archived tenant and enable its realm. | core `tenant-service-admin` |
|
|
49
55
|
|
|
50
56
|
The following `/api/tenant/v1` endpoints are deprecated. They are documented in the API documentation so that existing callers can find their replacements:
|
|
51
57
|
|
|
52
|
-
| Deprecated endpoint
|
|
53
|
-
|
|
54
|
-
| `POST /api/tenant/v1`
|
|
55
|
-
| `GET /api/tenant/v1/{id}`
|
|
56
|
-
| `DELETE /api/tenant/v1?realm={realm}` | core `tenant-service-admin`
|
|
57
|
-
| `GET /api/tenant/v1/realm/{realm}`
|
|
58
|
-
| `POST /api/tenant/v1/email`
|
|
59
|
-
| `POST /api/tenant/v1/name`
|
|
60
|
-
| `GET /api/tenant/v1/realm/roles`
|
|
58
|
+
| Deprecated endpoint | Required role | Replacement |
|
|
59
|
+
| :------------------------------------ | :------------------------------------------- | :---------------------------------------------- |
|
|
60
|
+
| `POST /api/tenant/v1` | core `beta-tester` or `tenant-service-admin` | `POST /api/tenant/v2/tenants` |
|
|
61
|
+
| `GET /api/tenant/v1/{id}` | Any authenticated user | `GET /api/tenant/v2/tenants/{id}` |
|
|
62
|
+
| `DELETE /api/tenant/v1?realm={realm}` | core `tenant-service-admin` | `DELETE /api/tenant/v2/tenants/{id}` |
|
|
63
|
+
| `GET /api/tenant/v1/realm/{realm}` | Any authenticated user | `GET /api/tenant/v2/tenants?realm={realm}` |
|
|
64
|
+
| `POST /api/tenant/v1/email` | Any authenticated user | `GET /api/tenant/v2/tenants?adminEmail={email}` |
|
|
65
|
+
| `POST /api/tenant/v1/name` | Any authenticated user | `GET /api/tenant/v2/tenants?name={name}` |
|
|
66
|
+
| `GET /api/tenant/v1/realm/roles` | `tenant-admin` | None |
|
|
61
67
|
|
|
62
68
|
These `/api/tenant/v1` endpoints are not deprecated. They are internal endpoints used by the tenant admin app, and are rate limited:
|
|
63
69
|
|
|
64
|
-
| Endpoint
|
|
65
|
-
|
|
66
|
-
| `GET /api/tenant/v1/user/id`
|
|
70
|
+
| Endpoint | Purpose | Required role |
|
|
71
|
+
| :------------------------------------ | :--------------------------------------------------------------------- | :------------- |
|
|
72
|
+
| `GET /api/tenant/v1/user/id` | Look up the ID of a user by email in a realm. | `tenant-admin` |
|
|
67
73
|
| `GET /api/tenant/v1/user/default-idp` | Check if a core realm user is linked to the default identity provider. | `tenant-admin` |
|
|
68
|
-
| `DELETE /api/tenant/v1/user/idp`
|
|
74
|
+
| `DELETE /api/tenant/v1/user/idp` | Remove the link between a user and an identity provider. | `tenant-admin` |
|
|
69
75
|
|
|
70
76
|
## Concepts
|
|
77
|
+
|
|
71
78
|
### Tenant
|
|
79
|
+
|
|
72
80
|
A tenant represents a team or program area using ADSP. Its ID is a URN, for example `urn:ads:platform:tenant-service:v2:/tenants/61f2e3a8c9b1d2e3f4a5b6c7`; endpoints that take `{id}` use only the last segment. Other platform services store this ID on their records to isolate tenant data. Each tenant has a unique name (compared ignoring case), an administrator email, and a status:
|
|
73
81
|
|
|
74
82
|
- `provisioning`: the tenant was created and its realm is still being set up. `POST /api/tenant/v2/tenants` responds `202` with this status. If provisioning fails, the tenant is removed.
|
|
75
83
|
- `active`: the tenant and its realm are ready.
|
|
84
|
+
- `archived`: the tenant was deleted with `DELETE /api/tenant/v2/tenants/{id}`. Its realm is disabled and it is excluded from searches (unless `status=archived` is requested). The tenant is retained until an archived tenant is purged with `DELETE /api/tenant/v2/tenants/{id}?purge=true`, or it can be restored.
|
|
76
85
|
|
|
77
86
|
A user can be the administrator of only one tenant, unless a `tenant-service-admin` creates the tenant.
|
|
78
87
|
|
|
79
88
|
### Realm
|
|
80
|
-
|
|
89
|
+
|
|
90
|
+
Each tenant has its own Keycloak realm, which signs the access tokens of the tenant's users and service accounts. Platform services read the token issuer to work out which tenant a request is for. A new realm is created when a tenant is created, with the administrator given the `tenant-admin` role and clients for the platform apps and services. A `tenant-service-admin` can instead associate a tenant with an existing realm. Archiving a tenant disables its realm, so users can no longer sign in, but doesn't delete it. A realm is only deleted when its tenant is purged.
|
|
81
91
|
|
|
82
92
|
## Events
|
|
83
|
-
Tenant service sends the following domain events under the `tenant-service` namespace. It doesn't consume events.
|
|
84
93
|
|
|
85
|
-
|
|
86
|
-
|:-|:-|
|
|
87
|
-
| `tenant-created` | A tenant was created, either with an existing realm or once its new realm was provisioned. The payload includes the `tenant` and `createdBy`. |
|
|
88
|
-
| `tenant-deleted` | A tenant was deleted. The payload includes the `tenant` and `deletedBy`. |
|
|
94
|
+
Tenant service sends the following domain events under the `tenant-service` namespace. It doesn't consume events.
|
|
89
95
|
|
|
96
|
+
| Event | Description |
|
|
97
|
+
| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
98
|
+
| `tenant-created` | A tenant was created, either with an existing realm or once its new realm was provisioned. The payload includes the `tenant` and `createdBy`. |
|
|
99
|
+
| `tenant-deleted` | A tenant was permanently deleted (purged). The payload includes the `tenant` and `deletedBy`. |
|
|
100
|
+
| `tenant-archived` | A tenant was archived. The payload includes the `tenant` and `archivedBy`. |
|
|
101
|
+
| `tenant-restored` | An archived tenant was restored. The payload includes the `tenant` and `restoredBy`. |
|
|
90
102
|
|
|
91
103
|
## Audit actions
|
|
104
|
+
|
|
92
105
|
Tenant service records audit events in the `tenant-service` namespace of the [audit service](audit-service.md). Records are written to the affected tenant, with the tenant as the resource (`{ type: 'tenant', id: <tenant URN> }`) and the tenant name and realm in the metadata.
|
|
93
106
|
|
|
94
|
-
| action
|
|
95
|
-
|
|
96
|
-
| tenant.created
|
|
97
|
-
| tenant.deleted
|
|
98
|
-
| tenant.
|
|
107
|
+
| action | category | severity | retention class | recorded when |
|
|
108
|
+
| :-------------- | :------------- | :------- | :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
109
|
+
| tenant.created | administrative | info | compliance | A tenant is created with an existing realm, or a new realm is provisioned for it. A failed provisioning is recorded with `failure` status. |
|
|
110
|
+
| tenant.deleted | administrative | critical | compliance | A tenant is permanently deleted (purged). |
|
|
111
|
+
| tenant.archived | administrative | warning | compliance | A tenant is archived and its realm disabled. |
|
|
112
|
+
| tenant.restored | administrative | warning | compliance | An archived tenant is restored and its realm enabled. |
|
|
113
|
+
| tenant.updated | administrative | info | compliance | A tenant is renamed. The change set captures the name before and after. |
|
|
99
114
|
|
|
100
115
|
Because the audit service resolves the tenant of each event, `tenant.deleted` is recorded before the realm and tenant are removed. If the removal does not fully succeed, a further `tenant.deleted` event is recorded with `failure` or `error` status; it cannot be stored if the tenant record itself was already removed.
|
|
101
116
|
|
|
102
117
|
Audit failures are logged by the SDK and do not roll back the tenant operation. The tenant service account requires the `audit-writer` role of `urn:ads:platform:audit-service`. Set `AUDIT_ENABLED=false` on tenant service to turn recording off; see [turn audit recording off](audit-service.md#turn-audit-recording-off).
|
|
103
118
|
|
|
104
119
|
## Code examples
|
|
120
|
+
|
|
105
121
|
### Look up a tenant by name
|
|
122
|
+
|
|
106
123
|
Anonymous requests can look up a tenant by name, for example to find the realm for signing in. Include a bearer token to also get the administrator email.
|
|
107
124
|
|
|
108
125
|
```typescript
|
|
@@ -115,6 +132,7 @@ const [tenant] = results;
|
|
|
115
132
|
```
|
|
116
133
|
|
|
117
134
|
### Retrieve a tenant by ID
|
|
135
|
+
|
|
118
136
|
Tenant users can retrieve their own tenant. Core users can retrieve any tenant.
|
|
119
137
|
|
|
120
138
|
```typescript
|
|
@@ -127,6 +145,7 @@ const { name, realm, adminEmail } = await response.json();
|
|
|
127
145
|
```
|
|
128
146
|
|
|
129
147
|
### Create a tenant
|
|
148
|
+
|
|
130
149
|
Core users with the `beta-tester` role create a tenant with a new realm and become its administrator. The response is `202` with `status: 'provisioning'`; search by name until the tenant is found, which means it is `active`.
|
|
131
150
|
|
|
132
151
|
```typescript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/adsp-sdk-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
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-17T15:07:15.268Z",
|
|
4
|
+
"sourceCommit": "48ad19ceefced766bcf7ad20002c6b2dfd5b7735",
|
|
5
|
+
"latestRelease": "1.33.0",
|
|
6
|
+
"docsCommit": "48ad19ceefced766bcf7ad20002c6b2dfd5b7735",
|
|
7
7
|
"sdk": {
|
|
8
8
|
"version": "2.36.1",
|
|
9
9
|
"commit": "dd58a2b854c4406b42c0604dba3fa4b941038d6c",
|