GET /connections/{connectionId} – Retrieves a connection by its ID.

  • For Cognito, the connectionId is the userPoolId.

Headers:

  • Authorization: Bearer <access_token> (required)

Body:

  • None

Path Parameters:

  • connectionId: The connection ID of which connection to retrieve (required)

Query Parameters:

  • provider: The authentication provider to use (optional, defaults to "auth0-connection" if omitted). See ConnectionProvider for valid options.

  • 200 OK – JSON stringified object represented the retrieved connection Connection

Status Code Meaning When it Happens
400 Bad Request Missing or invalid fields in request body
401 Unauthorized Missing or invalid authentication token
404 Not Found Specified connection does not exist
500 Internal Server Error Unexpected error
{
"error": "Detailed error message here"
}

GET /connections/exampleConnectionId
GET /connections/exampleUserPoolId?provider=cognito-connection
 {
"connectionId": "connection_id",
"name": "connection_name",
"type": "connection_type",
"status": "active|inactive",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-01T00:00:00Z",
"metadata": {
"key": "value"
},
"configuration": {
"setting": "value"
}
}

  • Parameters

    • event: APIGatewayProxyEvent

      The API Gateway event containing the request.

    • context: Context
    • callback: Callback<APIGatewayProxyResult>

    Returns void | Promise<APIGatewayProxyResult>

    A Promise resolving to an API Gateway-compatible response.