> This page is for Self-Hosted, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/self-hosted/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/self-hosted/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/self-hosted/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/self-hosted/v2.24/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/run-ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/run-ai/_mcp/server.

# Get an environment asset.

GET http://localhost:8080/api/v1/asset/environment/{AssetId}

Use to retrieve the details of environment asset by id.

Reference: https://docs.nvidia.com/run-ai/self-hosted/reference/rest-api/endpoints/workload-assets/environment/get-environment-asset-by-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Request

### Path parameters

- `AssetId` (string, required) — Unique identifier of the asset.

### Query parameters

- `usageInfo` (boolean, optional) — Whether the query should include asset usage information as part of the response.
- `complyToProject` (integer, optional) — Include workload creation compliance information of an asset, for a given project, as part of the response. To check compliance, you need to provide both project id and workload type.
- `complyToWorkloadType` (enum, optional) — Include workload creation compliance information of an asset, for a given workload type, as part of the response. To check compliance, you need to provide both project id and workload type.
  - Allowed values: `Workspace`, `Training`, `Distributed`, `Inference`, `DistributedInference`
- `complyToReplicaType` (enum, optional) — Include workload creation compliance information of an asset, for a given replica type, as part of the response. To check compliance, you need to provide both project id and workload type. For distributed, replica type should be provided as well.
  - Allowed values: `Worker`, `Master`, `Leader`
- `statusInfo` (boolean, optional) — Whether the query should include asset status information as part of the response.

## Response

### 200

Request completed successfully.

- `meta` (AssetMeta, required)
- `spec` (EnvironmentAssetSpec, required)
- `usedBy` (AssetUsageInfo, optional) — Details about resources that use the asset.
- `usageTimes` (UsageTimesInfo, optional) — Details about times the asset has been used by workloads, etc.
- `compliance` (ComplianceInfo, optional) — Compliance of an asset with creation of workloads in a given project.
- `status` (AssetClusterStatusInfo, optional)

## Errors

### 401 Unauthorized Error

Unauthorized

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 403 Forbidden Error

Forbidden

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 404 Not Found Error

The specified resource was not found

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 503 Service Unavailable Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

## Types

### AssetMeta

- `name` (string, required) — The name of the asset.
- `scope` (enum, required) — The scope in which an asset can be used. The highest scope, system, is intended for internal purposes only.
  - Allowed values: `system`, `tenant`, `cluster`, `department`, `project`
- `id` (string, required) — Unique identifier of the asset.
- `kind` (enum, required) — The kind of the asset.
  - Allowed values: `compute`, `environment`, `accessKey`, `dockerRegistry`, `password`, `genericSecret`, `registry`, `s3`, `git`, `nfs`, `pvc`, `hostPath`, `workload-template`, `model`, `config-map`, `secret-volume`, `data-volume`, `ngcApiKey`
- `createdBy` (string, required) — The user who created the asset.
- `createdAt` (datetime, required) — The time at which the asset were created
- `updatedBy` (string, required) — The user who updated the asset.
- `updatedAt` (datetime, required) — The time at which the asset has been updated
- `description` (string, optional) — The description of the asset.
- `clusterId` (string, optional) — The id of the cluster.
- `departmentId` (string, optional, nullable) — The id of the department. Must be specified for department scoped assets.
- `projectId` (integer, optional, nullable) — The id of the project. Must be specified for project scoped assets.
- `autoDelete` (boolean, optional, nullable, default: false) — The asset will be deleted automatically. This is intended for internal use.
- `workloadSupportedTypes` (WorkloadSupportedTypes, optional)
- `private` (boolean, optional, nullable, default: false) — The asset will be private to the user who created it. supported only for docker registry and generic secrets
- `tenantId` (integer, optional, nullable) — The id of the tenant.
- `deletedAt` (datetime, optional) — Deletion time of the asset (relevant for assets that sync to the cluster)
- `deletedBy` (string, optional) — The user who deleted the asset
- `projectName` (string, optional, nullable) — The name of the project that the asset is associated with, for project scoped assets.
- `updateCount` (long, optional) — the value of an update counter of a data in the system.

### EnvironmentAssetSpec

- `args` (string, optional) — Arguments to the command that the container running the workload executes.
- `command` (string, optional) — A command to the server as the entry point of the container running the workload.
- `environmentVariables` (list of EnvironmentVariableOfAsset, optional) — Set of environment variables to populate into the container running the workspace.
- `runAsGid` (long, optional) — The group id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsGid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
- `runAsUid` (long, optional) — The user id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsUid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
- `supplementalGroups` (string, optional) — Comma separated list of groups that the user running the container belongs to, in addition to the group indicated by runAsGid. Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled. Using an empty string implies reverting the supplementary groups of the image.
- `allowPrivilegeEscalation` (boolean, optional) — Allow the container running the workload and all launched processes to gain additional privileges after the workload starts. For more information consult the [User Identity in Container guide](/run-ai/self-hosted/documentation/installation-and-configuration/configuration/security/user-identity-in-containers)
- `capabilities` (list of enum, optional) — Add POSIX capabilities to running containers. Defaults to the default set of capabilities granted by the container runtime.
  - Allowed values: `AUDIT_CONTROL`, `AUDIT_READ`, `AUDIT_WRITE`, `BLOCK_SUSPEND`, `CHOWN`, `DAC_OVERRIDE`, `DAC_READ_SEARCH`, `FOWNER`, `FSETID`, `IPC_LOCK`, `IPC_OWNER`, `KILL`, `LEASE`, `LINUX_IMMUTABLE`, `MAC_ADMIN`, `MAC_OVERRIDE`, `MKNOD`, `NET_ADMIN`, `NET_BIND_SERVICE`, `NET_BROADCAST`, `NET_RAW`, `SETGID`, `SETFCAP`, `SETPCAP`, `SETUID`, `SYS_ADMIN`, `SYS_BOOT`, `SYS_CHROOT`, `SYS_MODULE`, `SYS_NICE`, `SYS_PACCT`, `SYS_PTRACE`, `SYS_RAWIO`, `SYS_RESOURCE`, `SYS_TIME`, `SYS_TTY_CONFIG`, `SYSLOG`, `WAKE_ALARM`
- `createHomeDir` (boolean, optional) — When set to `true`, creates a home directory for the container.
- `hostIpc` (boolean, optional) — Whether to enable host IPC. Defaults to false.
- `hostNetwork` (boolean, optional) — Whether to enable host networking. Default to false.
- `image` (string, optional) — Docker image name. For more information, see [Images](https://kubernetes.io/docs/concepts/containers/images). The image name is mandatory for creating a workload.
- `imagePullPolicy` (enum, optional) — Image pull policy. Defaults to `Always` if `:latest` tag is specified, otherwise it is `IfNotPresent`.
  - Allowed values: `Always`, `Never`, `IfNotPresent`
- `probes` (Probes, optional) — Probes are used to determine if the container is healthy and ready to accept traffic.
- `readOnlyRootFilesystem` (boolean, optional) — If true, mounts the container's root filesystem as read-only.
- `runAsNonRoot` (boolean, optional) — Force the container to run as a non-root user.
- `seccompProfileType` (enum, optional) — Indicates which kind of seccomp profile will be applied to the container. The options are a. `RuntimeDefault` - the container runtime default profile should be used. b. `Unconfined` - no profile should be applied. c. `Localhost` is not yet supported by Run:ai.
  - Allowed values: `RuntimeDefault`, `Unconfined`, `Localhost`
- `stdin` (boolean, optional) — Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF
- `tty` (boolean, optional) — Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
- `uidGidSource` (enum, optional) — Indicate the way to determine the user and group ids of the container. The options are a. `fromTheImage` - user and group ids are determined by the docker image that the container runs. this is the default option. b. `custom` - user and group ids can be specified in the environment asset and/or the workload creation request. c. `idpToken` - user and group IDs are automatically taken from the identity provider (IdP) token (available only in SSO-enabled installations). For more information, see [User Identity](/run-ai/self-hosted/documentation/installation-and-configuration/configuration/security/user-identity-in-containers).
  - Allowed values: `fromTheImage`, `fromIdpToken`, `custom`
- `workingDir` (string, optional) — Container's working directory. If not specified, the container runtime default will be used. This may be configured in the container image.
- `connections` (list of Connection, optional) — List of connections that either expose ports from the container (each port is associated with a tool that the container runs), or URL's to be used for connecting to an external tool that is related to the action of the container (such as Weights & Biases).
- `overrideUidGidInWorkspace` (boolean, optional, default: false) — Allow specifying uid/gid as part of create workspace. This is relevant only for custom uigGidSource.

### AssetUsageInfo

Details about resources that use the asset.

- `workspaces` (list of WorkloadRefAndStatus, optional) — workspaces that rely on this asset.
- `trainings` (list of WorkloadRefAndStatus, optional) — trainings that rely on this asset.
- `distributed` (list of WorkloadRefAndStatus, optional) — distributed trainings that rely on this asset.
- `inferences` (list of WorkloadRefAndStatus, optional) — inferences that rely on this asset.
- `templates` (list of AssetRef, optional) — templates that rely on this asset.
- `assets` (AssetsUsageRef, optional) — list of other assets that use this asset. specifically, accessKeys used by s3, and passwords used by git.

### UsageTimesInfo

Details about times the asset has been used by workloads, etc.

- `lastUsedByWorkload` (datetime, optional, nullable) — The time at which the asset were last used by a workload of given type and project. This field requires complyToProject and complyToWorkload types flags of the API, to specify the workload type and project id.

### ComplianceInfo

Compliance of an asset with creation of workloads in a given project.

- `imposed` (boolean, optional) — Whether the asset is imposed on created workloads by the administrator.
- `compliance` (boolean, optional) — Whether the asset info complies with creation of workloads in the project.
- `reason` (list of ComplianceInfoReason, optional) — For asset that does not comply, specify one or more reason why.

### AssetClusterStatusInfo

- `status` (enum, optional)
  - Allowed values: `Creating`, `Deleting`, `Failed`, `Deletion failed`, `Issues found`, `No issues found`, `No status`, `Updating`
- `issues` (list of AssetClusterStatusIssue, optional)
- `message` (string, optional)
- `url` (string, optional)

### WorkloadSupportedTypes

- `inference` (boolean, optional, nullable) — Is inference a supported workload type.
- `workspace` (boolean, optional, nullable) — Is workspace a supported workload type.
- `training` (boolean, optional, nullable) — Is training a supported workload type.
- `distributed` (boolean, optional, nullable) — Is distributed a supported workload type.
- `distFramework` (enum, optional, nullable) — The distributed training framework used in the workload. Note: The TF, XGBoost and JAX frameworks are deprecated and will be removed in a future release.
  - Allowed values: `MPI`, `PyTorch`, `TF`, `XGBoost`, `JAX`

### EnvironmentVariableOfAsset

Details of an environment variable which is populated into the container.

- `name` (string, optional, nullable) — The name of the environment variable. (mandatory)
- `value` (string, optional, nullable) — The value of the environment variable. (mutually exclusive with credential, configMap and podFieldRef)
- `credential` (EnvironmentVariableCredential, optional) — Details of the secret and key use to populate the environment variable. (mutually exclusive with value)
- `configMap` (EnvironmentVariableConfigMap, optional) — Details of the configMap and key use to populate the environment variable
- `podFieldRef` (EnvironmentVariablePodFieldReference, optional) — Details of the field-reference and key use to populate the environment variable
- `exclude` (boolean, optional, nullable) — Use 'true' in case the environment variable is defined in defaults of the policy, and you wish to exclude it from the workload.
- `description` (string, optional, nullable) — Description of the environment variable.

### Probes

Probes are used to determine if the container is healthy and ready to accept traffic.

- `readiness` (Probe, optional)

### Connection

- `name` (string, required) — A unique name of this connection. This name correlates between the connection information specified at the environment asset, to the information about the connection as specified in SpecificEnv for a specific workspace.
- `isExternal` (boolean, optional, default: false) — Internal tools (isExternal=false) are tools that run as part of the container. External tools (isExternal=true) run outside the container, typically in the cloud.
- `internalToolInfo` (InternalToolInfo, optional) — Information of the internal tool.
- `externalToolInfo` (ExternalToolInfo, optional) — Information of the external tool.

### WorkloadRefAndStatus

Id, name and status of a workspace or training

- `id` (string, required) — A unique ID of the workload.
- `name` (string, required) — The name of the workload.
- `status` (string, optional) — The status of the workspace or training.

### AssetRef

Reference information about an asset.

- `id` (string, required) — Unique identifier of the asset.
- `name` (string, required) — The name of the asset.

### AssetsUsageRef

Reference information about usage of assets by other assets, for example datasources that uses credentials.

- `environment` (EnvironmentAssetRef, optional, nullable) — environment asset.
- `environments` (list of AssetRef, optional)
- `compute` (AssetsUsageRefCompute, optional)
- `computes` (list of AssetRef, optional)
- `datasources` (list of AssetDatasourceRef, optional)

### ComplianceInfoReason

An issue preventing the use of a template or asset for creating workloads in a given project.

- `details` (string, required) — Explanation of the issue.
- `field` (string, optional, nullable) — For policy related issues, includes a json path to the field in the policy for which the issue applies.
- `rule` (enum, optional) — Indicates which validation rule (e.g., min, max, step, options, required, canEdit, canAdd) conflicted with policy restrictions, causing the asset or template to be rejected.
  - Allowed values: `min`, `max`, `step`, `options`, `required`, `canEdit`, `canAdd`, `locked`, `blocked`

### AssetClusterStatusIssue

- `scopeId` (string, required) — The id of the cluster, department or project, depending on the scope type.
- `scopeType` (enum, required)
  - Allowed values: `system`, `tenant`, `cluster`, `department`, `project`
- `issue` (enum, required)
  - Allowed values: `ReplicationError`, `LostPhase`, `NotCreated`

### EnvironmentVariableCredential

Details of the secret and key use to populate the environment variable. (mutually exclusive with value)

- `assetId` (string, optional, nullable) — Unique identifier of the asset. (mandatory)
- `key` (string, optional, nullable) — The key in the secret resource. (mandatory)

### EnvironmentVariableConfigMap

Details of the configMap and key use to populate the environment variable

- `name` (string, optional, nullable) — The name of the config-map resource. (mandatory)
- `key` (string, optional, nullable) — The key in the config-map resource. (mandatory)

### EnvironmentVariablePodFieldReference

Details of the field-reference and key use to populate the environment variable

- `path` (string, optional, nullable) — The field path resource. (mandatory)

### Probe

- `initialDelaySeconds` (integer, optional, nullable) — Number of seconds after the container has started before liveness or readiness probes are initiated.
- `periodSeconds` (integer, optional, nullable) — How often (in seconds) to perform the probe.
- `timeoutSeconds` (integer, optional, nullable) — Number of seconds after which the probe times out.
- `successThreshold` (integer, optional, nullable) — Minimum consecutive successes for the probe to be considered successful after having failed.
- `failureThreshold` (integer, optional, nullable) — When a probe fails, the number of times to try before giving up.
- `handler` (ProbeHandler, optional) — The action taken to determine the health of the container. (mandatory)

### InternalToolInfo

Information of the internal tool.

- `toolType` (enum, required) — The type of the internal tool. Internal tool runs within the container and exposes ports associated with the tool using NodePort, LoadBalancer or ExternalUrl.
  - Allowed values: `jupyter-notebook`, `pycharm`, `visual-studio-code`, `tensorboard`, `rstudio`, `mlflow`, `custom`, `matlab`, `chatbot-ui`
- `connectionType` (enum, required) — The type of connection that exposes the container port.
  - Allowed values: `LoadBalancer`, `NodePort`, `ExternalUrl`, `ServingPort`
- `containerPort` (integer, required) — The port within the container that the connection exposes.
- `nodePortInfo` (NodePortInfo, optional)
- `externalUrlInfo` (ExternalUrlInfo, optional)
- `servingPortInfo` (ServingPortInfo, optional)

### ExternalToolInfo

Information of the external tool.

- `toolType` (enum, required) — The type of external tool that is associated with the connection. External tool typically runs in the cloud and require external url for connecting to it.
  - Allowed values: `wandb`, `comet`
- `externalUrl` (string, required) — The external url for connecting to the external tool. The url can include environment variables that will be replaced with the value provided for those variables when the workspace is created.

### EnvironmentAssetRef

Reference information about environment asset.

- `id` (string, required) — Unique identifier of the asset.
- `name` (string, required) — The name of the asset.
- `toolTypes` (list of enum, optional, nullable) — the type of tools as defined in the connections of the environment asset.
  - Allowed values: `jupyter-notebook`, `pycharm`, `visual-studio-code`, `tensorboard`, `rstudio`, `mlflow`, `custom`, `wandb`, `matlab`, `comet`, `chatbot-ui`

### AssetsUsageRefCompute

- `id` (string, required) — Unique identifier of the asset.
- `name` (string, required) — The name of the asset.

### AssetDatasourceRef

Reference information about a datasource asset.

- `id` (string, required) — Unique identifier of the asset.
- `name` (string, required) — The name of the asset.
- `kind` (enum, required) — The kind of the asset.
  - Allowed values: `compute`, `environment`, `accessKey`, `dockerRegistry`, `password`, `genericSecret`, `registry`, `s3`, `git`, `nfs`, `pvc`, `hostPath`, `workload-template`, `model`, `config-map`, `secret-volume`, `data-volume`, `ngcApiKey`
- `overrides` (DataSourceOverrides, optional) — specific fields to override in the data source.

### ProbeHandler

The action taken to determine the health of the container. (mandatory)

- `httpGet` (ProbeHandlerHttpGet, optional) — An action based on HTTP Get requests.

### NodePortInfo

- `isCustomPort` (boolean, optional, default: false) — Whether the node port is provided in the specific env of the workspace. Default is false, and in this case the node port is auto generated by the system.

### ExternalUrlInfo

- `isCustomUrl` (boolean, optional, default: false) — Whether external url is provided in the specific env of the workspace. Default is false, and in this case the external url is auto generated by the system.
- `externalUrl` (string, optional, nullable) — Default value for the external url. You can override it in the specific env of the workspace. Should be specified for ExternalUrl only.

### ServingPortInfo

- `protocol` (enum, optional, nullable)
  - Allowed values: `grpc`, `http`

### DataSourceOverrides

specific fields to override in the data source.

- `containerPath` (string, optional, nullable)

### ProbeHandlerHttpGet

An action based on HTTP Get requests.

- `path` (string, optional, nullable) — Path to access on the HTTP server, defaults to /.
- `port` (integer, optional, nullable) — Number of the port to access on the container.
- `host` (string, optional, nullable) — Host name to connect to, defaults to the pod IP.
- `scheme` (enum, optional) — Scheme to use for connecting to the host, defaults to HTTP.
  - Allowed values: `HTTP`, `HTTPS`

## Examples

**Response**

```json
{
  "meta": {
    "name": "my-asset",
    "scope": "tenant",
    "id": "a418ed33-9399-48c0-a890-122cadd13bfd",
    "kind": "s3",
    "createdBy": "test@run.ai",
    "createdAt": "2023-02-23T14:25:36.707685Z",
    "updatedBy": "test@run.ai",
    "updatedAt": "2023-02-23T14:25:36.707685Z",
    "workloadSupportedTypes": {
      "workspace": false,
      "training": false,
      "distributed": true,
      "distFramework": "TF"
    }
  },
  "spec": {
    "args": "-x my-script.py",
    "command": "python",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "credential": {
          "assetId": "string",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "runAsGid": 30,
    "runAsUid": 500,
    "supplementalGroups": "2,3,5,8",
    "allowPrivilegeEscalation": false,
    "capabilities": [
      "CHOWN",
      "KILL"
    ],
    "createHomeDir": true,
    "hostIpc": false,
    "hostNetwork": false,
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "readOnlyRootFilesystem": false,
    "runAsNonRoot": true,
    "seccompProfileType": "RuntimeDefault",
    "stdin": true,
    "tty": true,
    "uidGidSource": "fromTheImage",
    "workingDir": "/home/myfolder",
    "connections": [
      {
        "name": "string",
        "isExternal": false,
        "internalToolInfo": {
          "toolType": "jupyter-notebook",
          "connectionType": "LoadBalancer",
          "containerPort": 1,
          "nodePortInfo": {
            "isCustomPort": false
          },
          "externalUrlInfo": {
            "isCustomUrl": false,
            "externalUrl": "string"
          },
          "servingPortInfo": {
            "protocol": "grpc"
          }
        },
        "externalToolInfo": {
          "toolType": "wandb",
          "externalUrl": "https://wandb.com/myteam/${PROJECT_NAME}"
        }
      }
    ],
    "overrideUidGidInWorkspace": false
  },
  "usedBy": {
    "workspaces": [
      {
        "id": "string",
        "name": "my-workload-name",
        "status": "string"
      }
    ],
    "trainings": [
      {
        "id": "string",
        "name": "my-workload-name",
        "status": "string"
      }
    ],
    "distributed": [
      {
        "id": "string",
        "name": "my-workload-name",
        "status": "string"
      }
    ],
    "inferences": [
      {
        "id": "string",
        "name": "my-workload-name",
        "status": "string"
      }
    ],
    "templates": [
      {
        "id": "string",
        "name": "my-asset"
      }
    ],
    "assets": {
      "environment": {
        "id": "string",
        "name": "my-asset",
        "toolTypes": [
          "jupyter-notebook"
        ]
      },
      "environments": [
        {
          "id": "string",
          "name": "my-asset"
        }
      ],
      "compute": {
        "id": "string",
        "name": "my-asset"
      },
      "computes": [
        {
          "id": "string",
          "name": "my-asset"
        }
      ],
      "datasources": [
        {
          "id": "string",
          "name": "my-asset",
          "kind": "compute",
          "overrides": {
            "containerPath": "/container/directory"
          }
        }
      ]
    }
  },
  "usageTimes": {
    "lastUsedByWorkload": "2024-01-15T09:30:00Z"
  },
  "compliance": {
    "imposed": true,
    "compliance": true,
    "reason": [
      {
        "details": "string",
        "field": "string",
        "rule": "min"
      }
    ]
  },
  "status": {
    "status": "Creating",
    "issues": [
      {
        "scopeId": "string",
        "scopeType": "system",
        "issue": "ReplicationError"
      }
    ],
    "message": "string",
    "url": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/api/v1/asset/environment/AssetId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/api/v1/asset/environment/AssetId';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/asset/environment/AssetId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/asset/environment/AssetId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/asset/environment/AssetId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://localhost:8080/api/v1/asset/environment/AssetId', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/asset/environment/AssetId");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/asset/environment/AssetId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```