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

# Get resource credential



## OpenAPI

````yaml /openapi/forge-api.yaml get /api/headless/v1/organizations/{organizationId}/resources/{resourceId}/credentials/{credentialId}
openapi: 3.0.3
info:
  title: Forge API
  version: 0.1.0
  description: >-
    Automate Forge inventory, investigations, findings, governance, fleet,
    policy, configuration, compliance, MCP, service-account, and audit
    workflows.
servers:
  - url: https://api.forge.ai
    description: Forge production API
security:
  - serviceAccountBearer: []
tags:
  - name: approvals
    description: MCP approvals
  - name: audit
    description: Audit
  - name: capabilities
    description: Capabilities
  - name: compliance
    description: Compliance
  - name: findings
    description: Findings
  - name: fleet
    description: Fleet
  - name: governance
    description: Governance
  - name: inventory
    description: Inventory
  - name: investigation
    description: Investigations
  - name: managed-config
    description: Managed configuration
  - name: mcp
    description: MCP sessions
  - name: mcp-registry
    description: MCP and skill registry
  - name: operations
    description: operations
  - name: policies
    description: Policies and violations
  - name: resources
    description: Resources
  - name: service-accounts
    description: Service accounts
  - name: settings
    description: Automation settings
paths:
  /api/headless/v1/organizations/{organizationId}/resources/{resourceId}/credentials/{credentialId}:
    get:
      tags:
        - resources
      summary: Get resource credential
      operationId: getHeadlessResourceCredential
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/ResourceId'
        - $ref: '#/components/parameters/ResourceCredentialId'
      responses:
        '200':
          description: Resource credential metadata without the secret value.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceCredential'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
components:
  parameters:
    OrganizationId:
      name: organizationId
      in: path
      required: true
      schema:
        type: string
    ResourceId:
      name: resourceId
      in: path
      required: true
      schema:
        type: string
    ResourceCredentialId:
      name: credentialId
      in: path
      required: true
      schema:
        type: string
  schemas:
    ResourceCredential:
      type: object
      additionalProperties: false
      required:
        - id
        - organizationId
        - resourceId
        - name
        - kind
        - default
        - assignedTo
        - managementMode
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        organizationId:
          type: string
        resourceId:
          type: string
        name:
          type: string
        kind:
          $ref: '#/components/schemas/ResourceCredentialKind'
        username:
          type: string
        headerName:
          type: string
        authentication:
          $ref: '#/components/schemas/ResourceCredentialAuthentication'
        default:
          type: boolean
        assignedTo:
          $ref: '#/components/schemas/ResourceCredentialAssignments'
        managementMode:
          type: string
          enum:
            - forge
            - terraform
        managerId:
          type: string
        managerInstance:
          type: string
        lastUsedAt:
          type: string
          format: date-time
        rotatedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ResourceCredentialKind:
      type: string
      enum:
        - username_password
        - bearer_token
        - header
        - aws_rds_iam
        - oauth2_client_credentials
        - oauth2_token_exchange
    ResourceCredentialAuthentication:
      type: object
      additionalProperties: false
      properties:
        region:
          type: string
          minLength: 1
          maxLength: 32
        roleArn:
          type: string
          minLength: 1
          maxLength: 2048
        tokenEndpoint:
          type: string
          format: uri
          minLength: 1
          maxLength: 2048
        clientId:
          type: string
          minLength: 1
          maxLength: 1024
        scopes:
          type: array
          uniqueItems: true
          maxItems: 64
          items:
            type: string
            minLength: 1
            maxLength: 256
        audience:
          type: string
          minLength: 1
          maxLength: 2048
    ResourceCredentialAssignments:
      type: object
      additionalProperties: false
      properties:
        users:
          type: array
          items:
            type: string
          maxItems: 256
        groups:
          type: array
          items:
            type: string
          maxItems: 256
        serviceAccounts:
          type: array
          items:
            type: string
          maxItems: 256
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
  responses:
    Error:
      description: Stable Forge error envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
  securitySchemes:
    serviceAccountBearer:
      type: http
      scheme: bearer
      bearerFormat: Forge service-account or delegated OAuth access token
      description: >-
        Enter a Forge service-account token or delegated OAuth access token.
        Mintlify adds the Bearer prefix.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.