Client.workstation_configs¤
detail ¤
detail(
pk: Optional[str] = None,
api_url: Optional[str] = None,
**params: Any
) -> gcapi.models.WorkstationConfig
Retrieve a specific resource by primary key, URL, or search parameters.
Parameters:
-
pk(Optional[str], default:None) –Primary key of the resource to retrieve.
-
api_url(Optional[str], default:None) –Direct API URL of the resource to retrieve.
-
**params(Any, default:{}) –Search parameters to find a unique resource, such as
slug="your-slug".
Returns:
-
WorkstationConfig–The requested resource instance.
Raises:
-
ValueError–If more than one or none of pk, api_url, or params are specified.
-
ObjectNotFound–If no resource is found matching the criteria.
-
MultipleObjectsReturned–If multiple resources match the search parameters.
iterate_all ¤
Iterate through all resources from the API endpoint across all pages.
This method automatically handles pagination and yields individual resources from all pages until all resources have been retrieved.
Parameters:
-
params(Optional[dict[str, Any]], default:None) –Query parameters to include in the API requests.
Yields:
-
WorkstationConfig–Individual resources from the API endpoint.
list ¤
Retrieve a raw list of resources from the API endpoint.
Parameters:
-
params(Optional[dict[str, Any]], default:None) –Query parameters to include in the API request.
Returns:
-
list[WorkstationConfig]–Raw JSON response from the API containing the list of resources.
page ¤
page(
offset: int = 0,
limit: int = 100,
params: Optional[dict[str, Any]] = None,
) -> PageResult[gcapi.models.WorkstationConfig]
Retrieve a paginated set of resources from the API endpoint.
Parameters:
-
offset(int, default:0) –The starting index for pagination (zero-based).
-
limit(int, default:100) –The maximum number of results to return in this page.
-
params(Optional[dict[str, Any]], default:None) –Additional query parameters to include in the API request.
Returns:
-
PageResult[WorkstationConfig]–A paginated result containing the requested resources and metadata.