We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesWallet KitServer APIsTransit Pass APIsQuerying Transit Pass Instances

Querying Transit Pass Instances

Queries all transit pass instances corresponding to the same modelId.

1 Request

HTTP request

GET
https://${url}/hmspass/v1/transit/instance?modelId={modelId}&session={session}&pageSize={pageSize}

Note: The ${url} variable in the preceding request should be selected based on the region where the wallet server is located. For details, please refer to Wallet Server Address.

Path Parameters

Parameter nameValueDescription
modelIdStringUnique identifier of a transit pass model. This ID must be unique across all models from an issuer. The value contains only alphabetic letters, digits, dots (.), hyphens (-), and underscores (_).
sessionStringIf you set pageSize, and the overall number of objects is larger than the pageSize, the HTTP response will return a "nextSession" parameter. Set the "nextSession" you just got to this "session" parameter and send this query request again, you will get the next group of objects. Do not set this parameter when you send the query request for the first time.
pageSizeIntThis parameter identifies the maximum number of results returned by a list. All results are returned if this parameter is not specified.

Note: If session and pageSize are both absent, all objects will be returned. If session is not set while pageSize is set, then the first group of objects will be returned. If sesion and pageSize are both set, then the next group of objects will be returned. Session should not be set if pageSize is not set.

Request body

The request body must be empty.

2 Response

If successful, this method returns a response with the following structure:
Response:
{
  "pageInfo": {
    object (PageInfo)
}
  "data": [
    {
      object (hwWalletObject)
    }
  ]
}

Parameter nameValueDescription
dataArray<hwWalletObject>Transit pass instances.
pageInfoPageInfoNumber of results returned on each page.


PageInfo

Parameter nameValueDescription
serviceTypeStringThe value is always hmspass#pageInfo.
pageSizeIntNumber of results returned on this page.
nextSessionStringToken that is used to fetch the next page (valid within five minutes).
This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.