---
title: "Get Resource (getResourceById)"
method: GET
path: "/api/resource/{resourceId}"
tags: ["tb-resource-controller"]
deprecated: true
---

# Get Resource (getResourceById)

`GET /api/resource/{resourceId}`

> **Deprecated.**

Fetch the Resource object based on the provided Resource Id. Resource is a heavyweight object that includes main information about the Resource and also data. 

Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.

## Path parameters

- `resourceId` string, required

## Response `200`

OK

- TbResource — A JSON value representing the Resource.
  - `id` TbResourceId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TB_RESOURCE', required — string
  - `createdTime` integer — Timestamp of the resource creation, in milliseconds
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `title` string — Resource title.
  - `resourceType` 'LWM2M_MODEL' | 'JKS' | 'PKCS_12' | 'JS_MODULE' | 'IMAGE' | 'DASHBOARD' | 'GENERAL' — Resource type.
  - `resourceSubType` 'IMAGE' | 'SCADA_SYMBOL' | 'EXTENSION' | 'MODULE' — Resource sub type.
  - `resourceKey` string — Resource key.
  - `publicResourceKey` string
  - `etag` string — Resource etag.
  - `fileName` string — Resource file name.
  - `descriptor` unknown
  - `data` string — Resource data.
  - `preview` string
  - `name` string
  - `public` boolean
  - `link` string
  - `publicLink` string

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
