Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
hello,
I have problem with adding data source to data gateway using rest API
according to documentation available here:
https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/createdatasource
and here:
https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/updatedatasource#basic_credentials_examp...
using powershell I created a simple script
that should add new datasource to a data gateway unfortunately it always finish with http error 400 (bad request)
script:
$postParams = [ordered]@{ "dataSourceType" = "SQL" "connectionDetails" = @{"server" = $dbServerName; "database" = $dbName } "credentialDetails" = [ordered]@{ "credentialType" = "Basic" "credentials"= @{ "credentialData" = @( [ordered]@{"name" = "username"; "value" = $dbUserName },[ordered]@{"name" = "password"; "value" = $dbUserPwd } ) } "encryptedConnection"= "Encrypted" "encryptionAlgorithm"= "None" "privacyLevel"= "None" } "datasourceName"= $datasourceName } $jsonPostBody = $postParams | ConvertTo-JSON -Depth 99 $uri = "https://api.powerbi.com/v1.0/myorg/gateways/$($gatewayID)/datasources" $datasource = Invoke-RestMethod -Uri $uri -Headers $auth_header -Method POST -Body $jsonPostBody
is it some missing information i documentation or am I doing something wrong?
@Anonymous ,
I would suggest you to create a support ticket here.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @v-yuta-msft,
I filed a ticket and it was successfully submitted (Case 119052922001462) unfortunately after 24h I didn't get any feedback/contact from Support
User | Count |
---|---|
64 | |
27 | |
25 | |
17 | |
11 |