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

# List self-hosted Runners

> List the account's self-hosted Runners with their labels, status and host details.

## Restrictions

| Aspect | Value |
| - | - |
| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |
| Permissions | None — any valid `app_key` can call this operation |

## Usage

* Returns account-scope Runners plus Runners of teams the caller belongs to; `team_ids` outside the caller's teams are silently dropped.
* `scope` overrides `include_account`: `account` returns only account-scope Runners, `team` only team Runners, `all` (or empty) both.
* `query` is a case-insensitive substring match over name, ID, labels, status, version, OS, architecture, hostname and IP address, so a label value finds the Runners that carry it.
* Without `p`, `limit`, `query` or `orderby` every visible Runner is returned in one page; once any of them is set the list is paginated (`limit` defaults to 20). Default order is `created_at` descending.
* `status` is live: `degraded` means the Runner is connected but its executor is unhealthy. The connection token is never returned.


## OpenAPI

````yaml /api-reference/safari.openapi.en.json post /safari/environment/self-hosted/list
openapi: 3.1.0
info:
  title: Flashduty Open API
  description: >-
    Public HTTP API for the Flashduty AI SRE platform — skills, MCP servers
    (connectors), A2A agents, and sessions. Every operation is authenticated
    with an `app_key` query parameter issued from the Flashduty console.
  version: 1.0.0
servers:
  - url: https://api.flashcat.cloud
    description: Flashduty Open API
security:
  - AppKeyAuth: []
tags:
  - name: AI SRE/Skills
    description: AI SRE agent skill management.
  - name: AI SRE/MCP servers
    description: MCP (Model Context Protocol) server management.
  - name: AI SRE/A2A agents
    description: A2A (agent-to-agent) remote agent management.
  - name: AI SRE/Sessions
    description: AI SRE agent session history — list, inspect, and export transcripts.
  - name: AI SRE/Automations
  - name: AI SRE/Knowledge
  - name: AI SRE/Artifacts
    description: >-
      AI SRE artifact gallery — publish, browse, and publicly share
      agent-produced files.
  - name: AI SRE/Runners
    description: Self-hosted Runner (BYOC) management.
paths:
  /safari/environment/self-hosted/list:
    post:
      tags:
        - AI SRE/Runners
      summary: List self-hosted Runners
      description: >-
        List the account's self-hosted Runners with their labels, status and
        host details.
      operationId: environment-read-self-hosted-list
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SelfHostedEnvironmentListRequest'
            example:
              p: 1
              limit: 20
              query: prod
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/SelfHostedEnvironmentListResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  environments:
                    - environment_id: env_9pL3xQ7mN2vK8wR4tY6hJ1
                      name: prod-k8s-bj
                      labels:
                        - prod
                        - k8s
                        - region=cn-beijing
                      status: online
                      team_id: 2586851485973
                      can_edit: true
                      version: 0.1.40
                      os: linux
                      arch: amd64
                      hostname: ops-jump-01
                      ip_address: 10.20.3.17
                      created_at: 1788000000000
                  total: 1
                  latest_version: 0.1.40
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - AppKeyAuth: []
components:
  schemas:
    SelfHostedEnvironmentListRequest:
      type: object
      description: Filter and pagination for the self-hosted Runner list.
      properties:
        p:
          type: integer
          minimum: 1
          description: Page number, starting from 1.
        limit:
          type: integer
          minimum: 1
          description: Page size. Defaults to 20 once pagination is in effect.
        scope:
          type: string
          enum:
            - all
            - account
            - team
          description: >-
            `all` account-scope and team Runners; `account` account-scope only;
            `team` team Runners only. Overrides `include_account`.
        query:
          type: string
          maxLength: 128
          description: >-
            Substring filter over name, ID, labels, status, version, OS,
            architecture, hostname and IP address. Up to 128 characters.
        team_ids:
          type: array
          items:
            type: integer
            format: int64
          description: >-
            Restrict team Runners to these teams; IDs of teams the caller does
            not belong to are ignored.
        include_account:
          type: boolean
          default: true
          description: >-
            Whether to include account-scope Runners (`team_id` = 0). Defaults
            to `true`; ignored when `scope` is set.
        orderby:
          type: string
          enum:
            - name
            - created_at
          description: >-
            Sort column: `name` or `created_at`. Empty keeps the default order
            (`created_at` descending) and ignores `asc`.
        asc:
          type: boolean
          default: false
          description: Sort ascending when `orderby` is set.
    ResponseEnvelope:
      type: object
      description: >-
        Standard response envelope used by every Flashduty public API. On
        success `data` contains the endpoint-specific payload and `error` is
        absent. On failure `error` is present and `data` is absent. `request_id`
        is always present and is also mirrored in the `Flashcat-Request-Id`
        response header.
      properties:
        request_id:
          type: string
          description: >-
            Unique ID for this request. Mirrored in the Flashcat-Request-Id
            header. Include it when reporting issues.
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        error:
          $ref: '#/components/schemas/DutyError'
        data:
          description: >-
            Operation-specific payload, documented in each operation's 200
            response. Operations without a payload return `{}` or omit `data`
            entirely.
      required:
        - request_id
    SelfHostedEnvironmentListResponse:
      type: object
      description: A page of self-hosted Runners.
      required:
        - environments
        - total
        - latest_version
      properties:
        environments:
          type: array
          items:
            $ref: '#/components/schemas/SelfHostedEnvironmentItem'
          description: Runners on this page.
        total:
          type: integer
          format: int64
          description: Number of Runners matching the filter.
        latest_version:
          type: string
          description: >-
            Latest Runner version offered by the platform; compare it with each
            item's `version` to find Runners that need an upgrade.
    DutyError:
      type: object
      description: >-
        Error payload inside the response envelope. Present only on non-2xx
        responses.
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            Human-readable error message in the response language (`locale` /
            `lang` query parameter or `Accept-Language` header). May name the
            offending field; do not parse it.
          example: The specified parameter template_id is not valid.
      required:
        - code
        - message
    SelfHostedEnvironmentItem:
      type: object
      description: A self-hosted Runner.
      required:
        - environment_id
        - name
        - labels
        - status
        - team_id
        - can_edit
        - created_at
      properties:
        environment_id:
          type: string
          description: Runner ID.
        name:
          type: string
          description: Runner name.
        labels:
          type: array
          items:
            type: string
          description: Labels set on the Runner; empty array when none.
        status:
          type: string
          enum:
            - pending
            - online
            - offline
            - degraded
          description: >-
            Live status: `pending` created but never connected; `online`
            connected; `offline` was connected, now disconnected; `degraded`
            connected but the executor is unhealthy.
        team_id:
          type: integer
          format: int64
          description: Owning team ID; 0 for an account-scope Runner.
        can_edit:
          type: boolean
          description: '`true` when the caller can manage this Runner.'
        version:
          type: string
          description: >-
            Runner version reported on its last connection; omitted before the
            first connection.
        os:
          type: string
          description: >-
            Operating system reported by the Runner, such as `linux` or
            `darwin`.
        arch:
          type: string
          description: CPU architecture reported by the Runner, such as `amd64` or `arm64`.
        hostname:
          type: string
          description: Hostname of the machine the Runner runs on.
        ip_address:
          type: string
          description: IP address the Runner last connected from.
        created_at:
          type: integer
          format: int64
          description: Creation time in Unix epoch milliseconds.
        vcs_credentials_disabled:
          type: boolean
          description: >-
            `true` when GitHub/GitLab tokens are not injected into commands on
            this Runner; omitted otherwise.
    ErrorResponse:
      type: object
      description: Response envelope for errors. `error` is required; `data` is absent.
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
          description: >-
            Unique trace ID of this request; include it when reporting issues so
            logs can be located.
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    ErrorCode:
      type: string
      description: >-
        Error code. Every failed response sets `error.code` to one of these
        stable strings; branch on it rather than on the HTTP status.


        | Code | HTTP | Meaning |

        |---|---|---|

        | `OK` | 200 | Reserved; never returned on a failed request. |

        | `InvalidParameter` | 400 | A parameter is missing, has the wrong type,
        or failed validation; `message` usually names the field. |

        | `BadRequest` | 400 | The request breaks a business rule or conflicts
        with the current state of an object; `message` says which. |

        | `InvalidContentType` | 400 | The body is not sent as
        `application/json`. |

        | `ResourceNotFound` | 400 | The referenced object does not exist in
        this account or was deleted. Returned as HTTP 400, not 404. |

        | `NoLicense` | 400 | The account's plan does not include the feature, a
        plan quota is used up, the plan has expired, or credits are
        insufficient. |

        | `ReferenceExist` | 400 | The object is still referenced by other
        objects, so it cannot be deleted. |

        | `Unauthorized` | 401 | The APP Key is missing, invalid, or deleted. |

        | `BalanceNotEnough` | 402 | Console-only (billing); not returned by
        Open API operations. |

        | `AccessDenied` | 403 | The APP Key's permission scope or the creator's
        role does not allow this operation or object. |

        | `RouteNotFound` | 404 | No operation matches the HTTP method and path.
        |

        | `MethodNotAllowed` | 405 | The path exists but not for this HTTP
        method. |

        | `UndonedOrderExist` | 409 | Console-only (billing); not returned by
        Open API operations. |

        | `EntityTooLarge` | 413 | The request body exceeds the size limit. |

        | `RequestLocked` | 423 | Console-only (sign-in protection); not
        returned by Open API operations. |

        | `RequestVerifyRequired` | 428 | Console-only (verification code); not
        returned by Open API operations. |

        | `DangerousOperation` | 428 | Console-only (MFA for high-risk actions);
        not returned by Open API operations. |

        | `RequestTooFrequently` | 429 | A rate limit was hit; wait for the
        `Flashcat-Request-Rate-Limit-Delay` response header (seconds) before
        retrying. |

        | `InternalError` | 500 | Unexpected server error; retry with backoff
        and include `request_id` when reporting. |

        | `ServiceUnavailable` | 503 | A backend dependency is overloaded or
        unavailable; retry with backoff. |
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - EntityTooLarge
        - RequestLocked
        - RequestVerifyRequired
        - DangerousOperation
        - RequestTooFrequently
        - InternalError
        - ServiceUnavailable
      x-enumDescriptions:
        OK: Reserved; never returned on a failed request.
        InvalidParameter: >-
          A parameter is missing, has the wrong type, or failed validation;
          `message` usually names the field.
        BadRequest: >-
          The request breaks a business rule or conflicts with the current state
          of an object; `message` says which.
        InvalidContentType: The body is not sent as `application/json`.
        ResourceNotFound: >-
          The referenced object does not exist in this account or was deleted.
          Returned as HTTP 400, not 404.
        NoLicense: >-
          The account's plan does not include the feature, a plan quota is used
          up, the plan has expired, or credits are insufficient.
        ReferenceExist: >-
          The object is still referenced by other objects, so it cannot be
          deleted.
        Unauthorized: The APP Key is missing, invalid, or deleted.
        BalanceNotEnough: Console-only (billing); not returned by Open API operations.
        AccessDenied: >-
          The APP Key's permission scope or the creator's role does not allow
          this operation or object.
        RouteNotFound: No operation matches the HTTP method and path.
        MethodNotAllowed: The path exists but not for this HTTP method.
        UndonedOrderExist: Console-only (billing); not returned by Open API operations.
        EntityTooLarge: The request body exceeds the size limit.
        RequestLocked: >-
          Console-only (sign-in protection); not returned by Open API
          operations.
        RequestVerifyRequired: Console-only (verification code); not returned by Open API operations.
        DangerousOperation: >-
          Console-only (MFA for high-risk actions); not returned by Open API
          operations.
        RequestTooFrequently: >-
          A rate limit was hit; wait for the `Flashcat-Request-Rate-Limit-Delay`
          response header (seconds) before retrying.
        InternalError: >-
          Unexpected server error; retry with backoff and include `request_id`
          when reporting.
        ServiceUnavailable: A backend dependency is overloaded or unavailable; retry with backoff.
      example: InvalidParameter
  responses:
    BadRequest:
      description: Invalid request — usually a missing or malformed parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              summary: Missing required parameter
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InvalidParameter
                  message: The specified parameter skill_id is not valid.
    Unauthorized:
      description: Missing or invalid app_key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingAppKey:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: Unauthorized
                  message: You are unauthorized.
    Forbidden:
      description: >-
        The app_key is valid, but its permission scope or the creator's role
        does not allow this operation or object.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            accessDenied:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: AccessDenied
                  message: Access Denied.
    TooManyRequests:
      description: >-
        Rate limit hit. Wait for the number of seconds in
        `Flashcat-Request-Rate-Limit-Delay`, then retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: RequestTooFrequently
                  message: Request too frequently.
      headers:
        Flashcat-Request-Rate-Limit-Delay:
          description: >-
            Seconds until the current rate-limit window resets. Absent when the
            request was rejected by the gateway's global protection limit.
          schema:
            type: integer
            minimum: 0
    ServerError:
      description: Unexpected server-side error. Include the request_id when reporting.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InternalError
                  message: >-
                    We encountered an internal error, and it has been reported.
                    Please try again later.
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: app_key
      description: >-
        APP Key created in the Flashduty console under My → APP Key. Send it as
        the `app_key` query parameter or in the `Fd-App-Key` request header. Its
        effective access is the intersection of the key's permission scope and
        the creator's current role permissions. Keep it secret.

````

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