Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleAssign an issue to a user

PUT /rest/api/2/issue/{issueIdOrKey}/assignee

Assign an issue to a user.

Request

Path parameters

issueIdOrKey Required

string

Issue id or key

Body parameters

active

boolean

applicationRoles

SimpleListWrapperApplicationRoleBean

avatarUrls

object

deleted

boolean

displayName

string

emailAddress

string

expand

string

groups

SimpleListWrapperGroupJsonBean

key

string

lastLoginTime

string

locale

string

name

string

self

string

Format: uri

timeZone

string

Example

Code Block
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth

url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/assignee"

auth = HTTPBasicAuth("email@example.com", "<api_token>")

headers = {
  "Content-Type": "application/json"
}

response = requests.request(
   "PUT",
   url,
   headers=headers,
   auth=auth
)

print(response.text)



Expand
titleAdd one or more attachments to an issue

POST /rest/api/2/issue/{issueIdOrKey}/attachments

Add one or more attachments to an issue. This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST. In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: no-check with the request, otherwise it will be blocked. The name of the multipart/form-data parameter that contains attachments must be file. A simple example to upload a file called "myfile.txt" to issue TEST-123: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" http://myhost/rest/api/2/issue/TEST-123/attachments

Request

Path parameters

issueIdOrKey Required

string

Issue id or key

Body parameters
Content typeValueRestrictions
multipart/form-data

string

Format: binary

Example

Code Block
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json

url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/attachments"

auth = HTTPBasicAuth("email@example.com", "<api_token>")

headers = {
  "Accept": "application/json"
}

response = requests.request(
   "POST",
   url,
   headers=headers,
   auth=auth
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))




...

Jira architecture

Atlassian's architecture documentation will help you understand Jira fundamentals and get a high-level perspective of Jira's dependencies.

...