The API allows the 3rd parties to manage their objects in Open Community Map (OCM) platform.
Currently the access is restricted for registered parters only.
Use the access token as query parameter to identify yourself.
https://communitymap.online/api/v0/object/12345?token=<your_token>
HTTP POST request with JSON content. Fields:
- type - string, mandatory, currently supported ones: chat, help, offer, place
- title - mandatory
- short_description - optional, if exists will be shown on map when mouse is hovering over object
- description - if missing, title will be used
- loc - object: {latitude: number, longitude: number}
- logoURL - optional, if exists, will be shown on map
- url - optional, external link to object's website or page in partner platform
- external_data - optional, some blackbox data stored by 3rd party
Returns the created object with id.
curl -v \
-X POST \
-H "Content-Type: application/json" \
-d '{"title":"Hello","description":"Great news!","loc":{"latitude":42.690603279,"longitude":23.3219472837},"type":"chat"}' \
'https://communitymap.online/api/v0/object?token=<your_token>'
HTTP PUT request with same structure as in Add, id is specified in the URL. You can modify only the objects created by you.
Returns the modified object.
curl -v \
-X PUT \
-H "Content-Type: application/json" \
-d '{"title":"Hello","description":"More great news!","loc":{"latitude":42.690603279,"longitude":23.3219472837},"type":"chat"}' \
'https://communitymap.online/api/v0/object/A9NSU6tja06Ne211JwzLfGt?token=<your_token>'
HTTP DELETE request with id in the url. You can delete only the objects created by you.
curl -v \
-X DELETE \
'https://communitymap.online/api/v0/object/A9NSU6tja06Ne211JwzLfGt?token=<your_token>'
HTTP GET request returing list of objects sorted by id. The query parameters allow to control:
- origin - filter objects for given origin only, optional
- offset - data offset, used when loading data on chunks or pages; optional, default: 0
- size - max number of items in result set; optional, default: 10
curl -v \
-X GET \
'https://communitymap.online/api/v0/object?token=<your_token>&origin=testOrigin'
HTTP GET request with object id in the URL. You can currently read any object existing in the platform.
curl -v \
-X GET \
'https://communitymap.online/api/v0/object/A9NSU6tja06Ne211JwzLfGt?token=<your_token>'