> ## 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/attestation/attest-jira-issue",
  "feedback": "Description of the issue"
}
```

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

</AgentInstructions>

# Attest Jira issue

> Add Jira attestation to a trail with an optional attachment file.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json post /attestations/{org}/{flow_name}/trail/{trail_name}/jira
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:
  /attestations/{org}/{flow_name}/trail/{trail_name}/jira:
    post:
      tags:
        - Attestation
      summary: Attest Jira issue
      description: Add Jira attestation to a trail with an optional attachment file.
      operationId: >-
        post_jira_attestation_attestations__org___flow_name__trail__trail_name__jira_post
      parameters:
        - name: flow_name
          in: path
          required: true
          schema:
            type: string
            title: Flow Name
        - name: trail_name
          in: path
          required: true
          schema:
            type: string
            title: Trail Name
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_post_jira_attestation_attestations__org___flow_name__trail__trail_name__jira_post
      responses:
        '201':
          description: Creation Success
          content:
            application/json:
              schema: {}
        '400':
          description: Validation Error
        '404':
          description: Not Found
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    Body_post_jira_attestation_attestations__org___flow_name__trail__trail_name__jira_post:
      properties:
        data_json:
          $ref: '#/components/schemas/JiraAttestationPostInput'
          description: Attestation data in JSON format
        attachment_file:
          anyOf:
            - type: string
              contentMediaType: application/octet-stream
            - type: 'null'
          title: Attachment File
          description: 'Optional attachment file (max size: 10MB)'
      type: object
      required:
        - data_json
      title: >-
        Body_post_jira_attestation_attestations__org___flow_name__trail__trail_name__jira_post
    JiraAttestationPostInput:
      properties:
        attestation_name:
          type: string
          pattern: ^[a-zA-Z0-9\-_,]+$
          title: Attestation Name
        origin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Origin Url
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        artifact_fingerprint:
          anyOf:
            - type: string
              pattern: ^[a-f0-9]{64}$
            - type: 'null'
          title: Artifact Fingerprint
        target_artifacts:
          anyOf:
            - items:
                type: string
                pattern: ^[a-zA-Z0-9\-_,]+$
              type: array
            - type: 'null'
          title: Target Artifacts
        git_commit_info:
          anyOf:
            - $ref: '#/components/schemas/GitCommit'
            - type: 'null'
        repo_info:
          anyOf:
            - $ref: '#/components/schemas/RepoInfoPostInput'
            - type: 'null'
        external_urls:
          anyOf:
            - patternProperties:
                ^[^=.]+$:
                  $ref: '#/components/schemas/ExternalAttachmentUrl'
              type: object
            - type: 'null'
          title: External Urls
        annotations:
          anyOf:
            - patternProperties:
                ^[A-Za-z0-9_-]+$:
                  type: string
              type: object
            - type: 'null'
          title: Annotations
        user_data:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: User Data
        jira_results:
          items:
            $ref: '#/components/schemas/JiraItem'
          type: array
          title: Jira Results
      additionalProperties: false
      type: object
      required:
        - attestation_name
        - jira_results
      title: JiraAttestationPostInput
      examples:
        - attestation_name: jira
          git_commit_info:
            author: Jon Smith <jon@smith.com>
            branch: main
            message: adding glorious commit
            sha1: ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6
            timestamp: 1750923680
            url: >-
              https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6
          jira_results:
            - issue_exists: true
              issue_id: ML-50
              issue_url: https://your-org.atlassian.net/browse/ML-50
          user_data: {}
    GitCommit:
      properties:
        sha1:
          type: string
          title: Sha1
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        author:
          anyOf:
            - type: string
            - type: 'null'
          title: Author
        author_username:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Username
        branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch
        timestamp:
          anyOf:
            - type: number
            - type: 'null'
          title: Timestamp
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        parents:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Parents
      type: object
      required:
        - sha1
      title: GitCommit
    RepoInfoPostInput:
      properties:
        name:
          type: string
          title: Name
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        url:
          type: string
          title: Url
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        provider:
          anyOf:
            - type: string
              enum:
                - github
                - gitlab
                - bitbucket
                - azure-devops
                - circleci
            - type: 'null'
          title: Provider
      type: object
      required:
        - name
        - url
      title: RepoInfoPostInput
    JiraItem:
      properties:
        issue_id:
          type: string
          title: Issue Id
        issue_url:
          type: string
          title: Issue Url
        issue_exists:
          type: boolean
          title: Issue Exists
        issue_fields:
          additionalProperties: true
          type: object
          title: Issue Fields
      additionalProperties: false
      type: object
      required:
        - issue_id
        - issue_url
        - issue_exists
      title: JiraItem
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````