## CreatePrebuildLogsToken `prebuilds.create_logs_token(PrebuildCreateLogsTokenParams**kwargs) -> PrebuildCreateLogsTokenResponse` **post** `/gitpod.v1.PrebuildService/CreatePrebuildLogsToken` Creates a logs access token for a prebuild. Use this method to: - Stream logs from a running prebuild - Access archived logs from completed prebuilds Generated tokens are valid for one hour. ### Examples - Create prebuild logs token: Generates a token for accessing prebuild logs. ```yaml prebuildId: "07e03a28-65a5-4d98-b532-8ea67b188048" ``` ### Parameters - `prebuild_id: str` prebuild_id specifies the prebuild for which the logs token should be created. +required ### Returns - `class PrebuildCreateLogsTokenResponse: …` - `access_token: str` access_token is the token that can be used to access the logs of the prebuild ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.prebuilds.create_logs_token( prebuild_id="07e03a28-65a5-4d98-b532-8ea67b188048", ) print(response.access_token) ``` #### Response ```json { "accessToken": "accessToken" } ```