POCZone.net

Intro | de | en

auth/register
= Register user
auth/login
= Login user
auth/logout
= Logout session
spaces/create
= Create space
spaces/create/adhoc
= Create adhoc space
spaces/getMine
= Get my spaces
spaces/edit
= Edit space
spaces/share
= Share space / Add collaborator
spaces/leave
= Leave space
spaces/coupons/create
= Create coupon for space access
spaces/coupons/collect
= Collect coupon for space access
spaces/coupons/revoke
= Revoke coupon for space access
data/token/create
= Grant space data access
data/token/revoke
= Revoke space data access
data/json/post
= Commit JSON space data diff
data/json/getDiff
= Get JSON space data diff
data/json/getByIDs
= Get JSON space data by IDs

auth/register

= Register user

username
= Username
password
= Password


Success output:
[self (JSONObject), sessionToken (String)]

Declared error codes:
[USERNAME_ALREADY_TAKEN (HTTP:400)]

auth/login

= Login user

username
= Username
password
= Password


Success output:
[self (JSONObject), sessionToken (String)]

Declared error codes:
[LOGIN_FAILED (HTTP:400)]

auth/logout

= Logout session

sessionToken
= Session token (from register / login)


Success output:
[]

Declared error codes:
[]

spaces/create

= Create space

sessionToken
= Session token (from register / login)
spaceName
= Space name
spaceApp
= Application name (uppercase letters, e.g. DEMO)


Success output:
[space (JSONObject)]

Declared error codes:
[]

spaces/create/adhoc

= Create adhoc space

spaceName
= Space name
spaceApp
= Application name (uppercase letters, e.g. DEMO)


Success output:
[space (JSONObject), dataToken (String)]

Declared error codes:
[]

spaces/getMine

= Get my spaces

sessionToken
= Session token (from register / login)


Success output:
[spaces (JSONArray)]

Declared error codes:
[]

spaces/edit

= Edit space

sessionToken
= Session token (from register / login)
spaceUUID
= Space identifier (from create / getMine)
spaceName
= Space name


Success output:
[]

Declared error codes:
[INSUFFICIENT_RIGHTS (HTTP:403)]

spaces/share

= Share space / Add collaborator

sessionToken
= Session token (from register / login)
spaceUUID
= Space identifier (from create / getMine)
username
= Username of the collaborator (known from elsewhere)
level
= Permission level (NONE / READER / WRITER / ADMIN)


Success output:
[]

Declared error codes:
[INSUFFICIENT_RIGHTS (HTTP:403), USER_NOT_FOUND (HTTP:400)]

spaces/leave

= Leave space

sessionToken
= Session token (from register / login)
spaceUUID
= Space identifier (from create / getMine)


Success output:
[]

Declared error codes:
[]

spaces/coupons/create

= Create coupon for space access

sessionToken
= Session token (from register / login)
spaceUUID
= Space identifier (from create / getMine)
level
= Permission level (NONE / READER / WRITER / ADMIN)


Success output:
[coupon (JSONObject)]

Declared error codes:
[INSUFFICIENT_RIGHTS (HTTP:403)]

spaces/coupons/collect

= Collect coupon for space access

sessionToken
= Session token (from register / login)
coupon
= Coupon code


Success output:
[]

Declared error codes:
[COUPON_NOT_FOUND (HTTP:400), COUPON_ALREADY_TAKEN (HTTP:400)]

spaces/coupons/revoke

= Revoke coupon for space access

sessionToken
= Session token (from register / login)
coupon
= Coupon code


Success output:
[]

Declared error codes:
[COUPON_NOT_FOUND (HTTP:400), INSUFFICIENT_RIGHTS (HTTP:403)]

data/token/create

= Grant space data access

sessionToken
= Session token (from register / login)
spaceUUID
= Space identifier (from create / getMine)
write
= Request write access (true / false)


Success output:
[dataToken (String)]

Declared error codes:
[INSUFFICIENT_RIGHTS (HTTP:403)]

data/token/revoke

= Revoke space data access

dataToken
= Data token (from data/token/create)


Success output:
[]

Declared error codes:
[]

data/json/post

= Commit JSON space data diff

dataToken
= Data token (from data/token/create)
commit
= Commit as JSON Object (e.g. {"SAMPLE_NEW_ID":{ ... }, "SAMPLE_EDIT_ID":{ ... }, "SAMPLE_DELETE_ID": null})


Success output:
[]

Declared error codes:
[INSUFFICIENT_RIGHTS (HTTP:403)]

data/json/getDiff

= Get JSON space data diff

dataToken
= Data token (from data/token/create)
since
= Known timestamp (0 or from previous call)
wait
= Wait for news (true / false)


Success output:
[diff (JSONObject), nextSince (Long)]

Declared error codes:
[]

data/json/getByIDs

= Get JSON space data by IDs

dataToken
= Data token (from data/token/create)
ids
= IDs (separated by comma)


Success output:
[diff (JSONObject)]

Declared error codes:
[]

Intro

Welcome to the POCZone.net Backend Service!

The POCZone.net Backend Service enables user authentication, space management and sharing and JSON live data access.

This software is provided AS IS with no warrenty of any kind. Please apply FAIR USE.

The source code is published in this Github Repository.

An introduction post was published at Medium.