ListPrebuilds
client.prebuilds.list(PrebuildListParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): PrebuildsPage<Prebuild { metadata, spec, status, id } >
POST/gitpod.v1.PrebuildService/ListPrebuilds
ListPrebuilds
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const prebuild of client.prebuilds.list()) {
console.log(prebuild.id);
}{
"pagination": {
"nextToken": "nextToken"
},
"prebuilds": [
{
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"updatedAt": "2019-12-27T18:11:19.117Z",
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"executor": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"triggeredBy": "PREBUILD_TRIGGER_UNSPECIFIED"
},
"spec": {
"desiredPhase": "PREBUILD_PHASE_UNSPECIFIED",
"specVersion": "specVersion",
"timeout": "+9125115.360s"
},
"status": {
"phase": "PREBUILD_PHASE_UNSPECIFIED",
"completionTime": "2019-12-27T18:11:19.117Z",
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"failureMessage": "failureMessage",
"logUrl": "https://example.com",
"snapshotCompletionPercentage": 100,
"snapshotSizeBytes": "snapshotSizeBytes",
"statusVersion": "statusVersion",
"warningMessage": "warningMessage"
},
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
]
}Returns Examples
{
"pagination": {
"nextToken": "nextToken"
},
"prebuilds": [
{
"metadata": {
"createdAt": "2019-12-27T18:11:19.117Z",
"creator": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"updatedAt": "2019-12-27T18:11:19.117Z",
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"executor": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"triggeredBy": "PREBUILD_TRIGGER_UNSPECIFIED"
},
"spec": {
"desiredPhase": "PREBUILD_PHASE_UNSPECIFIED",
"specVersion": "specVersion",
"timeout": "+9125115.360s"
},
"status": {
"phase": "PREBUILD_PHASE_UNSPECIFIED",
"completionTime": "2019-12-27T18:11:19.117Z",
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"failureMessage": "failureMessage",
"logUrl": "https://example.com",
"snapshotCompletionPercentage": 100,
"snapshotSizeBytes": "snapshotSizeBytes",
"statusVersion": "statusVersion",
"warningMessage": "warningMessage"
},
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}
]
}