Helix Core is now P4 and Helix Swarm is now P4 Code Review. Product user interfaces will be updated soon. Learn more >>

Documentation | 2025.4

# Jobs: P4 Code Review Perforce jobs

## Get a list of Perforce jobs

### Summary

Get a list of Perforce jobs.

GET /api/v11/jobs

### Description

Get a list of Perforce jobs.

### Parameters

Parameter | Description | Type | Parameter Type | Required
--- | --- | --- | --- | ---
filter | Filter Perforce jobs by using a combination of a job field and value. The job fields and values available depend on your Perforce job configuration. | string | query | No
max | Maximum number of Perforce jobs to return. This does not guarantee that max jobs are returned. It does guarantee that the number of jobs returned won’t exceed max. If not specified, the 50 most recent jobs are returned. | integer | query | No

### Example usage

#### Get all Perforce jobs

curl -u "username:ticket" "https://myswarm-url/api/v11/jobs"

P4 Code Review responds with:

    HTTP/1.1 200 OK

    {
      "error": null,
      "messages": [],
      "data" : {
        "jobs": [
          {
            "job": "job001002",
            "link": "/jobs/job001002",
            "fixStatus": "open",
            "description": "The description is blank when not specified for schedules in release 2.0.  Please resolve.\n",
            "descriptionMarkdown": "<span class=\"first-line\">The description is blank when not specified for schedules in release 2.0.</span><br><span class=\"more-lines\">\n &nbsp;Please resolve.</span>"
          },
          {
          ...
          <Other job ids formatted as above>
          ...
          }
        ]
      }
    }

#### Get Perforce job id job000050

curl -u "username:ticket" "https://myswarm-url/api/v11/jobs?filter=id=job000050"

P4 Code Review responds with:

    HTTP/1.1 200 OK

    {
      "error": null,
      "messages": [],
      "data" : {
        "jobs": [
          {
            "job": "job000050",
            "link": "/jobs/job000050",
            "fixStatus": "fixed",
            "description": "Update API call for status. Use the new repsonse style.\n",
            "descriptionMarkdown": "<span class=\"first-line\">Update API call for status.</span><br><span class=\"more-lines\">\n &nbsp;Use the new repsonse style.</span>"
          }
        ]
      }
    }

#### Get the 10 most recent Perforce jobs with a status of "fixed"

curl -u "username:ticket" "https://myswarm-url/api/v11/jobs?filter=status=fixed&max=10"

P4 Code Review responds with:

    HTTP/1.1 200 OK

    {
      "error": null,
      "messages": [],
      "data" : {
        "jobs": [
          {
            "job": "job000999",
            "link": "/jobs/job000999",
            "fixStatus": "fixed",
            "description": "Copyright text is incomplete.  Please resolve.\n",
            "descriptionMarkdown": "<span class=\"first-line\">Copyright text is incomplete.</span><br><span class=\"more-lines\">\n &nbsp;Please resolve.</span>"
          },
          {
          ...
          <Other job ids formatted as above>
          ...
          }
        ]
      }
    }

#### If a request fails

<error code>:

500 Invalid field name specified, the error text contains the invalid field name.

    HTTP/1.1 <response error code>

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

Your search for returned results