For AI agents: markdown of this page — /docs-content-en/infra/deploy/server-operation.md documentation index — /llms.txt

Operation outcome from the server feed

GET /v1/infra/servers/:id/operations/:operationId

Returns the outcome of a deploy or command that an entry in the server activity feed refers to. The operation is looked up by server ID and operation ID.

Use it when the outcome is read by a key other than the one that started the operation: GET /v1/infra/operations/:operationId responds only to requests made with the key that created the operation, while this endpoint follows the access rule of the activity feed. It is read by the server owner with a personal key or with the key of their OAuth application from the same Bitrix24 account, and by a development team member whose role includes server settings, with their own personal key. An OAuth application key reads the feed with the rights of its owner: the session user does not affect access, and the session token can be omitted. Keys issued for a narrow task with their own route list — the agent maintenance key, the application external API key, the team member key and the external collaborator key — do not read the outcome at this path and get 403 with a code of the form …_KEY_OUT_OF_SCOPE. This response contains only operation metadata. The private durable exec fields stdout, stderr, duration and truncated are absent even for the creator; read them through the authorized scoped endpoint. The metadata response is the same as for GET /v1/infra/operations/:operationId. The endpoint is read-only and has no side effects.

Durable exec is standalone only. async=true accepts a timeout from 1 to 86400 seconds on STANDALONE. Other server kinds receive 400 DURABLE_EXEC_UNSUPPORTED_SERVER_KIND before locking, operation creation or command dispatch, without a synchronous fallback. Galaxy exec stays synchronous with a 600-second limit. A running standalone durable job keeps its execution channel busy after 202; poll this operation rather than resend the command. An unknown outcome needs reconciliation and confirmed termination. /unstick and lock deletion do not remove the restriction on accepting durable jobs.

Parameters

Parameter Type Required Description
Parameterid (path) Typestring Requiredyes DescriptionServer ID. List: GET /v1/infra/servers
ParameteroperationId (path) Typestring Requiredyes DescriptionOperation identifier — the ref.id field of an activity feed entry, or the identifier from the POST /deploy or POST /exec response

Examples

curl — personal key

Terminal
curl -H "X-Api-Key: YOUR_API_KEY" \
  https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/operations/OPERATION_ID

curl — OAuth application

Terminal
curl -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/operations/OPERATION_ID

JavaScript — personal key

javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/operations/${operationId}`,
  { headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)

if (res.status === 410) {
  console.log('The operation existed, but its details are no longer stored')
} else {
  const { data } = await res.json()
  console.log(`Status: ${data.status}, step: ${data.step}, reason: ${data.error?.code ?? '—'}`)
}

JavaScript — OAuth application

javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/operations/${operationId}`,
  {
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  }
)
const { data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.operationId Typestring DescriptionOperation identifier
Fielddata.kind Typestring DescriptionOperation kind: deploy or exec
Fielddata.serverId Typestring DescriptionServer ID
Fielddata.status Typestring Descriptionrunning, succeeded, failed or unknown
Fielddata.step Typestring | null DescriptionThe step the operation is at or stopped at. Always null for kind: "exec"
Fielddata.exitCode Typenumber | null DescriptionOnly for kind: "exec": the command exit code if the agent confirmed it, otherwise null. A deploy has no such field
Fielddata.startedAt Typestring DescriptionStart time, ISO 8601
Fielddata.finishedAt Typestring | null DescriptionFinish time, ISO 8601. null while the operation is running
Fielddata.error Typeobject | null Description{ code, message } when status: "failed", otherwise null. code may be null if the platform did not name a failure code

The meaning of the statuses and of the exitCode + status pair is on the Operation outcome page.

Response example

JSON
{
  "success": true,
  "data": {
    "operationId": "cmop1abcdefghijklmnopqrs",
    "kind": "deploy",
    "serverId": "8f14e45f-ceea-467a-9c8d-2f1c5a6b7e30",
    "status": "failed",
    "step": "download",
    "startedAt": "2026-10-06T12:13:17.762Z",
    "finishedAt": "2026-10-06T12:13:28.135Z",
    "error": {
      "code": "DOWNLOAD_HTTP_STATUS",
      "message": "The source returned HTTP 404."
    }
  }
}

Error response example

404 — the server does not exist, is not available to this key, or the feed is not yet enabled for the server owner:

JSON
{
  "success": false,
  "error": {
    "code": "SERVER_NOT_FOUND",
    "message": "Server not found"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_OPERATION_ID DescriptionThe identifier is not of the shape the platform issues
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is not provided
HTTP401 CodeINVALID_API_KEY DescriptionThe key is not recognized
HTTP401 CodeINVALID_SESSION DescriptionAn OAuth application key is passed with a session token that is not recognized or has expired
HTTP403 CodeSESSION_APP_MISMATCH DescriptionThe session token was issued to a different application or for a different Bitrix24 account than the OAuth application key in X-Api-Key
HTTP403 CodeAGENT_MAINTENANCE_KEY_OUT_OF_SCOPE DescriptionThe request is made with an agent maintenance key: it has its own route list
HTTP403 CodeAPP_API_KEY_OUT_OF_SCOPE DescriptionThe request is made with an application external API key: it has its own route list
HTTP403 CodeEXTERNAL_COLLABORATOR_KEY_OUT_OF_SCOPE DescriptionThe request is made with an external collaborator key: it has its own route list
HTTP403 CodePORTAL_COLLABORATOR_KEY_OUT_OF_SCOPE DescriptionThe request is made with a team member key. A team member reads the outcome with their personal key
HTTP403 CodeSERVER_ROLE_FORBIDDEN DescriptionYou are in the server development team, but the role does not include server settings
HTTP404 CodeSERVER_NOT_FOUND DescriptionThe server does not exist, is not available to this key, or the feed is not yet enabled for the server owner
HTTP404 CodeOPERATION_NOT_FOUND DescriptionThe server is available, but it has no such operation: the identifier is unknown, belongs to another server, or the record has already been deleted
HTTP410 CodeOPERATION_OUTCOME_EXPIRED DescriptionThe outcome is no longer stored — more than 7 days have passed since completion. The error body also carries the operation's kind, serverId and startedAt
HTTP429 CodeRATE_LIMITED DescriptionThe limit of 60 requests per minute per key is exceeded. The current limit is returned in the x-ratelimit-limit header

For the full list of common API errors, see Errors.

Known specifics

  • Someone else's server and a disabled feed give the same 404 SERVER_NOT_FOUND. A separate response would confirm that such a server exists.
  • The outcome is readable even for an operation that is not in the feed. The endpoint looks the operation up by server, not by feed entry, so it also answers for a deploy started before the feed was enabled for the server owner — while the outcome is stored.
  • OPERATION_NOT_FOUND is returned only to someone who can see the server. An operation of another server is not read at this path, even if both servers are yours. A feed entry has no serverId of its own: take ref.id from the feed of the server whose id is in the request path.

See also