Skip to main content
records

Copy Metadata

POST
/api/records/{company_name}/metadata/{metadata_type}/{metadata_uid}/copy
Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

company_namestringrequired
metadata_typeenum<string>required
Available options: tools, specialists, safety_equipment, template_types, labels, synonyms
metadata_uidstringrequired
Required string length: 24 - 24
Pattern: ^[0-9a-f]{24}$
Example: 5eb7cf5a86d9755df3a6c593
target_company_namestringqueryrequired

Response

application/json

Successful Response

descriptionobject | nullrequired

Localized string, atleast one language must be set to is_auto_translated: False if any value is set

localized_str = LocalizedStr(en={"value":"hello", "is_auto_translated": False}) localized_str LocalizedStr(en='hello') set(Locals).issubset(LocalizedStr.model_fields.keys()) True #text set but every language is auto-translated -> invalid try: ... LocalizedStr(en={"value": "hello", "is_auto_translated": True}) ... except ValidationError as e: ... assert e.errors()[0]["msg"] == "Value error, If there are texts set, is auto translated must be set for atleast one of them", e.errors()[0]["msg"] #text on an earlier language, empty on a later one, both auto-translated -> still invalid try: ... LocalizedStr(en={"value": "hello", "is_auto_translated": True}, de={"value": "", "is_auto_translated": True}) ... except ValidationError as e: ... assert e.errors()[0]["msg"] == "Value error, If there are texts set, is auto translated must be set for atleast one of them", e.errors()[0]["msg"]

idstringrequired
Required string length: 24 - 24
Pattern: ^[0-9a-f]{24}$
Example: 5eb7cf5a86d9755df3a6c593
owner_namestringrequired
termsobject[] | null
titleobjectrequired

Localized string, atleast one language must be set to is_auto_translated: False if any value is set

localized_str = LocalizedStr(en={"value":"hello", "is_auto_translated": False}) localized_str LocalizedStr(en='hello') set(Locals).issubset(LocalizedStr.model_fields.keys()) True #text set but every language is auto-translated -> invalid try: ... LocalizedStr(en={"value": "hello", "is_auto_translated": True}) ... except ValidationError as e: ... assert e.errors()[0]["msg"] == "Value error, If there are texts set, is auto translated must be set for atleast one of them", e.errors()[0]["msg"] #text on an earlier language, empty on a later one, both auto-translated -> still invalid try: ... LocalizedStr(en={"value": "hello", "is_auto_translated": True}, de={"value": "", "is_auto_translated": True}) ... except ValidationError as e: ... assert e.errors()[0]["msg"] == "Value error, If there are texts set, is auto translated must be set for atleast one of them", e.errors()[0]["msg"]