Organization Content¶
Get a theme asset¶
GET /views/{viewId}/asset
Code samples
curl -X GET https://localhost:9543/api/v0.9/views/{viewId}/asset?fileType=string&fileName=string \
-u {username}:{password} \
-H 'Accept: text/css'
Retrieves a single organization theme asset (CSS, image, etc.) by fileType and fileName query parameters. The response content type is derived from the stored file type and extension.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| fileType | query | string | true | Organization content file type, such as style, image, text, template, or partial. |
| fileName | query | string | true | Stored organization content file name. |
| filePath | query | string | false | Optional relative content path used together with fileType and fileName. |
| orgId | query | string | false | Organization ID used to resolve a view's public style/image asset when no session is present (e.g. the pre-auth login page). Ignored for authenticated requests, which use the session organization. |
| viewId | path | string | true | The view's handle (unique per org). Not the internal database uuid. |
Example responses
200 Response
Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its
errorsarray); some legacy handlers return a message-only object.
{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
404 Response
500 Response
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Stored organization content asset. | string |
| 400 | Bad Request | Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object. |
Inline |
| 404 | Not Found | Resource not found. | ErrorResponse |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |
Response Schema
Enumerated Values
| Property | Value |
|---|---|
| status | error |
Apply a theme¶
POST /views/{viewId}/apply-theme
Code samples
curl -X POST https://localhost:9543/api/v0.9/views/{viewId}/apply-theme \
-u {username}:{password} \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d @payload.json
Uploads a ZIP file and atomically replaces the view's theme assets. Only the assets contained in the uploaded ZIP are present afterward.
Payload
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | ZIP file upload. Organization content uploads are limited to 50 MB. |
| ยป file | body | string(binary) | true | ZIP file containing organization theme assets. |
| viewId | path | string | true | The view's handle (unique per org). Not the internal database uuid. |
Example responses
200 Response
Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its
errorsarray); some legacy handlers return a message-only object.
{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
500 Response
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Organization content upload accepted and stored successfully. | OrganizationContentUploadResponse |
| 400 | Bad Request | Bad request. Validation and other bad-request errors are returned as a standard error object (field-level details, when present, are carried in its errors array); some legacy handlers return a message-only object. |
Inline |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |
Response Schema
Enumerated Values
| Property | Value |
|---|---|
| status | error |
Reset theme to defaults¶
POST /views/{viewId}/reset-theme
Code samples
curl -X POST https://localhost:9543/api/v0.9/views/{viewId}/reset-theme \
-u {username}:{password} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Deletes all stored theme assets for the view, reverting it to built-in defaults.
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| viewId | path | string | true | The view's handle (unique per org). Not the internal database uuid. |
Example responses
500 Response
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | Theme reset successfully. | None |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |
Download the current theme¶
GET /views/{viewId}/export-theme
Code samples
curl -X GET https://localhost:9543/api/v0.9/views/{viewId}/export-theme \
-u {username}:{password} \
-H 'Accept: application/zip' \
-H 'Authorization: Bearer {access-token}'
Bundles the view's current custom theme assets into a single ZIP archive for download. The archive is wrapped in a top-level folder so it can be re-uploaded via the apply-theme endpoint. Returns 404 when the view has no custom theme.
Authentication¶
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| viewId | path | string | true | The view's handle (unique per org). Not the internal database uuid. |
Example responses
200 Response
404 Response
500 Response
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Theme archive. | string |
| 404 | Not Found | Resource not found. | ErrorResponse |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |