Skip to main content

POST Add Environment

This API creates an environment that can be used during the execution of test cases

Updated this week

API Endpoint


{{apiUrl}}/api/v1/properties/environment

Headers


To authenticate the API request, you need to provide the Vansah Connect Token that is generated from the Jira workspace's Vansah configuration page.

Authorization

{{vansahConnectToken}}


Generate a Token from Vansah

Request Body Parameters


  • name (String, Required): The name of the environment (e.g., "UAT").

  • project (Object, Required): Contains project-related details.

    • key (String, Required): Workspace project key (e.g., "DEMO").

Example Request Body


{

"name": "{{environmentName}}", // Required: Name of the environment

"project" :{

"key":"{{projectKey}}", // Required: Workspace Project Key is required when using vansah connect API token

}

}

Response Body Parameters


  1. success (Boolean, Required): Indicates whether the request was successful (true or false).

  2. message (String, Required): A message describing the result of the request (e.g., "Environment is created successfully").

  3. data (Object, Required): Contains the details of the created environment.

    • name (String, Required): The name of the environment.

    • identifier (String, Required): The unique identifier for the environment.

Example Response Body


{

"success": true,

"message": "Environment is saved successfully",

"data": {

"identifier": "f94d0e7d-1edb-11ed-bdf2-ae827922bf87",

"name": "UAT"

}

}

Did this answer your question?