Best way to get the status of the latest deploymen...
# pulumi-deployments
f
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
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
Same deal though, right? i.e., if there are hundreds of successful deployments, to get the latest one requires iterating the full set
l
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