Prompts

Restore prompt version

Changed on

Restore a prompt version by creating a new version with the content from the specified version

post/v1/private/prompts/{promptId}/versions/{versionId}/restore

Request

  • Base URL
    http://localhost:5173/api
  • URL
    http://localhost:5173/api/v1/private/prompts/{promptId}/versions/{versionId}/restore
  • Auth
    none declared

Path parameters

promptIdstring uuid required
versionIdstring uuid required

Response

OK

idstring uuid

version unique identifier, generated if absent

prompt_idstring uuid
commitstring

version short unique identifier, generated if absent. it must be 8 characters long

version_numberstring

sequential version number in the format v<N>; null for masks

templatestring required
metadataJsonNodeDetail
type'mustache' | 'jinja2' | 'python'
version_type'prompt_version' | 'mask'

version type discriminator; defaults to prompt_version

environmentstring

Deprecated: use 'environments' instead

environmentsstring[]
change_descriptionstring
tagsstring[]
variablesstring[]
template_structure'text' | 'chat'
created_atstring date-time
created_bystring

Changes

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the optional property to the response with the status