# Create an asset link on a page

Launch stage: Beta

`POST /api/2.0/knowledge/{parent=pages/*/asset-link-categories/*}/asset-links`

Create an asset link on a page. For REST, send AssetLink fields directly
 as the JSON request body; the parent path supplies the page and category.
 An existing target with the same asset type, scope, and resolved asset ID
 in that page/category returns the original link and creation time.

API scopes: knowledge

## Path parameters

- `parent` (string, required)
  Category collection on the page in which to create the link.
   Format: `pages/{page_id}/asset-link-categories/{category}`, where
   `{category}` is a `LinkCategory` value (`SOURCE` or `RELATED_ASSETS`).

## Request body

The link to create. `asset_type`, `asset_scope_id`, and `asset_id` are
 required. The server assigns `name` and `create_time`; the path supplies
 the page and category. A duplicate target in that category returns the
 existing link.
- `name` (string, optional, ID, Immutable)
  Resource name of the link. Server-assigned on create, immutable thereafter.
   Format: `pages/{page_id}/asset-link-categories/{category}/asset-links/{link_id}`,
   where `category` is `SOURCE` or `RELATED_ASSETS` and `link_id` is a
   server-generated UUID. Omit on create; use the returned name for Get/Delete.
- `asset_type` (string, required)
  Kind of asset this link points to. Required on create;
   `ASSET_TYPE_UNSPECIFIED` is not a valid target type.
  Possible values:
  - `ASSET_TYPE_UC_TABLE`
  - `ASSET_TYPE_WORKSPACE_DASHBOARD`
  - `ASSET_TYPE_WORKSPACE_GENIE_AGENT`
  - `ASSET_TYPE_WORKSPACE_NOTEBOOK`
  - `ASSET_TYPE_WORKSPACE_APP`
  - `ASSET_TYPE_WORKSPACE_DBSQL_QUERY`
  - `ASSET_TYPE_ACCOUNT_PAGE`
  - `ASSET_TYPE_ACCOUNT_USER`
  - `ASSET_TYPE_EXTERNAL_URL`
- `asset_scope_id` (string, required)
  Containing scope of the asset. Required on create for every asset type:
   - UC table: metastore UUID.
   - Workspace asset: decimal workspace ID string.
   - Account page or external URL: the calling account UUID.
   Pass the bare ID, without a resource-name prefix. Query and Genie links,
   dashboard UUID inputs, and app-name inputs require this scope to match the
   caller's workspace.
- `asset_id` (string, required)
  Target identifier within `asset_scope_id`. Required on create. The accepted
   format depends on `asset_type`; see the identifier rules on each AssetType.
   For Databricks assets, pass the bare identifier rather than a resource name
   such as `pages/{page_id}` or `queries/{query_id}`. External assets use the
   full URL. Create and Get return table FQNs, app UUIDs,
   query UUIDs, and native Genie space IDs.

## Returns

Returns the AssetLink object.

## Response

```json
{
  "name": "string",
  "asset_type": "ASSET_TYPE_UC_TABLE",
  "asset_scope_id": "string",
  "asset_id": "string",
  "create_time": "string"
}
```

