---
title: "Delete a resource"
method: DELETE
path: "/api/v1/devices/{deviceId}/resource-links/{resourceHref}"
tags: ["Resource Links"]
---

# Delete a resource

`DELETE /api/v1/devices/{deviceId}/resource-links/{resourceHref}`

Request to delete a resource is an async operation. The device after successful resource deletion unpublishes the resource from the plgd hub. This information is published to the WebSocket in form of an `RESOURCE_UNPUBLISHED` event.

## Query parameters

- `timeToLive` integer

## Response `200`

Confirmation event about successful resource deletion.

- object
  - `data` Resource
    - `resourceId` ResourceId
      - `deviceId` string, uuid
      - `href` string, url
    - `content` union
      - ResourceContent
      - ResourceCreatedContent
        - `href` string, uri
        - `rt` string[]
        - `if` string[]
        - `rep` object — Resource content provided as JSON object or base64 encoded CBOR.
    - `auditContext` AuditContext
      - `userId` string
      - `correlationId` string
    - `eventMetadata` EventMetadata
      - `version` string, uint64
      - `timestamp` string, int64
      - `connectionId` string
      - `sequence` string, uint64
    - `status` 'UNKNOWN' | 'OK' | 'BAD_REQUEST' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'NOT_FOUND' | 'UNAVAILABLE' | 'NOT_IMPLEMENTED' | 'ACCEPTED' | 'ERROR' | 'METHOD_NOT_ALLOWED' | 'CREATED' | 'NOT_MODIFIED'

## Other responses

- `204` — Action will asynchronously processed.
- `400` — Bad Request
- `401` — Not authorized
- `403` — Forbidden
- `404` — Entity was not found.

---

[API](https://skmtc.net/plgd-dev/apis/plgd-http-gateway.md) · [All operations](https://skmtc.net/plgd-dev/apis/plgd-http-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/plgd-dev/plgd-http-gateway/versions/bbfd9fa43407/schema)
