diff --git a/api-spec/adminapi_filter.yaml b/api-spec/adminapi_filter.yaml new file mode 100644 index 0000000..44b5399 --- /dev/null +++ b/api-spec/adminapi_filter.yaml @@ -0,0 +1,19 @@ +get: + summary: Get filter protocol subscribers + description: Retrieve information about the serving filter subscriptions + operationId: getFilterInfo + tags: + - admin + responses: + '200': + description: Information about subscribed filter peers and topics + content: + application/json: + schema: + type: array + items: + $ref: "./schemas/apitypes.yaml#/FilterSubscription" + '400': + description: Filter Protocol is not mounted to the node + '5XX': + description: Unexpected error. diff --git a/api-spec/openapi.yaml b/api-spec/openapi.yaml index b3538bc..d7a2322 100644 --- a/api-spec/openapi.yaml +++ b/api-spec/openapi.yaml @@ -29,6 +29,8 @@ tags: paths: /admin/v1/peers: $ref: "./adminapi.yaml" + /admin/v1/filter/subscriptions: + $ref: "./adminapi_filter.yaml" /debug/v1/info: $ref: "./debugapi_info.yaml" /debug/v1/version: diff --git a/api-spec/schemas/apitypes.yaml b/api-spec/schemas/apitypes.yaml index bfe917a..599248f 100644 --- a/api-spec/schemas/apitypes.yaml +++ b/api-spec/schemas/apitypes.yaml @@ -187,3 +187,24 @@ HistoryCursor: - senderTime - storeTime - digest + +FilterSubscription: + type: object + required: + - peerId + - filterCriteria + properties: + peerId: + type: string + filterCriteria: + type: array + items: + type: object + required: + - pubsubTopic + - contentTopic + properties: + pubsubTopic: + type: string + contentTopic: + type: string