{ "swagger": "2.0", "info": { "description": "TMF637 Product Inventory Management", "version": "2.0.0", "title": "Product Inventory Management" }, "basePath": "/productInventoryManagement/v2/", "schemes": [ "http", "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ { "name": "product" }, { "name": "eventsSubscription" } ], "paths": { "/product": { "post": { "tags": [ "product" ], "parameters": [ { "name": "product", "required": true, "in": "body", "description": "", "schema": { "$ref": "#/definitions/Product" } } ], "operationId": "productCreate", "summary": "Create a product entity", "deprecated": false, "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/Product" } }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "get": { "tags": [ "product" ], "parameters": [ { "name": "fields", "required": false, "in": "query", "description": "Attributes selection", "type": "string" } ], "operationId": "productFind", "summary": "This operation lists all product entites", "deprecated": false, "responses": { "200": { "description": "Success", "schema": { "type": "array", "items": { "$ref": "#/definitions/Product" } } }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/product/{id}": { "get": { "tags": [ "product" ], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "description": "identity of the product" }, { "name": "fields", "required": false, "in": "query", "description": "Attributes selection", "type": "string" } ], "operationId": "productGet", "summary": "This operation retrives a product entity", "deprecated": false, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Product" } }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "patch": { "tags": [ "product" ], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "description": "identity of the product" }, { "name": "product", "required": true, "in": "body", "description": "", "schema": { "$ref": "#/definitions/Product" } } ], "operationId": "productPatch", "summary": "This operation patches a product entity", "deprecated": false, "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Product" } }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "tags": [ "product" ], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "description": "identity of the product" } ], "operationId": "productDelete", "summary": "This operation deletes a product entity", "deprecated": false, "responses": { "204": { "description": "Success" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/hub": { "post": { "tags": [ "eventsSubscription" ], "operationId": "registerSubscriber", "summary": "Register a subscriber", "deprecated": false, "parameters": [ { "name": "data", "schema": { "$ref": "#/definitions/EventSubscriptionInput" }, "required": true, "in": "body", "description": "Data containing the callback endpoint to deliver the information" } ], "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/hub/{id}": { "delete": { "tags": [ "eventsSubscription" ], "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "description": "identity of the subscriber" } ], "operationId": "deleteSubscriber", "summary": "This operation deletes a 'subscriber' by Id", "deprecated": false, "responses": { "204": { "description": "Success" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } } }, "definitions": { "Product": { "description": "A Product represents the subscription of a ProductOffering by a Party playing a PartyRole, such as a Customer.", "required": [ "id" ], "type": "object", "properties": { "id": { "description": "Unique identifier of the product", "type": "string" }, "href": { "description": "Reference of the product", "type": "string" }, "@baseType": { "description": "Indicates the base type of the resource. Here can be 'Product'", "type": "string" }, "@type": { "description": "Indicated the type of resource.", "type": "string" }, "@schemaLocation": { "description": "A link to the schema describing this REST resource.", "type": "string" }, "productOffering": { "$ref": "#/definitions/ProductOfferingRef" }, "characteristic": { "type": "array", "items": { "$ref": "#/definitions/ProductCharacteristic" } }, "realizingService": { "type": "array", "items": { "$ref": "#/definitions/RealizingService" } }, "balance": { "type": "array", "items": { "$ref": "/balanceManagement/v1#definition/AccumulatedBalance" } } } }, "ProductOfferingRef": { "description": "ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.", "required": [ "id" ], "type": "object", "properties": { "id": { "description": "Unique identifier of the product offering", "type": "string" }, "href": { "description": "Reference of the product offering", "type": "string" }, "name": { "description": "Name of the product offering", "type": "string" } } }, "ProductCharacteristic": { "description": "Characteristics of the product to instantiate or to modify.", "type": "object", "properties": { "name": { "description": "Name of the characteristic", "type": "string" }, "value": { "description": "Value of the characteristic", "type": "string" }, "@type": { "description": "Indicates the (class) type of resource", "type": "string" }, "@schemaLocation": { "description": "This field provided a link to the schema describing this REST resource.", "type": "string" } } }, "RealizingService": { "description": "RealizingService reference. RealizingService is a link to the service that realizes the product.", "required": [ "id" ], "type": "object", "properties": { "id": { "description": "Unique identifier of the service", "type": "string" }, "href": { "description": "Reference of the service", "type": "string" } } }, "EventSubscriptionInput": { "type": "object", "description": "Sets the communication endpoint address the service instance must use to deliver notification information", "required": [ "callback" ], "properties": { "callback": { "type": "string", "description": "The callback being registered." }, "query": { "type": "string", "description": "additional data to be passed" } } } } }