> ## 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/search/search-artifacts-by-sha-or-fingerprint",
  "feedback": "Description of the issue"
}
```

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

</AgentInstructions>

# Search artifacts by SHA or fingerprint

> Get artifacts that match fingerprint or commit-sha.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json get /search/{org}/sha/{search_value}
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:
  /search/{org}/sha/{search_value}:
    get:
      tags:
        - Search
      summary: Search artifacts by SHA or fingerprint
      description: Get artifacts that match fingerprint or commit-sha.
      operationId: get_search_search__org__sha__search_value__get
      parameters:
        - name: search_value
          in: path
          required: true
          schema:
            type: string
            title: Search Value
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      responses:
        '200':
          description: Artifacts matching the search value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultGetResponse'
        '400':
          description: 'Invalid input: non-hex characters or value too short.'
        '404':
          description: >-
            Search results are too ambiguous. For example: no matches for the
            provided value.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__39
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    SearchResultGetResponse:
      properties:
        resolved_to:
          anyOf:
            - $ref: '#/components/schemas/SearchResolvedModel'
            - type: 'null'
        artifacts:
          items:
            $ref: '#/components/schemas/SearchFoundArtifactModel'
          type: array
          title: Artifacts
          description: Artifacts that matched the search value.
      type: object
      required:
        - artifacts
      title: SearchResultGetResponse
    fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__39:
      properties:
        message:
          type: string
          title: Message
          description: Error message
        errors:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Errors
          description: Validation errors by field
      type: object
      required:
        - message
      title: NotFoundResponseModel
      description: >-
        Search results are too ambiguous. For example: no matches for the
        provided value.
      examples:
        - message: >-
            Search results are too ambiguous. For example: no matches for the
            provided value.
    SearchResolvedModel:
      properties:
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Type of found results. Either 'fingerprint', 'commit' or 'multiple'.
        full_match:
          anyOf:
            - type: string
            - type: 'null'
          title: Full Match
          description: >-
            Full match of search value if unique; otherwise arbitrary match from
            results.
        fingerprints:
          anyOf:
            - $ref: '#/components/schemas/SearchResolvedFingerprintsModel'
            - type: 'null'
        commits:
          anyOf:
            - $ref: '#/components/schemas/SearchResolvedCommitsModel'
            - type: 'null'
      type: object
      title: SearchResolvedModel
    SearchFoundArtifactModel:
      properties:
        fingerprint:
          type: string
          title: Fingerprint
          description: Fingerprint of found artifact.
          examples:
            - 1084c799cd551dd1d8d5c5f9a5d593b2e931f5e36122ee5c793c1d08a19839cc
        name:
          type: string
          title: Name
          description: Name of found artifact.
          examples:
            - my-artifact.exe
        has_provenance:
          type: boolean
          title: Has Provenance
          description: Whether the artifact has provenance.
          examples:
            - true
        git_commit:
          type: string
          title: Git Commit
          description: Git commit of found artifact.
          examples:
            - e0ad84e1a2464a9486e777c1ecde162edff930a9
        pipeline:
          type: string
          title: Pipeline
          description: This field is legacy, use flow instead.
          examples:
            - my-flow
        flow:
          type: string
          title: Flow
          description: Flow name of found artifact.
          examples:
            - my-flow
        trail:
          type: string
          title: Trail
          description: Trail of found artifact.
          examples:
            - my-trail
        template_reference_name:
          type: string
          title: Template Reference Name
          description: Name of the artifact in the trail template.
          examples:
            - backend
        build_url:
          type: string
          title: Build Url
          description: Build url of found artifact.
          examples:
            - https://my.build.service/1234
        commit_url:
          type: string
          title: Commit Url
          description: Commit url of found artifact.
          examples:
            - https://my.commit.service/1234
        compliance_state:
          type: string
          title: Compliance State
          description: Compliance state of found artifact.
          examples:
            - COMPLIANT
        running_in:
          items:
            type: string
          type: array
          title: Running In
          description: Environments where the artifact is running.
          examples:
            - - staging
              - prod
        exited_from:
          items:
            type: string
          type: array
          title: Exited From
          description: Environments where the artifact exited.
          examples:
            - - dev
        html_url:
          type: string
          title: Html Url
          description: URL to web UI for found artifact.
          examples:
            - >-
              https://app.kosli.com/my-flow/artifacts/1084c799cd551dd1d8d5c5f9a5d593b2e931f5e36122ee5c793c1d08a19839cc
        api_url:
          type: string
          title: Api Url
          description: URL to API for found artifact.
          examples:
            - >-
              https://app.kosli.com/api/v2/artifacts/1084c799cd551dd1d8d5c5f9a5d593b2e931f5e36122ee5c793c1d08a19839cc
        history:
          items: {}
          type: array
          title: History
          description: History of found artifact.
      type: object
      required:
        - fingerprint
        - name
        - has_provenance
        - git_commit
        - pipeline
        - flow
        - trail
        - template_reference_name
        - build_url
        - commit_url
        - compliance_state
        - running_in
        - exited_from
        - html_url
        - api_url
        - history
      title: SearchFoundArtifactModel
    SearchResolvedFingerprintsModel:
      properties:
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Type of found results.
        count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Count
          description: Count of fingerprints that matched the search value.
        matches:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Matches
          description: Fingerprints that matched the search value.
          examples:
            - - 1084c799cd551dd1d8d5c5f9a5d593b2e931f5e36122ee5c793c1d08a19839cc
      type: object
      title: SearchResolvedFingerprintsModel
    SearchResolvedCommitsModel:
      properties:
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Type of found results.
        count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Count
          description: Count of commits that matched the search value.
        matches:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Matches
          description: Commits that matched the search value.
          examples:
            - - e0ad84e1a2464a9486e777c1ecde162edff930a9
      type: object
      title: SearchResolvedCommitsModel
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````