View env vars on your server with cURL

Use cURL to view environment variables on a remote server and track each access event with Operational.

Why view environment variables with cURL

Environment variables store configuration details like API keys and database URLs. Accessing them helps debug issues.

When you need to inspect your server setup, running a cURL command against a secure endpoint can show you the variables.

For example, on a staging server you might want to confirm that the DATABASE_URL is set correctly.

What is Operational

Operational is an open source event tracking platform for any tech product.

You can use it to log each time someone views environment variables. That helps you audit access and catch unexpected changes.

Operational in action

Setting up Operational

  1. Go to https://app.operational.co and sign up.
  2. Create a new project in your dashboard.
  3. Copy the project’s API key.

Code example: Log environment view events

curl -X POST https://api.operational.co/v1/events/ingest -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{ "name": "view environment variables", "avatar": "🔑", "content": "User john.doe viewed env vars on server" }'

This command sends an event to Operational whenever someone retrieves environment variables.

Conclusion

Using Operational to log when environment variables are viewed can save time debugging and improve security.

Learn more at https://operational.co. Try the playground for copy-and-paste examples: https://operational.co/playground