mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Updated REST README.md
This commit is contained in:
		| @@ -5,17 +5,25 @@ The scheme for the rest api is the following: | ||||
|  | ||||
| | Url | Methods  | Function | | ||||
| |---|---|---| | ||||
| | api/rest/{entity}.{format} | HEAD |    Returns the create information for a specific entity | | ||||
| | api/rest/{entity}.{format} | POST | Creates a specific entity and returns it.  | | ||||
| | api/rest/{entity}/{uri}.{format} | GET |    Returns a specific entity. Including all actions | | ||||
| | api/rest/{entity}/{uri}/{action}.{format} | GET | Returns the output for an action of an specific entity. | | ||||
| | api/rest/{entity}/{uri}.{format} | PUT, PATCH | Updates a specific entity and returns it. | | ||||
| | api/rest/{entity}/{uri}.{format} | DELETE | Deletes a specific entity| | ||||
| | /{locale}/api/rest/{layer}.{format} | GET |    Returns the create information for an specific entity | | ||||
| | /{locale}/api/rest/{layer}.{format} | POST | Creates a specific entity and returns it.  | | ||||
| | /{locale}/api/rest/{layer}/{uri}.{format} | GET |    Returns a specific entity. Including all actions | | ||||
| |  /{locale}/api/rest/{layer}/{uri}.{format} | PUT, PATCH | Updates a specific entity and returns it. | | ||||
| | /{locale}/api/rest/{layer}/{uri}.{format} | DELETE | Deletes a specific entity| | ||||
|  | ||||
| If an concrete entity doesn't implement an method it should redirect to the connected entity which is responsible for this method. | ||||
| If an layer of an entity doesn't implement an method it should redirect to the connected (source) entity which is responsible for this method. | ||||
| ### Optional GET Parameters | ||||
| | Parameter | Type | Layer | Description | Standart | | ||||
| |-----------|---------|--------|-----------------------------------------------------------|----------------------------| | ||||
| | version | integer | All | Which version of an entity should be used to be processed | The newest version | | ||||
| | class | string | Source | Which class should be used for creation of an entity | The class of the entity | | ||||
| | action | string | All | Which action should be used for an layer. | All possible actions | | ||||
| | schema | boolean | All | Shows the schema of an entity.  | No Schema will be returned | | ||||
|  | ||||
| ### Methods | ||||
| In the future it would make sense to implement [more methods](https://de.wikipedia.org/wiki/Representational_State_Transfer#Umsetzung). | ||||
|  | ||||
| ### Formats | ||||
| The standard format of an entity MUST be JSON. | ||||
|  | ||||
| ## Workflow | ||||
|   | ||||
		Reference in New Issue
	
	Block a user