openapi: 3.0.1
info:
title: Light Authorization v1 - User Comments API
version: 1.0.0
security:
- apiKeyAuth: []
- bearerAuth: []
tags:
- name: v1 - User Comments
paths:
/v1/user-comments:
get:
tags:
- v1 - User Comments
summary: List user comments
description: List user comments for a given resource
operationId: listUserComments
parameters:
- name: resourceId
in: query
description: ID of the resource this comment is attached to (e.g. vendor, customer, etc.).
schema:
type: string
format: uuid
- name: sort
in: query
schema:
type: string
description: "Sort string in the format `field:direction`. To provide multiple sort fields, separate them with commas.\n\nAvailable directions: `asc`, `desc`. \n\nAvailable fields: `createdAt`."
example: amount:desc,createdAt:asc
- name: filter
in: query
schema:
type: string
description: "Filter string in the format `field:operator:value`. To provide multiple filters, separate them with commas.\n\nAvailable operators: `eq`, `ne`, `in`, `not_in`, `gt`, `gte`, `lt`, `lte`.\n - For `in` and `not_in` operators, provide multiple values separated by the pipe character (`|`). \n\nAvailable fields: `createdBy`, `createdAt`."
example: state:in:IN_DRAFT|SCHEDULED|PAID,amount:gte:500,vendorId:ne:null
- name: limit
in: query
description: Maximum number of items to return. Default is 50, maximum is 200.
schema:
maximum: 200
type: integer
format: int32
- name: offset
in: query
description: Number of items to skip before starting to collect the result set. Deprecated, use 'cursor' instead.
deprecated: true
schema:
type: integer
format: int64
- name: cursor
in: query
description: 'The cursor position to start returning results from.
To opt-in into cursor-based pagination, provide `0` for the initial request.
For subsequent requests, use `nextCursor` and `prevCursor` from the previous response to navigate.
Cursor values are opaque and should not be constructed manually.'
schema:
type: string
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExternalPaginatedResponseV1ModelExternalUserCommentV1Model'
post:
tags:
- v1 - User Comments
summary: Create user comment
description: Creates a new user comment
operationId: createUserComment
requestBody:
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExternalCreateUserCommentRequestV1Model'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExternalUserCommentV1Model'
/v1/user-comments/{userCommentId}:
delete:
tags:
- v1 - User Comments
summary: Delete user comment
description: Deletes the given user comment
operationId: deleteUserComment
parameters:
- name: userCommentId
in: path
required: true
schema:
type: string
format: uuid
responses:
default:
description: default response
content:
application/json;charset=UTF-8: {}
patch:
tags:
- v1 - User Comments
summary: Update user comment
description: Updates the given user comment
operationId: updateUserComment
parameters:
- name: userCommentId
in: path
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExternalUpdateUserCommentRequestV1Model'
responses:
default:
description: default response
content:
application/json;charset=UTF-8:
schema:
$ref: '#/components/schemas/ExternalUserCommentV1Model'
components:
schemas:
ExternalPaginatedResponseV1ModelExternalUserCommentV1Model:
type: object
properties:
records:
type: array
description: List of records for the current page
items:
$ref: '#/components/schemas/ExternalUserCommentV1Model'
hasMore:
type: boolean
description: Boolean flag indicating if there are more records available
total:
type: integer
description: Total number of records (only for offset pagination). This field is not guaranteed to be returned and only available for offset pagination, please do not rely on it and migrate to cursor pagination.
format: int64
nullable: true
deprecated: true
nextCursor:
type: string
description: Cursor for fetching the next page (only for cursor pagination)
nullable: true
prevCursor:
type: string
description: Cursor for fetching the previous page (only for cursor pagination)
nullable: true
ExternalUserCommentV1Model:
type: object
properties:
id:
type: string
description: ID of the comment.
format: uuid
companyId:
type: string
description: ID of the company this comment belongs to.
format: uuid
resourceId:
type: string
description: ID of the resource this comment is attached to (e.g. vendor, customer, etc.).
format: uuid
content:
type: string
description: Comment content.
createdBy:
type: string
description: ID of the user who created the comment.
format: uuid
createdAt:
type: string
description: Timestamp when the comment was created.
format: date-time
updatedAt:
type: string
description: Timestamp when the comment was last updated.
format: date-time
ExternalUpdateUserCommentRequestV1Model:
type: object
properties:
content:
type: string
description: Comment content.
ExternalCreateUserCommentRequestV1Model:
type: object
properties:
resourceId:
type: string
description: ID of the resource this comment is attached to (e.g. vendor, customer, etc.).
format: uuid
content:
type: string
description: Comment content.
securitySchemes:
apiKeyAuth:
type: apiKey
description: Basic authentication header of the form **Basic** **<api_key>**, where **<api_key>** is your api key.
name: Authorization
in: header
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT