Namespaces
8 calls. Every request needs the Authorization header: see the overview.
namespaces.list
Section titled “namespaces.list”GET /namespacesEvery namespace of the tenant.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: Namespace[] (200)
curl -X GET "https://api.maitento.com/namespaces" \ -H "Authorization: $MAITENTO_AUTH"const namespaces = await mt.namespaces.list();mt.namespaces.list()namespaces.create
Section titled “namespaces.create”POST /namespacesCreates a namespace.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Request body: NamespaceCreateOrUpdateRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The namespace’s name, 1 to 200 characters, unique within the tenant. |
Response: Namespace (200)
curl -X POST "https://api.maitento.com/namespaces" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"name":"..."}'const namespace = await mt.namespaces.create({ name: "support" });mt.namespaces.create("demo")namespaces.delete
Section titled “namespaces.delete”DELETE /namespaces/by-id/{id}Deletes an empty namespace (a 400 api:namespace:delete:not-empty lists what remains).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: no body (204)
curl -X DELETE "https://api.maitento.com/namespaces/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH"await mt.namespaces.delete("b5f3d1a9-7e6c-4b4a-9a2e-8c0d1f3e5a7b");mt.namespaces.delete("0f1e2d3c-4b5a-4968-8776-655443322110")namespaces.getById
Section titled “namespaces.getById”GET /namespaces/by-id/{id}The namespace with this id. Throws NotFoundError when there is none.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: Namespace (200)
curl -X GET "https://api.maitento.com/namespaces/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH"const namespace = await mt.namespaces.getById("b5f3d1a9-7e6c-4b4a-9a2e-8c0d1f3e5a7b");mt.namespaces.get_by_id("0f1e2d3c-4b5a-4968-8776-655443322110")namespaces.rename
Section titled “namespaces.rename”PUT /namespaces/by-id/{id}Renames a namespace.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: NamespaceCreateOrUpdateRequest
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The namespace’s name, 1 to 200 characters, unique within the tenant. |
Response: Namespace (200)
curl -X PUT "https://api.maitento.com/namespaces/by-id/<id>" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"name":"..."}'await mt.namespaces.rename("b5f3d1a9-7e6c-4b4a-9a2e-8c0d1f3e5a7b", { name: "customer-support" });mt.namespaces.rename("0f1e2d3c-4b5a-4968-8776-655443322110", "demo-2")namespaces.webAccess
Section titled “namespaces.webAccess”GET /namespaces/by-id/{id}/web-accessThe namespace’s web-access settings (its default web-download partition).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Response: WebAccessSettings (200)
curl -X GET "https://api.maitento.com/namespaces/by-id/<id>/web-access" \ -H "Authorization: $MAITENTO_AUTH"const settings = await mt.namespaces.webAccess("b5f3d1a9-7e6c-4b4a-9a2e-8c0d1f3e5a7b");mt.namespaces.web_access("0f1e2d3c-4b5a-4968-8776-655443322110")namespaces.setWebAccess
Section titled “namespaces.setWebAccess”PUT /namespaces/by-id/{id}/web-accessReplaces the namespace’s web-access settings (Tenant.Admin).
Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | uuid | yes |
Request body: WebAccessSettingsInput
| Field | Type | Required | Description |
|---|---|---|---|
defaultWebDownloadPartitionId | uuid | null | The temporary partition web downloads go to by default. Null: none is set here (sending null clears it). |
Response: WebAccessSettings (200)
curl -X PUT "https://api.maitento.com/namespaces/by-id/<id>/web-access" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"defaultWebDownloadPartitionId":"..."}'await mt.namespaces.setWebAccess("b5f3d1a9-7e6c-4b4a-9a2e-8c0d1f3e5a7b", { defaultWebDownloadPartitionId: "d6e5f4a3-b2c1-4d0e-9f8a-7b6c5d4e3f2a" });mt.namespaces.set_web_access("0f1e2d3c-4b5a-4968-8776-655443322110", default_web_download_partition_id="4b5c6d7e-8f9a-4b0c-9d1e-2f3a4b5c6d7e")namespaces.get
Section titled “namespaces.get”GET /namespaces/by-name/{name}The namespace with this NAME. Throws NotFoundError when there is none.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes |
Response: Namespace (200)
curl -X GET "https://api.maitento.com/namespaces/by-name/<name>" \ -H "Authorization: $MAITENTO_AUTH"const namespace = await mt.namespaces.get("support");mt.namespaces.get("demo")