A Jenkins plugin that allows parameters to be populated dynamically using JSON data from configurable sources.
This plugin defines a new parameter type: JSON Parameter.
It allows Jenkins jobs to dynamically fetch, parse, and populate values from JSON sources at runtime or configuration time.
Supported JSON sources:
- ✅ Jenkins Config File Provider (folder-based or global)
- ✅ Remote HTTP endpoints
You can extract values using JSONPath syntax, making it easy to map dynamic structures into usable parameter options.
Install via Jenkins Plugin Manager:
Manage Jenkins » Manage Jenkins » Available plugins » JSON Parameter
Requires:
When configuring a job:
- Click "Add Parameter" → "JSON Parameter"
- Fill in the following fields:
- Name: Internal parameter identifier
- Description (optional)
- Default Value (optional)
- Query: JSONPath expression (e.g.,
$[*].name
)
- Provide the Config File ID
- Jenkins resolves it hierarchically:
- Looks in the current folder and its parents
- Falls back to global if not found
- Enter a full API URL that returns JSON
- Select a Credentials ID if authentication is required:
- Username/Password → Basic Auth (or Bearer if username is empty)
- Secret Text → Bearer token
📦 Sample JSON
[
{ "name": "Alpha" },
{ "name": "Beta" }
]
🔧 Example 1: Folder-level config with placeholder
parameters {
jsonParam(
name: 'JSON_PARAM',
description: 'List data from JSON source.',
defaultValue: '',
query: '$[*].name',
source: configFileSource(configId: 'my-id')
)
}
➡️ Rendered dropdown:
["-- Choose an option --", "Alpha", "Beta"]
🔧 Example 2: Global config with preselected default
parameters {
jsonParam(
name: 'JSON_PARAM',
description: 'List data from JSON source.',
defaultValue: 'Alpha',
query: '$[*].name',
source: configFileSource(configId: 'my-id')
)
}
➡️ Rendered dropdown:
["Alpha", "Beta"]
🔧 Example 3: HTTP JSON source
parameters {
jsonParam(
name: 'JSON_PARAM',
description: 'List data from JSON source.',
defaultValue: 'Beta',
query: '$[*].name',
source: remoteSource(credentialsId: 'my-id', url: 'https://dummyjson.com/api/data')
)
}
➡️ Rendered dropdown:
["Beta", "Alpha"]
Refer to our contribution guidelines
Licensed under MIT, see LICENSE