Charthop category-sort API

The category-sort API from Charthop — 2 operation(s) for category-sort.

OpenAPI Specification

charthop-category-sort-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: REST API for ChartHop
  version: V1.0.0
  title: ChartHop access category-sort API
  contact:
    name: ChartHop
    url: https://www.charthop.com
    email: support@charthop.com
host: localhost
schemes:
- https
- http
consumes:
- application/json
produces:
- application/json
tags:
- name: category-sort
paths:
  /v1/org/{orgId}/category-sort:
    get:
      tags:
      - category-sort
      summary: Return category sort order
      operationId: getCategorySort
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: orgId
        in: path
        description: Org identifier (either id or slug)
        required: true
        type: string
      responses:
        '200':
          description: successful operation
          schema:
            $ref: '#/definitions/CategorySort'
        '400':
          description: bad request
        '401':
          description: not authorized
        '404':
          description: not found
        '500':
          description: Not Implemented
    post:
      tags:
      - category-sort
      summary: Create a category sort order if it doesn't exist
      operationId: createCategorySort
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: orgId
        in: path
        description: Org identifier (either id or slug)
        required: true
        type: string
      - name: body
        in: body
        description: Sort data to create
        required: true
        schema:
          $ref: '#/definitions/CreateCategorySort'
      responses:
        '201':
          description: Category sort order created
          schema:
            $ref: '#/definitions/CategorySort'
        '400':
          description: bad request
        '401':
          description: not authorized
        '404':
          description: not found
        '500':
          description: Not Implemented
    put:
      tags:
      - category-sort
      summary: Create or update category sort order for a given org and return the sort data
      operationId: updateOrCreateCategorySort
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: orgId
        in: path
        description: Org identifier (either id or slug)
        required: true
        type: string
      - name: body
        in: body
        description: Category Ids in sort order
        required: true
        schema:
          $ref: '#/definitions/UpdateCategorySort'
      responses:
        '200':
          description: Category sort order created or updated
          schema:
            $ref: '#/definitions/CategorySort'
        '400':
          description: categoryIds cannot be empty
        '403':
          description: Permission denied
    patch:
      tags:
      - category-sort
      summary: Update an existing category sort order
      operationId: updateCategorySort
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: orgId
        in: path
        description: Org identifier (either id or slug)
        required: true
        type: string
      - name: body
        in: body
        description: Sort data to update
        required: true
        schema:
          $ref: '#/definitions/UpdateCategorySort'
      responses:
        '500':
          description: Not Implemented
    delete:
      tags:
      - category-sort
      summary: Delete a category sort order
      operationId: deleteCategorySort
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: orgId
        in: path
        description: Org identifier (either id or slug)
        required: true
        type: string
      responses:
        '500':
          description: Not Implemented
  /v1/org/{orgId}/category-sort/upsert:
    post:
      tags:
      - category-sort
      summary: Create or update category sort order for a given org and return the sort data
      operationId: upsertCategorySort
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: orgId
        in: path
        description: Org identifier (either id or slug)
        required: true
        type: string
      - name: body
        in: body
        description: Category Ids in sort order
        required: true
        schema:
          $ref: '#/definitions/UpdateCategorySort'
      responses:
        '200':
          description: Category sort order created or updated
          schema:
            $ref: '#/definitions/CategorySort'
        '400':
          description: categoryIds cannot be empty
        '403':
          description: Permission denied
definitions:
  Attribution:
    type: object
    properties:
      principalUserId:
        type: string
        example: 588f7ee98f138b19220041a7
      agentUserIds:
        type: array
        items:
          type: string
          example: 588f7ee98f138b19220041a7
      eventId:
        type: string
        example: 588f7ee98f138b19220041a7
      aiChatId:
        type: string
        example: 588f7ee98f138b19220041a7
      aiToolUseId:
        type: string
      channel:
        type: string
        enum:
        - WEB
        - MOBILE
        - SLACK
        - TEAMS
        - MCP
  CategorySort:
    type: object
    required:
    - id
    properties:
      id:
        type: string
        description: globally unique id
        example: 588f7ee98f138b19220041a7
      orgId:
        type: string
        description: parent organization id (empty if built-in)
        example: 588f7ee98f138b19220041a7
      categoryIds:
        type: array
        description: ordered list of category ids of an org
        items:
          type: string
          example: 588f7ee98f138b19220041a7
      createId:
        type: string
        description: created by user id
        example: 588f7ee98f138b19220041a7
      createBehalfId:
        type: string
        description: created on behalf of user id
        example: 588f7ee98f138b19220041a7
      createAttribution:
        $ref: '#/definitions/Attribution'
      createAt:
        type: string
        description: created timestamp
        example: '2017-01-24T13:57:52Z'
      updateId:
        type: string
        description: last updated by user id
        example: 588f7ee98f138b19220041a7
      updateBehalfId:
        type: string
        description: last updated on behalf of user id
        example: 588f7ee98f138b19220041a7
      updateAttribution:
        $ref: '#/definitions/Attribution'
      updateAt:
        type: string
        description: last updated timestamp
        example: '2017-01-24T13:57:52Z'
      deleteId:
        type: string
        description: deleted by user id
        example: 588f7ee98f138b19220041a7
      deleteBehalfId:
        type: string
        description: deleted on behalf of user id
        example: 588f7ee98f138b19220041a7
      deleteAttribution:
        $ref: '#/definitions/Attribution'
      deleteAt:
        type: string
        description: deleted timestamp
        example: '2017-01-24T13:57:52Z'
  UpdateCategorySort:
    type: object
    properties:
      categoryIds:
        type: array
        description: ordered list of category ids of an org
        items:
          type: string
          example: 588f7ee98f138b19220041a7
  CreateCategorySort:
    type: object
    required:
    - orgId
    - categoryIds
    properties:
      orgId:
        type: string
        description: parent organization id (empty if built-in)
        example: 588f7ee98f138b19220041a7
      categoryIds:
        type: array
        description: ordered list of category ids of an org
        items:
          type: string
          example: 588f7ee98f138b19220041a7