Dela via


Product - List

Hämtar alla produkter.

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-parametrar

Name I Obligatorisk Typ Description
tenantId
path True

string

uuid

Klient-ID:t för Azure Sphere.

maxPageSize
query

integer

int32

Det maximala antalet resultat som ska ingå i svaret.

Begärandehuvud

Name Obligatorisk Typ Description
Sphere-Continuation

string

En fortsättningstoken som används för att fortsätta från en föregående sida med resultat.

Svar

Name Typ Description
200 OK

ProductItemCollectionResponse

Åtgärden lyckades.

Exempel

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
}

Definitioner

Name Description
Product
ProductItemCollectionResponse

Product

Name Typ Description
Description

string

Beskrivningen av produkten.

Id

string

Produktens unika ID.

Name

string

Namnet på produkten.

TenantId

string

Det unika ID:t för den klientorganisation som äger produkten.

ProductItemCollectionResponse

Name Typ Description
ContinuationToken

string

Fortsättningstoken som kan användas för att hämta nästa uppsättning objekt.

Items

Product[]

Lista över objekt.