Create resource

To create a new resource, use the command core/create_resource:

svc=core/create_resource&params={"creatorId":<long>,
				 "name":<text>,			     
				 "dataFlags":<uint>,
                                 "skipCreatorCheck":<bool>}

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 Data format: Resources)
skipCreatorCheck special flag (see below), 1 – enable

:!: Clarification for skipCreatorCheck: if non-account user created items then it is impossible to create account for such user later; in order to create resource for such user please use skipCreatorCheck=1. The flag is used for that case only. Such limitation exists to protect one’s hierarchy.

Response

{
	"item":{	/* resource created */
		...	
	},
	"flags":<uint>	/* applied data flags */
}

You can find the format of “item” in the chapter Data format: Resources.