OpenGov Step Comments API

A Record Step can have **Comments**, which are visible to public Record Contacts, and **Internal Notes**, which are visible to employees only. Comments send Notifications to any employee assigned to a step.

OpenAPI Specification

opengov-step-comments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: v1
  title: Permitting Licensing & Code Enforcement Step Comments API
  x-logo:
    url: https://viewpointcloud.blob.core.windows.net/profile-pictures/Frame_778_Sun_Nov_12_2023_17:18:36_GMT+0000_(Coordinated_Universal_Time).png
  description: "The OpenGov Permitting & Licensing API is organized around REST. The API is based on the JSON API specification and uses standard HTTP response codes, authentication, and verbs.\n\n## Authentication\nThe OpenGov Permitting & Licensing API is authenticated using the [OAuth2](https://www.rfc-editor.org/rfc/rfc6749) Client Credentials flow. Access tokens are provided as a [bearer token](https://datatracker.ietf.org/doc/html/rfc6750) Authorization header in all API requests.\n\nTo obtain an access token, you must have an OpenGov-provided **Client ID** and **Client Secret** and make a POST request to https://accounts.viewpointcloud.com/oauth/token\n\nExample request:\n\n```bash\ncurl --request POST \\\n  --url https://accounts.viewpointcloud.com/oauth/token \\\n  --header 'content-type: application/x-www-form-urlencoded' \\\n  --data 'grant_type=client_credentials' \\\n  --data 'client_id=YOUR_CLIENT_ID' \\\n  --data 'client_secret=YOUR_CLIENT_SECRET' \\\n  --data 'audience=viewpointcloud.com/api/production'\n```\n\nThe response will include:\n- `access_token`: Access token issued by the authorization server\n- `token_type`: Type of token issued (typically `Bearer`)\n- `expires_in`: The lifetime in seconds of the access token\n<br />\n<br />\nThe API will return a 401 error if a token is invalid.\n<br />\n<br />\n"
servers:
- url: https://api.plce.opengov.com/plce
  description: Production
security:
- bearerAuth: []
tags:
- name: Step Comments
  description: 'A Record Step can have **Comments**, which are visible to public Record Contacts, and **Internal Notes**, which are visible to employees only.


    Comments send Notifications to any employee assigned to a step.

    '
paths:
  /v1/{community}/records/{recordID}/workflow-steps/{stepID}/comments:
    get:
      summary: List step comments
      operationId: listRecordStepComments
      tags:
      - Step Comments
      parameters:
      - $ref: '#/components/parameters/community'
      - $ref: '#/components/parameters/recordID'
      - $ref: '#/components/parameters/stepID'
      responses:
        '200':
          description: Returns step comments
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/RecordStepComment'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
    post:
      summary: Post a step comment
      operationId: postStepComment
      tags:
      - Step Comments
      parameters:
      - $ref: '#/components/parameters/community'
      - $ref: '#/components/parameters/recordID'
      - $ref: '#/components/parameters/stepID'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/RecordStepCommentMutable'
        required: true
      responses:
        '200':
          description: Returns the step comment object
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/RecordStepComment'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
  /v1/{community}/records/{recordID}/workflow-steps/{stepID}/comments/{commentID}:
    delete:
      summary: Delete a step comment
      operationId: removeStepComment
      tags:
      - Step Comments
      parameters:
      - $ref: '#/components/parameters/community'
      - $ref: '#/components/parameters/recordID'
      - $ref: '#/components/parameters/stepID'
      - $ref: '#/components/parameters/commentID'
      responses:
        '200':
          description: Comment Deleted
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '500':
          description: Internal Server Error
components:
  schemas:
    RecordStepComment:
      x-tags:
      - Step Comments
      type: object
      title: The step comment object
      example:
        type: record_step_comment
        id: '10987'
        attributes:
          id: 10987
          type: COMMENT
          comment: Hello World
          createdBy: auth0|60x678x9x5x9xx00709x6880
          createdAt: '2023-11-11T19:00:46.000Z'
      properties:
        id:
          type: integer
        type:
          type: string
          enum:
          - record_step_comment
        attributes:
          type: object
          properties:
            id:
              type: integer
              description: ID that uniquely identifies each comment
            type:
              type: string
              enum:
              - COMMENT
              - INTERNAL_NOTE
              description: Value indicates the type of comment
            comment:
              type: string
              description: Contents of the comment
            createdBy:
              type: string
              description: ID of the user who created this comment
            createdAt:
              type: string
              format: date-time
              description: Timestamp that indicates when this comment was created
    RecordStepCommentMutable:
      type: object
      example:
        type: record_step_comment
        attributes:
          type: COMMENT
          comment: Hello World
      properties:
        type:
          type: string
          description: Type of the resource
          enum:
          - record_step_comment
        attributes:
          type: object
          properties:
            type:
              type: string
              enum:
              - COMMENT
              - INTERNAL_NOTE
              description: Value indicates the type of comment
            comment:
              type: string
              description: Contents of the comment
  parameters:
    stepID:
      name: stepID
      in: path
      description: ID of workflow step on a record
      required: true
      schema:
        type: integer
    commentID:
      name: commentID
      in: path
      description: ID of a comment on a workflow step of a record
      required: true
      schema:
        type: integer
    community:
      name: community
      in: path
      description: Name of the community
      required: true
      schema:
        type: string
    recordID:
      name: recordID
      in: path
      description: ID of the record
      required: true
      schema:
        type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-tagGroups:
- name: Records
  tags:
  - Records
  - Record Contacts
  - Record Locations
  - Record Form
- name: Workflow
  tags:
  - Steps
  - Step Comments
- name: Events
  tags:
  - Event Types