Product - List
获取所有产品。
GET https://prod.core.sphere.azure.net/v2/tenants/{tenantId}/products
GET https://prod.core.sphere.azure.net/v2/tenants/{tenantId}/products?maxPageSize={maxPageSize}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
tenant
|
path | True |
string uuid |
Azure Sphere 租户 ID。 |
max
|
query |
integer int32 |
响应中应包含的最大结果数。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Sphere-Continuation |
string |
用于继续上一页结果的延续标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功。 |
示例
List the products
Sample Request
GET https://prod.core.sphere.azure.net/v2/tenants/768c2cd6-1bf0-4521-9f53-084a331d81cb/products
Sample Response
{
"Items": [
{
"Id": "b0ba65bc-648f-4213-a910-cbeb6024c744",
"TenantId": "768c2cd6-1bf0-4521-9f53-084a331d81cb",
"Name": "Dishwasher",
"Description": "Contoso dishwashers"
},
{
"Id": "258e9e1d-a16d-4459-be5d-38420a8c43ad",
"TenantId": "768c2cd6-1bf0-4521-9f53-084a331d81cb",
"Name": "Refrigerator",
"Description": "Contoso refrigerators"
}
],
"ContinuationToken": null
}
定义
名称 | 说明 |
---|---|
Product | |
Product |
Product
名称 | 类型 | 说明 |
---|---|---|
Description |
string |
产品的说明。 |
Id |
string |
产品的唯一 ID。 |
Name |
string |
产品的名称。 |
TenantId |
string |
拥有产品的租户的唯一 ID。 |
ProductItemCollectionResponse
名称 | 类型 | 说明 |
---|---|---|
ContinuationToken |
string |
可用于获取下一组项的继续标记。 |
Items |
Product[] |
项列表。 |