https://pulumi.com logo
#pulumi-deployments
Title
# pulumi-deployments
f

full-dress-10026

06/12/2023, 3:17 PM
Best way to get the status of the latest deployment?
Was wondering if get deployment somehow supported it already. Alternatively, list deployments (ideally in descending by date order), get first, then get deployment.
The list deployments approach is not ideal since to get the latest, you’d need to walk all the pages.
l

lemon-agent-27707

06/12/2023, 4:04 PM
There is a
status
query parameter that looks like it didn't make it into the documentation.
statuses are: • not-started • accepted • running • failed • succeeded You can try
?status=accepted&status=not-started&status=running
to see all queued/running deployments.
Will take care of that one as well on my next docs update pass https://github.com/pulumi/pulumi-cloud-requests/issues/260
f

full-dress-10026

06/12/2023, 4:17 PM
Same deal though, right? i.e., if there are hundreds of successful deployments, to get the latest one requires iterating the full set
l

lemon-agent-27707

06/12/2023, 6:59 PM
Ah, good point. Let me open an issue.
Yeah, that API should return the latest deployment first. Not sure why it returns them in that order... We will add a sort parameter and possibly also a
/latest
endpoint for
GET deployment