Forum Discussion

CoulterJames2's avatar
CoulterJames2
Advocate II
10 days ago
Solved

Programmatically Create Fabric Data Pipeline Cloud Connection

Is it possible to create a Fabric Data Pipelines cloud connection via the Create Connection API or is this connection type not supported for creation? I can retrieve the details of such connections, ...
  • tayloramy's avatar
    10 days ago

    Hi CoulterJames2

     

    It is possible. The creationMethod is the type of connection to create. If you look at the examples in the documentation, 

    POST https://api.fabric.microsoft.com/v1/connections
    
    {
      "connectivityType": "ShareableCloud",
      "displayName": "ContosoCloudConnection",
      "connectionDetails": {
        "type": "SQL",
        "creationMethod": "SQL",
        "parameters": [
          {
            "dataType": "Text",
            "name": "server",
            "value": "contoso.database.windows.net"
          },
          {
            "dataType": "Text",
            "name": "database",
            "value": "sales"
          }
        ]
      },
      "privacyLevel": "Organizational",
      "credentialDetails": {
        "singleSignOnType": "None",
        "connectionEncryption": "NotEncrypted",
        "skipTestConnection": false,
        "credentials": {
          "credentialType": "Basic",
          "username": "admin",
          "passwordReference": {
            "connectionId": "4399ab2c-7551-4c0e-8aa7-18fc2f217626",
            "secretName": "some-secret"
          }
        }
      },
      "allowUsageInUserControlledCode": true
    }

     You can see that for this example, this is a SQL Server connection, and the CreationMethod is SQL. 

     

     

    Here is another API to list all the supported CreationMethods: 
    https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/list-supported-connection-types?tabs=HTTP