This is a basic REST API on PHP
HOST/API/log
POST
Data needed:
- password
Token needed for future requests
HOST/API/user
POST
To Create a user, you'd to take to account the next data needed:
- name (letters only)
- last name (letters only)
- password (alphanumeric only)
- role (numbers from 1 to 5, which means 1 for the basic role and 5 for the high)
HOST/API/post
POST
To Create a post, you'd to take to account the next data needed:
- Token
- Title (alphanumeric only)
- Description (alphanumeric only)
- basic: only access
- medium: access and query permission
- high medium: access and insert permission
- medium high: CRUD permisions except delete
- high: CRUD permission
HOST/API/post
DELETE
To delete a post, you'd to take to account the next data needed:
- Token
- id
HOST/API/post
PUT
To update a post, you'd to take to account the next data needed:
- Token
- id
- title
- description
HOST/API/post
GET
To get all posts, you'd to take to account the next data needed:
- Token
- basic: only access
- medium: access and query permission
- high medium: access and insert permission
- medium high: CRUD permisions except delete
- high: CRUD permission