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

# List action edges

For how action and site edges differ, see [Querying traces](https://docs.appsignal.com/api/v2/traces.md#service-dependency-edges).

```yaml POST /api/v2/tracing/action_edges theme={null}
openapi: 3.1.0
info:
  title: AppSignal V2 API
  description: >-
    REST API for metrics, traces, logs, Kubernetes monitoring, and deployment
    tracking.
  license:
    name: ''
  version: 0.1.0
paths:
  /api/v2/tracing/action_edges:
    post:
      tags:
        - Tracing
      summary: List action edges
      operationId: action_edges
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionEdgesApiQuery'
            example:
              site_id: abc123
              namespace: PublicApi/web
              action: UsersController#show
              from: '2024-01-01T00:00:00Z'
              to: '2024-01-01T01:00:00Z'
        required: true
      responses:
        '200':
          description: The focused action's upstream and downstream edges.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionEdgesResponse'
              example:
                upstream:
                  - site_id: def456
                    site_name: Frontend
                    site_environment: production
                    service: Frontend
                    namespace: web
                    action: HomeController#index
                    caller_kind: CLIENT
                    callee_kind: SERVER
                    edge_type: SYNC
                    count: 1200
                    error_count: 3
                    mean: 42.5
                    p_90: 80.1
                    p_95: 110.7
                downstream: []
        '400':
          description: >-
            `namespace` is not `<service>/<namespace>` with both halves
            non-empty, or the query is otherwise invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Missing or invalid authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Route or resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: External query concurrency limit exceeded; retry shortly.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Unhandled server-side failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
        - token_query: []
components:
  schemas:
    ActionEdge:
      type: object
      description: A single edge in the upstream or downstream list.
      required:
        - service
        - namespace
        - action
        - caller_kind
        - callee_kind
        - edge_type
        - count
        - error_count
        - mean
        - p_90
        - p_95
      properties:
        site_id:
          type:
            - string
            - 'null'
          description: |-
            Site ID of the peer service if it is one the user has access to,
            otherwise `None`. Resolved at ingestion via the in-memory site
            metadata, so renames do not invalidate historical rows.
        site_name:
          type:
            - string
            - 'null'
          description: Current display name of the peer site, if accessible to the user.
        site_environment:
          type:
            - string
            - 'null'
          description: >-
            Environment of the peer site (e.g. "production"), if accessible to
            the user.
        service:
          type: string
          description: |-
            Peer service (app name) on the other end of the edge. For peers
            in the user's accessible sites this reflects the *current* name
            (looked up from MongoDB at query time); for external peers it
            falls back to the value the agent reported at ingestion.
        namespace:
          type: string
          description: Peer namespace.
        action:
          type: string
          description: Peer action name.
        caller_kind:
          type: string
          description: OTel span kind on the caller side.
        callee_kind:
          type: string
          description: OTel span kind on the callee side.
        edge_type:
          type: string
          description: '`SYNC` or `ASYNC`.'
        count:
          type: integer
          format: u-int64
          description: Total request count over the time range.
          minimum: 0
        error_count:
          type: integer
          format: u-int64
          description: Total error count over the time range.
          minimum: 0
        mean:
          type: number
          format: double
          description: Mean duration in milliseconds (count-weighted across the range).
        p_90:
          type: number
          format: double
          description: >-
            90th percentile duration in milliseconds. Approximation:
            traffic-weighted

            average of per-minute pre-computed p_90 values (sum(p_90 * count) /
            sum(count)).
        p_95:
          type: number
          format: double
          description: >-
            95th percentile duration in milliseconds. Approximation:
            traffic-weighted

            average of per-minute pre-computed p_95 values (sum(p_95 * count) /
            sum(count)).
    ActionEdgesApiQuery:
      type: object
      description: Query parameters for listing upstream and downstream action edges.
      required:
        - site_id
        - namespace
        - action
        - from
        - to
      properties:
        site_id:
          type: string
          description: Site ID that anchors the query (the focused action's site).
        namespace:
          type: string
          description: >-
            Focused action's `"<service>/<namespace>"` (e.g. `"PublicApi/web"`),
            split on the first `/`

            (later `/` stay in the namespace). Both halves must be non-empty,
            else 400.
        action:
          type: string
          description: Action name of the focused action.
        from:
          type: string
          format: date-time
          description: Start of the time range (inclusive).
        to:
          type: string
          format: date-time
          description: End of the time range (exclusive).
    ActionEdgesResponse:
      type: object
      description: Response shape for the action edges endpoint.
      required:
        - upstream
        - downstream
      properties:
        upstream:
          type: array
          items:
            $ref: '#/components/schemas/ActionEdge'
          description: Upstream edges (callers into the focused action).
        downstream:
          type: array
          items:
            $ref: '#/components/schemas/ActionEdge'
          description: Downstream edges (callees the focused action invoked).
    BadRequestResponse:
      type: object
      description: >-
        Standard body for HTTP 400 Bad Request responses. Branch on the stable
        `error` slug, display `message` as-is, and read per-error structured
        data from `details`.
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Stable, machine-readable slug identifying the specific error case.
        message:
          type: string
          description: Human-readable message. Safe to log or display to end users.
        details:
          description: >-
            Per-error structured payload. Shape varies by
            [`error`](Self::error).
    ErrorResponse:
      type: object
      description: Error body returned for 401, 404 and 500 responses.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    TooManyRequestsResponse:
      type: object
      description: Error body returned for 429 responses.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
        suggestion:
          type:
            - string
            - 'null'
          description: >-
            A cheaper way to write the request's filter. Only the trace list

            endpoints set it, and only for a filter with a known indexed
            rewrite.
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <token>`'
    token_query:
      type: apiKey
      in: query
      name: token
      description: >-
        Alternative to the Authorization header: pass the token as a
        `?token=<token>` query parameter.
```


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.appsignal.com/llms.txt).


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