
[[_paths]]
== Paths

[[_createstate]]
=== Create state
....
POST /state
....


==== Description
Return state


==== Parameters

[options="header", cols=".^2a,.^3a,.^9a,.^4a"]
|===
|Type|Name|Description|Schema
|**Path**|**oldState** +
__required__|Old State as raw string|enum (ADDED, REMOVED, CHANGED)
|**Body**|**StateModel** +
__optional__|State as enum in object|<<_createstate_statemodel,StateModel>>
|===

[[_createstate_statemodel]]
**StateModel**

[options="header", cols=".^3a,.^11a,.^4a"]
|===
|Name|Description|Schema
|**integerValue** +
__optional__|**Example** : `2`|enum (2, 3, 4, 5, 6, 7, 11, 16)
|**value** +
__optional__|State value +
**Example** : `"ADDED"`|enum (ADDED, REMOVED, CHANGED)
|===


==== Responses

[options="header", cols=".^2a,.^14a,.^4a"]
|===
|HTTP Code|Description|Schema
|**200**|OK|enum (ADDED, REMOVED, CHANGED)
|**500**|Internal server error|enum (2, 3, 4, 5, 6, 7, 11, 16)
|===


==== Consumes

* `application/json`


==== Produces

* `\*/*`


==== Example HTTP request

===== Request path
----
/state
----


===== Request body
[source,json]
----
{
  "value" : "ADDED",
  "integerValue" : 2
}
----


==== Example HTTP response

===== Response 200
[source,json]
----
"ADDED"
----


===== Response 500
[source,json]
----
2
----



