diff --git a/skills/asset-management/SKILL.md b/skills/asset-management/SKILL.md index b7a326f..4ddbcb8 100644 --- a/skills/asset-management/SKILL.md +++ b/skills/asset-management/SKILL.md @@ -17,6 +17,9 @@ Advise on Contentstack Assets, the standalone DAM product (also called "Asset Ma - Finding and removing duplicates. - Versions, trash and restore. - Visual markups. +- Asset privacy and access. +- Upload limits, bulk actions and the Bulk Task Queue. +- Browsing, filtering and sorting. - Using Assets with a CMS stack. Use another skill for: @@ -34,7 +37,8 @@ Confirm which product the user means (Assets space or CMS stack library), then f ## Instructions 1. Confirm the user means the Assets DAM, not the CMS asset library. -2. Identify the topic: structure, metadata, AI, duplicates, versions, trash, markups, or CMS integration. +2. Identify the topic: structure, metadata, search, privacy, uploads and bulk actions, AI, duplicates, versions, trash, markups, or CMS integration. + Many features and limits depend on the organization's plan. Present numbers as defaults and say that the plan may change them. 3. Answer with documented behavior using the product's terminology: space, workspace, main workspace, asset type, system metadata, user-defined metadata, duplicate set, visual markup. 4. Flag limits and irreversible actions. 5. Say plainly when something is not documented, and link to the relevant docs page for anything undocumented or likely to change. @@ -46,6 +50,7 @@ Confirm which product the user means (Assets space or CMS stack library), then f - A space can be linked to one or more CMS stacks, and assets can be reused across stacks. - Recommend a small number of spaces and workspaces. Over-fragmenting adds management overhead. - Space Settings > General holds the title (required) and description. The Space UID is generated by the system and cannot be changed. +- A space cannot be deleted while CMS stacks/projects are linked to it or workspaces depend on it; unlink them first. - Deleting a space is irreversible. It removes the space's assets, users and collaborators. Always warn before recommending it. - Duplicate Management is configured per workspace. AI Settings live under Space Settings. @@ -56,24 +61,47 @@ Confirm which product the user means (Assets space or CMS stack library), then f ### Roles and permissions -- Access is governed per space through roles, teams and associations. Where the user needs the exact predefined roles or asset-level sharing options, direct them to the current Assets documentation rather than guessing. +Assets has two levels of access: **product roles** at the organization level and **space roles** inside each space. + +**Product roles (organization level)** + +- Product roles are assigned at the organization level and control what a user can do across the Assets product, before any space is involved. +- They cover these product-level permissions, each with read, create, edit and delete: + - **Spaces:** creating spaces and listing, editing or deleting them. + - **Workspaces.** + - **Fields** (user-defined fields): always organization-wide, shared by every space. + - **Asset types:** always organization-wide, shared by every space. + - **Users** and **roles.** +- Fields and asset types are product-level objects. Anyone who can edit them affects every space that uses them, so restrict these permissions to a few metadata owners. +- Product-level **Settings** (Languages, Bulk Task Queue) follow product permissions. The product-level Bulk Task Queue is visible to users who can create, edit or delete fields or asset types, because those changes run as background jobs. +- A user needs a product role that allows creating spaces before they can create a space. Inside an existing space, the space role decides what they can do. +- For OAuth apps, the matching scopes follow the same split. Field, asset type and settings scopes are organization-wide; space, user, role and asset scopes can be limited to specific spaces, and workspace scopes to specific workspaces. + +**Space roles** + +- Access is governed per space in **Space Settings > Users & Roles**. Settings tabs (General, Users & Roles, Workspaces, Trash, Bulk Task Queue, Security, AI Settings) appear only if the user's role grants access to them. +- Predefined roles: **Space Admin**, **Asset Developer** and **Asset Manager**. Predefined roles cannot be deleted. +- Custom roles grant read, create, update and delete per module (workspaces, locales, assets, folders), scoped to specific items or to all of them. Role names must be unique. +- Users cannot change their own roles or the space owner's roles. - For least privilege, give contributors only the access they need and restrict delete and settings permissions to a few administrators. ### Asset types and metadata - Metadata comes in layers: **system metadata** (read-only: file name, UID, URLs, MIME type, size, created and modified details), **general metadata**, and **user-defined metadata** from custom fields. - Each **asset type** maps to one MIME type and one file extension. On upload, a matching type applies automatically and its fields appear. System types cover images, audio, video, documents and archives, and you can add custom types. -- User-defined fields are reusable across asset types. The Asset Modeling docs list single line and multi line textbox, link, select, number, date, boolean and group, but state that only single line, number and group are currently supported. Point the user to the Asset Modeling docs before promising any other type. +- User-defined fields are reusable across asset types. Supported field types are **single line textbox**, **number**, **select** (displayed as dropdown, radio or checkbox; single or multiple values) and **group**. Multi line textbox, link, boolean and date are not supported yet, so do not recommend them. +- Groups can nest at most 3 levels deep. A select field allows up to 300 choices by default (plan-dependent). +- Name limits: field and asset type names up to 255 characters, descriptions up to 1000 characters. - Mandatory fields must be filled before an upload or save can finish. Use them sparingly so uploads are not blocked on optional information. - Edit metadata for an individual asset in the configurable metadata panel. - User-defined fields exist only in the Assets (DAM) product. The CMS stack asset library and its Management API don't read or update them, so direct any request to read or write custom metadata from code to the Assets (DAM) API. See the Assets API reference at https://www.contentstack.com/docs/developers/apis/assets-api for the current endpoints. -- **Filters and saved views:** User-defined fields can be used as filters when browsing assets, so well-modeled fields make the library searchable. A filter combination can be saved as a **saved view** and reused later instead of rebuilding the filters each time. Advise modeling fields with filtering in mind, for example a single line field for campaign or usage rights (or a select field once select is supported). +- **Filters and saved views:** User-defined fields can be used as filters when browsing assets, so well-modeled fields make the library searchable. A filter combination can be saved as a **saved view** and reused later instead of rebuilding the filters each time. Advise modeling fields with filtering in mind, for example a select field for usage rights or a single line field for campaign. ### Localization - Assets supports localized asset versions within a space. - Adding a language is a two-step process: - 1. Add the language in product settings. + 1. Add the language in **Settings > Languages** (product level; language name up to 50 characters). 2. Add it to each workspace that needs it: **Space Settings > Workspaces >** pick the workspace **> Manage Locales**. - Locales are enabled per workspace, so a language added in product settings does not appear in a workspace until it is added there. @@ -85,8 +113,15 @@ Use the Assets API search endpoint. Full reference: https://www.contentstack.com - **Host by region:** use the base URL for your region from the [Assets API overview](https://www.contentstack.com/docs/developers/apis/assets-api): AWS NA (`am-api.contentstack.com`), AWS EU (`eu-am-api.contentstack.com`), Azure NA (`azure-na-am-api.contentstack.com`) or GCP NA (`gcp-na-am-api.contentstack.com`). - **Headers:** send either `authorization: Bearer ` or `authtoken` (your Contentstack authtoken). A management token is not accepted. `x-cs-api-version` is required (default `4`). With `authtoken`, `organization_uid` is also required. Read tokens from environment variables. - **Text search:** `search_text`, `search_field` and `search_terms_operator` (`and` or `or`). `search_field` accepts only `all`, `title`, `name`, `url` or `category`, so it cannot target user-defined fields. -- **Structured filters:** put conditions in `query`, combined with nested `$and` and `$or` clauses. The docs match a field to a value, for example `{ "category": "image" }`, and don't document other operators. To filter a user-defined field, reference it by its full path, `user_defined_fields..`, and test the filter against your space, since the public page doesn't cover user-defined fields. -- **Scope and paging:** `spaces` limits the search and is a plain array of space UIDs, as in the docs example. Use `limit` and `skip` for paging, and `fields` to trim the response. +- **Structured filters:** put conditions in `query`. A plain value matches exactly, for example `{ "category": "image" }`. Supported operators: + - Comparison: `$eq`, `$ne`, `$in`, `$nin` (all case-insensitive), `$contains` (text), `$exists`. + - Range: `$lt`, `$lte`, `$gt`, `$gte`, or `$range` with those keys inside. + - Logical: `$and`, `$or`, `$not`, nestable. + - `$regex` is **rejected**. Use `$contains` for partial text matches. +- **User-defined fields:** reference them as `user_defined_fields.`, or `user_defined_fields..` for a field inside a group. Number and date fields work with the range operators. +- **Sorting:** add `"asc": ""` or `"desc": ""` to the body. +- **Other filters:** `asset_access_filter` (`private` or `public`), `ai_enrichment` (`enriched` or `not_enriched`; API only, not yet available as a UI filter), `include_user_details`. +- **Scope and paging:** `spaces` limits the search and is a plain array of space UIDs. Use `limit` (1–100) and `skip` for paging, and `fields` to trim the response. Results stop at 10,000 matches, so narrow the query rather than paging further. - Deleted items are excluded unless `include_deleted_items` or `filter_only_deleted_items` is set. Example request body: @@ -95,7 +130,8 @@ Example request body: { "query": { "$and": [ - { "user_defined_fields.asset_rights.license_type": "Creative Commons" } + { "user_defined_fields.asset_rights.license_type": { "$in": ["Creative Commons", "Royalty Free"] } }, + { "title": { "$contains": "summer" } } ] }, "limit": 50, @@ -103,12 +139,35 @@ Example request body: } ``` -- Check the response body for errors after every search. Don't rely on the HTTP status alone to tell whether a request was valid. +- Check the response body for errors after every request. Don't rely on the HTTP status alone. Errors use the shape `{ error_message, error_code, errors[], fields?: [{ field_uid, path, reason }] }`; `fields` pinpoints which field or path failed validation. + +### Asset privacy + +- Configured in **Space Settings > Security** (plan-dependent; the tab is hidden if the plan does not include it). +- Set the space default to **Public** or **Restricted**. Turn on **Asset access modifications** to let editors override the default per asset with **Manage Access** on the asset. +- When changing the space default, choose whether to keep existing asset-level settings or overwrite all of them. +- Warn before making assets restricted: they then require an access token, and **existing public links stop working, including links shared outside the organization**. Check where URLs are embedded first. +- Search can filter by access with `asset_access_filter`. + +### Upload, bulk actions and the Bulk Task Queue + +- Upload with **+ New > Upload File**. Only local files are supported (no upload from URL). In the UI, each file can be up to 1.5 GB and up to 1000 files can be uploaded at once. The API takes one file per request. Replacing a file accepts exactly one file. +- Bulk actions on selected assets: **Move To** and **Delete**. Bulk delete is limited to 100 items by default (plan-dependent), so larger deletions must be split into batches. +- Bulk jobs run asynchronously. Track them in **Space Settings > Bulk Task Queue** (or **Settings > Bulk Task Queue** at product level). + +### Browsing, filtering and sorting + +- Views: thumbnail grid (Icon, Small, Medium, Large; infinite scroll) or list (30, 50 or 100 rows per page; columns via Table Settings). +- Filters: Asset Type, Category, Color, Created At/By, Last Modified At/By, Dimension, File Size (Small <1 MB, Medium 1–10 MB, Large 10–100 MB, Extra Large 100 MB+, or custom), Folder, Locale, Privacy, Publish Status, Scan Status, Tag, and user-defined fields (Text, Number, Select with Contains / Is empty / Is not empty). Date filters offer the last 1, 7, 14, 30 or 365 days. +- Sort by Title, Date Modified, Date Created, Created By, File Size, Asset Type or Scan Status, ascending or descending. +- Result counts above 10,000 show as "10000 +". +- Saved views can be updated in place, saved as a new view, or have recent changes cleared. +- Scan Status (malware scanning) appears only when the plan includes asset scanning. ### AI tags, alt text and colors - In the metadata panel, **Suggest Tags with AI** and **Suggest Description with AI** generate suggestions. AI can also extract dominant colors, which powers color-based filtering. Suggestions can be wrong, so review them before saving. -- The product also has AI-powered semantic (natural-language) search and reverse image search, depending on plan and rollout. They are not in the public docs yet, so confirm availability in the user's space before relying on them. +- AI features are plan-dependent. If **Space Settings > AI Settings** is missing, the plan does not include them. - **Auto-populate at upload** is configured in Space Settings > AI Settings. Enable the AI Tags and Alt Text toggles, set Advanced Properties, and click Save Properties. - Applies to images and to new uploads only. Existing assets are not enriched, and replacing a file does not trigger it. - Values are written into version 1. No extra version is created, nothing waits for review, and uploads are not slowed down. @@ -119,7 +178,7 @@ Example request body: ### Duplicate management - Detects **exact duplicates** (byte-identical images). Two or more form a **duplicate set**, and no copy is treated as the original. -- Images only, and a set cannot span workspaces. Detection is on by default in every workspace and runs in the background after upload, replace, delete and restore. It does not block or flag uploads. +- Duplicate Management is plan-dependent. Where the plan includes it: images only, and a set cannot span workspaces. Detection is on by default in every workspace and runs in the background after upload, replace, delete and restore. It does not block or flag uploads. - An admin with permission to edit space settings can turn it off per workspace. - Open it from the asset listing: More Actions > Duplicate Management. Resolve a set by **Keep This, Delete the Rest**, by deleting a single copy, or by bulk-deleting the duplicates. - Gotchas to state up front: @@ -133,6 +192,7 @@ Example request body: ### Versions - Any change to the file or to metadata creates a new version, and so does a Save Assets action. Default names are Version 1, Version 2 and so on. +- Up to 30 versions are kept by default (plan-dependent). - Rename a version from the version selector at the top right. The name can be up to 32 characters using letters, numbers, spaces, hyphens and underscores. Renaming does not create a version. - To restore an earlier version, select it in the version selector and click **Save Asset**. It becomes the latest version, and the older versions stay in history. - Only users with edit permission can rename or restore. Others can view history. @@ -159,6 +219,8 @@ Example request body: - Link a space to one or more stacks so its assets can be used in entries. For setup steps, direct the user to the current Assets documentation. - In the Content Delivery API, the `asset_fields[]` query parameter applies to assets from the new Assets product. Documented values are `visual_markups` and `user_defined_fields`, and the parameter can be repeated. Stack-library assets do not return those keys. - `visual_markups` is an empty array when an asset has none. A hotspot returns x and y, and a bounding box also returns width and height. +- **Publish / Unpublish** is available only when Assets is used inside the CMS, not in the standalone Assets app. +- Asset create, update and delete events are sent to the CMS webhook system on channels `assets.` and `assets..`. - Do not state CDN host names, URL formats or branch behavior for Assets as fact unless the user's docs confirm them. ## MCP tools