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

# Get a policy group by name

> Retrieves a policy group by its name, optionally specifying a particular version by digest. If no digest is provided, the latest version is returned.



## OpenAPI

````yaml https://api.app.chainloop.dev/openapi.yaml get /v1/groups/{group_name}
openapi: 3.0.1
info:
  contact:
    email: support@chainloop.dev
    name: Chainloop Support
    url: https://chainloop.dev
  termsOfService: https://chainloop.dev/terms
  title: Chainloop Platform API
  version: '1.0'
servers:
  - url: https://api.app.chainloop.dev/
security:
  - bearerToken: []
tags:
  - description: AI-powered agent operations
    name: AgentsService
  - name: ArtifactService
  - name: AssessmentService
  - description: Service for polling the status of asynchronous operations
    name: AsyncOperationsService
  - name: AttestationsService
  - name: PolicyService
  - name: ComplianceService
  - name: ComponentService
  - name: EnvironmentsService
  - name: EvidenceService
  - name: FindingService
  - name: LogicalEnvironmentsService
  - name: ProductsService
  - name: ProjectsService
  - name: UserService
externalDocs:
  description: Chainloop Official Documentation
  url: https://docs.chainloop.dev
paths:
  /v1/groups/{group_name}:
    get:
      tags:
        - PolicyService
      summary: Get a policy group by name
      description: >-
        Retrieves a policy group by its name, optionally specifying a particular
        version by digest. If no digest is provided, the latest version is
        returned.
      operationId: PolicyService_GetGroup
      parameters:
        - description: The name of the policy group to retrieve
          in: path
          name: group_name
          required: true
          schema:
            type: string
        - description: >-
            if set, it will return the policy with the given digest

            otherwise it will return the latest version


            If set, returns the policy group with the given digest; otherwise
            returns the latest version
          in: query
          name: digest
          schema:
            type: string
        - description: >-
            Organization owning this policy group (empty for best effort
            fallback)


            Organization owning this policy group (empty for best effort
            fallback)
          in: query
          name: organization_name
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1PolicyServiceGetGroupResponse'
          description: A successful response.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1BadRequestResponse'
          description: Bad Request - The request was invalid or cannot be served.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1UnauthorizedResponse'
          description: Unauthorized - Authentication is required.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1PermissionDeniedResponse'
          description: Forbidden - You do not have permission to access this resource.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1InternalServerErrorResponse'
          description: Internal Server Error - An unexpected error occurred on the server.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
          description: An unexpected error response.
components:
  schemas:
    v1PolicyServiceGetGroupResponse:
      description: Response containing a policy group and its metadata
      example:
        version_references:
          - digest: digest
            created_at: '2000-01-23T04:56:07.000Z'
          - digest: digest
            created_at: '2000-01-23T04:56:07.000Z'
        inputs_json_schema: inputs_json_schema
        organization_id: organization_id
        builtin: true
        digest: digest
        raw:
          format: FORMAT_UNSPECIFIED
          body: body
        organization_name: organization_name
        group:
          version_references:
            - digest: digest
              created_at: '2000-01-23T04:56:07.000Z'
            - digest: digest
              created_at: '2000-01-23T04:56:07.000Z'
          attestation:
            - with:
                key: with
              ref: ref
            - with:
                key: with
              ref: ref
          materials:
            - name: name
              policies:
                - with:
                    key: with
                  ref: ref
                - with:
                    key: with
                  ref: ref
              type: type
            - name: name
              policies:
                - with:
                    key: with
                  ref: ref
                - with:
                    key: with
                  ref: ref
              type: type
          raw_group:
            format: FORMAT_UNSPECIFIED
            body: body
          builtin: true
          organization_id: organization_id
          digest: digest
          name: name
          description: description
          organization_name: organization_name
          category: category
          latest: true
        latest: true
      properties:
        digest:
          description: The digest of the policy group
          title: Provider fields
          type: string
        raw:
          $ref: '#/components/schemas/v1RawBody'
        group:
          $ref: '#/components/schemas/v1PlatformPolicyGroup'
        latest:
          description: Whether this is the latest version of the policy group (deprecated)
          type: boolean
        organization_id:
          description: ID of the organization owning this policy group (deprecated)
          type: string
        organization_name:
          description: Name of the organization owning this policy group
          title: >-
            We need the organization_name here to be consistent with the
            GetResponse for Policies

            Note that chainloop expects the organization_name to be in the
            request for both policies and policy groups
          type: string
        builtin:
          description: Whether this policy group is builtin (deprecated)
          type: boolean
        version_references:
          description: References to all versions of this policy group (deprecated)
          items:
            $ref: '#/components/schemas/v1PolicyGroupVersionReference'
          type: array
        inputs_json_schema:
          description: JSON schema of the inputs required by the policy group
          title: The JSON schema version of the inputs of the policy group
          type: string
      title: PolicyServiceGetGroupResponse
      type: object
    v1BadRequestResponse:
      description: Response for bad request
      example:
        code: 0
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 3
          description: >-
            The error code indicating the type of error. It's fixed to 3, which
            is the code for INVALID_ARGUMENT.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: BadRequestResponse
      type: object
    v1UnauthorizedResponse:
      description: Response for unauthorized access
      example:
        code: 6
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 16
          description: >-
            The error code indicating the type of error. It's fixed to 16, which
            is the code for UNAUTHENTICATED.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: UnauthorizedResponse
      type: object
    v1PermissionDeniedResponse:
      description: Response for permission denied
      example:
        code: 1
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 7
          description: >-
            The error code indicating the type of error. It's fixed to 7, which
            is the code for PERMISSION_DENIED.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: PermissionDeniedResponse
      type: object
    v1InternalServerErrorResponse:
      description: Response for internal server error
      example:
        code: 5
        details:
          - details
          - details
        message: message
      properties:
        code:
          default: 13
          description: >-
            The error code indicating the type of error. It's fixed to 13, which
            is the code for INTERNAL_ERROR.
          format: int32
          type: integer
        message:
          description: A human-readable message providing more details about the error.
          type: string
        details:
          description: Additional details about the error.
          items:
            type: string
          type: array
      required:
        - code
        - message
      title: InternalServerErrorResponse
      type: object
    rpcStatus:
      example:
        code: 5
        details:
          - '@type': '@type'
          - '@type': '@type'
        message: message
      properties:
        code:
          format: int32
          type: integer
        message:
          type: string
        details:
          items:
            $ref: '#/components/schemas/protobufAny'
          type: array
      type: object
    v1RawBody:
      example:
        format: FORMAT_UNSPECIFIED
        body: body
      properties:
        body:
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
        format:
          $ref: '#/components/schemas/RawBodyRawBodyFormat'
      title: Raw representation in bytes of a resource in json, yaml or cue
      type: object
    v1PlatformPolicyGroup:
      example:
        version_references:
          - digest: digest
            created_at: '2000-01-23T04:56:07.000Z'
          - digest: digest
            created_at: '2000-01-23T04:56:07.000Z'
        attestation:
          - with:
              key: with
            ref: ref
          - with:
              key: with
            ref: ref
        materials:
          - name: name
            policies:
              - with:
                  key: with
                ref: ref
              - with:
                  key: with
                ref: ref
            type: type
          - name: name
            policies:
              - with:
                  key: with
                ref: ref
              - with:
                  key: with
                ref: ref
            type: type
        raw_group:
          format: FORMAT_UNSPECIFIED
          body: body
        builtin: true
        organization_id: organization_id
        digest: digest
        name: name
        description: description
        organization_name: organization_name
        category: category
        latest: true
      properties:
        builtin:
          title: Whether this policy is builtin or custom
          type: boolean
        organization_id:
          title: Organization owning this policy (empty for builtin policies)
          type: string
        digest:
          type: string
        latest:
          type: boolean
        raw_group:
          $ref: '#/components/schemas/v1RawBody'
        organization_name:
          title: Organization owning this policy (empty for builtin policies)
          type: string
        version_references:
          items:
            $ref: '#/components/schemas/v1PolicyGroupVersionReference'
          type: array
        name:
          title: Basic group info
          type: string
        description:
          type: string
        category:
          type: string
        materials:
          items:
            $ref: '#/components/schemas/PlatformPolicyGroupPolicyGroupMaterial'
          title: group spec
          type: array
        attestation:
          items:
            $ref: >-
              #/components/schemas/PlatformPolicyGroupPolicyGroupPolicyAttachment
          type: array
      type: object
    v1PolicyGroupVersionReference:
      example:
        digest: digest
        created_at: '2000-01-23T04:56:07.000Z'
      properties:
        digest:
          title: The digest of the policy group
          type: string
        created_at:
          format: date-time
          title: The timestamp when the policy group was created
          type: string
      title: PolicyGroupReference represents the reference to a policy group version
      type: object
    protobufAny:
      additionalProperties:
        type: object
      example:
        '@type': '@type'
      properties:
        '@type':
          type: string
      type: object
    RawBodyRawBodyFormat:
      default: FORMAT_UNSPECIFIED
      enum:
        - FORMAT_UNSPECIFIED
        - FORMAT_JSON
        - FORMAT_YAML
        - FORMAT_CUE
      title: |-
        buf:lint:ignore ENUM_VALUE_PREFIX
        buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
      type: string
    PlatformPolicyGroupPolicyGroupMaterial:
      example:
        name: name
        policies:
          - with:
              key: with
            ref: ref
          - with:
              key: with
            ref: ref
        type: type
      properties:
        name:
          type: string
        type:
          type: string
        policies:
          items:
            $ref: >-
              #/components/schemas/PlatformPolicyGroupPolicyGroupPolicyAttachment
          type: array
      type: object
    PlatformPolicyGroupPolicyGroupPolicyAttachment:
      example:
        with:
          key: with
        ref: ref
      properties:
        ref:
          type: string
        with:
          additionalProperties:
            type: string
          type: object
      type: object
  securitySchemes:
    bearerToken:
      description: Bearer token for authentication
      type: http
      scheme: bearer
      bearerFormat: JWT

````