java.lang.Object | |
↳ | com.atlassian.jira.rest.v2.issue.IssueTypeResource |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Converts temporary avatar into a real avatar
| |||||||||||
Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue
type scheme.@return
| |||||||||||
Deletes the specified issue type.
| |||||||||||
Returns a list of all alternative issue types for the given issue type id.
| |||||||||||
Returns a list of all issue types visible to the user
| |||||||||||
Returns a full representation of the issue type that has the given id.
| |||||||||||
Creates temporary avatar.
| |||||||||||
Creates temporary avatar using multipart.
| |||||||||||
Updates the specified issue type from a JSON representation.@return
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Converts temporary avatar into a real avatar
issueTypeId | the id of the issue type, which avatar is updated. |
---|---|
croppingInstructions | cropping instructions |
Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue type scheme.@return
Deletes the specified issue type. If the issue type has any associated issues, these issues will be migrated to the alternative issue type specified in the parameter. You can determine the alternative issue types by calling the /rest/api/2/issuetype/{id}/alternatives resource.
issueTypeId | the id of the issue type to remove. |
---|---|
alternativeIssueTypeId | the id of an issue type to which issues associated with the removed issue type will be migrated. |
Returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated. The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme.
Returns a list of all issue types visible to the user
Returns a full representation of the issue type that has the given id.
issueTypeId | a String containing an issue type id |
---|
Creates temporary avatar. Creating a temporary avatar is part of a 3-step process in uploading a new avatar for an issue type: upload, crop, confirm.
The following examples shows these three steps using curl. The cookies (session) need to be preserved between requests, hence the use of -b and -c. The id created in step 2 needs to be passed to step 3 (you can simply pass the whole response of step 2 as the request of step 3).
curl -c cookiejar.txt -X POST -u admin:admin -H "X-Atlassian-Token: no-check" \ -H "Content-Type: image/png" --data-binary @mynewavatar.png \ 'http://localhost:8090/jira/rest/api/2/issuetype/1/avatar/temporary?filename=mynewavatar.png' curl -b cookiejar.txt -X POST -u admin:admin -H "X-Atlassian-Token: no-check" \ -H "Content-Type: application/json" --data '{"cropperWidth": "65","cropperOffsetX": "10","cropperOffsetY": "16"}' \ -o tmpid.json \ http://localhost:8090/jira/rest/api/2/issuetype/1/avatar curl -b cookiejar.txt -X PUT -u admin:admin -H "X-Atlassian-Token: no-check" \ -H "Content-Type: application/json" --data-binary @tmpid.json \ http://localhost:8090/jira/rest/api/2/issuetype/1/avatar
issueTypeId | the id of the issue type, which avatar is updated. |
---|---|
filename | name of file being uploaded |
size | size of file |
request | servlet request |
Creates temporary avatar using multipart. The response is sent back as JSON stored in a textarea. This is because the client uses remote iframing to submit avatars using multipart. So we must send them a valid HTML page back from which the client parses the JSON from.
Creating a temporary avatar is part of a 3-step process in uploading a new avatar for an issue type: upload, crop, confirm. This endpoint allows you to use a multipart upload instead of sending the image directly as the request body.
You *must* use "avatar" as the name of the upload parameter:
curl -c cookiejar.txt -X POST -u admin:admin -H "X-Atlassian-Token: no-check" \ -F "avatar=@mynewavatar.png;type=image/png" \ 'http://localhost:8090/jira/rest/api/2/issuetype/1/avatar/temporary'
issueTypeId | the id of the issue type, which avatar is updated. |
---|---|
request | servlet request |
Updates the specified issue type from a JSON representation.@return
issueTypeId | the id of the issue type to update. |
---|