Es gibt Dokumentation here über das JSON-Schema und einig Beispiel JSON, die im Körper der POST-Anforderung gehen muss /rest/api/2/issue
https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-createIssue
Hier ist ein grundlegender python3 Skript einen Beitrag Anfrag
import requests, json
from requests.auth import HTTPBasicAuth
base_url = "myjira.example.com" # The base_url of the Jira insance.
auth_user = "simon" # Jira Username
auth_pass = "N0tMyRe3lP4ssw0rd" # Jira Password
url = "https://{}/rest/api/2/issue".format(base_url)
# Set issue fields in python dictionary. See docs and comment below regarding available fields
fields = {
"summary": "something is wrong"
}
payload = {"fields": fields}
headers = {"Content-Type": "application/json"}
response = requests.post(
url,
auth=(auth_user, auth_pass),
headers=headers,
data=json.dumps(payload))
print("POST {}".format(url))
print("Response {}: {}".format(response.status_code, response.reason))
_json = json.loads(response.text)
zu machen
Mit this HTTP-Anforderungen Bibliothek für python
http://docs.python-requests.org/en/master/
Sie können eine GET-Anfrage an /rest/api/2/issue/{issueIdOrKey}/editmeta
unter Verwendung der ID oder des Schlüssels des vorhandenen Problems im selben Projekt wie das Problem erstellen, das Sie über die API erstellen werden, um eine Liste aller Felder zu erhalten, die Sie festlegen können sind erforderlich.
https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getEditIssueMeta
Nur ein normaler API-Aufruf eine JIRA, nicht sicher zu schaffen, was ist Ihr Anliegen. – chenrui
Wählen Sie einfach die richtige API ([Cloud] (https://docs.atlassian.com/jira/REST/cloud) vs. [Server] (https://docs.atlassian.com/jira/REST/server/)) und senden Sie eine POST-Anfrage mit dem parametrisierten Inhalt an den Endpunkt "/ rest/api/2/issue". –