Create Export Destination
(v2)POST
Creates an export destination in your Confident AI project and returns its id. Credentials must be sent in full — a masked value copied from a read is rejected, since storing the mask would leave a destination that can never authenticate. A project holds at most three destinations.
curl -X POST "https://api.confident-ai.com/v2/export-destinations" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "Nightly S3 exports",
"type": "S3",
"bucket": "acme-llm-exports",
"region": "us-east-1",
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"pathPrefix": "confident-ai/",
"snowflakeConfig": {
"account": "myorg-myaccount",
"username": "CONFIDENT_EXPORTER",
"role": "CONFIDENT_EXPORT_ROLE",
"warehouse": "CONFIDENT_WH",
"database": "ANALYTICS",
"schema": "CONFIDENT",
"privateKey": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASC...\n-----END PRIVATE KEY-----",
"privateKeyPassphrase": "correct-horse-battery-staple"
},
"enabled": true
}'{
"success": true,
"data": {
"id": "<EXPORT-DESTINATION-ID>"
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/project-settings/exports",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Request body
namestringRequiredThe name of the destination, as it appears in your project.
typeenumWhere exports go.
S3uploads files to a bucket andSNOWFLAKEloads rows into tables; any other member is rejected on create. A destination's type can't be changed after it is created.Show 4 enum valuesHide 4 enum values
S3GCSAZURE_BLOBSNOWFLAKE
bucketstringThe name of the bucket exports are uploaded to. Required for
S3destinations and rejected forSNOWFLAKE.regionstringThe region the bucket lives in. Required for
S3destinations and rejected forSNOWFLAKE.accessKeyIdstringRequired for
S3destinations. The access key id Confident AI uploads with. Reads return this masked, as fifteen asterisks followed by its last six characters, so a masked value is rejected here — send the real key id.secretAccessKeystringRequired for
S3destinations. The secret access key paired withaccessKeyId. Confident AI never returns it in full, so a masked value is rejected here — send the real secret.pathPrefixstring | nullA folder inside the bucket to write exports under. A leading slash is stripped and a trailing one added, so
/confident-aiis stored asconfident-ai/. Omit it, or sendnullor an empty string, to write to the root of the bucket.snowflakeConfigobjectHow Confident AI signs in to Snowflake with key-pair authentication, and where it creates the export tables.
Show 8 propertiesHide 8 properties
accountstringRequiredThe Snowflake account identifier, as
<organization>-<account>. A fullhttps://<account>.snowflakecomputing.comURL is accepted and trimmed to the identifier.usernamestringRequiredThe Snowflake user Confident AI signs in as, ideally a
TYPE = SERVICEuser whoseRSA_PUBLIC_KEYmatchesprivateKey.rolestringRequiredThe role loads run as. It needs USAGE on the warehouse, database and schema, and CREATE
TABLEon the schema.warehousestringRequiredThe warehouse that runs each load.
databasestringRequiredThe database the export tables live in.
schemastringRequiredThe schema Confident AI creates
CONFIDENT_TRACESandCONFIDENT_ANNOTATIONSin.privateKeystringRequiredThe PEM private key paired with the user's
RSA_PUBLIC_KEY. Reads return it masked, so a masked value is rejected here — send the real key.privateKeyPassphrasestring | nullThe passphrase of an encrypted private key. Omit it, or send
null, for an unencrypted key.
enabledbooleanWhether export schedules may upload to this destination. Defaults to
true.
Response
Create Export Destination succeeded.
successbooleanIndicates if the request was successful.
dataobjectA reference to an export destination by its id.
Show 1 propertyHide 1 property
idstringThe id of the destination, generated by Confident AI.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.