openapi: 3.0.3 info: title: Binarly Assistant Subscription API version: 4.275.2 security: - auth: [] tags: - name: Subscription paths: /api/v4/users/me/subscriptions: post: summary: Create Subscription operationId: CreateSubscription x-permission: '{resourceType}.subscriptions.create' tags: - Subscription requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubscriptionPayload' responses: '201': description: success content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError' get: summary: List Subscriptions operationId: ListSubscriptions x-permission: '{resourceType}.subscriptions.list' tags: - Subscription parameters: - $ref: '#/components/parameters/QueryResourceName' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/Subscriptions' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' /api/v4/users/me/subscriptions/{subscriptionId}: delete: summary: Delete Subscription operationId: DeleteSubscription x-permission: '{resourceType}.subscriptions.delete' tags: - Subscription parameters: - name: subscriptionId required: true in: path schema: $ref: '#/components/schemas/ULID' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/Subscription' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' components: responses: Forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenErrorResponse' Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' BadRequest: description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' NotFound: description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' InternalServerError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' schemas: WithSubscriptions: type: object required: - subscriptions properties: subscriptions: type: array items: $ref: '#/components/schemas/Subscription' Subscriptions: allOf: - $ref: '#/components/schemas/WithSubscriptions' ULID: type: string format: ulid minLength: 26 maxLength: 26 example: 01ARZ3NDEKTSV4RRFFQ69G5FAV x-go-type: ulid.ULID x-go-type-import: path: github.com/oklog/ulid/v2 ForbiddenErrorResponse: type: object required: - message - permission - resourceName properties: message: type: string permission: type: string resourceName: type: string details: type: array items: $ref: '#/components/schemas/ErrorDetail' WithId: type: object required: - id properties: id: readOnly: true allOf: - $ref: '#/components/schemas/ULID' SubscriptionPayload: type: object allOf: - $ref: '#/components/schemas/WithResourceName' Subscription: allOf: - $ref: '#/components/schemas/WithId' - $ref: '#/components/schemas/WithResourceName' - $ref: '#/components/schemas/WithCreateTime' WithCreateTime: type: object required: - createTime properties: createTime: type: string readOnly: true example: '2024-01-01T01:00:00Z' ErrorResponse: required: - message type: object properties: message: type: string readOnly: true x-go-type-skip-optional-pointer: true details: type: array items: $ref: '#/components/schemas/ErrorDetail' ErrorDetail: type: object required: - error properties: reason: type: string x-go-type-skip-optional-pointer: true field: type: string x-go-type-skip-optional-pointer: true service: type: string x-go-type-skip-optional-pointer: true WithResourceName: type: object required: - resourceName properties: resourceName: type: string parameters: QueryResourceName: name: resourceName required: true in: query schema: type: string securitySchemes: auth: type: http scheme: bearer bearerFormat: JWT