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

# Webhook 目标失败警报 API

> 通过 Didit 列出 Webhook 目标的失败警报，包括时间戳和失败次数，使用读取权限并支持 limit/offset 分页。

Didit 的 Webhook 目标活动 API 按从新到旧的顺序返回已记录的失败警报。每条记录包含 `id`、`type`（`failure_alert`）、`occurred_at` 和 `failure_count`。

使用 `limit` 和 `offset` 进行分页，并持续使用 `next` 分页，直到其为 null。`count` 可能有上限，也可能是估算值。目标不存在时返回 `404`。

这些警报不同于[投递尝试](https://docs.didit.me/zh/management-api/webhook/list-deliveries.md)。另请参阅[Webhook 失败活动](https://docs.didit.me/zh/integration/webhooks.md#重试策略)和[目标分析](https://docs.didit.me/zh/management-api/webhook/destination-analytics.md)。


## OpenAPI

````yaml zh/openapi-25.json GET /v3/organization/{organization_id}/application/{application_id}/webhook/destinations/{destination_uuid}/activity/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/organization/{organization_id}/application/{application_id}/webhook/destinations/{destination_uuid}/activity/:
    get:
      tags:
        - Webhook
      summary: 列出 Webhook 目标活动
      description: >-
        列出为某个目标记录的失败警报，按最新时间排序。需要 read:webhooks 权限。应用或 API 密钥凭证必须属于路径中的应用；成员
        Bearer token 必须有权访问该应用。这些是失败警报事件，而非单次投递尝试或出站 Webhook 事件类型。请参阅
        [Webhooks](https://docs.didit.me/zh/integration/webhooks#重试策略)。
      operationId: list_activity_webhooks_destinations
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 组织 ID。
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 应用 ID。
        - name: destination_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 目标 UUID。
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
            minimum: 1
          description: 每页最大结果数。
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
            minimum: 0
          description: 要跳过的结果数。
      responses:
        '200':
          description: 列出 Webhook 目标活动。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDestinationActivityList'
        '401':
          description: 缺少凭证、凭证无效或凭证已过期。
        '403':
          description: 调用方无权访问此应用，或缺少所需权限。
        '404':
          description: 未找到 Webhook 目标。
        '429':
          $ref: '#/components/responses/RateLimitedRead'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            client = Didit()

            for item in client.webhooks.destinations.list_activity(
                "11111111-2222-3333-4444-555555555555",
            ):
                print(item)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            const didit = new Didit();


            for await (const item of
            didit.webhooks.destinations.listActivity("11111111-2222-3333-4444-555555555555"))
            {
              console.log(item);
            }
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Webhooks.Destinations.ListActivityAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsListActivityParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            Didit client = new Didit();


            for (var item :
            client.webhooks().destinations().listActivity("11111111-2222-3333-4444-555555555555"))
            {
                System.out.println(item);
            }
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            $didit = new DiditClient();


            foreach
            ($didit->webhooks->destinations->listActivity('11111111-2222-3333-4444-555555555555')
            as $item) {
                print_r($item->toArray());
            }
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            # and DIDIT_APPLICATION_ID.

            didit = Didit::Client.new


            didit.webhooks.destinations.list_activity("11111111-2222-3333-4444-555555555555").auto_paging_each
            do |item|
              puts item.to_h
            end
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            using var client = new DiditClient();


            await foreach (var item in await
            client.Webhooks.Destinations.ListActivityAsync("11111111-2222-3333-4444-555555555555"))

            {
                Console.WriteLine(JsonSerializer.Serialize(item));
            }
components:
  schemas:
    WebhookDestinationActivityList:
      type: object
      required:
        - count
        - next
        - previous
        - results
      properties:
        count:
          type: integer
          description: 结果数量，通常上限为 100；可能是估算值。停止分页时请使用 next，而不要依据 count。
        next:
          type: string
          description: 下一页的 URL，或 null。
          nullable: true
        previous:
          type: string
          description: 上一页的 URL，若无则为 null。
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/WebhookDestinationActivity'
      example:
        count: 1
        next: null
        previous: null
        results:
          - id: 00000000-0000-4000-8000-000000000003
            type: failure_alert
            occurred_at: '2026-11-11T01:00:00Z'
            failure_count: 3
    WebhookDestinationActivity:
      type: object
      required:
        - id
        - type
        - occurred_at
        - failure_count
      properties:
        id:
          type: string
          description: 失败警报标识符。
          format: uuid
        type:
          type: string
          description: 活动类型。
          enum:
            - failure_alert
        occurred_at:
          type: string
          description: 失败告警的时间。
          format: date-time
        failure_count:
          type: integer
          description: 此警报记录的失败次数。
          minimum: 0
    RateLimitBudgetError:
      type: object
      description: 仅在速率限制中间件预算拒绝时返回。其他 429 错误（包括幂等性冲突和端点特定上限）不保证返回这些元数据字段。
      required:
        - detail
        - reference
        - limit
        - remaining
        - reset
        - window_seconds
      properties:
        detail:
          type: string
          description: 已有的可读预算拒绝信息。
        reference:
          type: string
          pattern: ^RL-[0-9a-f]{32}$
          description: 不透明的支持参考编号：RL- 后跟 32 个小写 UUID 十六进制字符。
        limit:
          type: integer
          description: 超出限额的作用域对应的预算；与 X-RateLimit-Limit 相同。
        remaining:
          type: integer
          minimum: 0
          description: 剩余额度，下限为零；与 X-RateLimit-Remaining 相同。
        reset:
          type: integer
          format: int64
          description: 窗口重置时间，以 Unix 秒表示；与 X-RateLimit-Reset 相同。
        window_seconds:
          type: integer
          description: 固定窗口时长（秒），不是剩余等待时间。重试前请遵循 Retry-After。
      example:
        detail: >-
          Write request rate limit exceeded. You can make up to 300 requests per
          minute.
        reference: RL-00000000000040008000000000000001
        limit: 300
        remaining: 0
        reset: 1794358860
        window_seconds: 60
  responses:
    RateLimitedRead:
      description: 中间件读取额度已超出。重试前请先遵守 Retry-After。
      headers:
        Retry-After:
          $ref: '#/components/headers/BudgetRetryAfter'
        X-RateLimit-Scope:
          $ref: '#/components/headers/BudgetXRateLimitScope'
        X-RateLimit-Limit:
          $ref: '#/components/headers/BudgetXRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/BudgetXRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/BudgetXRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitBudgetError'
          example:
            detail: >-
              GET request rate limit exceeded. You can make up to 600 requests
              per minute.
            reference: RL-00000000000040008000000000000001
            limit: 600
            remaining: 0
            reset: 1794358860
            window_seconds: 60
  headers:
    BudgetRetryAfter:
      description: 需等待的秒数，向上取整到下一个时间窗口。出现在中间件预算拒绝响应中。
      schema:
        type: integer
    BudgetXRateLimitScope:
      description: 已超出预算的范围。出现在中间件预算拒绝响应中。
      schema:
        type: string
    BudgetXRateLimitLimit:
      description: 超出限额的作用域的预算；与请求体限制相同。出现在中间件预算拒绝响应中。
      schema:
        type: integer
    BudgetXRateLimitRemaining:
      description: 剩余额度，下限为零；与响应体中的 remaining 相同。仅出现在中间件额度拒绝的响应中。
      schema:
        type: integer
    BudgetXRateLimitReset:
      description: 以 Unix 秒表示的重置时间；与正文中的 reset 相同。出现在中间件预算拒绝响应中。
      schema:
        type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。
    BearerAuth:
      type: http
      scheme: bearer
      description: 该应用的客户端凭证访问 token。

````

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