Http_server_id variable for http hello world example

Hi @dmuensterer, welcome to OpenZiti, nice to have you in the community!

I can’t believe that wasn’t explained in more detail! I made an issue to track that here: explain http_server_id better on host-access · Issue #169 · openziti/ziti-doc · GitHub

Right now, when you run ziti edge list identities with your CLI, can you show me what you get back? The “id” we need is in that response. For example when I run it, my “id” is: GUk3rc.7u

ziti edge list identities 'name contains "http-server"'
╭───────────┬─────────────┬──────┬────────────╮
│ ID        │ NAME        │ TYPE │ ATTRIBUTES │
├───────────┼─────────────┼──────┼────────────┤
│ GUk3rc.7u │ http-server │ User │            │
╰───────────┴─────────────┴──────┴────────────╯

If you jsut want to set the variable you can use the -j flag and jq and you can run:

http_server_id=$(ziti edge list identities 'name contains "http-server"' -j | jq -r .data[].id)

echo $http_server_id
GUk3rc.7u

That help?

1 Like