Skip to content

Latest commit

 

History

History
694 lines (383 loc) · 16.6 KB

DOCS.md

File metadata and controls

694 lines (383 loc) · 16.6 KB

Ecomapss-API v0.8.5

Documentation of ecomapss api project

Area

Create area

POST /areas

Parameters

Name Type Description
access_token String

admin access token.

nome

Area's nome.

categoria

Area's categoria.

areacol

Area's areacol.

Delete area

DELETE /areas/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve area

GET /areas/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve areas

GET /areas

Parameters

Name Type Description
access_token String

admin access token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update area

PUT /areas/:id

Parameters

Name Type Description
access_token String

admin access token.

nome

Area's nome.

categoria

Area's categoria.

areacol

Area's areacol.

AreaElemento

Create area elemento

POST /area-elementos

Parameters

Name Type Description
access_token String

admin access token.

id_area

Area elemento's id_area.

id_elemento

Area elemento's id_elemento.

Delete area elemento

DELETE /area-elementos/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve area elemento

GET /area-elementos/:id

Parameters

Name Type Description
access_token String

user access token.

Retrieve area elementos

GET /area-elementos

Parameters

Name Type Description
access_token String

user access token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update area elemento

PUT /area-elementos/:id

Parameters

Name Type Description
access_token String

admin access token.

id_area

Area elemento's id_area.

id_elemento

Area elemento's id_elemento.

Auth

Authenticate

POST /auth

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
access_token String

Master access_token.

Elemento

Create elemento

POST /elementos

Parameters

Name Type Description
access_token String

admin access token.

info

Elemento's info.

estado

Elemento's estado.

Delete elemento

DELETE /elementos/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve elemento

GET /elementos/:id

Retrieve elementos

GET /elementos

Parameters

Name Type Description
q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update elemento

PUT /elementos/:id

Parameters

Name Type Description
access_token String

admin access token.

info

Elemento's info.

estado

Elemento's estado.

Fauna

Create fauna

POST /faunas

Parameters

Name Type Description
access_token String

admin access token.

nome_popular

Fauna's nome_popular.

nome_cientifico

Fauna's nome_cientifico.

ordem

Fauna's ordem.

reino

Fauna's reino.

filo

Fauna's filo.

classe

Fauna's classe.

elemento_id

Fauna's elemento_id.

Delete fauna

DELETE /faunas/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve fauna

GET /faunas/:id

Retrieve faunas

GET /faunas

Parameters

Name Type Description
q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update fauna

PUT /faunas/:id

Parameters

Name Type Description
access_token String

admin access token.

nome_popular

Fauna's nome_popular.

nome_cientifico

Fauna's nome_cientifico.

ordem

Fauna's ordem.

reino

Fauna's reino.

filo

Fauna's filo.

classe

Fauna's classe.

elemento_id

Fauna's elemento_id.

Historia

Create historia

POST /historias

Parameters

Name Type Description
access_token String

admin access token.

titulo

Historia's titulo.

descricao

Historia's descricao.

elemento_id

Historia's elemento_id.

Delete historia

DELETE /historias/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve historia

GET /historias/:id

Retrieve historias

GET /historias

Parameters

Name Type Description
q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update historia

PUT /historias/:id

Parameters

Name Type Description
access_token String

admin access token.

titulo

Historia's titulo.

descricao

Historia's descricao.

elemento_id

Historia's elemento_id.

Mail

Create mail

POST /mail

Parameters

Name Type Description
email String

Email address to receive the password reset token.

data String

Data which contains information what will be sent.

PasswordReset

Send email

POST /password-resets

Parameters

Name Type Description
email String

Email address to receive the password reset token.

link String

Link to redirect user.

Submit password

PUT /password-resets/:token

Parameters

Name Type Description
password String

User's new password.

Verify token

GET /password-resets/:token

Regiao

Create regiao

POST /regioes

Parameters

Name Type Description
access_token String

admin access token.

cidade

Regiao's cidade.

uf

Regiao's uf.

Delete regiao

DELETE /regioes/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve regiao

GET /regioes/:id

Parameters

Name Type Description
access_token String

admin access token.

Retrieve regiaos

GET /regioes

Parameters

Name Type Description
access_token String

admin access token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update regiao

PUT /regioes/:id

Parameters

Name Type Description
access_token String

admin access token.

cidade

Regiao's cidade.

uf

Regiao's uf.

User

Create user

POST /users

Parameters

Name Type Description
access_token String

Master access_token.

email String

User's email.

password String

User's password.

name String optional

User's name.

picture String optional

User's picture.

role String optional

User's role.

Delete user

DELETE /users/:id

Parameters

Name Type Description
access_token String

User access_token.

Retrieve current user

GET /users/me

Parameters

Name Type Description
access_token String

User access_token.

Retrieve user

GET /users/:id

Retrieve users

GET /users

Parameters

Name Type Description
access_token String

User access_token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update password

PUT /users/:id/password

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
password String

User's new password.

Update user

PUT /users/:id

Parameters

Name Type Description
access_token String

User access_token.

name String optional

User's name.

picture String optional

User's picture.