Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
https://docs.microsoft.com/ja-jp/rest/api/power-bi/pushdatasets/datasets_puttable
I write in php and my code is like this
※I'm getting tokens
------------------------
$token_header = [
'Authorization: Bearer '.$token,
'Content-Type: application/json',
];
$powerBIApiAddRowsUrl = "https://api.powerbi.com/v1.0/myorg/datasets/09c8212f-b082-4553-993e-35d31399b226/tables/User";
$rowsJson = '{
"tableName": "NewProduct",
"columns": [
{
"name": "ProductID",
"dataType": "Int64"
},
{
"name": "Name",
"dataType": "string"
},
{
"name": "Category",
"dataType": "string"
},
{
"name": "IsCompete",
"dataType": "bool"
},
{
"name": "ManufacturedOn",
"dataType": "DateTime"
},
{
"name": "NewColumn",
"dataType": "string"
}
]
}';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $powerBIApiAddRowsUrl);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, $rowsJson);
curl_setopt($curl, CURLOPT_HTTPHEADER, $token_header);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
$response = curl_exec($curl);
curl_close($curl);
------------------------
※↓Error message
HTTP/1.1 404 Not Found
Cache-Control: no-store, must-revalidate, no-cache
Transfer-Encoding: chunked
Content-Type: application/json; odata.metadata=minimal
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Options: deny
X-Content-Type-Options: nosniff
RequestId: 06482c82-5a6a-4aec-a357-6e234498a759
OData-Version: 4.0
Access-Control-Expose-Headers: RequestId
Date: Tue, 09 Jul 2019 01:28:23 GMT
{
"error":{
"code":"","message":"No HTTP resource was found that matches the request URI 'http://api.powerbi.com/v1.0/myorg/datasets/09c8212f-b082-4553-993e-35d31399b226/tables/User'."
}
}"
------------------------
I would like to have some advice.
Thank you.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |