Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 2.76 KB

File metadata and controls

65 lines (45 loc) · 2.76 KB

Host

Method HTTP request Release Stage
list GET /v2/admin/enrollments/{enrollmentRid}/hosts Public Beta

list

Lists all Hosts.

This is a paged endpoint. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, the nextPageToken field will be populated. To get the next page, make the same request again, but set the value of the pageToken query parameter to be value of the nextPageToken value of the previous response. If there is no nextPageToken field in the response, you are on the last page.

Parameters

Name Type Description Notes
enrollment_rid EnrollmentRid
page_size Optional[PageSize] The page size to use for the endpoint. [optional]
page_token Optional[PageToken] The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and use it to populate the pageToken field of the next request. [optional]
preview Optional[PreviewMode] Enables the use of preview functionality. [optional]

Return type

ListHostsResponse

Example

from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint

client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")

# EnrollmentRid
enrollment_rid = None
# Optional[PageSize] | The page size to use for the endpoint.
page_size = None
# Optional[PageToken] | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and use it to populate the `pageToken` field of the next request.
page_token = None
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None


try:
    for host in client.admin.Enrollment.Host.list(
        enrollment_rid, page_size=page_size, page_token=page_token, preview=preview
    ):
        pprint(host)
except foundry_sdk.PalantirRPCException as e:
    print("HTTP error when calling Host.list: %s\n" % e)

Authorization

See README

HTTP response details

Status Code Type Description Content Type
200 ListHostsResponse application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]