Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered.
The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.]]>
If the user is already a participant in the pull request, their previous role is replaced with the supplied role unless they are already assigned the AUTHOR role which cannot be changed and will result in a Bad Request (400) response code.
The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.]]>
{ "text": "An insightful general comment on a pull request." }Reply to a comment:
{ "text": "A measured reply.", "parent": { "id": 1 } }General file comment:
{ "text": "An insightful general comment on a file.", "anchor": { "path": "path/to/file", "srcPath": "path/to/file" } }File line comment:
{ "text": "A pithy comment on a particular line within a file.", "anchor": { "line": 1, "lineType": "CONTEXT", "fileType": "FROM" "path": "path/to/file", "srcPath": "path/to/file" } }Note: general file comments are an experimental feature and may change in the near future! For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be:
version
that must match the
server's version of the comment or the update will fail. To determine the current version of
the comment, the comment should be fetched from the server prior to the update. Look for the
'version' attribute in the returned JSON structure.
The authenticated user must have REPO_READ permission for the repository that this pull request
targets to call this resource.]]>truncated
flags will be set to
true
on the segments, hunks and diffs substructures in the returned JSON response.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.]]>
false
to stream the diff without comments]]>truncated
flags will be set to
true
on the segments, hunks and diffs substructures in the returned JSON response.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.]]>
false
to stream the diff without comments]]>The authenticated user must have REPO_READ permission for the specified repository to call this resource.]]>
In addition, a user may not revoke a group's permissions if it will reduce their own permission level.]]>
The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result.]]>
In addition, a user may not revoke their own project permissions if they do not have a higher global permission.]]>
The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a global permission that already implies that permission.]]>
The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.]]>
The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.]]>
{ "text": "An insightful general comment on a commit." }Reply to a comment:
{ "text": "A measured reply.", "parent": { "id": 1 } }General file comment:
{ "text": "An insightful general comment on a file.", "anchor": { "path": "path/to/file", "srcPath": "path/to/file" } }File line comment:
{ "text": "A pithy comment on a particular line within a file.", "anchor": { "line": 1, "lineType": "CONTEXT", "fileType": "FROM" "path": "path/to/file", "srcPath": "path/to/file" } }Note: general file comments are an experimental feature and may change in the near future! For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be:
version
that must match
the server's version of the comment or the update will fail. To determine the current version of the comment,
the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the
returned JSON structure.
The authenticated user must have REPO_READ permission for the repository that the commit
is in to call this resource.]]>POST_RECEIVE
]]>The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.]]>
The authenticated user must have REPO_READ permission for the specified project to call this resource.]]>
The authenticated user must have REPO_READ permission for the specified repository to call this resource.]]>
The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.]]>
The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.]]>
The authenticated user must have REPO_READ permission for the context repository to call this resource.]]>
srcPath
must also be specified to
produce the correct diff.
Note: This RESTful endpoint is currently not paged. The server will internally apply a hard cap to the
streamed lines, and it is not possible to request subsequent pages if that cap is exceeded.
The authenticated user must have REPO_READ permission for the repository that this pull request
targets to call this resource.]]>false
to stream the diff without comments]]>srcPath
must also be specified to
produce the correct diff.
Note: This RESTful endpoint is currently not paged. The server will internally apply a hard cap to the
streamed lines, and it is not possible to request subsequent pages if that cap is exceeded.
The authenticated user must have REPO_READ permission for the repository that this pull request
targets to call this resource.]]>false
to stream the diff without comments]]>This resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'.
There are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded file size (1MB by default). Several different image formats are supported, but PNG and JPEG are preferred due to the file size limit.
An example curl request to upload an image name 'avatar.png' would be:
curl -X POST -u username:password http://example.com/rest/api/latest/users/jdoe/avatar.png -F avatar=@avatar.png
Users are always allowed to update their own avatar. To update someone else's avatar the authenticated user must have global ADMIN permission, or global SYS_ADMIN permission to update a SYS_ADMIN user's avatar.]]>
]]>
The authenticated user must have the ADMIN permission to call this resource.]]>
The authenticated user must have the ADMIN permission to call this resource.]]>
false
to not add them to a group]]>The authenticated user must have the ADMIN permission to call this resource.]]>
In the request entity, the context attribute is the group and the itemName is the user.
The authenticated user must have the ADMIN permission to call this resource.]]>
groups/add-user
, but with the context and
itemName attributes of the supplied request entity reversed. On the face of it this may appear
redundant, but it facilitates a specific UI component in Stash.
In the request entity, the context attribute is the user and the itemName is the group.
The authenticated user must have the ADMIN permission to call this resource.]]>
The authenticated user must have the ADMIN permission to call this resource.
In the request entity, the context attribute is the group and the itemName is the user.]]>
In the request entity, the context attribute is the user and the itemName is the group.
The authenticated user must have the ADMIN permission to call this resource.]]>
The authenticated user must have the LICENSED_USER permission to call this resource.]]>
The authenticated user must have the LICENSED_USER permission to call this resource.]]>
avatar
and the value a data URI containing Base64-encoded image data. The URI should be in
the following format:
data:(content type, e.g. image/png);base64,(data)If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, project creation will fail.
The authenticated user must have PROJECT_CREATE permission to call this resource.]]>
The authenticated user must have PROJECT_VIEW permission for the specified project to call this resource.]]>
The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.]]>
To include a custom avatar for the updated project, the project definition should contain an additional attribute
with the key avatar
and the value a data URI containing Base64-encoded image data. The URI should be
in the following format:
data:(content type, e.g. image/png);base64,(data)
If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid,
project creation will fail.
The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.]]>
This resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'.
There are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded file size (1MB by default). Several different image formats are supported, but PNG and JPEG are preferred due to the file size limit.
An example curl request to upload an image name 'avatar.png' would be:
curl -X POST -u username:password http://example.com/rest/api/1.0/projects/STASH/avatar.png -F avatar=@avatar.png
The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.]]>
The authenticated user must have PROJECT_VIEW permission for the specified project to call this resource.]]>
The authenticated user must have:
The authenticated user must have:
truncated
flags will be set to
true
on the segments, hunks and diffs substructures in the returned JSON response.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.]]>
truncated
flags will be set to
true
on the segments, hunks and diffs substructures in the returned JSON response.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.]]>
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.]]>
The authenticated user must either:
Different types of activity items may be introduced in newer versions of Stash or by user installed plugins, so clients should be flexible enough to handle unexpected entity shapes in the returned page.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.]]>
The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result.]]>
In addition, a user may not revoke a group's permissions if it will reduce their own permission level.]]>
The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a project or global permission that already implies that permission.]]>
In addition, a user may not revoke their own repository permissions if they do not have a higher project or global permission.]]>