Create News
POST/news
This operation allows to create a News
Request
- application/json
Body
news to create
Possible values: non-empty
, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
start date of the news
Possible values: non-empty
, Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$
end date of the news
Possible values: Value must match regular expression \S
event Type
Possible values: Value must match regular expression \S
informations about the news
Possible values: [ACTIVE
, DESACTIVE
]
news state
Responses
- 201
- 400
- 401
- 403
- 500
created
- application/json
- Schema
- Example (from schema)
Schema
Possible values: Value must match regular expression [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
news id
start date of the news
end date of the news
event Type
informations about the news
Possible values: [ACTIVE
, DESACTIVE
]
news state
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dateStart": "2022-03-10",
"dateEnd": "2022-03-10",
"eventType": "string",
"information": "string",
"status": "ACTIVE"
}
bad request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
bad request code
bad request message
bad request status
bad request title
violations
object[]
bad request violations
violated field name
error message
{
"code": 0,
"message": "string",
"status": 0,
"title": "string",
"violations": [
{
"field": "string",
"message": "string"
}
]
}
unauthorized access
- application/json
- Schema
- Example (from schema)
Schema
error code
error message
error description
{
"code": 0,
"message": "string",
"description": "string"
}
forbidden access
- application/json
- Schema
- Example (from schema)
Schema
error code
error message
error description
{
"code": 0,
"message": "string",
"description": "string"
}
internal error
- application/json
- Schema
- Example (from schema)
Schema
error code
error message
error description
{
"code": 0,
"message": "string",
"description": "string"
}