Skip to content

DA-ETSIINF/daetsiinf-printing-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DAETSIINF PRINTING

Rails JSON API used as backend for the Student Nation of the Computer Science School UPM printing system.

Endpoints

List of endpoints and documentation related to them:

Endpoint Method Definition
1 /users POST Creates a user
2 /folders POST Creates a folder
3 /documents POST Creates a document
4 /sessions POST Logs in a user

There are certain headers that need to be included in the requests in order to obtain a succesfull answer from the API:

Accept: vnd.daetsiinf_printing.v1
Content-type: application/json

In some circumstances an Authorization header needs to be included in order to verify the user authenticity:

Authorization: <USER_AUTH_TOKEN>

Creating a user.

To create a user we need to issue a POST request to /users with the following body:

{
	"user": {
		"name": "FULL NAME",
		"email": "VALID EMAIL",
		"password": "PASSWORD",
		"password_confirmation": "PASSWORD"
	}
}

This requests returns a new user with all the shared folders and documents, like following:

{
  "id": 1,
  "name": "FULL NAME",
  "email": "VALID EMAIL",
  "auth_token": "USER_AUTH_TOKEN",
  "balance": 0,
  "folders": [],
  "documents": []
}

Creating a folder.

Creating a document.

Logging a user.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published