Create Connector Collection Association
POST/v1/connector/create_connector_collection_association/:workspace_id
Creates associations between a singular connector and collection(s).
Args:
connector_repository (ConnectorRepository): The repository for managing connectors. connector_collection_repository (ConnectorCollectionRepository): The repository for managing associations between connectors and collections. workspace_id (str): The workspace_id of the connector to be created. user (TokenData): The token data of the authenticated user. connector_id (str): The id of the connector to be associated. collection_id_list (List[str]): The id of the collections to associate a connector to.
Returns:
List[GetAssociationSuccessfulResponse]: a list of associations that has just been generated
Important observations:
- The connector_id must exist in the workspace
- The collection_id(s) must all exist in the workspace
- If all the collections are already associated to the connector, it will return an HTTP Exception
- If any collection is not associated with the connector, it will ignore the ones that are, and create the associations between the ones that aren't already associated
Request
Responses
- 200
- 422
Successful Response
Validation Error