Skip to content

REST API

Damiano edited this page Apr 13, 2014 · 31 revisions

/data

  • /data/{id} PUT GET DELETE

/resources

  • /resources POST GET
  • /resources/resource/{id}[?full=true] PUT GET DELETE
    (query param full in GET method also returns attached storeddata)
  • /resources/search POST GET
  • /resources/search/{namelike} GET
  • /resources/search/list POST GET
  • /resources/count/{namelike} GET
  • /resources/resource/{id}/attributes GET
  • /resources/resource/{id}/attributes/{name} GET
  • /resources/resource/{id}/attributes/{name}/{value} PUT

/categories

  • /categories POST GET
  • /categories/category/{id} PUT GET DELETE
  • /categories/count/{namelike} GET

/users

  • /users/ POST
  • /users/user/{id} PUT
  • /users/user/{id} DELETE
  • /users/user/{id} GET
  • /users/search/{name} GET
  • /users/ GET (get all with paging)
  • /users/count/{nameLike} GET
  • /users/user/details GET
  • /users/serach/list/{nameLike} GET

/usersgroup

  • /usergroups/ POST (Insert a UserGroup)
  • /usergroups/group/{id} DELETE (delete an UserGroup)
  • /usergroups/group/{id} GET (get an UserGroup)
  • /usergroups/group/name/{name} GET (search an UserGroup using its name)
  • /usergroups/group/{userid}/{groupid} POST (assign a usergroup to a user)
  • /usergroups/group/{userid}/{groupid} DELETE (remove the usergroup association to a User)
  • /usergroups/ GET (get all UserGroup with paging)
  • /usergroups/update_security_rules/{groupId}/{canRead}/{canWrite} PUT (change the grants for a group on a set of resources)

/misc

These calls simplify some client side operations, avoiding the use of XML filters to be POSTed and receiving all the needed params in the URL path.

  • /misc/category/name/{cname}/resource/name/{rname} GET
    Get the full resource, completed with its data. May be computational and network heavy.
    Results:

    • 200 OK: one resource found
    • 404 NOT FOUND: no matching resource found
    • 409 CONFLICT: too many matching resources found
    • 500: other errors
  • /misc/category/name/{cname}/resource/name/{rname}/data GET
    Get the resource data. May be computational and network heavy.
    Results:

    • 200 OK: one resource found
    • 404 NOT FOUND: no matching resource found
    • 409 CONFLICT: too many matching resources found
    • 500: other errors
  • /misc/category/name/{cname}/resources GET
    Get the list of resources belonging to the Category with name cname.

    Results:

    • 200 OK: one or more resources
    • 404 NOT FOUND: no matching resource found
    • 500: other errors
  • /misc/getdata?categoryname={cname}&resourcename={rname}

/backup

  • /backup/full GET
    Not implemented yet.
  • /backup/full PUT
    Not implemented yet.
  • /backup/quick GET
    Return an XML document containing information about categories, resources, storedData.
    No info about users or authorization is returned.
  • /backup/quick PUT
    Restore the info from an XML doc got with the GET method.
    • All existing categories and resources will be deleted.
    • Categories, resources and storeddata are created from the the XML document.
    • Users will not be modified. Security rules will not be added.
    • IDs are not preserved. Creation dates are recreated.
    • Returns the ok string if the procedure completed successfully.

Clone this wiki locally