Custom Connections

Upsert Custom Data Records

This endpoint allows you to upsert custom data records individually or in bulk.

  • If a record with a matching identifier is found, it will be updated (upserted).

  • If no matching record is found, a new record will be created with a generated ID.

🔒 Requires Custom Connections Data: Create Custom Connection Data permission.

💎 Requires your account have the Custom Connections and Tests feature. Contact your CSM for help upgrading.

Securitybearer
Request
path Parameters
connectionId
required
number
resourceId
required
number
Request Body schema: application/json
required
data
required
object

The Custom data to be created

Responses
200

Successful

201

Created

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

412

You must accept the Drata terms and conditions to use the API

413

The file was too large to upload

500

Internal server error

post/custom-connections/{connectionId}/resources/{resourceId}/records
Request samples
application/json
{
  • "data": {
    • "id": "some-id-here-uuid4",
    • "name": "John",
    • "last_name": "Wick",
    • "age": 5,
    • "data": {
      • "foo": "bar"
      }
    }
}
Response samples
application/json
{
  • "id": "fd52f04f-a030-44ea-a5af-40919194ab7e",
  • "createdAt": "2020-07-06 12:00:00.000000",
  • "updatedAt": "2020-07-06 13:00:00.000000",
  • "statusCode": 200,
  • "data": {
    • "YOUR": "DATA",
    • "PROPERTIES": {
      • "WILL": "BE_HERE"
      }
    }
}

Generate evidence from custom data

Generate an evidence file based on your pushed data

🔒 Requires Custom Connections Data: Generate Evidence permission.

💎 Requires your account have the Custom Connections and Tests feature. Contact your CSM for help upgrading.

Securitybearer
Request
path Parameters
connectionId
required
number
resourceId
required
number
Responses
201

Successful

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

412

You must accept the Drata terms and conditions to use the API

500

Internal server error

post/custom-connections/{connectionId}/resources/{resourceId}/generate-evidence
Request samples
Response samples
application/json
{
  • "statusCode": 0,
  • "message": "string",
  • "code": 0,
  • "debugInfo": {
    • "name": "string",
    • "message": "string",
    • "stack": "string"
    }
}

Update custom data record by id

If a record with the id exists it will be updated.

🔒 Requires Custom Connections Data: Create and Update Custom Connection Data permission.

💎 Requires your account have the Custom Connections and Tests feature. Contact your CSM for help upgrading.

Securitybearer
Request
path Parameters
connectionId
required
number
resourceId
required
number
recordId
required
string
Request Body schema: application/json
required
required
object

The Custom data to be created

Responses
200

Successful

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

412

You must accept the Drata terms and conditions to use the API

413

The file was too large to upload

500

Internal server error

put/custom-connections/{connectionId}/resources/{resourceId}/records/{recordId}
Request samples
application/json
{
  • "data": {
    • "type": "object",
    • "required": [
      • "comment_id",
      • "user",
      • "text"
      ],
    • "properties": {
      • "comment_id": {
        • "type": "number"
        },
      • "user": {
        • "type": "object",
        • "required": [
          • "id",
          • "name",
          • "email",
          • "has_bought"
          ],
        • "properties": {
          • "id": {
            • "type": "number"
            },
          • "name": {
            • "type": "string"
            },
          • "email": {
            • "type": "string"
            },
          • "has_bought": {
            • "type": "boolean"
            }
          }
        },
      • "text": {
        • "type": "string"
        }
      }
    }
}
Response samples
application/json
{
  • "id": 1
}

Delete a custom data record by id

If a record with the id exists it will be deleted

🔒 Requires Custom Connections Data: Delete Custom Connection Data permission.

💎 Requires your account have the Custom Connections and Tests feature. Contact your CSM for help upgrading.

Securitybearer
Request
path Parameters
recordId
required
string
connectionId
required
number
resourceId
required
number
Responses
200

Successful

400

Malformed data and/or validation errors

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

404

Not Found

412

You must accept the Drata terms and conditions to use the API

500

Internal server error

delete/custom-connections/{connectionId}/resources/{resourceId}/records/{recordId}
Request samples
Response samples
application/json
{
  • "statusCode": 0,
  • "message": "string",
  • "code": 0,
  • "debugInfo": {
    • "name": "string",
    • "message": "string",
    • "stack": "string"
    }
}