Logo
15_Days_of_Postman_-_for_testers_IvanKo API Documentation

Environments

Number of APIs: 5


1. Get an environment

GET {{baseUrl}}/environments/{{environmentId}}

Gets information about an environment.



2. Delete an environment

DELETE {{baseUrl}}/environments/{{environmentId}}

Deletes an environment.



3. Create an environment

POST {{baseUrl}}/environments

Creates an environment. Include the following properties in the request body:

  • name — A string value that contains the environment's name.

You can also include the following properties:

  • values — An array of objects that contains the following:

    • key — A string value that contains the variable's name.
    • value — A string value that contains the variable's value.
    • enabled — A boolean value that, if true, enable the variable.
    • type — A string value that contains the variable's type. One of: secret, default, or any.



4. Update an environment

PUT {{baseUrl}}/environments/{{environmentId}}

Updates an environment. Include the following properties in the request body:

  • name — A string value that contains the environment's name.

  • values — An array of objects that contains the following:

    • key — A string value that contains the variable's name.
    • value — A string value that contains the variable's value.
    • enabled — A boolean value that, if true, enable the variable.
    • type — A string value that contains the variable's type. One of: secret, default, or any.



5. Get all environments

GET {{baseUrl}}/environments

Gets information about all of your [environments]



ENDPOINTS