Datarova
Project keywords

update_project_keyword_labels

Replace keyword labels ยท Changes data

Replace item-label assignments on up to 1000 keyword attachments in one marketplace project.

  • All labels and targets must be available; invalid input changes nothing.
  • An identical replacement reports unchanged keywords.
  • Pure additions apply normally; removing any assignment returns one exact review plan for the whole mixed update.
  • Show that plan and wait for explicit user confirmation before execute_removal.
  • Other projects' assignments stay unchanged.

Input

NameTypeRequiredDescription
project_idintegerRequiredA marketplace project ID: list_projects data.projects[].marketplaces[].project_id, not a project group. Minimum 1. Maximum 2147483647.
keywordsstring[]RequiredAt most 1000 inputs before normalization and deduplication. At least 1 item. At most 1000 items.
label_idsinteger[]RequiredComplete replacement item-label IDs from list_item_labels; [] clears assignments and requires confirmation when labels exist. At most 1000 items.

Output

Read this object from the result's structuredContent. The result's content carries a text version for the model, which is not always the same JSON.

The result is one of 2 shapes.

Variant 1

Fields of data:

NameTypeRequiredDescription
plan_referencestringRequiredPattern ^[A-Za-z0-9_-]{43}$.
operationstringRequired
expires_atstring (date-time)Required
targetsobject[]Required
consequencesobject[]Required
instructionsstringRequired

Variant 2

Fields of data:

NameTypeRequired
operationstringRequired
committedtrueRequired
recoveredbooleanRequired
outcomeobjectRequired
Full input and output JSON Schema
JSONCode
{ "inputSchema": { "type": "object", "$schema": "https://json-schema.org/draft/2020-12/schema", "properties": { "project_id": { "type": "integer", "minimum": 1, "maximum": 2147483647, "description": "A marketplace project ID: list_projects data.projects[].marketplaces[].project_id, not a project group." }, "keywords": { "minItems": 1, "maxItems": 1000, "type": "array", "items": { "type": "string", "description": "Keyword; after trimming/lowercasing, 1 to 255 Unicode code points without NUL." }, "description": "At most 1000 inputs before normalization and deduplication." }, "label_ids": { "maxItems": 1000, "type": "array", "items": { "type": "integer", "minimum": 1, "maximum": 2147483647 }, "description": "Complete replacement item-label IDs from list_item_labels; [] clears assignments and requires confirmation when labels exist." } }, "required": [ "project_id", "keywords", "label_ids" ], "additionalProperties": false }, "outputSchema": { "type": "object", "required": [ "data" ], "anyOf": [ { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "required": [ "plan_reference", "operation", "expires_at", "targets", "consequences", "instructions" ], "properties": { "plan_reference": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" }, "operation": { "type": "string" }, "expires_at": { "type": "string", "format": "date-time" }, "targets": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "consequences": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "instructions": { "type": "string" } } } } }, { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "object", "required": [ "operation", "committed", "recovered", "outcome" ], "properties": { "operation": { "type": "string" }, "committed": { "const": true }, "recovered": { "type": "boolean" }, "outcome": { "type": "object", "additionalProperties": true } } } } } ] } }