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

# Resolve an S3 access key to its owner and secret (gateway only)

> Resolves an S3 access key to its owner identity and plaintext secret key.

Machine path for the S3 gateway only:
- Returns the plaintext secret so the gateway can verify the SigV4 signature.
- Restricted to general PSK authentication; not reachable by interactive users.



## OpenAPI

````yaml post /api/s3-credentials/lookup
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/s3-credentials/lookup:
    post:
      tags:
        - S3 Credentials
      summary: Resolve an S3 access key to its owner and secret (gateway only)
      description: >-
        Resolves an S3 access key to its owner identity and plaintext secret
        key.


        Machine path for the S3 gateway only:

        - Returns the plaintext secret so the gateway can verify the SigV4
        signature.

        - Restricted to general PSK authentication; not reachable by interactive
        users.
      operationId: lookup_s3_credential_api_s3_credentials_lookup_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S3CredentialLookupRequest'
        required: true
      responses:
        '200':
          description: Credential resolved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3CredentialLookupResponse'
        '403':
          description: Forbidden, general PSK required.
        '404':
          description: No active credential for this access key.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    S3CredentialLookupRequest:
      properties:
        access_key:
          type: string
          title: Access Key
          description: The S3 access key ID to resolve.
      type: object
      required:
        - access_key
      title: S3CredentialLookupRequest
      description: Gateway lookup request — resolve an access key to its owner + secret.
    S3CredentialLookupResponse:
      properties:
        access_key:
          type: string
          title: Access Key
          description: The S3 access key ID.
        secret_key:
          type: string
          title: Secret Key
          description: The plaintext S3 secret key for SigV4 verification.
        owner:
          type: string
          title: Owner
          description: The user that owns this credential (authorize as this identity).
        role:
          type: string
          title: Role
          description: The IAM role for the gateway account (always 'user').
        groups:
          items:
            type: string
          type: array
          title: Groups
          description: The owner's groups, if resolved (for group-based policies).
      type: object
      required:
        - access_key
        - secret_key
        - owner
        - role
      title: S3CredentialLookupResponse
      description: Gateway lookup result. Returns the plaintext secret — machine path only.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````