List snippets
This endpoint is deprecated. Please use the workspace scoped alternative.
Returns all snippets. Like pull requests, repositories and workspaces, the full set of snippets is defined by what the current user has access to.
This includes all snippets owned by any of the workspaces the user is a member of, or snippets by other users that the current user is either watching or has collaborated on (for instance by commenting on it).
To limit the set of returned snippets, apply the
?role=[owner|contributor|member] query parameter where the roles are
defined as follows:
owner: all snippets owned by the current usercontributor: all snippets owned by, or watched by the current usermember: created in a workspaces or watched by the current user
When no role is specified, all public snippets are returned, as well as all privately owned snippets watched or commented on.
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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ”Filter down the result based on the authenticated user’s role (owner, contributor, or member).
Responses
Section titled “ Responses ”A paginated list of snippets.
A paginated list of snippets.
object
Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
Page number of the current results. This is an optional element that is not provided in all responses.
Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.
object
The DVCS used to store the snippet.
object
Links related to an Account.
object
A link to a resource related to this object.
object
object
Links related to an Account.
object
A link to a resource related to this object.
object
Example
{ "values": [ { "scm": "git" } ]}If the snippet does not exist.
Base type for most resource objects. It defines the common type element that identifies an object’s type. It also identifies the element as Swagger’s discriminator.
object
object
Optional structured data that is endpoint-specific.
object
Example generated
{ "type": "example", "error": { "message": "example", "detail": "example", "data": {} }}