Skip to main content

Organization Content

Get a theme asset​

GET /views/{viewId}/asset

Code samples


curl -X GET https://localhost:9543/api-portal/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​

NameInTypeRequiredDescription
fileTypequerystringtrueOrganization content file type, such as style, image, text, template, or partial.
fileNamequerystringtrueStored organization content file name.
filePathquerystringfalseOptional relative content path used together with fileType and fileName.
orgIdquerystringfalseDeprecated and ignored. Accepted only so existing callers (the portal's own style-URL rewrite appends it) are not rejected. The organization is always this instance's own — from the session when there is one, otherwise from organization.handle configuration. It was previously honoured on this unauthenticated endpoint, which made it a selector for any organization's branding in a shared database.
viewIdpathstringtrueThe view's handle (unique per org). Not the internal database uuid.

Example responses

200 Response

"string"

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.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKStored organization content asset.string
400Bad RequestBad 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
404Not FoundResource not found.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Apply a theme​

POST /views/{viewId}/apply-theme

Code samples


curl -X POST https://localhost:9543/api-portal/api/v0.9/views/{viewId}/apply-theme \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json' \

Uploads a ZIP file and atomically replaces the view's theme assets. Only the assets contained in the uploaded ZIP are present afterward.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:organization_content:manage`, `dp:organization:manage`

Parameters​

NameInTypeRequiredDescription
bodybodyobjecttrueZIP file upload. Organization content uploads are limited to 50 MB.
» filebodystring(binary)trueZIP file containing organization theme assets.
viewIdpathstringtrueThe view's handle (unique per org). Not the internal database uuid.

Example responses

200 Response

{
"id": "string",
"fileName": "string"
}

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.

{
"status": "error",
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter."
}
{
"message": "Missing or invalid fields in the request payload"
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKOrganization content upload accepted and stored successfully.OrganizationContentUploadResponse
400Bad RequestBad 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
500Internal Server ErrorInternal server error.ErrorResponse

Response schema​

Enumerated Values​

PropertyValue
statuserror

Reset theme to defaults​

POST /views/{viewId}/reset-theme

Code samples


curl -X POST https://localhost:9543/api-portal/api/v0.9/views/{viewId}/reset-theme \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'

Deletes all stored theme assets for the view, reverting it to built-in defaults.

Authentication​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:organization_content:manage`, `dp:organization:manage`

Parameters​

NameInTypeRequiredDescription
viewIdpathstringtrueThe view's handle (unique per org). Not the internal database uuid.

Example responses

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
204No ContentTheme reset successfully.None
500Internal Server ErrorInternal server error.ErrorResponse

Download the current theme​

GET /views/{viewId}/export-theme

Code samples


curl -X GET https://localhost:9543/api-portal/api/v0.9/views/{viewId}/export-theme \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/zip'

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​

This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:organization_content:read`, `dp:organization:manage`

Parameters​

NameInTypeRequiredDescription
viewIdpathstringtrueThe view's handle (unique per org). Not the internal database uuid.

Example responses

200 Response

404 Response

{
"status": "error",
"code": "ORG_NOT_FOUND",
"message": "Organization not found."
}

500 Response

{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}

Responses​

StatusMeaningDescriptionSchema
200OKTheme archive.string
404Not FoundResource not found.ErrorResponse
500Internal Server ErrorInternal server error.ErrorResponse

Was this page helpful?