v2

latestOpenAPI 3.0.02026-08-013312111.4 MB
Snippets

Update a previous revision of a snippet

Identical to UPDATE /snippets/encoded_id, except that this endpoint takes an explicit commit revision. Only the snippet's "HEAD"/"tip" (most recent) version can be updated and requests on all other, older revisions fail by returning a 405 status.

Usage of this endpoint over the unrestricted /snippets/encoded_id could be desired if the caller wants to be sure no concurrent modifications have taken place between the moment of the UPDATE request and the original GET.

This can be considered a so-called "Compare And Swap", or CAS operation.

Other than that, the two endpoints are identical in behavior.

put/snippets/{workspace}/{encoded_id}/{node_id}

Response

The updated snippet object.

typestring required
idinteger
titlestring
scm'git'

The DVCS used to store the snippet.

created_onstring date-time
updated_onstring date-time
is_privateboolean