Luminance Reviews API

The Reviews API from Luminance — 3 operation(s) for reviews.

OpenAPI Specification

luminance-reviews-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Luminance Reviews API
  version: '1.0'
  description: 'Operations tagged Reviews across 2 of this provider''s published API definitions: luminance-api-v1-3-openapi-original.yml,
    luminance-api-v1-4-openapi-original.yml. Each path carries the servers of the definition it was published
    in.'
tags:
- name: Reviews
paths:
  /projects/{project-id}/tasks/{task-id}/reviews:
    get:
      tags:
      - Reviews
      summary: Get all Reviews for a particular task
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/project-id'
      - $ref: '#/components/parameters/task-id'
      - $ref: '#/components/parameters/reviewId'
      - $ref: '#/components/parameters/documentReviewId'
      - $ref: '#/components/parameters/reviewSyncState'
      - $ref: '#/components/parameters/reviewState'
      - $ref: '#/components/parameters/reviewAssignee'
      - $ref: '#/components/parameters/reviewAssignedAt'
      - $ref: '#/components/parameters/reviewOutcome'
      security:
      - OAuth2: []
      responses:
        '200':
          $ref: '#/components/responses/review_200'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '405':
          $ref: '#/components/responses/405'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
    post:
      tags:
      - Reviews
      summary: Create a New Review
      parameters:
      - $ref: '#/components/parameters/task-id'
      - $ref: '#/components/parameters/project-id'
      requestBody:
        required: true
        content:
          application/json:
            description: Define the documentId which will have a review created for it in the relevant
              task
            schema:
              type: object
              properties:
                document_id:
                  type: integer
                  example: 83049
            example:
              document_id: 83049
      security:
      - OAuth2: []
      responses:
        '201':
          $ref: '#/components/responses/review_201'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '405':
          $ref: '#/components/responses/405'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
    patch:
      tags:
      - Reviews
      summary: Update multiple reviews
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/project-id'
      - $ref: '#/components/parameters/task-id'
      - $ref: '#/components/parameters/documentId'
      - $ref: '#/components/parameters/reviewId'
      - $ref: '#/components/parameters/reviewSyncState'
      - $ref: '#/components/parameters/reviewState'
      - $ref: '#/components/parameters/reviewAssignee'
      - $ref: '#/components/parameters/reviewAssignedAt'
      - $ref: '#/components/parameters/reviewOutcome'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  required: false
                  type: string
                  enum:
                  - active
                  - sync_staged
                  - deleted
                  example: active
                review_state:
                  required: false
                  type: string
                  enum:
                  - pending
                  - complete
                  example: pending
                assigned_to:
                  required: false
                  type: integer
                  example: 7
                outcome:
                  required: false
                  type: string
                  enum:
                  - approved
                  - rejected
                  - None
                  description: If the task is of type 'precedent' i.e. a Knowledge Bank, users can set
                    up approvals before a document can pass through a particular workflow stage. This
                    indicates whether those approvals have been completed or rejected.
  /projects/{project-id}/tasks/{task-id}/reviews/{review-id}:
    get:
      tags:
      - Reviews
      summary: Get Information on a Single Review
      parameters:
      - $ref: '#/components/parameters/review-id'
      - $ref: '#/components/parameters/task-id'
      - $ref: '#/components/parameters/project-id'
      security:
      - OAuth2: []
      responses:
        '200':
          $ref: '#/components/responses/review_200'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
    patch:
      tags:
      - Reviews
      summary: Update a Single Review
      parameters:
      - $ref: '#/components/parameters/review-id'
      - $ref: '#/components/parameters/task-id'
      - $ref: '#/components/parameters/project-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                state:
                  required: false
                  type: string
                  enum:
                  - active
                  - sync_staged
                  - deleted
                  example: active
                review_state:
                  required: false
                  type: string
                  enum:
                  - pending
                  - complete
                  example: pending
                assigned_to:
                  required: false
                  type: integer
                  example: 7
                outcome:
                  required: false
                  type: string
                  enum:
                  - approved
                  - rejected
                  - None
                  description: If the task is of type 'precedent' i.e. a Knowledge Bank, users can set
                    up approvals before a document can pass through a particular workflow stage. This
                    indicates whether those approvals have been completed or rejected.
      security:
      - OAuth2: []
      responses:
        '200':
          $ref: '#/components/responses/review_200'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '405':
          $ref: '#/components/responses/405'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
  /projects/{project-id}/tasks/{task-id}/reviews/{review-id}/analysis:
    get:
      tags:
      - Reviews
      summary: Get a JSON object containing the Traffic Light Analysis results for AI review completed
        on a single document. this may have been initiated from the {document-id}/traffic_light_analysis
        endpoint, in which case the analysis may not be immediately available, there will be up to a few
        minutes to wait. The response will be an empty array until complete.
      parameters:
      - $ref: '#/components/parameters/review-id'
      - $ref: '#/components/parameters/task-id'
      - $ref: '#/components/parameters/project-id'
      security:
      - OAuth2: []
      responses:
        '200':
          $ref: '#/components/responses/review_analysis_200'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  responses:
    '405':
      description: Method not allowed (calling api with wrong method)
    review_analysis_200:
      description: JSON array of objects representing AI outputs from Traffic Light Analysis
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/traffic_light_analysis'
          example: null
    '404':
      description: Not Found
    '500':
      description: Internal server error
    review_200:
      description: JSON array of Reviews or a single review object if review ID is referenced in the path
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Review'
          example:
            id: 3643
            created_at: '2018-12-21T14:49:38.331Z'
            created_by: 7
            task_id: 16
            document_id: 2040
            state: active
            review_state: pending
            assigned_to: 7
            assigned_at: '2018-12-21T14:49:51.292Z'
    review_201:
      description: JSON object of review created by POST method
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Review'
          example:
            id: 955758409
            created_at: '2024-07-08T17:35:56.583Z'
            created_by: 251
            task_id: 256
            document_id: 83049
            state: active
            review_state: pending
            assigned_to: None
            assigned_at: None
            outcome: None
    '403':
      description: Forbidden - the authenticated user does not have sufficient permissions to perform
        this action
    '401':
      description: Unauthorized - the authentication provided was invalid
    '429':
      description: Too many requests have been sent to the server over a given time period. Please contact
        Luminance's support team.
    '422':
      description: Unprocessable Entity - the request was well formed, but not processable
  parameters:
    project-id:
      name: project-id
      in: path
      description: Project ID
      required: true
      schema:
        type: integer
        format: int32
        minimum: 0
    documentId:
      name: id
      in: query
      description: Unique Document ID
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
      example: 654
    reviewAssignee:
      name: assigned_to
      in: query
      description: User ID of Assignee
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
    reviewState:
      name: review_state
      in: query
      description: Whether the document has been completely reviewd (complete) or is pending review (pending)
      required: false
      schema:
        type: string
        enum:
        - pending
        - complete
    review-id:
      name: review-id
      in: path
      description: Review ID
      required: true
      schema:
        type: integer
        format: int32
        minimum: 0
    reviewSyncState:
      name: state
      in: query
      description: Whether the document is active, there is a sync_staged for it (the document has been
        flagged to appear in the task but not added yet), or had a review which has been deleted
      required: false
      schema:
        type: string
        enum:
        - active
        - sync_staged
        - deleted
    documentReviewId:
      name: document_id
      in: query
      description: Unique Document ID
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
      example: 654
    limit:
      name: limit
      in: query
      description: Maximum number of objects that can be retrieved.
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
        default: 50
    task-id:
      name: task-id
      in: path
      description: Task ID
      required: true
      schema:
        type: integer
        format: int32
        minimum: 0
    reviewOutcome:
      name: outcome
      in: query
      description: If the task is of type 'precedent' i.e. a Knowledge Bank, users can set up approvals
        before a document can pass through a particular workflow stage. Each individual approval has a
        separate taskReview which can be set to completed or rejected. Once all are complete, the document
        can pass through certain workflow stages.
      required: false
      schema:
        type: string
        enum:
        - approved
        - rejected
        - None
    reviewId:
      name: id
      in: query
      description: Unique Review ID(s)
      required: false
      schema:
        type: integer
        format: int32
        minimum: 0
    reviewAssignedAt:
      name: created_at
      in: query
      description: Time of Task Allocation
      required: false
      schema:
        type: string
        format: date-time
        minimum: 0
  schemas:
    Review:
      type: object
      properties:
        id:
          type: integer
          example: 77
        created_at:
          type: string
          format: date-time
          example: '2018-12-21T14:49:38.331Z'
        created_by:
          type: integer
          example: 4
        document_id:
          type: integer
          example: 7342
        state:
          type: string
          enum:
          - active
          - deleted
          example: active
        review_state:
          type: string
          enum:
          - pending
          - complete
          example: pending
        assigned_to:
          type: integer
          example: 7
        assigned_at:
          type: string
          format: date-time
          example: '2018-12-21T14:49:51.292Z'
        outcome:
          type: string
          enum:
          - approved
          - rejected
          - None
          description: If the task is of type 'precedent' i.e. a Knowledge Bank, users can set up approvals
            before a document can pass through a particular workflow stage. This indicates whether those
            approvals have been completed or rejected.
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://moniker.app.luminance.com/auth/oauth2/token
x-refined-from:
- luminance-api-v1-3-openapi-original.yml
- luminance-api-v1-4-openapi-original.yml