Snippets

Create a snippet for a workspace

Changed on

Identical to /snippets, except that the new snippet will be created under the workspace specified in the path parameter {workspace}.

post/snippets/{workspace}

Request

  • Base URL
    https://api.bitbucket.org/2.0
  • URL
    https://api.bitbucket.org/2.0/snippets/{workspace}
  • Auth
    • OAuth 2
      Authorization code: https://bitbucket.org/site/oauth2/authorize
      Token URL: https://bitbucket.org/site/oauth2/access_token scopes: snippet:write
    • or HTTP basic
    • or API key in header Authorization

Request body

typestring required
idinteger
titlestring
scm'git'

The DVCS used to store the snippet.

created_onstring date-time
updated_onstring date-time
is_privateboolean

Response

The newly created 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

Changes

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the optional property /// from the response with the status

    • warning

      removed the optional property /// from the response with the status