> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Asset Usage

> Get where a component asset is used

Returns information about where a component asset is referenced, including components, content, and packages.

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

<ParamField path="componentId" type="string" required>
  Component ID
</ParamField>

<ParamField path="assetId" type="string" required>
  Asset ID
</ParamField>

## Response

```json theme={null}
{
  "data": {
    "inComponents": ["c123", "c456"],
    "inPackages": ["pkg-1.0.0", "pkg-1.1.0"],
    "inContent": ["cont123"],
    "totalUsage": 5
  }
}
```

## Response Fields

| Field        | Type      | Description                          |
| ------------ | --------- | ------------------------------------ |
| inComponents | string\[] | Component IDs referencing this asset |
| inPackages   | string\[] | Package IDs containing this asset    |
| inContent    | string\[] | Content IDs referencing this asset   |
| totalUsage   | number    | Total number of references           |

<Note>
  Assets referenced in published packages cannot be deleted. Use this endpoint to check usage before attempting deletion.
</Note>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123/assets/asset123/usage" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123/assets/asset123/usage',
    {
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  const result = await response.json();
  const usage = result.data;

  if (usage.usedInPackages.length > 0) {
    console.log('Asset is used in packages and cannot be deleted');
  } else {
    console.log('Asset can be safely deleted');
  }
  ```
</CodeGroup>
