---
title: "Get AI Agent Task Pull Request"
method: POST
path: "/ai-agent-task-pull-request/{id}/get-item"
tags: ["AI Agent Task Pull Request"]
---

# Get AI Agent Task Pull Request

`POST /ai-agent-task-pull-request/{id}/get-item`

## Request

- Base URL: `https://oneuptime.com/api`
- URL: `https://oneuptime.com/api/ai-agent-task-pull-request/{id}/get-item`
- Auth: API key in header `APIKey`
- TypeScript: <https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/docs/ai-agent-task-pull-request/:id/get-item/post.ts> (a function with typed inputs; its response is checked against the schema)

Endpoint to retrieve a single AI Agent Task Pull Request by ID

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `select` AIAgentTaskPullRequestSelectSchema: Select schema for AIAgentTaskPullRequest. Set fields to true to include them in the response.
    - `_id` boolean
    - `createdAt` boolean
    - `updatedAt` boolean
    - `deletedAt` boolean
    - `projectId` boolean
    - `aiRunId` boolean
    - `aiAgentId` boolean
    - `codeRepositoryId` boolean
    - `title` boolean
    - `description` boolean
    - `pullRequestUrl` boolean
    - `pullRequestId` boolean
    - `pullRequestNumber` boolean
    - `pullRequestState` boolean
    - `ciStatus` boolean
    - `ciStatusAt` boolean
    - `runnerVerificationStatus` boolean
    - `runnerVerificationSummary` boolean
    - `mergeCommitSha` boolean
    - `mergedAt` boolean
    - `productionStatus` boolean
    - `productionStatusAt` boolean
    - `deployedAt` boolean
    - `deployedVersion` boolean
    - `deployedCommitSha` boolean
    - `productionSummary` boolean
    - `productionCheck` boolean
    - `headRefName` boolean
    - `baseRefName` boolean
    - `repoOrganizationName` boolean
    - `repoName` boolean
    - `createdByUserId` boolean

## Response `200`

Successful response

- object
  - `data` AIAgentTaskPullRequest
    - `_id` string, uuid: ID of this object. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `createdAt` object: Date and Time when the object was created. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `updatedAt` object: Date and Time when the object was updated. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `deletedAt` object: Date and Time when the object was deleted. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `version` number: Object version
    - `projectId` string, uuid, required: ID of the project this pull request belongs to. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `aiRunId` string, uuid: ID of the AIRun (runType CodeFix) this pull request was opened by. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `aiAgentId` string, uuid: ID of the AI Agent that created this pull request. Null when it was proposed from an AI chat conversation. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `codeRepositoryId` string, uuid: ID of the Code Repository this pull request was created in. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `title` string, required: Title of the pull request. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `description` string: Description/body of the pull request. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `pullRequestUrl` string: URL to the pull request on the hosting platform. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `pullRequestId` number: The unique ID of the pull request from the hosting platform. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `pullRequestNumber` number: The pull request number (e.g., #123). Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `pullRequestState` 'open' | 'closed' | 'merged', required: Current state of the pull request (open, closed, merged). Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [Project Owner, Project Admin, Project Member, Edit AI Agent Task]
    - `ciStatus` 'Pending' | 'Green' | 'Red' | 'ExpectedFailureObserved' | 'NoCiConfigured': Rolled-up conclusion of the repository's own CI check runs on this pull request (Pending, Green, Red, ExpectedFailureObserved for should-fail regression-test PRs, NoCiConfigured). Null until the sync job first polls check runs. Written by AIAgent:SyncPullRequestStates — never by users. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `ciStatusAt` object: When the CI status last changed. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `runnerVerificationStatus` 'Passed' | 'Failed' | 'Skipped': Outcome of the Runner-side build/test verification that ran against the fix BEFORE this pull request opened (Passed, Failed, Skipped when the repository has no verification commands configured). Distinct from CI Status, which mirrors the repository's own CI checks after the PR exists. Written by the Runner at record time — never by users. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `runnerVerificationSummary` string: Human-readable summary of the Runner-side verification (which commands ran, what failed, how many repair attempts were used). Written by the Runner at record time. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `mergeCommitSha` string: The commit GitHub merged the pull request as. The fix is in production once a recorded deploy contains this commit. Written by the server when the pull request merges. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `mergedAt` object: When GitHub merged the pull request. Written by the server. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `productionStatus` 'AwaitingDeploy' | 'Watching' | 'Verified' | 'Regressed' | 'Unverifiable': Whether the merged fix worked in production: AwaitingDeploy, Watching, Verified, Regressed or Unverifiable. Written by the server, which watches what the fix was for (Production Check) once a recorded deploy contains the fix. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `productionStatusAt` object: When the production status last changed. Written by the server. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `deployedAt` object: When the first recorded deploy that contains the fix ran. Written by the server. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `deployedVersion` string: The version that deploy reported, when it reported one. Written by the server. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `deployedCommitSha` string: The commit that deploy ran: the fix's merge commit or a later one. Written by the server. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `productionSummary` string: What the production check found, in a sentence: the deploy that shipped the fix and what it measured before and since. Written by the server. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `productionCheck` 'Exception' | 'Performance' | 'Recurrence' | 'Telemetry': What production is watched for once the fix merges: Exception (the exception stops), Performance (the operation it names gets faster), Recurrence (the monitor stops raising incidents or alerts) or Telemetry (the spans and log fields it adds arrive). Empty on a watched fix of an exception from before the column existed. Written by the server when the pull request merges. Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `headRefName` string: The branch name of the pull request (source branch). Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `baseRefName` string: The target branch for the pull request. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `repoOrganizationName` string: Organization or username that owns the repository. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `repoName` string: Name of the repository. Permissions - Create: [Project Owner, Project Admin, Project Member, Create AI Agent Task], Read: [Project Owner, Project Admin, Project Member, Viewer, Read AI Agent Task], Update: [No access - you don't have permission for this operation]
    - `createdByUserId` string, uuid: User ID who created this object (if this object was created by a User). Permissions - Create: [No access - you don't have permission for this operation], Read: [Project Owner, Project Admin], Update: [No access - you don't have permission for this operation]

## Other responses

- `400`: Bad request. This response indicates that the request was malformed or contained invalid data.
- `401`: Unauthorized. This response indicates that the request requires user authentication.
- `402`: Payment Required. This response indicates that the request requires payment or a valid subscription.
- `403`: Forbidden. This response indicates that the server understood the request, but refuses to authorize it.
- `404`: Not found. The record does not exist, belongs to another project, or is one you may not read - the same answer for each.
- `405`: Project not found. This response indicates that the requested project does not exist or is not accessible.
- `408`: Request Timeout. This response indicates that the server timed out waiting for the request.
- `415`: Unable to reach server. This response indicates that the server is currently unreachable or down.
- `422`: Not authorized. This response indicates that the user does not have permission to access the requested resource.
- `500`: Internal Server Error. This response indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

---

[API](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification.md) - [All operations](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/revisions/ba3307d00304?raw)
