Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi everyone.
I'm having big problems retreving some data from an restfull api.
APi documentation example looks like this.
Product
This endpoints allows retrieveal, creation, modification and deletion of products in Warehouze, it also allows retrieval of stock quantities pr. warehouse.
Call requires at least one property name, blank query is allowed.
| AdjustedInStockQty | Decimal | False | |
| Barcode | String | True | |
| Barred | Boolean | True | |
| BaseNumber | String | False | |
| ColliQty | Decimal | False | |
| CompanyId | Int32 | False | |
| CreationDate | DateTime | False | |
| CustomProductPropertyFive | String | False | |
| CustomProductPropertyFour | String | False | |
| CustomProductPropertyOne | String | False | |
| CustomProductPropertyThree | String | False | |
| CustomProductPropertyTwo | String | False | |
| DataSource | DataSource | 0 Economic, 1 SmartWeb, 2 Local, 3 Magento, 4 GoldenPlanet, 5 Shopify, 6 WooCommerce, 7 FakturaFil, 8 IEX | False |
| DeliveryDays | Int32 | True | |
| ExtraCosts | Decimal | False | |
| GroupId | Int32 | False | |
| Height | Decimal | False | |
| Id | Int32 | False | |
| IncludeInShoppinglist | Boolean | False | |
| IsCollectionMaster | Boolean | False | |
| IsMaster | Boolean | False | |
| LastUpdated | DateTime | False | |
| Length | Decimal | False | |
| LocationId | Int32 | False | |
| Name | String | True | |
| Notes | String | True | |
| Notifications | String | False | |
| Number | String | False | |
| OrderedByCustomersQty | Decimal | False | |
| OrderedFromSuppliersQty | Decimal | False | |
| PoQtyMin | Decimal | False | |
| SelectedVariantType1 | String | False | |
| SelectedVariantType2 | String | False | |
| ShippingMethod | String | False | |
| ShippingPrice | Decimal | False | |
| ShoppingQty | Decimal | False | |
| StockQty | Decimal | False | |
| SupplierId | Int32 | True | |
| SupplierProductNumber | String | True | |
| TurnoverQty | Decimal | False | |
| UnitCostPrice | Decimal | False | |
| UnitId | Int32 | False | |
| UnitPrice | Decimal | False | |
| UnitSalesPrice | Decimal | False | |
| VariantMasterId | Int32 | False | |
| Volume | Decimal | False | |
| WarehouseId | Int32 | False | |
| Weight | Decimal | False | |
| Width | Decimal | False |
var request = { Token: "Insert your token here", Query: [ "Number=130", "WarehouseNumber=1", ], Properties: [ "Id", "Name", "StockQty", ], }; $.ajax({ url: "https://api.warehouze.io/Product", data: request, dataType: 'text', type: "GET", traditional: true, success: function (data) { console.log(data); }, error: function (data, xHr) { console.log(data); console.log(xHr); } });
Can anyone help me how to extract data?
You can't have a GET request with a payload in Power BI (or anywhere, I think). It has to be a POST request.
Power BI does all that automatically via Web.Contents and Json.FromValue
for example:
let
URL = "http://xxx/tstat",
headers = [#"Content-Type"="application/json"],
data = Json.FromValue([tmode = 2,t_cool = Setpoint,hold = 0]),
web = Web.Contents(URL, [ Content = data, Headers = headers, ManualStatusHandling = {404, 400}]),
result = Json.Document(web)
in result
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 7 | |
| 5 | |
| 5 |