I'm currently using the following code to create a folder.
url: http://site url/_api/web/folders
method: POST
body: { '__metadata': { 'type': 'SP.Folder' }, 'ServerRelativeUrl': '/document library relative url/folder name'}
Headers:
Authorization: "Bearer " + accessToken
X-RequestDigest: form digest value
accept: "application/json;odata=verbose"
content-type: "application/json;odata=verbose"
content-length:length of post body
When I create the folder I can get the UniqueId from the response, but would also like to get the item number as I need this to perform another operation. The only way I can see to get this information is by changing the following:
request.Accept = "application/json;odata=fullmetadata";
I'm not sure if this is the correct way as it brings back a lot of information?