Hi Team.. I am using Phoenix and its a really great application. Thanks for creating it. I want to understand, if there is any way to programmatically create system API key during the deployment ? From the documentation, I can see that I can change the password, and create a system API key manually.
Yes, you can programmatically create a system API key using a GraphQL mutation. According to the GitHub pull request, you can use the createSystemApiKey mutation to generate a system API key. Here's an example of how you can perform this mutation: LBKSmutation { createSystemApiKey(input: { name: "system-api-key"}) { jwt apiKey { name description createdAt expiresAt } } }LBKSThis mutation will return a JSON payload containing the JWT and details of the created API key, such as its name, creation date, and expiration date.Would you like more detail on how to implement this in your deployment process? Sources:
- GitHub pull request
馃挕聽Hint: Mention RunLLM in the thread for followups.
Hey Chaitanya, totally understand your use case. We're actively working on some phoenix management improvements at the moment (https://github.com/Arize-ai/phoenix/issues/6358). This might ultimately solve your problem but we don't have a solution for you today. Only admins can create system keys. Can you maybe tell us a bit more about your setup and why you need a new phoenix at deployment? Would love to understand why you need a phoenix freshly deployed with a system API key already setup. Thanks for the feedback! We hope to have a solution in the next iteration of Phoenix.
Hi Mikyo Thanks for your response. I am deploying phoenix in ECS fargate along with my chatbot services. These chatbot services send traces to the phoenix services. Right now upon successful deployment of the phoenix, the other chatbot services will start. This is completely automated in the code pipeline. Now I need to add a manual intervention after phoenix is deployed, need to change the admin default password, generate a system API key, and store it in one of the secrets and pass it to downstream applications as input or environment variable etc. I want to avoid this manual intervention. Hope it is clear...
To use PHOENIX_ADMIN_SECRET, set this environment variable in your Phoenix deployment with a strong secret (at least 32 characters, including a digit and a lowercase letter). This enables programmatic API key creation via a new endpoint, allowing you to automate project setup and trace logging without manual admin login. Remove the value after creating a system key for security reasons. For details, see API Key Generation via API and Admin Secret documentation.Would you like more detail on the API call or deployment example?Sources: - API Key Generation via API - Admin Secret documentation
馃挕聽Hint: Mention RunLLM in the thread for followups.
