Managing agent parameters using the REST API in Cloudera Edge Management
Edge Flow Manager's REST API provides a programmatic approach to configuring agent parameters, enabling you to set parameter contexts at the agent and agent class levels. This method ensures consistency across agents and provides flexibility for per-agent configurations.
Parameter contexts define the scope and overriding behavior of parameters, ensuring that values are applied at the correct level: agent, agent class, or flow. Parameters never exist on their own, they only exist in a parameter context. Any collection of replacement key-value pairs is known as a parameter context.
Levels | Description |
---|---|
Agent Class | An agent class level parameter context, if present, overwrites the flow level context. This is to support multiple versions of a flow definition to an agent class, but allowing agent class configuration values that override whatever is set in the Flow Designer UI as default values. Agent class level parameter contexts are set using the Edge Flow Manager REST API, and can be set once to impact all future flows published to that agent class. |
Agent | An agent level parameter context, if present, overwrites the agent class and flow level contexts. This is to support deploying a flow to multiple agents in an agent class but allowing per-agent configuration values. Agent level parameter contexts are set using the Edge Flow Manager REST API, and can be set once to affect all future flows deployed to that agent. |
Resolving parameter contexts
GET /efm/api/flows/{flowId}?aid={agentId}
When a flow is fetched, the agent, agent class, and flow level parameter contexts are retrieved and applied to the flow in the hierarchy listed above.
REST API endpoints for parameters
- Parameters section in Edge Flow Manager REST API.
- Parameter Mappings section in Edge Flow Manager REST API.
For tutorials of specific use cases that leverage this feature, including examples interacting
with the REST API using curl
, see Using Agent Parameters.