From 8f141d17f3ea7720df479f4ae51b5a2e169548cb Mon Sep 17 00:00:00 2001 From: romaingimbert Date: Fri, 14 Sep 2018 14:52:20 +0200 Subject: Add API Documentation for Casablanca -update docs -update version related code -change properties MSB Change-Id: I7fb2a257ec035c53e93666d7571a2c74a0624524 Issue-ID: EXTAPI-141 Signed-off-by: romaingimbert --- docs/offeredapis/listener/markDown.md | 122 ++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 docs/offeredapis/listener/markDown.md (limited to 'docs/offeredapis/listener/markDown.md') diff --git a/docs/offeredapis/listener/markDown.md b/docs/offeredapis/listener/markDown.md new file mode 100644 index 0000000..332c6cf --- /dev/null +++ b/docs/offeredapis/listener/markDown.md @@ -0,0 +1,122 @@ +# API Listener + + + +## Overview + +### Api URL + +[Swagger UI](https://api-designer.sso.infra.ftgroup/swagger-ui/?url=https://api-designer.sso.infra.ftgroup/api/1.0/apis/aoG0EJ01Pv/swagger.json) + + +[plant UML UI](https://plantuml.rd.francetelecom.fr/proxy?fmt=svg&src=https://api-designer.sso.infra.ftgroup/api/1.0/apis/aoG0EJ01Pv/plantuml&noCache=7322.0) + +Listener API has to be implemented on the client side in order to receive notification. +Notification are received if HUB has been posted on server side. + + +### Version information +*Version* : 0.1.0_inProgress + + +### URI scheme +*Host* : serverRoot +*BasePath* : /externalapi/listener/v1 +*Schemes* : HTTPS + + +### Tags + +* Listener + + +### Produces + +* `application/json;charset=utf-8` + + + +## Resources + + +### Listener + + +#### createEvent +``` +POST /listener +``` + + +##### Description +The create event is used by the seller to trigger (POST) a notification to the buyer. The buyer has previously subscribed to receive notification + +Specific business errors for current operation will be encapsulated in + +HTTP Response 422 Unprocessable entity + + +##### Parameters + +|Type|Name|Schema| +|---|---|---| +|**Body**|**event**
*required*|[Listener](#listener)| + + +##### Responses + +|HTTP Code|Description|Schema| +|---|---|---| +|**201**|Success|[Listener](#listener)| +|**400**|Bad Request

List of supported error codes:
- 20: Invalid URL parameter value
- 21: Missing body
- 22: Invalid body
- 23: Missing body field
- 24: Invalid body field
- 25: Missing header
- 26: Invalid header value
- 27: Missing query-string parameter
- 28: Invalid query-string parameter value|[ErrorRepresentation](#errorrepresentation)| +|**401**|Unauthorized

List of supported error codes:
- 40: Missing credentials
- 41: Invalid credentials
- 42: Expired credentials|[ErrorRepresentation](#errorrepresentation)| +|**403**|Forbidden

List of supported error codes:
- 50: Access denied
- 51: Forbidden requester
- 52: Forbidden user
- 53: Too many requests|[ErrorRepresentation](#errorrepresentation)| +|**422**|Unprocessable entity

Functional error|[ErrorRepresentation](#errorrepresentation)| +|**500**|Internal Server Error

List of supported error codes:
- 1: Internal error|[ErrorRepresentation](#errorrepresentation)| +|**503**|Service Unavailable

List of supported error codes:
- 5: The service is temporarily unavailable
- 6: Orange API is over capacity, retry later !|[ErrorRepresentation](#errorrepresentation)| + + +##### Consumes + +* `application/json;charset=utf-8` + + +##### Produces + +* `application/json;charset=utf-8` + + + +## Definitions + + +### ErrorRepresentation + +|Name|Schema| +|---|---| +|**@schemaLocation**
*optional*|string| +|**@type**
*optional*|string| +|**code**
*required*|integer (int32)| +|**message**
*optional*|string| +|**reason**
*optional*|string| +|**referenceError**
*optional*|string| +|**status**
*optional*|integer (int32)| + + + +### EventType +*Type* : enum (ServiceOrderCreationNotification, ServiceOrderStateChangeNotification, ServiceOrderItemStateChangeNotification) + + + +### Listener +An event will be triggered for each time a notification is send to a listener. + + +|Name|Description|Schema| +|---|---|---| +|**event**
*required*|An event representation is the payload of information send with the notification; it will feature event attributes + summary view of the resource.|object| +|**eventDate**
*required*||string (date-time)| +|**eventId**
*required*|id of the event|string| +|**eventType**
*required*||[EventType](#eventtype)| + -- cgit 1.2.3-korg