# Virtual Environments

## Get Virtual Environments

> Retrieves a list of virtual environments that have at least one flow version deployment. Can be filtered by \`name\`, \`type\`, \`status\`, \`hasDeployedVersion\`, and \`labelled\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}}},"paths":{"/api/v1/flow-version-deployments/virtual-environments":{"get":{"summary":"Get Virtual Environments","description":"Retrieves a list of virtual environments that have at least one flow version deployment. Can be filtered by `name`, `type`, `status`, `hasDeployedVersion`, and `labelled`.","tags":["Virtual Environments"],"parameters":[{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by name."},{"name":"filter[type]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by type."},{"name":"filter[status]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by status."},{"name":"filter[hasDeployedVersion]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by hasDeployedVersion."},{"name":"filter[labelled]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by label `id`."},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of relationships to include. Available: versions, firstVersion, firstVersion.user, deployments, deployedVersion.variables, deployments.flowVersion, deployments.flowVersion.flow, deployments.enabledBy, deployments.user, deployments.package, packageDeployments.user, packageDeployments.package, labels"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for descending. Available: name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}}}}}}
```

## List Virtual Environments

> Retrieves a paginated list of virtual environments.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}}}},"paths":{"/api/v1/virtual-environments":{"get":{"summary":"List Virtual Environments","description":"Retrieves a paginated list of virtual environments.","parameters":[{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by name."},{"name":"filter[type]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by type."},{"name":"filter[status]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by status."},{"name":"filter[hasDeployedVersion]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by hasDeployedVersion."},{"name":"filter[labelled]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by label `id`."},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of relationships to include. Available: versions, firstVersion, firstVersion.user, deployments, deployedVersion.variables, deployments.flowVersion, deployments.flowVersion.flow, deployments.enabledBy, deployments.user, deployments.package, packageDeployments.user, packageDeployments.package, labels"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for descending. Available: name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Virtual Environments"]}}}}
```

## Create Virtual Environment

> Creates a new virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VirtualEnvironments"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"VirtualEnvironmentsStoreRequest":{"type":"object","properties":{"description":{"type":"string","maxLength":255,"nullable":true},"type":{"type":"string","nullable":true},"name":{"type":"string","maxLength":245},"labels":{"type":"array","properties":{"*":{"type":"object","properties":{"id":{"type":"string"}}}}}},"required":["labels","name"]}}},"paths":{"/api/v1/virtual-environments":{"post":{"summary":"Create Virtual Environment","description":"Creates a new virtual environment.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsStoreRequest"}}}},"tags":["Virtual Environments"],"parameters":[]}}}}
```

## Get Virtual Environment

> Retrieves the details of a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VirtualEnvironments"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}":{"get":{"summary":"Get Virtual Environment","description":"Retrieves the details of a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."},{"name":"filter[name]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by name."},{"name":"filter[type]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by type."},{"name":"filter[status]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by status."},{"name":"filter[hasDeployedVersion]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by hasDeployedVersion."},{"name":"filter[labelled]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by label `id`."},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated list of relationships to include. Available: versions, firstVersion, firstVersion.user, deployments, deployedVersion.variables, deployments.flowVersion, deployments.flowVersion.flow, deployments.enabledBy, deployments.user, deployments.package, packageDeployments.user, packageDeployments.package, labels"},{"name":"sort","in":"query","required":false,"schema":{"type":"string"},"description":"Sort field. Prefix with - for descending. Available: name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Virtual Environments"]}}}}
```

## Update Virtual Environment

> Updates an existing virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VirtualEnvironments"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"VirtualEnvironmentsUpdateRequest":{"type":"object","properties":{"description":{"type":"string","maxLength":255,"nullable":true},"type":{"type":"string","nullable":true},"name":{"type":"string","maxLength":255},"labels":{"type":"array","properties":{"*":{"type":"object","properties":{"id":{"type":"string"}}}}}},"required":["labels","name"]}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}":{"put":{"summary":"Update Virtual Environment","description":"Updates an existing virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsUpdateRequest"}}}},"tags":["Virtual Environments"]}}}}
```

## Delete Virtual Environment

> Permanently deletes a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}":{"delete":{"summary":"Delete Virtual Environment","description":"Permanently deletes a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Virtual Environments"]}}}}
```

## Copy Virtual Environment

> Creates a copy of a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/copy":{"post":{"summary":"Copy Virtual Environment","description":"Creates a copy of a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Virtual Environments"]}}}}
```

## List Virtual Environment Versions

> Retrieves a paginated list of versions for a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/versions":{"get":{"summary":"List Virtual Environment Versions","description":"Retrieves a paginated list of versions for a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Virtual Environments"]}}}}
```

## Create Virtual Environment Version

> Creates a new version for a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VirtualEnvironments"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"VirtualEnvironmentsStoreVersionsRequest":{"type":"object","properties":{"notes":{"type":"string"}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/versions":{"post":{"summary":"Create Virtual Environment Version","description":"Creates a new version for a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsStoreVersionsRequest"}}}},"tags":["Virtual Environments"]}}}}
```

## Get Virtual Environment Version

> Retrieves the details of a specific version for a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VirtualEnvironments"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/versions/{version}":{"get":{"summary":"Get Virtual Environment Version","description":"Retrieves the details of a specific version for a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Virtual Environments"]}}}}
```

## Update Virtual Environment Version

> Updates an existing version for a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"VirtualEnvironmentsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VirtualEnvironments"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"}},"deployments":{"type":"array","items":{"type":"object"}},"versions":{"type":"array","items":{"type":"object"}},"versions_count":{"type":"integer"},"first_version":{"type":"string"},"deployed_version":{"type":"string"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"VirtualEnvironmentsUpdateVersionsRequest":{"type":"object","properties":{"notes":{"type":"string"}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/versions/{version}":{"put":{"summary":"Update Virtual Environment Version","description":"Updates an existing version for a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VirtualEnvironmentsUpdateVersionsRequest"}}}},"tags":["Virtual Environments"]}}}}
```

## Delete Virtual Environment Version

> Permanently deletes a specific version for a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/versions/{version}":{"delete":{"summary":"Delete Virtual Environment Version","description":"Permanently deletes a specific version for a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"}},"tags":["Virtual Environments"]}}}}
```

## Copy Virtual Environment Version

> Creates a copy of a specific version for a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/versions/{version}/copy":{"post":{"summary":"Copy Virtual Environment Version","description":"Creates a copy of a specific version for a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Virtual Environments"]}}}}
```

## Deploy Virtual Environment Version

> Deploys a specific version of a specific virtual environment.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Virtual Environments"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}},"paths":{"/api/v1/virtual-environments/{virtual_environment}/versions/{version}/deploy":{"post":{"summary":"Deploy Virtual Environment Version","description":"Deploys a specific version of a specific virtual environment.","parameters":[{"name":"virtual_environment","in":"path","required":true,"schema":{"type":"string"},"description":"The virtual environment identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Virtual Environments"]}}}}
```
