> ## Documentation Index
> Fetch the complete documentation index at: https://kosli-mbevc1-patch-1.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Report Cloud Run environment

> Process a report for a Google Cloud Run environment.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json put /environments/{org}/{env_name}/report/cloud-run
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:
  /environments/{org}/{env_name}/report/cloud-run:
    put:
      tags:
        - Environments
      summary: Report Cloud Run environment
      description: Process a report for a Google Cloud Run environment.
      operationId: cloud_run_report
      parameters:
        - name: env_name
          in: path
          required: true
          schema:
            type: string
            title: Env Name
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloudRunReport'
      responses:
        '200':
          description: Report processed successfully, no new snapshots to create
          content:
            application/json:
              schema: {}
        '201':
          description: Snapshot created
          content:
            application/json:
              schema:
                type: string
                title: Response 201 Cloud Run Report
        '400':
          description: Invalid report data
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__ValidationErrorResponse___locals___ValidationErrorResponseModel__7
        '404':
          description: Environment Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__21
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    CloudRunReport:
      properties:
        type:
          type: string
          const: cloud-run
          title: Type
          description: Environment type
          default: cloud-run
        artifacts:
          items:
            $ref: '#/components/schemas/CloudRunArtifact'
          type: array
          title: Artifacts
          description: all artifacts in the report
      additionalProperties: false
      type: object
      required:
        - artifacts
      title: CloudRunReport
      description: Cloud Run report containing revision and job artifacts
      examples:
        - artifacts:
            - creationTimestamp: 1632122962
              digests:
                europe-west1-docker.pkg.dev/proj/svc@sha256:c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7: >-
                  c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7
              kind: service
              revisionName: hello-world-00007-abc
              serviceName: hello-world
            - creationTimestamp: 1632122962
              digests:
                europe-west1-docker.pkg.dev/proj/job@sha256:1e54935005f517e13b0a104681d2aad9092a147ba7f3573a84c56dda8001f1dc: >-
                  1e54935005f517e13b0a104681d2aad9092a147ba7f3573a84c56dda8001f1dc
              jobName: sandman-job
              kind: job
    fastapi_app__errors__ValidationErrorResponse___locals___ValidationErrorResponseModel__7:
      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: ValidationErrorResponseModel
      description: Invalid report data
      examples:
        - errors:
            email: Field must be a valid email address
            name: Field cannot be empty
          message: Invalid report data
    fastapi_app__errors__NotFoundResponse___locals___NotFoundResponseModel__21:
      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: Environment not found
      examples:
        - message: Environment not found
    CloudRunArtifact:
      properties:
        digests:
          additionalProperties:
            anyOf:
              - type: string
                pattern: ^[a-f0-9]{64}$
              - type: string
                const: ''
          type: object
          title: Digests
          description: Image name to sha256 fingerprint mapping
        creationTimestamp:
          type: integer
          title: Creationtimestamp
          description: Creation time stamp for the revision or job execution in UTC
        kind:
          type: string
          enum:
            - service
            - job
          title: Kind
          description: 'Discriminator for the Cloud Run resource kind: "service" or "job"'
        serviceName:
          anyOf:
            - type: string
            - type: 'null'
          title: Servicename
          description: Cloud Run service name (kind=service)
        revisionName:
          anyOf:
            - type: string
            - type: 'null'
          title: Revisionname
          description: Cloud Run revision name (kind=service)
        jobName:
          anyOf:
            - type: string
            - type: 'null'
          title: Jobname
          description: Cloud Run job name (kind=job)
      additionalProperties: false
      type: object
      required:
        - digests
        - creationTimestamp
        - kind
      title: CloudRunArtifact
      description: Individual artifact (revision or job) in a Cloud Run report
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````