Changes: Swarm changes

Get job information for jobs associated with a change

Summary

Get job information for jobs associated with a change

GET /api/v10/changes/{id}/jobs

Description

Get job information for jobs associated with a change.

Important

You must be authenticated to view the job information for a change.

Tip
  • Private projects: when a project is made private, only the project owners, moderators, and members, plus users with super-level privileges in the Helix server, can see the project, its activity streams, and ongoing reviews. API responses honor these private project restrictions. For more information about private project restrictions, see Private projects.
  • Permissions: if a public review contains files that the user does not have permission to view, the review is returned but the restricted files are not displayed.

Parameters

Parameter Description Type Parameter Type Required

id

Change ID

integer

path

Yes

Example usage

Get job information for change 12345

Get job information for all of the jobs associated with change 12345.

curl -u "username:<ticket>" "https://myswarm-url/api/v10/changes/12345/jobs"

Swarm responds with:

HTTP/1.1 200 OK		

{
  "error": null,
  "messages": [],
  "data" : {
    "jobs": [{
        "job": "job000020",
        "link": "/jobs/job000998",
        "fixStatus": "open",
        "description": "Fix final bugs for beta release.\n",
        "description-markdown": "<span class=\"first-line\">Fix final bugs for beta release.</span>"
      },
      {
        "job": "job001001",
        "link": "/jobs/job001001",
        "fixStatus": "fixed",
        "description": "Write release notes for beta release.\n",
        "description-markdown": "<span class=\"first-line\">Write release notes for beta release.</span>" 
      }
    ]
  }
}

If a request fails

<error code>:

  • 403 Insufficient permissions to access the change
  • 404 Change does not exist
HTTP/1.1 <response error code>		

{
  "error": <error code>,
  "messages": [{
    "code" : "<code string>",
    "text" : "<error message>"
  }],
  "data" : null
}