Saltar al contenido principal
GET
/
agent
/
{projectId}
/
job
/
{id}
Get agent job
curl --request GET \
  --url https://api.mintlify.com/v2/agent/{projectId}/job/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "status": "active",
  "source": {
    "repository": "<string>",
    "ref": "<string>"
  },
  "model": "<string>",
  "prLink": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "archivedAt": "2023-11-07T05:31:56Z"
}
Este endpoint obtiene el estado actual y los detalles de una tarea de agente específica. Úselo para consultar la finalización y obtener el enlace PR una vez que el agente crea uno.

Estados de tareas

EstadoDescripción
activeLa tarea se está ejecutando actualmente
completedLa tarea terminó exitosamente
failedLa tarea encontró un error
archivedLa tarea ha sido archivada

Recomendaciones de polling

  • Consulte cada 5-10 segundos mientras la tarea está active
  • Deje de consultar una vez que el estado sea completed, failed o archived
  • El campo prLink se completa una vez que el agente crea una pull request

Autorizaciones

Authorization
string
header
requerido

The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.

Parámetros de ruta

projectId
string
requerido

Your project ID. Can be copied from the API keys page in your dashboard.

id
string
requerido

The unique identifier of the agent job to retrieve.

Respuesta

Agent job details retrieved successfully.

id
string

Unique identifier for the agent job.

status
enum<string>

Current status of the agent job.

Opciones disponibles:
active,
completed,
archived,
failed
source
object

Information about the source repository.

model
string

The AI model used for this job.

URL of the pull request created by the agent. Null until the PR is created.

createdAt
string<date-time>

Timestamp when the job was created.

archivedAt
string<date-time> | null

Timestamp when the job was archived. Null if still active.