Api post

Creating a new record in an entity is done through a POST URL. The body must include the data set to be inserted.

For example, to insert a new volume in the administration endpoint (on my_server:8214), the request will be a POST on the following URL:

http://my_server:8124/api1/syracuse/collaboration/syracuse/storageVolumes?representation=storageVolumes.$edit

The body must include all the properties that are mandatory. The following data can be sent:

{"code": "LOG1","description": "Log files","storageType": "db_file","dynamic": false,}

The http status will be 201 (Created) if the result is successful.

The body returned will include the details of the properties, including the additional meta-data properties. For example, it can be:

{"$uuid": "5a4fa630-8d02-4942-a768-f29a2d2d7939","$key": "5a4fa630-8d02-4942-a768-f29a2d2d7939","$url": "http://my_server:8124/api1/syracuse/collaboration/syracuse/storageVolumes('5a4fa630-8d02-4942-a768-f29a2d2d7939')","$etag": 1,"$creUser": "XDOM","$creDate": "2014-02-17T12:25:06.060Z","$updUser": "XDOM","$updDate": "2014-02-17T12:25:06.060Z","$properties": {"code": {"$diagnoses": []},"description": {"$diagnoses": []},"storageType": {"$isDisabled": true},"path": {"$isHidden": true},"dynamic": {"$isHidden": true}},"code": "LOG1","description": "Log files","storageType": "db_file","dynamic": false,"$links": {"$browse": {"$title": "List of files","$url": "{$baseUrl}/documents?representation=document.$query&where=(volume eq \"{$uuid}\")","$target": "blank"}},"$value": "Log files","$actions": {"$save": {"$isRequested": false,"$links": {"$details": {"$isHidden": false},"$query": {"$isHidden": false},"$create": {"$isHidden": false}},"$diagnoses": [{"$severity": "success","$message": "Resource has been saved"}],"$isDisabled": true}}}