Create a component environment property

Request

PUT https://{hostname}:{port}
    /cli/component/addEnvProp
Accept: {contentType}
Table 1. Header parameters
Parameter Type Required Description
Accept
  • application/json
  • application/yaml
true
This command takes a JSON request string or file. Use the following template for the request:
{
  "component": "Name or ID of the component",
  "default": "Default value (Optional)",
  "description": "Description for the property (Optional)",
  "label": "Label of the property (Optional)",
  "name": "Name of the property",
  "pattern": "A regular expression that specifies valid 
  values for the property. Follows java.util.regex.Pattern 
  (Optional)",
  "required": "Whether the property is required (Optional, 
  Boolean)",
  "secure": "Specify true to create a secure property 
  (Optional, Boolean)"
}

Example

curl -k -u jsmith:passwd 
   
  "https://deployserver.example.com:8443/cli/component/
  addEnvProp?name=MyProperty&component=d2e59ca4-a2f5-4851-9c85-629c1019ba20
  &default=DefaultValue&required=true" 
  -X PUT

Related CLI command: addEnvironmentProperty.