listAll* variant yields items across every page. The other variant returns one page with pagination metadata. See Pagination.
Signature
Method signatures onclient.projects:
Parameters
listAllTokens()
string
required
Project ID with prefix
pp..number
default:"20"
Maximum number of results to return; defaults to 20.
number
default:"0"
Number of results to skip before this page; defaults to 0.
listTokens()
string
required
Project ID with prefix
pp..number
default:"20"
Maximum number of results to return; defaults to 20.
number
default:"0"
Number of results to skip before this page; defaults to 0.
Returns
listAllTokens() result
AsyncGenerator<ScopedTokenSummary>
Yields one item at a time. The fields below describe each yielded item.
string
required
Public token ID with prefix
pst., used to revoke the token.string
required
The user the token acts as.
ProjectId[]
required
Projects the token can act in.
string[]
required
Granted permissions, written as
resource:operation strings.string
required
Time the token was created, as an ISO 8601 timestamp.
string
required
Time the token expires, as an ISO 8601 timestamp.
listTokens() result
Promise<{ tokens: ScopedTokenSummary[]; pagination: Pagination }>
ScopedTokenSummary[]
required
Live scoped tokens in this page.
Pagination
required
Pagination information for this page.
Errors
HTTP errors throwPotatoApiError. The endpoint documents these error responses:
HTTP endpoint:
GET /projects/{projectId}/tokens.