Skip to main content
GET
/
api
/
v1
/
terraform-export
/
schema
Typescript (SDK)
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";

const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
  security: {
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
    oauth: "<YOUR_OAUTH_HERE>",
  },
});

async function run() {
  const result = await conductoroneSDKTypescript.terraformExport.getSchema();

  console.log(result);
}

run();
{
  "schema": {
    "dataSource": {},
    "fields": [
      {
        "c1Field": "<string>",
        "computed": true,
        "enumValues": [
          {
            "name": "<string>",
            "number": 123
          }
        ],
        "nestedFields": "<array>",
        "oneofField": "<string>",
        "oneofVariant": "<string>",
        "optional": true,
        "references": {
          "compositeKeyFields": [
            {
              "c1Field": "<string>",
              "tfField": "<string>"
            }
          ],
          "tfTypeNames": [
            "<string>"
          ]
        },
        "required": true,
        "sensitive": true,
        "tfField": "<string>"
      }
    ],
    "providerVersion": "<string>",
    "refererShapes": [
      {
        "fields": [
          {
            "c1Field": "<string>",
            "tfField": "<string>"
          }
        ]
      }
    ],
    "resource": {
      "importId": {
        "composite": {
          "fields": [
            {
              "c1Field": "<string>"
            }
          ]
        },
        "singleString": {}
      }
    },
    "tfTypeName": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Response

200 - application/json

Successful response

The GetSchemaResponse message.

schema
Tf Schema Mapping · object

TFSchemaMapping describes how to translate one C1 API object into a single Terraform block. Variant-specific metadata (e.g. import_id for resources) lives on the block oneof.

This message contains a oneof named block. Only a single field of the following list may be set at a time:

  • resource
  • dataSource