# List Asset Tags GET https://api.trebellar.app/api/v2/assets/tags/list Retrieve a list of all asset tags available, with the ability to filter based on asset type. Reference: https://docs.trebellar.app/api-reference/api-resources/assets/list-asset-tags ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: List Asset Tags version: endpoint_assets.listAssetTags paths: /api/v2/assets/tags/list: get: operationId: list-asset-tags summary: List Asset Tags description: >- Retrieve a list of all asset tags available, with the ability to filter based on asset type. tags: - - subpackage_assets parameters: - name: assetTypes in: query required: false schema: type: string - name: X-Trebellar-Api-Key in: header required: true schema: type: string responses: '200': description: Asset tags retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ListAssetTagsResponse' '404': description: No assets found content: {} components: schemas: ListAssetTagsResponseDataItemsAssetTypesItems: type: string enum: - value: STRUCTURE - value: FLOOR - value: SPACE - value: DESK - value: SENSOR - value: UNKNOWN - value: SENSOR_GROUP ListAssetTagsResponseDataItems: type: object properties: id: type: string assetTypes: type: array items: $ref: '#/components/schemas/ListAssetTagsResponseDataItemsAssetTypesItems' description: type: string color: type: string icon: type: string name: type: string category: type: string metadata: type: string required: - id - assetTypes - description - color - icon - name - category ListAssetTagsResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/ListAssetTagsResponseDataItems' required: - data ``` ## SDK Code Examples ```typescript import { TrebellarApiClient } from "@trebellar/api-sdk"; async function main() { const client = new TrebellarApiClient({ environment: "https://api.trebellar.app", }); await client.assets.listAssetTags({}); } main(); ``` ```python from trebellar import TrebellarApi client = TrebellarApi( base_url="https://api.trebellar.app", api_key= ) client.assets.list_asset_tags() ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.trebellar.app/api/v2/assets/tags/list" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-Trebellar-Api-Key", "") 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("https://api.trebellar.app/api/v2/assets/tags/list") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-Trebellar-Api-Key"] = '' response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.get("https://api.trebellar.app/api/v2/assets/tags/list") .header("X-Trebellar-Api-Key", "") .asString(); ``` ```php request('GET', 'https://api.trebellar.app/api/v2/assets/tags/list', [ 'headers' => [ 'X-Trebellar-Api-Key' => '', ], ]); echo $response->getBody(); ``` ```csharp var client = new RestClient("https://api.trebellar.app/api/v2/assets/tags/list"); var request = new RestRequest(Method.GET); request.AddHeader("X-Trebellar-Api-Key", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["X-Trebellar-Api-Key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.trebellar.app/api/v2/assets/tags/list")! 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() ```