AI 자동화 작업 조회
AI 자동화 작업의 현재 상태를 조회합니다. 작업이 진행 중인지(running), 완료(completed), 실패(failed), 취소(cancelled)되었는지 확인할 때 사용합니다.
필요 권한
사용자 이상의 계정으로 이용할 수 있습니다.
HTTP 요청
GET /api/sonar/ai/automation/tasks/:task_id
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/ai/automation/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890
요청 매개변수
경로 매개변수
| 키 | 타입 | 설명 | 비고 |
|---|---|---|---|
| task_id | 문자열 | AI 자동화 작업 식별자 | 36자 |
정상 응답
{
"task": {
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"command": "sonar-ai-generate-parser",
"callback": "sonar-ai-generate-parser-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "running"
}
}
- task (맵): AI 자동화 작업 정보
- task_id (문자열): 작업 식별자
- command (문자열): 작업 종류.
sonar-ai-generate-parser,sonar-ai-fix-parser,sonar-ai-generate-dashboard중 하나 - callback (문자열): 진행 상황 푸시 콜백 채널 이름.
command뒤에-와 작업 식별자가 결합된 형식 - status (문자열): 작업 상태.
running,completed,failed,cancelled중 하나
오류 응답
task_id가 누락된 경우
HTTP 상태 코드 400 응답
{
"error_code": "null-argument",
"error_msg": "task_id should be not null"
}
task_id가 GUID 형식이 아닌 경우
HTTP 상태 코드 400 응답
{
"error_code": "invalid-param-type",
"error_msg": "task_id should be guid type."
}
작업이 존재하지 않는 경우
HTTP 상태 코드 500 응답
{
"error_code": "invalid-argument",
"error_msg": "Task not found: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
권한이 없는 경우
HTTP 상태 코드 500 응답
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}