openapi: 3.2.0 info: title: InstiApp Communityposts API description: InstiApp IIT Bombay API termsOfService: https://insti.app/tos.html contact: email: devcom@iitb.ac.in license: name: AGPLv3 version: v1 servers: - url: https://gymkhana.iitb.ac.in/instiapp/api security: - Basic: [] tags: - name: Community Posts paths: /communityposts: parameters: [] get: operationId: communityposts_list description: 'List Of Posts. List fresh posts arranged chronologiaclly for the current user.' responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/CommunityPostSerializers' tags: - Community Posts summary: Communityposts list x-summary-source: derived post: operationId: communityposts_create description: 'Create Post and Comments. Needs `AddP` permission for each body to be associated.' responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/CommunityPostSerializers' tags: - Community Posts requestBody: content: application/json: schema: $ref: '#/components/schemas/CommunityPostSerializers' required: true summary: Communityposts create x-summary-source: derived /communityposts/moderator/{id}: parameters: - name: id in: path description: A UUID string identifying this Community Post. required: true schema: type: string format: uuid put: operationId: communityposts_change_status description: '' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/CommunityPostSerializers' tags: - Community Posts requestBody: content: application/json: schema: $ref: '#/components/schemas/CommunityPostSerializers' required: true summary: Communityposts change status x-summary-source: derived /communityposts/{id}: parameters: - name: id in: path description: A UUID string identifying this Community Post. required: true schema: type: string format: uuid get: operationId: communityposts_read description: 'Get full Post. Get by `uuid` or `str_id`' responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/CommunityPostSerializers' tags: - Community Posts summary: Communityposts read x-summary-source: derived put: operationId: communityposts_update description: 'Update Event. Needs BodyRole with `UpdE` for at least one associated body. Disassociating bodies from the event requires the `DelE` permission and associating needs `AddE`' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/CommunityPostSerializers' tags: - Community Posts requestBody: content: application/json: schema: $ref: '#/components/schemas/CommunityPostSerializers' required: true summary: Communityposts update x-summary-source: derived components: schemas: BodySerializerMin: required: - name type: object properties: id: title: Id type: string format: uuid readOnly: true str_id: title: Str id type: - string - 'null' readOnly: true minLength: 1 name: title: Name type: string maxLength: 50 minLength: 1 short_description: title: Short description type: string maxLength: 50 website_url: title: Website url type: - string - 'null' format: uri maxLength: 200 image_url: title: Image url type: - string - 'null' format: uri maxLength: 200 cover_url: title: Cover url type: - string - 'null' format: uri maxLength: 200 followers_count: title: Followers count type: string readOnly: true short_name: title: Short name type: - string - 'null' maxLength: 20 CommunityPostSerializers: type: object properties: id: title: Id type: string format: uuid readOnly: true str_id: title: Str id type: - string - 'null' readOnly: true minLength: 1 content: title: Content type: - string - 'null' posted_by: title: Posted by type: string readOnly: true reactions_count: title: Reactions count type: string readOnly: true user_reaction: title: User reaction type: string readOnly: true comments_count: title: Comments count type: string readOnly: true time_of_creation: title: Time of creation type: string format: date-time readOnly: true time_of_modification: title: Time of modification type: string format: date-time readOnly: true image_url: title: Image url type: string readOnly: true comments: title: Comments type: string readOnly: true thread_rank: title: Thread rank type: - integer - 'null' maximum: 2147483647 minimum: -2147483648 community: $ref: '#/components/schemas/CommunitySerializerMin' status: title: Status type: - integer - 'null' maximum: 2147483647 minimum: -2147483648 tag_body: type: array items: $ref: '#/components/schemas/BodySerializerMin' readOnly: true tag_user: type: array items: $ref: '#/components/schemas/UserProfile' readOnly: true interests: type: array items: $ref: '#/components/schemas/Interest' readOnly: true featured: title: Featured type: - boolean - 'null' deleted: title: Deleted type: - boolean - 'null' anonymous: title: Anonymous type: boolean reported_by: type: array items: type: string format: uuid uniqueItems: true CommunitySerializerMin: required: - name - body type: object properties: id: title: Id type: string format: uuid readOnly: true str_id: title: Str id type: - string - 'null' readOnly: true minLength: 1 name: title: Name type: string maxLength: 100 minLength: 1 about: title: About type: - string - 'null' cover_image: title: Cover image type: - string - 'null' format: uri maxLength: 200 logo_image: title: Logo image type: - string - 'null' format: uri maxLength: 200 followers_count: title: Followers count type: string readOnly: true body: title: Body type: string format: uuid is_user_following: title: Is user following type: string readOnly: true UserProfile: type: object properties: id: title: Id type: string format: uuid readOnly: true name: title: Name type: string maxLength: 50 profile_pic: title: Profile pic type: - string - 'null' format: uri maxLength: 200 ldap_id: title: Ldap id type: - string - 'null' maxLength: 50 Interest: required: - title type: object properties: id: title: Id type: string format: uuid readOnly: true title: title: Title type: string maxLength: 80 minLength: 1 securitySchemes: Basic: type: http scheme: basic