This is one of the note which I created using web interface and its fine.
[
{
"uuid":"/UUID(04363196-c948-42ec-827c-20030946796d)/",
"contentId":"04363196-c948-42ec-827c-20030946796d",
"type":"/Type(Note)/",
"creator":"/UUID(04478215-a58d-47f3-b292-68548fa3604e)/",
"creatorUsername":"vbsampath",
"created":"\/Date(1357414080324)\/",
"modified":"\/Date(1378229692015)\/",
"name":"test note for springpad",
"firstPublicUrl":null,
"properties":
{
"workbooks":["04322887-248f-4c6f-b7d8-7fe5a88507d2"],
"text":"test note for springpad api<br>",
"\/meta\/url":"note\/testnoteforspringpad",
"\/cached\/attributedUsername":"vbsampath",
"\/cached\/old_text":"test note for springpad api<br>",
"_text_version":2.0,
"format":"text\/springpad",
"\/meta\/published":false,
"\/cached\/attributedUser":"04478215-a58d-47f3-b292-68548fa3604e",
"\/cached\/workbooks_metadata":[
{
"theme":"gridpaper",
"name":"iPhone Notes",
"accent":"blue",
"uuid":"04322887-248f-4c6f-b7d8-7fe5a88507d2",
"public":false,
"url":"notebook\/iphonenotes"
}]
}
}]
Below is one note which Im trying to create using API and the data was ported from different source so 'created' and 'modified' dates are to be set as per my data and not when I create the note.
I have tried doing 'set' ,'propertyName','Value' method but the details are adding to properties section and not to main section and its not showing in web interface too (showing as created today)
Other try was to do 'add',,'propertyName','Value' method ..this didnt work and created invalid notes which I have to trash using web interface.
Output of the note which I'm trying to post by API
[
[
"create",
"/Type(Note)/",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/"
],
[
"set",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
"name",
"Car deal"
],
[
"set",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
"format",
"text\/springpad"
],
[
"set",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
"created",
"\/Date(1331569207000)\/"
],
[
"set",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
"modified",
"\/Date(1331569246000)\/"
],
[
"set",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
"_text_version",
"2.0"
],
[
"set",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
"text",
"Car deal<div>Accent car</div><div>2lakhs negotiable (1.6-7)</div><div>Good condition</div><div>Satyam manager&nbsp;Used only for office</div> "
],
[
"set",
"/UUID(0438501E-E491-4ADD-BB73-3A7F563229D8)/",
"workbooks",
[
"04322887-248f-4c6f-b7d8-7fe5a88507d2"
]
]
]
My main query would be ..how to create a note with predefined created,modified date (because its data porting)
I also need more information on
_text_version
format
userAction
rich