ListPrompts
agents.list_prompts(AgentListPromptsParams**kwargs) -> SyncPromptsPage[Prompt]
POST/gitpod.v1.AgentService/ListPrompts
Lists all prompts matching the specified criteria.
Use this method to find and browse prompts across your organization. Results are ordered by their creation time with the newest first.
Examples
-
List all prompts:
Retrieves all prompts with pagination.
pagination: pageSize: 10
ListPrompts
import os
from gitpod import Gitpod
client = Gitpod(
bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted
)
page = client.agents.list_prompts(
pagination={
"page_size": 10
},
)
page = page.prompts[0]
print(page.id){
"pagination": {
"nextToken": "nextToken"
},
"prompts": [
{
"id": "id",
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"description": "description",
"name": "name",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"command": "command",
"isCommand": true,
"isSkill": true,
"isTemplate": true,
"prompt": "prompt"
}
}
]
}Returns Examples
{
"pagination": {
"nextToken": "nextToken"
},
"prompts": [
{
"id": "id",
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"description": "description",
"name": "name",
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updatedAt": "2019-12-27T18:11:19.117Z"
},
"spec": {
"command": "command",
"isCommand": true,
"isSkill": true,
"isTemplate": true,
"prompt": "prompt"
}
}
]
}