Skip to content

cartologic/api

This branch is 35 commits ahead of map-egypt/api:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6a3d71d · Sep 16, 2024
Nov 17, 2016
Dec 1, 2020
Dec 7, 2020
Dec 7, 2020
Apr 7, 2017
Aug 9, 2020
Nov 11, 2016
Jul 27, 2020
Nov 17, 2016
Sep 16, 2024
Oct 24, 2016
Nov 17, 2016
Oct 4, 2020
Nov 14, 2016
Nov 14, 2016
Aug 9, 2020
Sep 16, 2020
Oct 14, 2020
Oct 7, 2020
Nov 15, 2016

Repository files navigation

Map Egypt Api

Reference

Routes

/projects

  • GET: Returns all projects. Providing a valid token with the request will return private projects. Providing a token with edit access will also return projects with draft status.
  • POST: Create a new project. Requires a name property in the payload, everything else is optional. Requires a valid token with edit access.

/projects/:id

  • GET: Returns the project with the provided id. Requires the proper tokens as noted above for accessing private or draft projects.
  • PUT: Update the project with the provided id. Requires a valid token with edit access.
  • DELETE: Update the project with the provided id. Requires a valid token with edit access.

/indicators

  • GET: Returns all indicators. Providing a valid token with the request will return private indicators. Providing a token with edit access will also return indicators with draft status.
  • POST: Create a new indicator. Requires a name property in the payload, everything else is optional. Requires a valid token with edit access.

/indicators/:id

  • GET: Returns the indicators with the provided id. Requires the proper tokens as noted above for accessing private or draft indicators.
  • PUT: Update the indicators with the provided id. Requires a valid token with edit access.
  • DELETE: Update the indicators with the provided id. Requires a valid token with edit access.

Authorization

To access certain routes, a valid JSON Web Token must be provided in the request header:

Authorization=[TOKEN]

Local Development

Testing

Requirements

  • Node v6
  • Yarn
  • Local Postgres 9.4+ running on localhost (default settings: username postgres, no password, port 5432)

Steps

  • Clone this repo
  • yarn to install dependencies
  • yarn test to run the tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.9%
  • Other 1.1%