Set Credentials
The Set Credentials operation sets the credentials for a datasource.
Required scope: Dataset.ReadWrite.All
To set the permissions scope, see Register a client app or Register a web app.
PATCH https://api.powerbi.com/v1.0/myorg/gateways/{gateway_id}/datasources/{datasource_id}
Uri parameter
| Name | Description | Data Type |
|---|---|---|
| gateway_id | Unique guid of the Gateway to use. | String |
| datasource_id | Unique guid of the Datasource to use. | String |
Header
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Body schema
{
"credentialType": "Basic",
"basicCredentials": {
"username": "userName",
"password": "password"
}
}
Status code
| Code | Description |
|---|---|
| 200 | OK. Indicates success. The dataset is returned in the response body. |
Content-Type
application/json
Show: