프로그래밍
JIRA api
cadion
2024. 5. 22. 20:26
https://developer.atlassian.com/server/jira/platform/rest-apis/
url rest api 형태
python
- Jira library 존재 ( 난 안씀 )
- 디폴트 헤더 ( requests library 기반 )
import requests
from requests.auth import HTTPBasicAuth
import json
- 필드 양식
- response ( json ) = requests.request("GET/POST", url, headers, params, auth)
- url
- f"{jira_server}/rest/api/2/search"
- headers
- { "Accept": "application/json", "Content-Type": "application/json" }
- params
- 'jql' : j쿼리 string으로 입력 ( assignee 등 대상유저는 nickname이 아니라 id로 입력해야 함 )
- 'maxResults' :
- auth
- HTTPBasicAuth(username, api_token)
- username : Jira - 우상단 초상화- Profile - Username 확인
- api_token : Jira - 우상단 초상화 - API Auth 들어가서 발급받기
- HTTPBasicAuth(username, api_token)
- url
- return 필드 ( json )
- expand
- startAt
- maxResults
- total
- issues[]
- expand
- id : int id
- self : url
- key : string id
- fields
- 필드명들 ( customfield 포함 )
- resolution : 해결됨 여부 ( work flow에서 post로 resolution여부 지정하게 됨. 보통 unresolved인지 여부를 잔여여부로 활용 )
lastViewed
labels
aggregatetimeoriginalestimate
issuelinks
assignee
components
subtasks
reporter
progress
votes
issuetype : 분류. design task
project : OVDR
resolutiondate
watches
updated
timeoriginalestimate
description
summary
environment
duedate
fixVersions
priority
timeestimate
versions
status : 진행상태 ( open / done ). work flow에서 지정된 custom string이므로 보증할 수 없음
aggregatetimeestimate
creator
aggregateprogress
timespent
aggregatetimespent
workratio
created