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

# List native users

> Lists native users for a resource. Secret values are not returned.



## OpenAPI

````yaml /docs/api/openapi/native_user_openapi.json post /core.v1.NativeUserService/ListNativeUsersV3
openapi: 3.1.0
info:
  title: core.v1.NativeUserService
  version: 0.0.1
servers:
  - url: https://api.joinformal.com
    description: Production API
security: []
tags:
  - name: core.v1.NativeUserService
paths:
  /core.v1.NativeUserService/ListNativeUsersV3:
    post:
      tags:
        - core.v1.NativeUserService
      summary: List native users
      description: Lists native users for a resource. Secret values are not returned.
      operationId: core.v1.NativeUserService.ListNativeUsersV3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/core.v1.ListNativeUsersV3Request'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/core.v1.ListNativeUsersV3Response'
        '400':
          description: Bad Request - Invalid request parameters or body
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: invalid_request
                  message:
                    type: string
                    example: Invalid request parameters
                  details:
                    type: object
        '401':
          description: Unauthorized - Missing or invalid authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: unauthorized
                  message:
                    type: string
                    example: Authentication required
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: forbidden
                  message:
                    type: string
                    example: Insufficient permissions to perform this action
        '404':
          description: Not Found - Resource does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: not_found
                  message:
                    type: string
                    example: Resource not found
        '500':
          description: Internal Server Error - An error occurred processing the request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: internal_error
                  message:
                    type: string
                    example: An internal error occurred
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X POST
            "https://api.joinformal.com/core.v1.NativeUserService/ListNativeUsersV3"
            \
              -H "X-API-KEY: YOUR_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "example": "value"
              }'
        - lang: javascript
          label: JavaScript (fetch)
          source: >-
            fetch("https://api.joinformal.com/core.v1.NativeUserService/ListNativeUsersV3",
            {
              method: "POST",
              headers: {
                "X-API-KEY": "YOUR_API_KEY",
                "Content-Type": "application/json"
              },
              body: JSON.stringify({
                example: "value"
              })
            })
              .then(response => response.json())
              .then(data => console.log(data))
              .catch(error => console.error(error));
        - lang: python
          label: Python
          source: >-
            import requests


            url =
            "https://api.joinformal.com/core.v1.NativeUserService/ListNativeUsersV3"

            headers = {
                "X-API-KEY": "YOUR_API_KEY",
                "Content-Type": "application/json"
            }

            data = {
                "example": "value"
            }


            response = requests.post(url, headers=headers, json=data)

            print(response.json())
        - lang: go
          label: Go
          source: |-
            package main

            import (
                "bytes"
                "encoding/json"
                "fmt"
                "io"
                "net/http"
            )

            func main() {
                url := "https://api.joinformal.com/core.v1.NativeUserService/ListNativeUsersV3"

                body := map[string]string{
                    "example": "value",
                }

                jsonData, _ := json.Marshal(body)

                req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
                req.Header.Set("X-API-KEY", "YOUR_API_KEY")
                req.Header.Set("Content-Type", "application/json")

                client := &http.Client{}
                resp, err := client.Do(req)
                if err != nil {
                    panic(err)
                }
                defer resp.Body.Close()

                responseBody, _ := io.ReadAll(resp.Body)
                fmt.Println(string(responseBody))
            }
components:
  schemas:
    core.v1.ListNativeUsersV3Request:
      type: object
      properties:
        limit:
          exclusiveMinimum: 0
          type: integer
          title: limit
          maximum: 500
          format: int32
        cursor:
          type: string
          title: cursor
        order:
          type: string
          title: order
        resourceId:
          type: string
          title: resource_id
          minLength: 1
      title: ListNativeUsersV3Request
      additionalProperties: false
    core.v1.ListNativeUsersV3Response:
      type: object
      properties:
        nativeUsers:
          type: array
          items:
            $ref: '#/components/schemas/core.v1.NativeUserV3'
          title: native_users
        listMetadata:
          $ref: '#/components/schemas/core.v1.ListMetadata'
          title: list_metadata
      title: ListNativeUsersV3Response
      additionalProperties: false
    core.v1.NativeUserV3:
      type: object
      properties:
        id:
          type: string
          title: id
          minLength: 1
        resourceId:
          type: string
          title: resource_id
          minLength: 1
        label:
          type: string
          title: label
          minLength: 1
          description: >-
            Unique label per resource. You can use this label to request this
            native user in a connection string.
        credentials:
          $ref: '#/components/schemas/core.v1.NativeUserV3Credentials'
          title: credentials
        terminationProtection:
          type: boolean
          title: termination_protection
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          description: |
            timestamp.lt_now = true
        updatedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          description: |
            timestamp.lt_now = true
      title: NativeUserV3
      required:
        - credentials
      additionalProperties: false
    core.v1.ListMetadata:
      type: object
      properties:
        after:
          type: string
          title: after
        before:
          type: string
          title: before
        count:
          type: integer
          title: count
          format: int32
        nextCursor:
          type: string
          title: next_cursor
      title: ListMetadata
      additionalProperties: false
    core.v1.NativeUserV3Credentials:
      type: object
      properties:
        awsIam:
          $ref: '#/components/schemas/core.v1.AWSIAMNativeUserV3'
          title: aws_iam
          description: One of the discriminated union fields - use exactly one
        azureIam:
          $ref: '#/components/schemas/core.v1.AzureIAMNativeUserV3'
          title: azure_iam
          description: One of the discriminated union fields - use exactly one
        basic:
          $ref: '#/components/schemas/core.v1.BasicNativeUserV3'
          title: basic
          description: One of the discriminated union fields - use exactly one
        gcpIam:
          $ref: '#/components/schemas/core.v1.GCPIAMNativeUserV3'
          title: gcp_iam
          description: One of the discriminated union fields - use exactly one
        hook:
          $ref: '#/components/schemas/core.v1.HookNativeUserV3'
          title: hook
          description: One of the discriminated union fields - use exactly one
        httpApiKeyHeader:
          $ref: '#/components/schemas/core.v1.HTTPAPIKeyHeaderNativeUserV3'
          title: http_api_key_header
          description: One of the discriminated union fields - use exactly one
        httpApiKeyQuery:
          $ref: '#/components/schemas/core.v1.HTTPAPIKeyQueryNativeUserV3'
          title: http_api_key_query
          description: One of the discriminated union fields - use exactly one
        httpBasic:
          $ref: '#/components/schemas/core.v1.HTTPBasicNativeUserV3'
          title: http_basic
          description: One of the discriminated union fields - use exactly one
        httpBearer:
          $ref: '#/components/schemas/core.v1.HTTPBearerNativeUserV3'
          title: http_bearer
          description: One of the discriminated union fields - use exactly one
        kubernetesInline:
          $ref: '#/components/schemas/core.v1.KubernetesInlineNativeUserV3'
          title: kubernetes_inline
          description: One of the discriminated union fields - use exactly one
        kubernetesPath:
          $ref: '#/components/schemas/core.v1.KubernetesPathNativeUserV3'
          title: kubernetes_path
          description: One of the discriminated union fields - use exactly one
        snowflakeKey:
          $ref: '#/components/schemas/core.v1.SnowflakeKeyNativeUserV3'
          title: snowflake_key
          description: One of the discriminated union fields - use exactly one
        sshKey:
          $ref: '#/components/schemas/core.v1.SSHKeyNativeUserV3'
          title: ssh_key
          description: One of the discriminated union fields - use exactly one
      title: NativeUserV3Credentials
      additionalProperties: false
      description: >-
        Exactly one of these fields is required: aws_iam or azure_iam or basic
        or gcp_iam or hook or http_api_key_header or http_api_key_query or
        http_basic or http_bearer or kubernetes_inline or kubernetes_path or
        snowflake_key or ssh_key.
    google.protobuf.Timestamp:
      type: string
      examples:
        - '2023-01-15T01:30:15.01Z'
        - '2024-12-25T12:00:00Z'
      format: date-time
      description: >-
        A Timestamp represents a point in time independent of any time zone or
        local
         calendar, encoded as a count of seconds and fractions of seconds at
         nanosecond resolution. The count is relative to an epoch at UTC midnight on
         January 1, 1970, in the proleptic Gregorian calendar which extends the
         Gregorian calendar backwards to year one.

         All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
         second table is needed for interpretation, using a [24-hour linear
         smear](https://developers.google.com/time/smear).

         The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
         restricting to that range, we ensure that we can convert to and from [RFC
         3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.

         # Examples

         Example 1: Compute Timestamp from POSIX `time()`.

             Timestamp timestamp;
             timestamp.set_seconds(time(NULL));
             timestamp.set_nanos(0);

         Example 2: Compute Timestamp from POSIX `gettimeofday()`.

             struct timeval tv;
             gettimeofday(&tv, NULL);

             Timestamp timestamp;
             timestamp.set_seconds(tv.tv_sec);
             timestamp.set_nanos(tv.tv_usec * 1000);

         Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.

             FILETIME ft;
             GetSystemTimeAsFileTime(&ft);
             UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;

             // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
             // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
             Timestamp timestamp;
             timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
             timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));

         Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.

             long millis = System.currentTimeMillis();

             Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
                 .setNanos((int) ((millis % 1000) * 1000000)).build();

         Example 5: Compute Timestamp from Java `Instant.now()`.

             Instant now = Instant.now();

             Timestamp timestamp =
                 Timestamp.newBuilder().setSeconds(now.getEpochSecond())
                     .setNanos(now.getNano()).build();

         Example 6: Compute Timestamp from current time in Python.

             timestamp = Timestamp()
             timestamp.GetCurrentTime()

         # JSON Mapping

         In JSON format, the Timestamp type is encoded as a string in the
         [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
         format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
         where {year} is always expressed using four digits while {month}, {day},
         {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
         seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
         are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
         is required. A proto3 JSON serializer should always use UTC (as indicated by
         "Z") when printing the Timestamp type and a proto3 JSON parser should be
         able to accept both UTC and other timezones (as indicated by an offset).

         For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
         01:30 UTC on January 15, 2017.

         In JavaScript, one can convert a Date object to this format using the
         standard
         [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
         method. In Python, a standard `datetime.datetime` object can be converted
         to this format using
         [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
         the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
         the Joda Time's [`ISODateTimeFormat.dateTime()`](
         http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
         ) to obtain a formatter capable of generating timestamps in this format.
    core.v1.AWSIAMNativeUserV3:
      type: object
      properties:
        username:
          type: string
          title: username
          minLength: 1
        role:
          type:
            - string
            - 'null'
          title: role
      title: AWSIAMNativeUserV3
      additionalProperties: false
      description: |-
        AWS IAM auth. `role` is the (optional) role ARN; unset means the role is
         inherited from the connector's environment.
    core.v1.AzureIAMNativeUserV3:
      type: object
      properties:
        username:
          type: string
          title: username
          minLength: 1
      title: AzureIAMNativeUserV3
      additionalProperties: false
      description: Azure IAM auth.
    core.v1.BasicNativeUserV3:
      type: object
      properties:
        username:
          type: string
          title: username
          minLength: 1
        password:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: password
      title: BasicNativeUserV3
      required:
        - password
      additionalProperties: false
      description: Generic username and password auth, e.g. Postgres or MySQL.
    core.v1.GCPIAMNativeUserV3:
      type: object
      properties:
        username:
          type: string
          title: username
          minLength: 1
      title: GCPIAMNativeUserV3
      additionalProperties: false
      description: GCP IAM auth.
    core.v1.HookNativeUserV3:
      type: object
      properties:
        hook:
          type: string
          title: hook
          minLength: 1
        outputType:
          type: string
          title: output_type
          enum:
            - basic
            - aws_iam
            - gcp_iam
            - azure_iam
            - kubernetes_path
            - kubernetes_inline
            - ssh_key
            - snowflake_key
            - http_basic
            - http_bearer
            - http_api_key_header
            - http_api_key_query
        allowlistedEnvVariables:
          type: array
          items:
            type: string
            minLength: 1
            pattern: ^[A-Za-z_][A-Za-z0-9_]*$
          title: allowlisted_env_variables
        allowlistedNetworkHosts:
          type: array
          items:
            type: string
            minLength: 1
          title: allowlisted_network_hosts
      title: HookNativeUserV3
      additionalProperties: false
      description: |-
        Hook-backed credentials are resolved on the connector. `hook` is the raw
         TypeScript/JavaScript source (same shape as hooks.code). output_type declares
         the shape the hook must return so the connector can validate its result.
    core.v1.HTTPAPIKeyHeaderNativeUserV3:
      type: object
      properties:
        key:
          type: string
          title: key
          minLength: 1
        value:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: value
      title: HTTPAPIKeyHeaderNativeUserV3
      required:
        - value
      additionalProperties: false
      description: >-
        HTTP API key. `key` refers to the header name; `value` is the header
        value (the API key).
    core.v1.HTTPAPIKeyQueryNativeUserV3:
      type: object
      properties:
        key:
          type: string
          title: key
          minLength: 1
        value:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: value
      title: HTTPAPIKeyQueryNativeUserV3
      required:
        - value
      additionalProperties: false
      description: >-
        HTTP API key. `key` refers to the query parameter name; `value` is the
        query parameter value (the API key).
    core.v1.HTTPBasicNativeUserV3:
      type: object
      properties:
        header:
          type: string
          title: header
          minLength: 1
        username:
          type: string
          title: username
          minLength: 1
        password:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: password
      title: HTTPBasicNativeUserV3
      required:
        - password
      additionalProperties: false
      description: HTTP Basic auth with username and password injected on a named header.
    core.v1.HTTPBearerNativeUserV3:
      type: object
      properties:
        header:
          type: string
          title: header
          minLength: 1
        token:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: token
      title: HTTPBearerNativeUserV3
      required:
        - token
      additionalProperties: false
      description: HTTP Bearer token with token injected on a named header.
    core.v1.KubernetesInlineNativeUserV3:
      type: object
      properties:
        kubeconfig:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: kubeconfig
      title: KubernetesInlineNativeUserV3
      required:
        - kubeconfig
      additionalProperties: false
      description: Kubernetes with a kubeconfig YAML document.
    core.v1.KubernetesPathNativeUserV3:
      type: object
      properties:
        kubeconfigPath:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: kubeconfig_path
      title: KubernetesPathNativeUserV3
      required:
        - kubeconfigPath
      additionalProperties: false
      description: Kubernetes with a kubeconfig file path.
    core.v1.SnowflakeKeyNativeUserV3:
      type: object
      properties:
        username:
          type: string
          title: username
          minLength: 1
        key:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: key
      title: SnowflakeKeyNativeUserV3
      required:
        - key
      additionalProperties: false
      description: Snowflake key-pair auth.
    core.v1.SSHKeyNativeUserV3:
      type: object
      properties:
        username:
          type: string
          title: username
          minLength: 1
        key:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: key
        certificate:
          $ref: '#/components/schemas/core.v1.SecretValue'
          title: certificate
      title: SSHKeyNativeUserV3
      required:
        - key
      additionalProperties: false
      description: SSH key auth.
    core.v1.SecretValue:
      type: object
      properties:
        environmentVariable:
          type: string
          title: environment_variable
          minLength: 1
          description: One of the discriminated union fields - use exactly one
        literal:
          type: string
          title: literal
          minLength: 1
          description: One of the discriminated union fields - use exactly one
      title: SecretValue
      additionalProperties: false
      description: >-
        Exactly one of these fields is required: environment_variable or
        literal.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key authentication. Get your API key from the Formal console.

````