Skip to main content

List prompt fragments

POST 

/api/v1/prompt-fragments/list

Returns the project's fragments, paginated, together with the current project-wide fragment-set version.

The following access conditions are preserved as declared intent and are not implemented by generated code: Authorized scoped domain action.

Use this in a guide: Reuse and update shared assistant instructions

Request​

Responses​

Page of fragments

Read a bounded first page from the project library.​

Section ID: DOC-MA-profiles-prompts-api-listPromptFragments#example-agent-profiles-listPromptFragments-request

Request example

{
"page": 1,
"pageSize": 20
}

Guide request for Step 2: Check the sources and record their set version. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-MA-profiles-prompts-api-listPromptFragments#example-cookbook-managed-agents-profiles-prompts-prompt-fragments-03-request

Request example

{
"page": 1,
"pageSize": 25
}

Illustrative response shape; omitted default fields and actual outcomes depend on the operation.​

Section ID: DOC-MA-profiles-prompts-api-listPromptFragments#example-agent-profiles-listPromptFragments-response

Response example

{
"fragments": [
{
"fragmentId": "example_123",
"name": "example",
"content": "Example text"
}
],
"totalCount": 1,
"hasMore": true,
"setVersion": 1
}

Illustrative response for Step 2: Check the sources and record their set version. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-MA-profiles-prompts-api-listPromptFragments#example-cookbook-managed-agents-profiles-prompts-prompt-fragments-json-03-response

Response example

{
"fragments": [
{
"fragmentId": "safety",
"name": "Safety rules",
"content": "Never give medical advice. Refer the user to a clinician when asked."
}
],
"totalCount": 1,
"hasMore": false,
"setVersion": 7
}

Document ID: DOC-MA-profiles-prompts-api-listPromptFragments. Section identities and revisions.

SectionStable reference
List prompt fragmentsDOC-MA-profiles-prompts-api-listPromptFragments#overview
RequestDOC-MA-profiles-prompts-api-listPromptFragments#request
ResponsesDOC-MA-profiles-prompts-api-listPromptFragments#responses