# Delete Asset Tag DELETE https://api.trebellar.app/api/v2/assets/tags/delete/{assetTagId} Delete an existing asset tag. Reference: https://docs.trebellar.app/api-reference/api-resources/assets/delete-asset-tag ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Delete Asset Tag version: endpoint_assets.deleteAssetTag paths: /api/v2/assets/tags/delete/{assetTagId}: delete: operationId: delete-asset-tag summary: Delete Asset Tag description: Delete an existing asset tag. tags: - - subpackage_assets parameters: - name: assetTagId in: path required: true schema: type: string - name: X-Trebellar-Api-Key in: header required: true schema: type: string responses: '200': description: Asset tag deleted successfully content: application/json: schema: $ref: '#/components/schemas/DeleteAssetTagResponse' '500': description: Unable to delete asset tag content: {} components: schemas: DeleteAssetTagResponseDataAssetTypesItems: type: string enum: - value: STRUCTURE - value: FLOOR - value: SPACE - value: DESK - value: SENSOR - value: UNKNOWN - value: SENSOR_GROUP DeleteAssetTagResponseData: type: object properties: id: type: string assetTypes: type: array items: $ref: '#/components/schemas/DeleteAssetTagResponseDataAssetTypesItems' 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 DeleteAssetTagResponse: type: object properties: data: $ref: '#/components/schemas/DeleteAssetTagResponseData' 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.deleteAssetTag("assetTagId"); } main(); ``` ```python from trebellar import TrebellarApi client = TrebellarApi( base_url="https://api.trebellar.app", api_key= ) client.assets.delete_asset_tag( asset_tag_id="assetTagId" ) ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.trebellar.app/api/v2/assets/tags/delete/assetTagId" req, _ := http.NewRequest("DELETE", 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/delete/assetTagId") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["X-Trebellar-Api-Key"] = '' response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.delete("https://api.trebellar.app/api/v2/assets/tags/delete/assetTagId") .header("X-Trebellar-Api-Key", "") .asString(); ``` ```php request('DELETE', 'https://api.trebellar.app/api/v2/assets/tags/delete/assetTagId', [ 'headers' => [ 'X-Trebellar-Api-Key' => '', ], ]); echo $response->getBody(); ``` ```csharp var client = new RestClient("https://api.trebellar.app/api/v2/assets/tags/delete/assetTagId"); var request = new RestRequest(Method.DELETE); 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/delete/assetTagId")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" 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() ```