Running jobs through the Runly UI is great, but the real value in Runly comes from integrating jobs into your application’s workflow. Runly offers a robust HTTP API for integration along with pre-built clients to interact with it.
In order to access the API, you will need to generate an API key for your application. You can manage connected applications for your account from your Application Dashboard.
Add a new application:
After you create the application, make sure to copy the generated API key. You will only be able to see the API key right after you create it. If you lose the API key, you will need to delete the application and recreate it effectively generating a new key.
When you generate a non-public API key for an application, the API key grants the application access to the Runly API as your user account. The application will have access to and be able to do anything you can do with your user account. It is the responsibility of the user to keep the API key secret.
When you generate a “public” API key, the key still grants access to the Runly API as your user account, but the scope is limited. Public API keys are meant to be used in public environments like a JS client running in a browser.
A public application can only perform the following operations on your behalf:
- Retrieve run status
- Requeue a failed or partially failed job without changing any configuration settings
- Queue a job from a template with explicit permissions that allow this
The public application will only be able to perform these operations on organizations and environments that your user account has access to.
Your organization has a web application that needs to integrate with the Runly API. An Ops user in the organization could create an API key, My Backend Web App, under their user account. Since the Ops user has access to production, this API key would be privileged. It could be configured for the application to use only when it is deployed to production.
A Developer in the organization, on the other hand, who only has access to dev environments, could create the same API key, My Backend Web App, but it would be scoped to their user account. This API key would be less priveleged since it could only be used to queue jobs on dev environments. This API key could be used for development purposes.