Forum Discussion
confuzed
5 months agoNew Contributor
CLI output is not json when "--format json" used with "connect server create"
When running `op --format json connect server create "My Server" --vaults "MyVault"`, I expect the output to be JSON, an only JSON, so that my script can safely consume the output. I need to extract ...
- 5 months ago
Hi confuzed,
Thanks for reaching out. thanks for the feedback, I'll send this along to the team. In the mean time as a work around you can use the following to retrieve the JSON version of the server info:
op connect server get "Demo Server" --format jsonit will come back like this
➜ Connect op connect server get "Demo Server" --format json { "id": "TRMT2AZWWRE65JAHY{REDACTED}", "name": "demo SErver", "state": "ACTIVE", "created_at": "2025-06-27T16:05:12Z", "creator_id": "FIVA23HWMBETFC{REDACTED}", "tokens_version": 1 }Let us know if you need more help!
All the best,
Phil
1P_Phil
Moderator
5 months agoHi confuzed
Ah, got it! Makes sense. Ok I have created a ticket on your behalf here. https://github.com/1Password/connect/issues/103
For your use case, does it make sense to have servers with the same human readable name created or should we return an error / warning back to the script/user?
Thanks!
Phil