> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kosli.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.kosli.com/feedback

```json
{
  "path": "/api-reference/approval/get-approval",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Get approval

> Get an approval record.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json get /approvals/{org}/{flow_name}/{approval_number}
openapi: 3.1.0
info:
  title: Kosli API
  summary: The API for communicating with Kosli
  description: >

    # Authentication 


    When making requests against Kosli API, you can authenticate your requests
    using a bearer token. 

    Set the bearer token in the request Authorization header to a valid API
    key. 

    API Keys can be personal or for service accounts. Check the [service
    accounts
    documentation](https://docs.kosli.com/getting_started/service-accounts/) for
    details. 


    ## Curl example


    ```shell

    curl -H "Authorization: Bearer <<your-api-key>>"
    https://app.kosli.com/api/v2/environments/<<your-org-name>>

    ```
  version: '2.0'
servers:
  - url: https://app.kosli.com/api/v2
    description: EU
  - url: https://app.us.kosli.com/api/v2
    description: US
security:
  - HTTPBearer: []
paths:
  /approvals/{org}/{flow_name}/{approval_number}:
    get:
      tags:
        - Approval
      summary: Get approval
      description: Get an approval record.
      operationId: get_approval_approvals__org___flow_name___approval_number__get
      parameters:
        - name: flow_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Name
        - name: approval_number
          in: path
          required: true
          schema:
            type: integer
            title: Approval Number
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApprovalResponse'
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    ApprovalResponse:
      properties:
        release_number:
          type: integer
          title: Release Number
          description: The approval number
        base_artifact:
          type: string
          title: Base Artifact
          description: The base artifact fingerprint
        artifact_name:
          type: string
          title: Artifact Name
          description: The name/identifier of the artifact
        target_artifact:
          type: string
          title: Target Artifact
          description: The target artifact fingerprint
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
          description: Environment the approval is valid for
        description:
          type: string
          title: Description
          description: Description for the approval
        src_commit_list:
          items:
            $ref: '#/components/schemas/CommitInfo'
          type: array
          title: Src Commit List
          description: List of commits with their artifact fingerprints
        created_at:
          type: number
          title: Created At
          description: Timestamp when the approval was created
        last_modified_at:
          type: number
          title: Last Modified At
          description: Timestamp when the approval was last modified
        state:
          type: string
          enum:
            - APPROVED
            - UNAPPROVED
            - PENDING
          title: State
          description: Overall approval state
        approvals:
          items:
            $ref: '#/components/schemas/ApprovalWithTimestamp'
          type: array
          title: Approvals
          description: List of individual approvals
        user_data:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: User Data
          description: Additional user data
      additionalProperties: false
      type: object
      required:
        - release_number
        - base_artifact
        - artifact_name
        - target_artifact
        - description
        - src_commit_list
        - created_at
        - last_modified_at
        - state
        - approvals
      title: ApprovalResponse
      description: Get approval response.
      examples:
        - approvals:
            - approval_url: undefined
              approved_by: external://External
              comment: ''
              state: APPROVED
              timestamp: 1756281574.9707942
          artifact_name: >-
            a.really.long/name/mimicing/docker@sha256:0fcd25440a99c80ac8df15ca3c5df095a791e7b01fbcb2ac60e9994f1c1e8f4d
          base_artifact: 5e2ec37f5b16b662e197a7de71173aac545437f5dab6d0ce452f71dd472a77b2
          created_at: 1756281574.9707942
          description: ''
          environment: staging
          last_modified_at: 1756281574.9707942
          release_number: 1
          src_commit_list:
            - artifact_fingerprints:
                - >-
                  37bb572099c4e464b18ad5262620f2ebb257db68bd076dd28d2de4a5905a875e
                - >-
                  b82d50a10366965e923fb348c684d8fc7dfa65c104b594ba5613df1efe012c30
              commit_sha: 8a0075843a3f94226938bb87c81785c2be0e9d48
          state: APPROVED
          target_artifact: 5e2ec37f5b16b662e197a7de71173aac545437f5dab6d0ce452f71dd472a77b2
          user_data: {}
    CommitInfo:
      properties:
        commit_sha:
          type: string
          pattern: ^[a-f0-9]{40}$
          title: Commit Sha
          description: The SHA of the commit
        artifact_fingerprints:
          items:
            type: string
            pattern: ^[a-f0-9]{64}$
          type: array
          title: Artifact Fingerprints
          description: List of artifact fingerprints associated with this commit
      type: object
      required:
        - commit_sha
        - artifact_fingerprints
      title: CommitInfo
      description: Information about a commit and its associated artifact fingerprints.
    ApprovalWithTimestamp:
      properties:
        state:
          type: string
          enum:
            - APPROVED
            - UNAPPROVED
          title: State
        comment:
          type: string
          title: Comment
          description: Comment for approval
        approved_by:
          type: string
          title: Approved By
          description: The user who approved it
        approval_url:
          type: string
          title: Approval Url
          description: URL to the source of the approval
        timestamp:
          type: number
          title: Timestamp
          description: Unix timestamp of the approval
      type: object
      required:
        - state
        - comment
        - approved_by
        - approval_url
        - timestamp
      title: ApprovalWithTimestamp
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````