Ресурс

AI Agent Task Pull Request

Pull requests created by AI agents during task execution.

Модель AI Agent Task Pull Request

Свойства

  • Имя
    _id
    Тип
    Object ID
    Описание

    ID of this object

  • Имя
    createdAt
    Тип
    Date
    Описание

    Date and Time when the object was created.

  • Имя
    updatedAt
    Тип
    Date
    Описание

    Date and Time when the object was updated.

  • Имя
    project
    Тип
    ProjectОбязательно
    Описание

    Project this pull request belongs to.

  • Имя
    projectId
    Тип
    Object IDОбязательно
    Описание

    ID of the project this pull request belongs to.

  • Имя
    aiAgentTask
    Тип
    AI Agent TaskОбязательно
    Описание

    AI Agent Task this pull request belongs to.

  • Имя
    aiAgentTaskId
    Тип
    Object IDОбязательно
    Описание

    ID of the AI Agent Task this pull request belongs to.

  • Имя
    aiAgent
    Тип
    AI AgentОбязательно
    Описание

    AI Agent that created this pull request.

  • Имя
    aiAgentId
    Тип
    Object IDОбязательно
    Описание

    ID of the AI Agent that created this pull request.

  • Имя
    codeRepository
    Тип
    Code Repository
    Описание

    Code Repository this pull request was created in.

  • Имя
    codeRepositoryId
    Тип
    Object ID
    Описание

    ID of the Code Repository this pull request was created in.

  • Имя
    title
    Тип
    TextОбязательно
    Описание

    Title of the pull request.

  • Имя
    description
    Тип
    Long Text
    Описание

    Description/body of the pull request.

  • Имя
    pullRequestUrl
    Тип
    URL
    Описание

    URL to the pull request on the hosting platform.

  • Имя
    pullRequestId
    Тип
    Number
    Описание

    The unique ID of the pull request from the hosting platform.

  • Имя
    pullRequestNumber
    Тип
    Number
    Описание

    The pull request number (e.g., #123).

  • Имя
    pullRequestState
    Тип
    TextОбязательно
    Описание

    Current state of the pull request (open, closed, merged).

  • Имя
    headRefName
    Тип
    Text
    Описание

    The branch name of the pull request (source branch).

  • Имя
    baseRefName
    Тип
    Text
    Описание

    The target branch for the pull request.

  • Имя
    repoOrganizationName
    Тип
    Text
    Описание

    Organization or username that owns the repository.

  • Имя
    repoName
    Тип
    Text
    Описание

    Name of the repository.

  • Имя
    createdByUser
    Тип
    User
    Описание

  • Имя
    createdByUserId
    Тип
    Object ID
    Описание

    User ID who created this object (if this object was created by a User)

GETorPOST/api/ai-agent-task-pull-request/get-list

Список

Этот метод возвращает постраничный список ваших объектов «AI Agent Task Pull Request». По умолчанию на странице до десяти записей.

Необязательные query-параметры

  • limit
    число
    Сколько объектов вернуть. По умолчанию 10, максимум 100
  • skip
    число
    Сколько объектов пропустить (для пагинации)

Необязательное тело запроса

Запрос списка

POST
/api/ai-agent-task-pull-request/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "aiAgent": true,
    "aiAgentId": true,
    "aiAgentTask": true,
    "aiAgentTaskId": true,
    "project": true
  },
  "query": {
    "pullRequestState": "Example state"
  },
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "3769f090-28fe-11f1-b591-3fdcef396aba",
      "aiAgent": "Example ai agent",
      "aiAgentId": "550e8400-e29b-41d4-a716-446655440000",
      "aiAgentTask": "Example ai agent task",
      "aiAgentTaskId": "550e8400-e29b-41d4-a716-446655440000",
      "project": "Example project"
    },
    {
      "_id": "3769f091-28fe-11f1-b591-3fdcef396aba",
      "aiAgent": "Example ai agent",
      "aiAgentId": "550e8400-e29b-41d4-a716-446655440000",
      "aiAgentTask": "Example ai agent task",
      "aiAgentTaskId": "550e8400-e29b-41d4-a716-446655440000",
      "project": "Example project"
    },
    {
      "_id": "3769f092-28fe-11f1-b591-3fdcef396aba",
      "aiAgent": "Example ai agent",
      "aiAgentId": "550e8400-e29b-41d4-a716-446655440000",
      "aiAgentTask": "Example ai agent task",
      "aiAgentTaskId": "550e8400-e29b-41d4-a716-446655440000",
      "project": "Example project"
    }
  ]
}
GETorPOST/api/ai-agent-task-pull-request/:id/get-item

Получить по ID

Возвращает объект «AI Agent Task Pull Request» по идентификатору.

  • id
    строка
    ID объекта

Необязательное тело запроса

  • select
    По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.

Запрос одного объекта

POST
/api/ai-agent-task-pull-request/:id/get-item
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "aiAgent": true,
    "aiAgentId": true,
    "aiAgentTask": true,
    "aiAgentTaskId": true,
    "project": true
  }
}

Ответ

{
  "_id": "3769f090-28fe-11f1-b591-3fdcef396aba",
  "aiAgent": "Example ai agent",
  "aiAgentId": "550e8400-e29b-41d4-a716-446655440000",
  "aiAgentTask": "Example ai agent task",
  "aiAgentTaskId": "550e8400-e29b-41d4-a716-446655440000",
  "project": "Example project"
}
POST/api/ai-agent-task-pull-request/count

Количество

Возвращает количество ваших объектов «AI Agent Task Pull Request».

Необязательное тело запроса

Запрос количества

POST
/api/ai-agent-task-pull-request/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "pullRequestState": "Example state"
  }
}

Ответ

{
  "count": 107
}
POST/api/ai-agent-task-pull-request

Создать AI Agent Task Pull Request

Создаёт новый объект.

Запрос создания

POST
/api/ai-agent-task-pull-request
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "aiAgent": "Example ai agent",
    "aiAgentId": "550e8400-e29b-41d4-a716-446655440000",
    "aiAgentTask": "Example ai agent task",
    "aiAgentTaskId": "550e8400-e29b-41d4-a716-446655440000",
    "project": "Example project"
  }
}

Ответ

{
  "_id": "3769f090-28fe-11f1-b591-3fdcef396aba",
  "aiAgent": "Example ai agent",
  "aiAgentId": "550e8400-e29b-41d4-a716-446655440000",
  "aiAgentTask": "Example ai agent task",
  "aiAgentTaskId": "550e8400-e29b-41d4-a716-446655440000",
  "project": "Example project"
}
PUT/api/ai-agent-task-pull-request/:id

Обновить по ID

Обновляет объект по ID.

Альтернативные методы

Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:

POST/api/ai-agent-task-pull-request/:id/update-item
GET/api/ai-agent-task-pull-request/:id/update-item

Запрос обновления

PUT
/api/ai-agent-task-pull-request/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "pullRequestState": "Example state",
    "title": "Example title",
    "description": "Example description"
  }
}

Ответ

{}
DELETE/api/ai-agent-task-pull-request/:id

Удалить по ID

Удаляет объект по ID.

Альтернативные методы

Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:

POST/api/ai-agent-task-pull-request/:id/delete-item
GET/api/ai-agent-task-pull-request/:id/delete-item

Запрос удаления

DELETE
/api/ai-agent-task-pull-request/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY

Ответ

{}

Права доступа

Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.

Права на чтение

Нужны для чтения AI Agent Task Pull Request

  • Project Owner
  • Project Admin
  • Project Member
  • Read AI Agent Task
  • Read All Project Resources

Права на создание

Нужны для создания AI Agent Task Pull Request

  • Project Owner
  • Project Admin
  • Project Member
  • Create AI Agent Task

Права на обновление

Нужны для обновления AI Agent Task Pull Request

  • Project Owner
  • Project Admin
  • Project Member
  • Edit AI Agent Task

Права на удаление

Нужны для удаления AI Agent Task Pull Request

  • Project Owner
  • Project Admin
  • Project Member
  • Delete AI Agent Task