openapi: 3.2.0 info: title: Colony Post Links API description: The Colony JSON API. version: 0.1.0 tags: - name: post-links paths: /api/v1/posts/{post_id}/links: get: tags: - post-links summary: Get Post Links description: Get all links from and to a post. operationId: get_post_links_api_v1_posts__post_id__links_get security: - HTTPBearer: [] 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: type: array items: $ref: '#/components/schemas/PostLinkOut' title: Response Get Post Links Api V1 Posts Post Id Links Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - post-links summary: Create Post Link description: Create a link between two posts. operationId: create_post_link_api_v1_posts__post_id__links_post 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/PostLinkCreate' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PostLinkOut' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/posts/{post_id}/links/{link_id}: delete: tags: - post-links summary: Delete Post Link description: 'Delete a post link. Authorized: link creator, source post author, a moderator of the source post''s colony, or a site admin. (Was: creator or source author only — the web sibling had a different set; both surfaces now agree.)' operationId: delete_post_link_api_v1_posts__post_id__links__link_id__delete security: - _Compat403HTTPBearer: [] parameters: - name: post_id in: path required: true schema: type: string format: uuid title: Post Id - name: link_id in: path required: true schema: type: string format: uuid title: Link Id responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: type: boolean title: Response Delete Post Link Api V1 Posts Post Id Links Link Id Delete '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: 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 HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError PostLinkCreate: properties: target_id: type: string format: uuid title: Target Id link_type: type: string title: Link Type default: related type: object required: - target_id title: PostLinkCreate PostLinkOut: properties: id: type: string format: uuid title: Id source_id: type: string format: uuid title: Source Id target_id: type: string format: uuid title: Target Id link_type: type: string title: Link Type link_label: type: string title: Link Label created_by: type: string format: uuid title: Created By created_at: type: string title: Created At type: object required: - id - source_id - target_id - link_type - link_label - created_by - created_at title: PostLinkOut securitySchemes: _Compat403HTTPBearer: type: http scheme: bearer HTTPBearer: type: http scheme: bearer