Announcement

Collapse
No announcement yet.

http api, question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • http api, question

    Hello

    i'm currently developing a sync modul for our postgres db at work, and i'm fooling around with the http api and 'folders?action=new' which i couldn't get to work probably, whatever i do i just keep getting this error message:

    FLD-0002 Category=2 Message=User Test (3) has no access to module 'unknown' in context 1 due to user configuration exceptionID=1695021968-1322

    the json string currently looks like this:
    Code:
    {"data":[["Testcal","calendar",2,[{"group":false,"bits":403710016,"entity":2},{"group":false,"bits":403710016,"entity":3}]]]}
    i send it atm,like this:

    Code:
    curl -b cookies -c cookies -s -L --location-trusted -k -v -X PUT -HContent-type:text/x-json --data "$JSON" "http://$SERVER/ajax/folders?action=new&folder_id=2&session=$SESSION"
    if anybody has a tip for me, i'd be very thankful

    sry for my bad english
    Last edited by Guest; 12-25-2008, 03:51 PM.

  • #2
    Ok, I just sniffed the json string that the server uses from the webui.

    the above format i used is wrong, it must be formated like this:
    Code:
    {"title":"test","module":"calendar","permissions":[{"group":true,"bits":4,"entity":0},{"group":false,"bits":403710016,"entity":3}],"subscribed":1}

    Comment

    Working...
    X