API Content
Upload API content
POST /apis/{apiId}/assets
Code samples
curl -X POST https://localhost:9543/api-portal/api/v0.9/apis/{apiId}/assets \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json' \
-F 'docMetadata=[{"name":"External guide","url":"https://example.com/docs/guide","type":"LINK"}]' \
-F 'imageMetadata={"api-icon":"icon.png"}'
Uploads the static content package for an API.
The content ZIP must contain at least one of these root directories:
web/for API landing-page assets such as markdown, HTML, CSS, JavaScript, and images.docs/for downloadable API documents.
Use docMetadata to add external document links that are stored alongside uploaded documents.
Use imageMetadata to map uploaded images to API image roles such as the API icon.
Authentication
This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api_content:create`, `dp:api_content:manage`
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | API content ZIP upload. |
| » content | body | string(binary) | true | ZIP upload field named content. |
| » docMetadata | body | string | false | Optional JSON string containing API document link metadata. |
| » imageMetadata | body | string | false | Optional JSON string containing API image metadata. |
| apiId | path | string | true | The API's handle (unique per org). Resolves only to REST, SOAP, WebSocket, WebSub, and GraphQL APIs. Model Context Protocol (MCP) servers are addressed via /mcp-servers. |
Detailed descriptions
body: API content ZIP upload.
Expected ZIP structure:
web/: optional API landing-page files and images.docs/: optional downloadable documents.
At least one of web/ or docs/ must exist at the ZIP root.
docMetadata and imageMetadata are JSON strings because they are submitted as multipart form fields.
Example responses
201 Response
{
"message": "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
errorsarray); 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"
}
409 Response
{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}
500 Response
{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | JSON message response. | MessageResponse |
| 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 |
| 409 | Conflict | The request conflicts with an existing resource. | ErrorResponse |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |
Response schema
Enumerated Values
| Property | Value |
|---|---|
| status | error |
Replace API content
PUT /apis/{apiId}/assets
Code samples
curl -X PUT https://localhost:9543/api-portal/api/v0.9/apis/{apiId}/assets \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json' \
-F 'docMetadata=[{"name":"External guide","url":"https://example.com/docs/guide","type":"LINK"}]' \
-F 'imageMetadata={"api-icon":"icon.png"}'
Replaces or adds static content files for an existing API.
The upload format is the same as POST /api-portal/api/v0.9/apis/{apiId}/assets.
Existing files with the same stored type and fileName are updated; new files are created.
Image metadata is updated only when image metadata can be resolved from the upload or request body.
Authentication
This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api_content:update`, `dp:api_content:manage`
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | API content ZIP upload. |
| » content | body | string(binary) | true | ZIP upload field named content. |
| » docMetadata | body | string | false | Optional JSON string containing API document link metadata. |
| » imageMetadata | body | string | false | Optional JSON string containing API image metadata. |
| apiId | path | string | true | The API's handle (unique per org). Resolves only to REST, SOAP, WebSocket, WebSub, and GraphQL APIs. Model Context Protocol (MCP) servers are addressed via /mcp-servers. |
Detailed descriptions
body: API content ZIP upload.
Expected ZIP structure:
web/: optional API landing-page files and images.docs/: optional downloadable documents.
At least one of web/ or docs/ must exist at the ZIP root.
docMetadata and imageMetadata are JSON strings because they are submitted as multipart form fields.
Example responses
201 Response
{
"message": "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
errorsarray); 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"
}
409 Response
{
"status": "error",
"code": "CONFLICT",
"message": "Conflict"
}
500 Response
{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | JSON message response. | MessageResponse |
| 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 |
| 409 | Conflict | The request conflicts with an existing resource. | ErrorResponse |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |
Response schema
Enumerated Values
| Property | Value |
|---|---|
| status | error |
Get an API content file
GET /apis/{apiId}/assets
Code samples
curl -X GET https://localhost:9543/api-portal/api/v0.9/apis/{apiId}/assets?type=DOC_HowTo&fileName=getting-started.md \
-u {username}:{password} \
-H 'Accept: text/markdown'
Retrieves a single stored API content file.
The type query parameter selects the stored content category and fileName selects the file
within that category. Text files and external document links are returned as text. Image files are
returned as binary content with a media type derived from the file extension.
Image files (type=IMAGE) are publicly readable so that an API's icon renders on the public
listing and landing pages without a session; the organization is then this instance's own
configured one (mirrors GET /views/{viewId}/asset). All other content categories require a
session: an anonymous request for a non-image type is rejected.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| type | query | string | true | Stored type of the file, matched exactly: MARKETING for the API's landing page content and theming, such as its Markdown body and Handlebars template; IMAGE for images, such as the API icon; DOC_<category> for documents, for example DOC_HowTo (DOC_Other for documents without a category); and API_DEFINITION for the API's definition. |
| fileName | query | string | true | Stored file name to retrieve. For API_DEFINITION, use the name the definition was stored under: definition.yaml, definition.yml, or definition.json when it came from an API artifact ZIP, the uploaded file's own name when it was sent in the definition field, and definition.graphql for a GraphQL schema. |
| orgId | query | string | false | Deprecated and ignored. Accepted only so existing callers (the portal's own image-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 API icons in a shared database. |
| apiId | path | string | true | The API's handle (unique per org). Resolves only to REST, SOAP, WebSocket, WebSub, and GraphQL APIs. Model Context Protocol (MCP) servers are addressed via /mcp-servers. |
Example responses
200 Response
"<section>API overview</section>"
"https://example.com/docs/guide"
{
"title": "API overview"
}
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."
}
{
"message": "Missing or invalid fields in the request payload"
}
404 Response
"string"
500 Response
{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Stored API content asset. The concrete media type depends on the stored file extension or whether the content is an external document link. | 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 | Plain text success response. | string |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |
Response schema
Enumerated Values
| Property | Value |
|---|---|
| status | error |
Delete API content files
DELETE /apis/{apiId}/assets
Code samples
curl -X DELETE https://localhost:9543/api-portal/api/v0.9/apis/{apiId}/assets?type=DOC_HowTo \
-H 'Authorization: Bearer {access_token}' \
-H 'Accept: application/json'
Deletes stored API content.
Send both type and fileName to delete one file. Send only type to delete all stored content
files matching that content category for the API.
Authentication
This operation requires a Bearer JWT access token in the Authorization header. Required scopes (the token must carry at least one of): `dp:api_content:delete`, `dp:api_content:manage`
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| type | query | string | true | Stored type of the files to delete: MARKETING for the API's landing page content and theming, such as its Markdown body and Handlebars template; IMAGE for images, such as the API icon; DOC_<category> for documents, for example DOC_HowTo (DOC_Other for documents without a category); and API_DEFINITION for the API's definition. |
| fileName | query | string | false | File name selector used to delete a single stored API content file. |
| apiId | path | string | true | The API's handle (unique per org). Resolves only to REST, SOAP, WebSocket, WebSub, and GraphQL APIs. Model Context Protocol (MCP) servers are addressed via /mcp-servers. |
Example responses
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."
}
{
"message": "Missing or invalid fields in the request payload"
}
404 Response
"string"
500 Response
{
"status": "error",
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred."
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 204 | No Content | API content deleted successfully. | None |
| 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 | Plain text success response. | string |
| 500 | Internal Server Error | Internal server error. | ErrorResponse |
Response schema
Enumerated Values
| Property | Value |
|---|---|
| status | error |
Was this page helpful?