Skip to main content

Finalize Connector

Create a connector from a reviewed draft.

POST /api/connectors/drafts/{id}/finalize

Authorization

  • Analyst / Admin: Required.
note

The draft (generation log) must be in review status. The new connector is created at version 1.0.0 with status testing — these are not configurable on this call. Use Update Connector afterwards to bump the version or promote to production.

Request Body

None. Endpoint enable/disable and config are read from the draft itself.

Response

Returns 201 Created:

{
"connector_id": "conn_slack001",
"platform_name": "Slack",
"version": "1.0.0",
"endpoints_count": 12,
"message": "Connector created with 12 enabled endpoints (3 disabled)"
}

endpoints_count is the number of enabled endpoints (disabled ones are still carried over but filtered at execution time).

Side Effects

Finalizing a draft:

  1. Promotes the draft connector row to testing status at version 1.0.0 (soft-deleting any prior testing connector for the same platform)
  2. Keeps all endpoints, preserving each one's enabled flag
  3. Extracts sample responses from the spec into connector test data (when available)
  4. Marks the generation log completed
  5. Invalidates the connectors-list cache

Pre-Finalization Checklist

Before finalizing, ensure:

  • All relevant endpoints are enabled
  • Endpoint dependencies are configured
  • Pagination is set up for list endpoints
  • Authentication has been tested
  • At least one full chain test has passed

Example Request

curl -X POST "https://api.traces.io/api/connectors/drafts/draft_abc123/finalize" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"version": "1.0.0",
"status": "testing"
}'

Error Responses

400 Bad Request

Draft not in review status:

{
"error": {
"code": "VALIDATION_ERROR",
"message": "Cannot finalize draft in analyzing status"
}
}

No endpoints in the draft:

{
"error": {
"code": "VALIDATION_ERROR",
"message": "No endpoints in draft"
}
}

404 Not Found

{
"error": {
"code": "NOT_FOUND",
"message": "Draft not found"
}
}

Post-Finalization

After finalizing:

  1. The connector appears in the connector list (in testing status)
  2. It is not yet usable for customer collections until promoted to production
  3. The generation log is marked completed

To promote the connector or change endpoints, use the Update Connector endpoint.