| 1 | [ |
| 2 | { |
| 3 | // required |
| 4 | // how your custom approvals application references this field |
| 5 | // LaunchDarkly uses the value here as a key |
| 6 | // in the "additionalFormVariables" object |
| 7 | // in the creationRequest that LaunchDarkly sends to your application |
| 8 | // in the creationRequest that LaunchDarkly sends to your application |
| 9 | "key": "exampleKey", |
| 10 | |
| 11 | // required |
| 12 | // name of the field displayed in the LaunchDarkly approval request UI |
| 13 | "name": "Example field", |
| 14 | |
| 15 | // required |
| 16 | // field type, can be any of 'string', 'boolean', 'uri', 'enum', and 'dynamicEnum' |
| 17 | "type": "string", |
| 18 | |
| 19 | // required |
| 20 | // field description displayed in the LaunchDarkly approval request UI |
| 21 | "description": "Example description", |
| 22 | |
| 23 | // optional |
| 24 | // placeholder text displayed in the LaunchDarkly approval request UI |
| 25 | "placeholder": "Example description", |
| 26 | |
| 27 | // optional |
| 28 | // whether the field is optional |
| 29 | // if not specified, defaults to false |
| 30 | "isOptional": false, |
| 31 | |
| 32 | // optional |
| 33 | // value if field left unspecified in the LaunchDarkly approval request UI |
| 34 | "defaultValue": null, |
| 35 | |
| 36 | // optional |
| 37 | // array of allowed strings for enum-type fields |
| 38 | "allowedValues": null, |
| 39 | |
| 40 | // required if type is set to dynamicEnum |
| 41 | // defines the request for getting dynamic options and the paths to parse them out of the response |
| 42 | "dynamicOptions": { |
| 43 | "endpoint": { // required. hostname must match the baseURL of the integration configuration |
| 44 | "url": "https://your-application-host.com/api/colors", |
| 45 | "method": "GET", // can only be GET |
| 46 | "headers": [ |
| 47 | { |
| 48 | "name": "Authorization", |
| 49 | "value": "Bearer {{ apiKey }}" // apiKey will auto-fill with the apiKey defined on the integration configuration |
| 50 | } |
| 51 | ] |
| 52 | }, |
| 53 | "parser": { |
| 54 | "optionsPath": "/data", |
| 55 | "optionsItems": { |
| 56 | "label": "/name", |
| 57 | "value": "/value" |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | }, |
| 62 | { |
| 63 | // additional fields |
| 64 | } |
| 65 | ] |