diff --git a/api/v2.0/legacy_swagger.yaml b/api/v2.0/legacy_swagger.yaml index 57b513e39..d4ba18f61 100644 --- a/api/v2.0/legacy_swagger.yaml +++ b/api/v2.0/legacy_swagger.yaml @@ -3212,6 +3212,30 @@ paths: description: User have no permission to list webhook jobs of the project. '500': description: Unexpected internal errors. + '/projects/{project_id}/webhook/events': + get: + summary: Get supported event types and notify types. + description: Get supportted event types and notify types. + tags: + - Products + parameters: + - name: project_id + in: path + type: integer + format: int64 + required: true + description: Relevant project ID. + responses: + '200': + description: Success + schema: + $ref: '#/definitions/SupportedWebhookEventTypes' + '401': + description: User need to log in first. + '403': + description: User have no permission to list webhook jobs of the project. + '500': + description: Unexpected internal errors. '/projects/{project_id}/immutabletagrules': get: summary: List all immutable tag rules of current project @@ -6120,3 +6144,23 @@ definitions: 'Success': 5 'Error': 2, 'Running': 3 + SupportedWebhookEventTypes: + type: object + description: Supportted webhook event types and notify types. + properties: + event_type: + type: array + items: + $ref: '#/definitions/EventType' + notify_type: + type: array + items: + $ref: '#/definitions/NotifyType' + EventType: + type: string + description: Webhook supportted event type. + example: 'pullImage' + NotifyType: + type: string + description: Webhook supportted notify type. + example: 'http' diff --git a/api/v2.0/swagger.yaml b/api/v2.0/swagger.yaml index 0cd0c8114..d7355d5c8 100644 --- a/api/v2.0/swagger.yaml +++ b/api/v2.0/swagger.yaml @@ -558,24 +558,6 @@ paths: $ref: '#/responses/401' '500': $ref: '#/responses/500' - # TODO replace project_id with project_name - /projects/{project_id}/webhook/events: - get: - summary: Get supported event types and notify types. - description: Get supportted event types and notify types. - tags: - - notification - parameters: - - $ref: '#/parameters/projectId' - responses: - '200': - description: Success - schema: - $ref: '#/definitions/SupportedWebhookEventTypes' - '401': - $ref: '#/responses/401' - '403': - $ref: '#/responses/403' /projects/{project_name}/logs: get: summary: Get recent logs of the projects @@ -1066,23 +1048,3 @@ definitions: op_time: type: string description: The time when this operation is triggered. - SupportedWebhookEventTypes: - type: object - description: Supportted webhook event types and notify types. - properties: - event_type: - type: array - items: - $ref: '#/definitions/EventType' - notify_type: - type: array - items: - $ref: '#/definitions/NotifyType' - EventType: - type: string - description: Webhook supportted event type. - example: 'pullImage' - NotifyType: - type: string - description: Webhook supportted notify type. - example: 'http'