API 参考订阅 API

列出订阅

只列这把 key 自己的订阅。

GET/api/v1/subscriptions
GET
/api/v1/subscriptions

只返回这把 key 自己的订阅——归属是租户隔离的全部实现,没有别的过滤条件(§6.7)。列表带 signingKeyPrefix(签名 key 的前缀)而不是验签密钥本身,要密钥从详情取。

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <key>。key 由控制台自助签发,或管理员在 /dashboard 代签

In: header

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/subscriptions"
{  "subscriptions": [    {      "id": "string",      "name": "string",      "callbackUrl": "string",      "signingKeyPrefix": "string",      "cadence": "daily",      "mode": "batch",      "scopes": [        "repos.stats"      ],      "filters": {        "repoIds": [          "string"        ],        "projectTypes": [          "client"        ],        "categoryCodes": [          "string"        ],        "includePlatformProjects": true,        "includeUncurated": true,        "includeOwnSubmissions": true      },      "filtersVersion": 0,      "enabled": true,      "disabledReason": "too_many_failures",      "watermark": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ],  "count": 0}