Create Data Source (gateways)

 

Updated: June 23, 2017


Request | Response | Example

The Create data source operation creates a new data source from a JSON schema definition and returns the data source ID and the properties of the data source created. This is specific to a data source for an On-Premises Data Gateway.

POST https://api.powerbi.com/v1.0/myorg/gateways/{gateway_id}/datasources

Uri parameter

NameDescriptionData Type
gateway_idGuid of the gateway to use. You can get the Gateway id from the Get Gateways operation.String

Header

Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ

Body schema

{
    "name": "Contoso Data Source",
    "connectionDetails": "{"server":"MyAzureDB.database.windows.net", "database":"Sample2"}",
    "type": "Sql|AnalysisServices|...",    
    "credentialDetails": {
        "credentials": "ABEF==",        
        "encryptionAlgorithm": "RSA-OAEP",
          "encryptedConnection": "Encrypted|NotEncrypted",
        "privacyLevel": "None|Public|Organizational|Private",
        "credentialType": "Basic|Windows|Anonymous|…"
    }
}

Status code

CodeDescription
201Empty HTTP 201 created
400Bad request
403Not authorized
404Not found
500Internal service error

Content-Type

application/json

More questions? Try the Power BI Community

Show: