fluke/devops-service/doc/reports.md
Tim Lianov 03dc3d8d99 v3
2018-04-04 22:44:39 +03:00

2.6 KiB

JobTasks API

Get task [GET /v3/task/:id]

Get task with id ':id'

Request

  • Policy: read_tasks
  • Method: GET
  • Headers:
    • Accept: application/json
  • Params:
    • :id - task id

Response

Status: 200

  • Headers:
    • Content-Type: application/json

Get report [GET /v3/task/:id/report]

Get report with task id ':id'

Request

  • Policy: read_tasks
  • Method: GET
  • Headers:
    • Accept: application/json
  • Params:
    • :id - task id

Response

Status: 200

  • Headers:
    • Content-Type: text/html

Get status [GET /v3/task/:id/status]

Get job status with task id ':id'

Request

  • Policy: read_tasks
  • Method: GET
  • Headers:
    • Accept: application/json
  • Params:
    • :id - task id

Response

Status: 200

  • Headers:
    • Content-Type: text/plain

Get all tasks [GET /v3/tasks]

Get all tasks

Request

  • Policy: read_tasks
  • Method: GET
  • Headers:
    • Accept: application/json
  • Params:
    • project - project id
    • environment - environment id
    • category - category name
    • type - job type
    • created_by - user id
    • date_from - date from filter (long)
    • date_to - date to filter (long)
    • sort - sort order
    • status - job status
    • server_id - server id

Response

Status: 200

  • Headers:
    • Content-Type: application/json
  • Body:
[
  {
    "id": "task id",
    "file": "report file name",
    "project": "project id",
    "environment": "environment id",
    "category": "category name",
    "created_by": "user",
    "type": job_type,
    "server_id": "server_id",
    "host": "server host",
    "stack": "stack name",
    "subtasks": [],
    "job_result_code": status
  }
]

Get latest tasks [GET /v3/tasks/latest]

Get latest tasks

Request

  • Policy: read_tasks
  • Method: GET
  • Headers:
    • Accept: application/json
  • Params:
    • project - project id
    • environment - environment id
    • category - category name
    • type - job type
    • created_by - user id
    • date_from - date from filter (long)
    • date_to - date to filter (long)
    • sort - sort order
    • status - job status
    • server_id - server id

Response

Status: 200

  • Headers:
    • Content-Type: application/json
  • Body:
[
  {
    "id": "task id",
    "file": "report file name",
    "project": "project id",
    "environment": "environment id",
    "category": "category name",
    "created_by": "user",
    "type": job_type,
    "server_id": "server_id",
    "host": "server host",
    "stack": "stack name",
    "subtasks": [],
    "job_result_code": status
  }
]