This endpoint allows you to create a new connection for a specified project.
You need to provide the project ID and the connection details in the request body.
The connection details include the name, type, and credentials required for the connection.
Depending on the connection type, additional parameters may be required under credentials.
You can view the list of supported connection types by calling the /connections/config endpoint.
You can switch examples from the second dropdown of the sample request component. (cURL (first dropdown) - Stripe Connection Request (second dropdown))
Note: Typically, the connection creation process involves the following steps:
Example:
GET /connections/config endpoint displays all of the connection types.
GET /connection/config/POSTGRES endpoint displays the POSTGRES connection configuration.
The definition of the POSTGRES connection configuration is as follows:
{
"connectionType": "POSTGRES",
"connectionTypeLabel": "PostgreSQL",
"name": "PostgreSQL",
"authorizationType": "custom",
"credentialSchemaType": "postgres_credential_schema",
"category": "Database",
"configuration": [
{
"fieldName": "url",
"fieldType": "text",
"required": true,
"description": "URL"
},
{
"fieldName": "port",
"fieldType": "number",
"required": true,
"description": "Port"
},
{
"fieldName": "user",
"fieldType": "text",
"required": true,
"description": "User"
},
{
"fieldName": "password",
"fieldType": "text",
"required": true,
"description": "Password"
},
{
"fieldName": "databaseName",
"fieldType": "text",
"required": true,
"description": "Database Name"
},
{
"fieldName": "useSsl",
"fieldType": "boolean",
"required": true,
"description": "Use SSL"
}
],
"documentationUrl": "https://docs.peaka.com/integrations/postgresql"
}
According to the POSTGRES connection configuration, the connection request should include the following parameters (respecting to the required flag):
{
"name": "examplePostgre",
"type": "POSTGRES",
"credential": {
"url": "<host ip or domain>",
"port": 5432,
"user": "userOfYourDB",
"password": "passwordOfUser",
"databaseName": "yourDBName",
"useSsl": false
}
}
Use the Authorization header with the value 'Bearer <apiKey>' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication
ID of the project
Connection Request
The body is of type object
.
Connection created successfully
The response is of type object
.