This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:sidebar:remoteapi:apiref:item:update_custom_property [23/01/2013 08:44] 127.0.0.1 external edit |
en:sidebar:remoteapi:apiref:item:update_custom_property [24/10/2013 13:12] mast |
||
---|---|---|---|
Line 1: | Line 1: | ||
{{indexmenu_n>4}} | {{indexmenu_n>4}} | ||
- | ====== Произвольные свойства ====== | + | ====== Custom properties ====== |
- | Чтобы создать новое свойство для элемента или изменить уже имеющееся, нужно использовать команду **item/update_custom_property**: | + | |
+ | ===== Create/update property ===== | ||
+ | To create a new custom property for an item or update an existed one, use the command **item/update_custom_property**: | ||
<code javascript> | <code javascript> | ||
svc=item/update_custom_property¶ms={"itemId":<long>, | svc=item/update_custom_property¶ms={"itemId":<long>, | ||
Line 8: | Line 10: | ||
</code> | </code> | ||
- | ===== Параметры ===== | + | ===== Delete property ===== |
- | ^ Название ^ Описание ^ | + | To delete custom property, use the same command but with empty **value** param: |
- | | itemId | ID элемента | | + | <code javascript> |
- | | name | название свойства | | + | svc=item/update_custom_property¶ms={"itemId":<long>, |
- | | value | значение свойства | | + | "name":<text>, |
+ | "value":""} | ||
+ | </code> | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | ^ Name ^ Description ^ | ||
+ | | itemId | item ID | | ||
+ | | name | custom property name | | ||
+ | | value | custom property value | | ||
- | ===== Возвращаемый результат ===== | + | ===== Response ===== |
<code=javascript> | <code=javascript> | ||
{ | { | ||
- | "n":<text>, /* имя свойства */ | + | "n":<text>, /* custom property name */ |
- | "v":<text> /* значение свойства */ | + | "v":<text> /* custom property value */ |
} | } | ||
</code> | </code> |
|