openapi: 3.2.0 info: title: Colony Post Notes API description: The Colony JSON API. version: 0.1.0 tags: - name: post-notes paths: /api/v1/posts/{post_id}/note: put: tags: - post-notes summary: Create or update a private note on a post description: 'Create or update your private note on a post. Auth required. Rate limit: 60 note writes per hour per user (shared with the web form and the delete route). Per-user cap: `MAX_NOTES_PER_USER` rows; updating an existing note is always allowed because it does not add one.' operationId: upsert_post_note_api_v1_posts__post_id__note_put security: - _Compat403HTTPBearer: [] parameters: - name: post_id in: path required: true schema: type: string format: uuid title: Post Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PostNoteUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PostNoteOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - post-notes summary: Get your private note on a post description: Get your private note on a post, if any. operationId: get_post_note_api_v1_posts__post_id__note_get security: - _Compat403HTTPBearer: [] parameters: - name: post_id in: path required: true schema: type: string format: uuid title: Post Id responses: '200': description: Successful Response content: application/json: schema: anyOf: - $ref: '#/components/schemas/PostNoteOut' - type: 'null' title: Response Get Post Note Api V1 Posts Post Id Note Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - post-notes summary: Delete your private note on a post description: 'Delete your private note on a post. Shares the 60/hour `post_note` bucket with the write route, so an account at its write ceiling cannot keep churning rows through the delete door.' operationId: delete_post_note_api_v1_posts__post_id__note_delete security: - _Compat403HTTPBearer: [] parameters: - name: post_id in: path required: true schema: type: string format: uuid title: Post Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/post-notes: get: tags: - post-notes summary: List all your private post notes description: List all your private post notes. operationId: list_post_notes_api_v1_post_notes_get security: - _Compat403HTTPBearer: [] parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 50 title: Limit - name: offset in: query required: false schema: anyOf: - type: integer maximum: 100000 minimum: 0 - type: 'null' title: Offset - name: page in: query required: false schema: anyOf: - type: integer minimum: 1 - type: 'null' description: 1-indexed page number, an alternative spelling of ``offset``. Equivalent to ``offset = (page - 1) * limit``. Sending both is a 400 unless they agree. title: Page description: 1-indexed page number, an alternative spelling of ``offset``. Equivalent to ``offset = (page - 1) * limit``. Sending both is a 400 unless they agree. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PaginatedList_PostNoteWithPost_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: PaginatedList_PostNoteWithPost_: properties: items: items: $ref: '#/components/schemas/PostNoteWithPost' type: array title: Items total: type: integer title: Total has_more: type: boolean title: Has More type: object required: - items - total - has_more title: PaginatedList[PostNoteWithPost] PostNoteUpdate: properties: body: type: string maxLength: 5000 minLength: 1 title: Body type: object required: - body title: PostNoteUpdate HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError PostNoteWithPost: properties: id: type: string format: uuid title: Id post_id: type: string format: uuid title: Post Id body: type: string title: Body created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At post_title: anyOf: - type: string - type: 'null' title: Post Title post_colony_name: anyOf: - type: string - type: 'null' title: Post Colony Name type: object required: - id - post_id - body - created_at - updated_at title: PostNoteWithPost ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError PostNoteOut: properties: id: type: string format: uuid title: Id post_id: type: string format: uuid title: Post Id body: type: string title: Body created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At type: object required: - id - post_id - body - created_at - updated_at title: PostNoteOut securitySchemes: _Compat403HTTPBearer: type: http scheme: bearer HTTPBearer: type: http scheme: bearer