Creating project parameters

Create a project parameter.

Procedure

  1. In a REST client platform, add the authentication details of the tenant where you want to create a project parameter.
    
    //In case of Instance API key 
    Headers:
    {
    "x-instance-api-key": "instance_api_key"
    }
     
    // In case of MCSP or ISV token
    Headers:
    {
    "Authorization": "mcsp_or_isv_token"
    }
    Body:
    	{   
    		"key": "<param_name>*^",  
    		"value": "<param_value>*",
    		"required": <true || false>*,
    		"isPassword": <true || false>*    
    	}
    	
    //A field with the asterisk (*) character in the body of the request is a required field. 
    //A field with the caret (^) character in the body of the request indicates that the field can only have unique values.
  2. Make a POST request at the URL of the project.

    URL syntax: <domain>/apis/v1/rest/projects/:project/params

    In this URL request, /:project is the name of the project where you want to create a parameter.

    Method: POST

    If the request is successful, you receive the response code for success.

    Case 1 - If the project parameter is password-protected and the value of the isPassword field is set as true, the value field is not displayed in the output. The following output is seen:

    {
    output: 
    	{
    		"uid": "<param_uid>",
    		"param": 
    		{
    		"key": "<param_name>",
    		"required": <true || false>,
    		"isPassword": <true>            
    		},
    		"project_uid": "<project_uid>",
    		"tenant_uid": "<tenant_uid>"
    	}
    }

    Case 2 - If the project parameter is not password-protected and the value of the isPassword field is set to false, the following output is received:

    {
    output: 
    	{
    		"uid": "<param_uid>",
    		"param": 
    		{
    		"key": "<param_name>",
    		"value": "<param_value>",
    		"required": <true || false>,
    		"isPassword": <false>            
    		},
    		"project_uid": "<project_uid>",
    		"tenant_uid": "<tenant_uid>"
    	}
    }