List snippets in a workspace
Changed onReturns a paginated list of snippets owned by {workspace}.
To limit the set of returned snippets, apply the ?role=[owner|contributor|member] query parameter where the roles are defined as follows:
- owner: snippets owned by {workspace} that also belong to the current user (only returns results when {workspace} is the current user's personal workspace)
- contributor: snippets owned by {workspace} that the current user is watching, plus any owned by {workspace} and the current user
- member: all snippets owned by {workspace} if the current user is a member, otherwise only those the current user is watching
When no role is specified, all snippets owned by {workspace} are returned.
If the current user is not a member of {workspace}, only public snippets are returned regardless of role.
The returned response is a normal paginated JSON list. This endpoint only supports application/json responses and no multipart/form-data or multipart/related. As a result, it is not possible to include the file contents.
Request
- Base URLhttps://api.bitbucket.org/2.0
- URLhttps://api.bitbucket.org/2.0/snippets/{workspace}
- Auth
- OAuth 2Authorization code: https://bitbucket.org/site/oauth2/authorizeToken URL: https://bitbucket.org/site/oauth2/access_token scopes: snippet
- or HTTP basic
- or API key in header Authorization
Query parameters
Filter down the result based on the authenticated user's role (owner, contributor, or member).
Response
A paginated list of snippets.
Changes
- warning
removed the optional property
/////from the response with the status - warning
removed the optional property
/////from the response with the status
- warning