{ "opencollection": "1.0.0", "info": { "name": "GitLab access_requests environments API", "version": "v4" }, "items": [ { "info": { "name": "environments", "type": "folder" }, "items": [ { "info": { "name": "List environments", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/v4/projects/:id/environments", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" }, { "name": "page", "value": "1", "type": "query", "description": "Current page number" }, { "name": "per_page", "value": "20", "type": "query", "description": "Number of items per page" }, { "name": "name", "value": "", "type": "query", "description": "Return the environment with this name. Mutually exclusive with search" }, { "name": "search", "value": "", "type": "query", "description": "Return list of environments matching the search criteria. Mutually exclusive with name. Must be at least 3 characters." }, { "name": "states", "value": "", "type": "query", "description": "List all environments that match a specific state. Accepted values: `available`, `stopping`, or `stopped`. If no state value given, returns all environments" } ] }, "docs": "Get all environments for a given project. This feature was introduced in GitLab 8.11." }, { "info": { "name": "Create a new environment", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/v4/projects/:id/environments", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" } ] }, "docs": "Creates a new environment with the given name and `external_url`. It returns `201` if the environment was successfully created, `400` for wrong parameters. This feature was introduced in GitLab 8.11." }, { "info": { "name": "getApiV4ProjectsIdEnvironmentsEnvironmentId", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/v4/projects/:id/environments/:environment_id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" }, { "name": "environment_id", "value": "", "type": "path", "description": "The ID of the environment" } ] }, "docs": "Get a specific environment" }, { "info": { "name": "Update an existing environment", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/api/v4/projects/:id/environments/:environment_id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" }, { "name": "environment_id", "value": "", "type": "path", "description": "The ID of the environment" } ] }, "docs": "Updates an existing environment name and/or `external_url`. It returns `200` if the environment was successfully updated. In case of an error, a status code `400` is returned. This feature was introduced in GitLab 8.11." }, { "info": { "name": "Delete an environment", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/v4/projects/:id/environments/:environment_id", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" }, { "name": "environment_id", "value": "", "type": "path", "description": "The ID of the environment" } ] }, "docs": "It returns 204 if the environment was successfully deleted, and 404 if the environment does not exist. This feature was introduced in GitLab 8.11." }, { "info": { "name": "Delete multiple stopped review apps", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/v4/projects/:id/environments/review_apps", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" }, { "name": "before", "value": "", "type": "query", "description": "The date before which environments can be deleted. Defaults to 30 days ago. Expected in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`)" }, { "name": "limit", "value": "", "type": "query", "description": "Maximum number of environments to delete. Defaults to 100" }, { "name": "dry_run", "value": "", "type": "query", "description": "Defaults to true for safety reasons. It performs a dry run where no actual deletion will be performed. Set to false to actually delete the environment" } ] }, "docs": "It schedules for deletion multiple environments that have already been stopped and are in the review app folder. The actual deletion is performed after 1 week from the time of execution. By default, it only deletes environments 30 days or older. You can change this default using the `before` parameter." }, { "info": { "name": "Stop an environment", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/v4/projects/:id/environments/:environment_id/stop", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" }, { "name": "environment_id", "value": "", "type": "path", "description": "The ID of the environment" } ] }, "docs": "It returns 200 if the environment was successfully stopped." }, { "info": { "name": "Stop stale environments", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/v4/projects/:id/environments/stop_stale", "params": [ { "name": "id", "value": "", "type": "path", "description": "The ID or URL-encoded path of the project owned by the authenticated user" } ] }, "docs": "It returns `200` if stale environment check was scheduled successfully" } ] } ], "bundled": true }