Zoho TicketAttachment API

The TicketAttachment API from Zoho — 2 operation(s) for ticketattachment.

Documentation

Specifications

Code Examples

Other Resources

OpenAPI Specification

zoho-ticketattachment-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Helpcenter TicketAttachment API
  version: 1.0.0
tags:
- name: TicketAttachment
paths:
  /api/v1/tickets/{ticketId}/attachments:
    get:
      tags:
      - TicketAttachment
      summary: List ticket attachments
      description: This API lists the files attached to a ticket.
      operationId: getTicketAttachments
      parameters:
      - name: include
        in: query
        description: SSecondary information related to the comments The allowed values are mentions and plainText. In the API request, you can pass mention, plainText, or both by using commas to separate them.
        required: false
        style: simple
        explode: true
        schema:
          type:
          - 'null'
          - array
          description: Secondary information related to the comments The allowed values are mentions and plainText. In the API request, you can pass mention, plainText, or both by using commas to separate them.
          items:
            type:
            - string
            - 'null'
            enum:
            - creator
            maxLength: 100
            minLength: 0
          uniqueItems: true
      - name: limit
        in: query
        description: Number of comments to fetch
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          - integer
          format: int32
          description: Number of comments to fetch
          maximum: 100
          minimum: 1
          pattern: ([0-9]+)
      - $ref: '#/components/parameters/isPublic'
      - name: from
        in: query
        description: Index number starting from which the comments must be fetched
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          - integer
          format: int32
          description: Index number starting from which the comments must be fetched
          minimum: 0
          pattern: ([0-9]+)
      - name: sortBy
        in: query
        description: Sort by the commentedTime attribute. The default sorting order is ascending. A - prefix denotes descending order of sorting
        required: false
        style: form
        explode: true
        schema:
          type:
          - string
          - 'null'
          description: Sort by the commentedTime attribute. The default sorting order is ascending. A - prefix denotes descending order of sorting
          enum:
          - createdTime
          maxLength: 100
          minLength: 0
      - $ref: '#/components/parameters/ticketId'
      - $ref: ./Common.json#/components/parameters/orgId
      responses:
        '204':
          $ref: ./Common.json#/components/responses/emptyResponse
        '200':
          $ref: '#/components/responses/listAllAttachmentResponse'
      security:
      - iam-oauth2-schema:
        - Desk.tickets.READ
      x-audience:
      - external-public
    post:
      tags:
      - TicketAttachment
      summary: Create Ticket attachment
      description: This API attaches a file to a ticket.
      operationId: createTicketAttachment
      parameters:
      - $ref: '#/components/parameters/isPublic'
      - $ref: '#/components/parameters/ticketId'
      - $ref: ./Common.json#/components/parameters/orgId
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: File to be attached
              required:
              - file
      responses:
        '422':
          $ref: ./Common.json#/components/responses/invalidDataErrorResponse
        '200':
          $ref: '#/components/responses/attachmentResponse'
      security:
      - iam-oauth2-schema:
        - Desk.tickets.UPDATE
      x-audience:
      - external-public
  /api/v1/tickets/{ticketId}/attachments/{attachmentId}:
    delete:
      tags:
      - TicketAttachment
      summary: Delete Ticket attachment
      description: This API deletes an attachment from a ticket.
      operationId: deleteTicketAttachment
      parameters:
      - $ref: '#/components/parameters/attachmentId'
      - $ref: '#/components/parameters/ticketId'
      - $ref: ./Common.json#/components/parameters/orgId
      responses:
        '200':
          $ref: ./Common.json#/components/responses/emptyResponse
        '403':
          $ref: ./Common.json#/components/responses/forbiddenErrorResponse
      security:
      - iam-oauth2-schema:
        - Desk.tickets.UPDATE
      x-audience:
      - external-public
    patch:
      tags:
      - TicketAttachment
      summary: Update Ticket attachment
      description: This API updates an existing attachment.
      operationId: updateTicketAttachment
      parameters:
      - $ref: '#/components/parameters/attachmentId'
      - $ref: '#/components/parameters/ticketId'
      - $ref: ./Common.json#/components/parameters/orgId
      requestBody:
        $ref: '#/components/requestBodies/attachmentJson'
      responses:
        '422':
          $ref: ./Common.json#/components/responses/invalidDataErrorResponse
        '200':
          $ref: ./Common.json#/components/responses/emptyResponse
      security:
      - iam-oauth2-schema:
        - Desk.tickets.UPDATE
      x-audience:
      - external-public
components:
  parameters:
    isPublic:
      name: isPublic
      in: query
      description: ''
      required: false
      style: form
      explode: true
      schema:
        type:
        - boolean
        - 'null'
        description: ''
    attachmentId:
      name: attachmentId
      in: path
      description: ''
      required: true
      style: simple
      explode: false
      schema:
        type:
        - string
        - 'null'
        - integer
        format: int64
        description: ''
        pattern: ([0-9]+)
    ticketId:
      name: ticketId
      in: path
      description: ''
      required: true
      style: simple
      explode: false
      schema:
        type:
        - string
        - 'null'
        - integer
        format: int64
        description: ''
        pattern: ([0-9]+)
  responses:
    attachmentResponse:
      description: attachmentResponse template definitions
      content:
        application/json:
          schema:
            type:
            - 'null'
            - object
            additionalProperties: false
            properties:
              previewurl:
                type:
                - string
                - 'null'
                description: ''
                maxLength: 16000000
                minLength: 0
                pattern: (^(ht|f)tp(s?)\://[-.\w]*(/?)([a-zA-Z0-9\-\.\?\,\:\'/\\+=&%\$#_@]*)?$)
              size:
                type:
                - string
                - 'null'
                - integer
                format: int64
                description: ''
                pattern: ([0-9]+)
              creatorId:
                type:
                - string
                - 'null'
                - integer
                format: int64
                description: ''
                pattern: ([0-9]+)
              name:
                type:
                - string
                - 'null'
                description: ''
                maxLength: 100
                minLength: 0
              createdTime:
                type:
                - string
                - 'null'
                description: ''
                maxLength: 100
                minLength: 0
                pattern: (((19|20)\d\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\d]{0,3})?(Z))
              isPublic:
                type:
                - boolean
                - 'null'
                description: ''
              id:
                type:
                - string
                - 'null'
                - integer
                format: int64
                description: ''
                pattern: ([0-9]+)
              href:
                type:
                - string
                - 'null'
                description: ''
                maxLength: 16000000
                minLength: 0
                pattern: (^(ht|f)tp(s?)\://[-.\w]*(/?)([a-zA-Z0-9\-\.\?\,\:\'/\\+=&%\$#_@]*)?$)
            required:
            - createdTime
            - creatorId
            - href
            - id
            - isPublic
            - name
            - previewurl
            - size
          examples:
            Valid responses Definitions:
              value: {}
    listAllAttachmentResponse:
      description: listAllAttachmentResponse template definitions
      content:
        application/json:
          schema:
            allOf:
            - type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      creator:
                        type:
                        - 'null'
                        - object
                        additionalProperties: false
                        description: ''
                        maxProperties: 5
                        minProperties: 5
                        properties:
                          firstName:
                            type:
                            - string
                            - 'null'
                            description: ''
                            maxLength: 40
                            minLength: 0
                          lastName:
                            type:
                            - string
                            - 'null'
                            description: ''
                            maxLength: 200
                            minLength: 0
                          photoURL:
                            type:
                            - string
                            - 'null'
                            description: ''
                            maxLength: 100
                            minLength: 0
                            pattern: (^(ht|f)tp(s?)\://[-.\w]*(/?)([a-zA-Z0-9\-\.\?\,\:\'/\\+=&%\$#_@]*)?$)
                          id:
                            type:
                            - string
                            - 'null'
                            - integer
                            format: int64
                            description: ''
                            pattern: ([0-9]+)
                          email:
                            type:
                            - string
                            - 'null'
                            description: ''
                            maxLength: 255
                            minLength: 0
                            pattern: ^[a-zA-Z0-9\_]([a-zA-Z0-9\_\+\-\.\'\&\~]*)@(?=.{4,256}$)(([a-zA-Z0-9]+)(([\-\_]*[a-zA-Z0-9])*)[\.])+[a-zA-Z]{2,22}$
                        required:
                        - email
                        - firstName
                        - id
                        - lastName
                        - photoURL
            - type:
              - 'null'
              - object
              additionalProperties: false
              properties:
                data:
                  $ref: ./TicketAttachment.json#/components/schemas/data
              required:
              - data
          examples:
            Valid responses Definitions:
              value: {}
  requestBodies:
    attachmentJson:
      content:
        application/json:
          schema:
            type:
            - 'null'
            - object
            additionalProperties: false
            properties:
              isPublic:
                type:
                - boolean
                - 'null'
                description: ''
          examples:
            Valid requestBody Definitions:
              value: {}
  securitySchemes:
    iam-oauth2-schema:
      $ref: ./Common.json#/components/securitySchemes/iam-oauth2-schema
x-entity: Helpcenter