Zoho CommunityAttachment API

The CommunityAttachment API from Zoho — 2 operation(s) for communityattachment.

Documentation

Specifications

Code Examples

Other Resources

OpenAPI Specification

zoho-communityattachment-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Helpcenter CommunityAttachment API
  version: 1.0.0
tags:
- name: CommunityAttachment
paths:
  /api/v1/communityAttachments:
    post:
      tags:
      - CommunityAttachment
      summary: Add community attachment
      description: This API uploads files to the storage space allocated for the community module.
      operationId: addCommunityAttachment
      parameters:
      - $ref: ./Common.json#/components/parameters/orgId
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
              - file
      responses:
        '404':
          $ref: ./Common.json#/components/responses/urlNotFoundErrorResponse
        '200':
          $ref: '#/components/responses/addAttachment'
        '422':
          $ref: ./Common.json#/components/responses/multipleUnprocessEntityResponse
        '500':
          $ref: ./Common.json#/components/responses/internalErrorResponse
        '403':
          $ref: ./Common.json#/components/responses/forbiddenErrorResponse
      security:
      - iam-oauth2-schema:
        - Desk.forums.CREATE
        - Desk.community.CREATE
      x-audience:
      - external-public
  /api/v1/communityAttachments/{id}/content:
    get:
      tags:
      - CommunityAttachment
      summary: Get unassociated attachment
      description: Unassociated attachments are those attachments uploaded to a community topic or comment that is not yet published or saved as a draft. This API fetches an unassociated attachment from the user community.
      operationId: getUnassociatedCommunityAttachment
      parameters:
      - name: id
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type:
          - string
          - 'null'
          - integer
          format: int64
          pattern: ([0-9]+)
      - $ref: ./Common.json#/components/parameters/orgId
      responses:
        '404':
          $ref: ./Common.json#/components/responses/urlNotFoundErrorResponse
        '200':
          $ref: ./Common.json#/components/responses/fileResponse
        '500':
          $ref: ./Common.json#/components/responses/internalErrorResponse
        '403':
          $ref: ./Common.json#/components/responses/forbiddenErrorResponse
      security:
      - iam-oauth2-schema:
        - Desk.forums.READ
      x-audience:
      - external-public
components:
  responses:
    addAttachment:
      description: addAttachment template definitions
      content:
        application/json:
          schema:
            type:
            - 'null'
            - object
            additionalProperties: false
            properties:
              size:
                type:
                - string
                - 'null'
                - integer
                format: int64
                pattern: ([0-9]+)
              name:
                type:
                - string
                - 'null'
                maxLength: 100
                minLength: 0
              id:
                type:
                - string
                - 'null'
                - integer
                format: int64
                pattern: ([0-9]+)
              href:
                type:
                - string
                - 'null'
                maxLength: 200
                minLength: 0
                pattern: (^(ht|f)tp(s?)\://[-.\w]*(/?)([a-zA-Z0-9\-\.\?\,\:\'/\\+=&%\$#_@]*)?$)
            required:
            - href
            - id
            - name
            - size
          examples:
            Valid responses Definitions:
              value:
                size: '1024'
                name: attachment.jpeg
                id: '1004'
  securitySchemes:
    iam-oauth2-schema:
      $ref: ./Common.json#/components/securitySchemes/iam-oauth2-schema
x-entity: Helpcenter