N
Neon15mo ago
other-emerald

Last active on CLI?

Is there a way to get the Last active field from the browser UI with this command: neonctl branches list --project-id PROJECT_ID --output json? Currently, I only see a created_at and an updated_at, neither of which match the data of the Last active column. We're trying to automate branch cleanup and need this data to know which branches are safe to be pruned.
6 Replies
compatible-crimson
compatible-crimson15mo ago
Good question - I know it exists as compute_last_active_at in the API - https://arc.net/l/quote/wzwijyuz
compatible-crimson
compatible-crimson15mo ago
I've pinged internally to see about access via CLI
other-emerald
other-emeraldOP15mo ago
Thank you! Do you know where "compute_last_active_at" comes from in the API? Your link takes me to projects, and when I click into branches, none of the responses have this field
compatible-crimson
compatible-crimson15mo ago
oh yes I see - you need that field on the branch level, not the project level
xenial-black
xenial-black15mo ago
Hey! In ui, we actually show this field from the branch endpoints, selecting the latest one
compatible-crimson
compatible-crimson15mo ago
@Duffmaster Flex I logged a request for adding this to neonctl here https://github.com/neondatabase/neonctl/issues/275
GitHub
Make "Last Active" available in neonctl branches list · Issue #275 ...
From Discord: https://discord.com/channels/1176467419317940276/1281248863470096446/1281248863470096446 Is there a way to get the Last active field from the browser UI with this command: neonctl bra...

Did you find this page helpful?