Differences
This shows you the differences between two versions of the page.
|
|
en:sidebar:remoteapi:apiref:core:create_resource [07/04/2014 06:27] mast |
en:sidebar:remoteapi:apiref:core:create_resource [18/06/2015 18:58] |
{{indexmenu_n>6}} | |
====== Create resource ====== | |
| |
To create a new resource, use the command **core/create_resource**: | |
| |
<code javascript> | |
svc=core/create_resource¶ms={"creatorId":<long>, | |
"name":<text>, | |
"dataFlags":<uint>} | |
</code> | |
| |
===== Parameters ===== | |
^ Name ^ Description ^ | |
| creatorId | ID of a user who will be assigned a creator for a new resource | | |
| name | name of a new resource (at least 4 characters) | | |
| dataFlags | data flags for the response (see [[../format/resource|Data format: Resources]])| | |
| |
===== Response ===== | |
<code javascript> | |
{ | |
"item":{ /* resource created */ | |
... | |
}, | |
"flags":<uint> /* applied data flags */ | |
} | |
</code> | |
You can find the format of “item” in the chapter [[../format/resource|Data format: Resources]]. | |