> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apsio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel a remote request

> Takes an open request out of the policies: devices stop seeing it at their next fetch. A device that already served it is not affected. Owners and admins; audited as device_request.cancel.



## OpenAPI

````yaml /api-reference/openapi.json post /orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /orgs/{orgId}/projects/{projectId}/device-requests/{requestId}/cancel:
    post:
      summary: Cancel a remote request
      description: >-
        Takes an open request out of the policies: devices stop seeing it at
        their next fetch. A device that already served it is not affected.
        Owners and admins; audited as device_request.cancel.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a001
          required: true
          name: orgId
          in: path
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a001
          required: true
          name: projectId
          in: path
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a001
          required: true
          name: requestId
          in: path
      responses:
        '200':
          description: The canceled request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceRequest'
      security:
        - session: []
components:
  schemas:
    DeviceRequest:
      type: object
      properties:
        id:
          type: string
        project_id:
          type: string
        kind:
          type: string
          enum:
            - send
            - delete
        subject_kind:
          type: string
          enum:
            - install
            - user
        subject_hint:
          type: string
          description: The install id's or user hash's last four characters.
        families:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - summary
              - errors
              - logs
              - spans
              - network
              - metrics
              - replay
          description: 'Null: every family.'
        created_by:
          type:
            - string
            - 'null'
        created_at:
          type: string
        expires_at:
          type: string
        canceled_at:
          type:
            - string
            - 'null'
        state:
          type: string
          enum:
            - open
            - expired
            - canceled
          description: 'Open: in the policy every device of the project fetches.'
        answers:
          type:
            - object
            - 'null'
          properties:
            devices:
              type: integer
              description: Installs that answered it.
            sent:
              type: integer
              description: Of them, those that sent what they held.
            deleted:
              type: integer
              description: Those that deleted it.
            nothing:
              type: integer
              description: Those that held nothing the request matched.
            records:
              type: integer
              description: The records they reported, each install's latest answer.
            last_at:
              type:
                - string
                - 'null'
              description: The latest answer.
          required:
            - devices
            - sent
            - deleted
            - nothing
            - records
            - last_at
          description: >-
            How devices answered (their apsio.remote_request records, spec
            15.5), by install; never the install ids. Null when the answers
            could not be read, which is not zero.
      required:
        - id
        - project_id
        - kind
        - subject_kind
        - subject_hint
        - families
        - created_by
        - created_at
        - expires_at
        - canceled_at
        - state
        - answers
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: apsio_session
      description: >-
        The console session, set by /v1/auth/callback (`__Host-apsio_session`
        when host-only).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.