@abgov/adsp-sdk-mcp-server 1.39.3 → 1.39.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"openapi":"3.0.0","info":{"title":"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."}]}
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}. Retrieves the tenant with the given administrator email. No role is required. Tenant users can only retrieve their own tenant, and get 404 for any other tenant; core users can retrieve any tenant.\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}. Retrieves the tenant with the given name, ignoring case. No role is required. Tenant users can only retrieve their own tenant, and get 404 for any other tenant; core users can retrieve any tenant.\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}. Retrieves a tenant by realm. No role is required. Tenant users can only retrieve their own tenant, and get 404 for any other realm; core users can retrieve any tenant.\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. Tenant users can only look up users in their own realm or the core realm; core users can use any realm.\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"},"403":{"description":"Tenant user is not permitted to use the realm of another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"User Test User (ID: 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a) not permitted to find user."}}}},"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. Tenant users can only act on their own realm or the core realm; core users can use any realm.\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"},"403":{"description":"Tenant user is not permitted to use the realm of another tenant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantError"},"example":{"errorMessage":"User Test User (ID: 3d1c5e7a-9b2f-4c6d-8e0a-1f3b5d7c9e2a) not permitted to delete user identity provider link."}}}},"429":{"$ref":"#/components/responses/TenantTooManyRequests"}}}},"/api/tenant/v1/{id}":{"get":{"deprecated":true,"tags":["Tenant service"],"description":"Deprecated; use GET /api/tenant/v2/tenants/{id}. Retrieves a tenant by ID. No role is required. Tenant users can only retrieve their own tenant, and get 404 for any other tenant; core users can retrieve any tenant.\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."}]}
@@ -53,6 +53,8 @@ File types are configured through the [configuration service](configuration-serv
53
53
 
54
54
  File type represents a category of files with specific access roles. For example, a 'Supporting Documents' file type may allow `applicant` role to upload files and `assessor` role to download the files. File types are configured in the [configuration service](configuration-service.md) under the `platform:file-service` namespace and name.
55
55
 
56
+ Each file type is a configuration entry with the settings below. They control who can upload and read files of the type, which files it accepts, and how long files are kept. See [Configure a file type](#configure-a-file-type) for an example.
57
+
56
58
  | setting | effect |
57
59
  | :----------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
58
60
  | `readRoles` | Users with one of these roles can read the metadata of and download any file of the type. |
@@ -36,7 +36,7 @@ Tenant service manages the tenants themselves, so it doesn't use the `tenantId`
36
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.
37
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.
38
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.
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.
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`) follow the same rule: tenant users only find their own tenant and get `404` for any other. Use the v2 endpoints instead.
40
40
 
41
41
  Search results only include `active` tenants. A tenant that is still `provisioning` can be retrieved by ID, but isn't found by search.
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/adsp-sdk-mcp-server",
3
- "version": "1.39.3",
3
+ "version": "1.39.5",
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-19T18:35:40.539Z",
4
- "sourceCommit": "e82fabfc36163570b6048bba763b39871b8be5a0",
5
- "latestRelease": "1.39.2",
6
- "docsCommit": "726a6be30c323f398eda0c5251595eb3e8cdeb87",
3
+ "builtAt": "2026-11-20T14:50:40.603Z",
4
+ "sourceCommit": "757a35b7c7e1e0f89effbf9b7b8dbda4d603a1a0",
5
+ "latestRelease": "1.39.4",
6
+ "docsCommit": "757a35b7c7e1e0f89effbf9b7b8dbda4d603a1a0",
7
7
  "sdk": {
8
8
  "version": "2.36.1",
9
9
  "commit": "dd58a2b854c4406b42c0604dba3fa4b941038d6c",