promptSource

Read the editable source behind one prompt before changing it; returns the prompt with its content, source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.

Arguments

  • projectReferenceString!required

  • idString!required

    The id of the definition, from its list.

  • sourceTargetKindSourceReadTargetKind

    The source to read; default runtimeTargetKind, else project. main_branch reads the project source. One of project, main_branch, preview_branch.

  • runtimeTargetKindRuntimeTargetKind

    Used as the source to read when sourceTargetKind is omitted. One of main_branch, environment, preview_branch.

  • targetBranchIdID

    Required with the kind preview_branch.

  • targetEnvironmentIdID

    Not supported for source reads; a non-null value is refused as invalid_input.

Responses

query PromptSource($projectReference: String!, $id: String!) {  promptSource(projectReference: $projectReference, id: $id) {    id    name    description    content    sourcePath    source    editMode    sourceOnlyReasons  }}
{  "data": {    "promptSource": {      "id": "string",      "name": "string",      "description": "string",      "content": "string",      "sourcePath": "string",      "source": "string",      "editMode": "structured",      "sourceOnlyReasons": [        "string"      ]    }  }}

The PromptSource! in data.promptSource.