X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=r-app-catalogue%2Fapi%2Frac-api.json;h=64f19d8244146f7e0dc41dfb26e68be8e954a665;hb=a1521d7d0dc2eb303be1049eb2012ade5ee76925;hp=3741bdd1a146c2773e9c4999b23e4f457b165868;hpb=5ada515a9b796bdcb0a78c7fd4eb3512bd21c031;p=nonrtric.git diff --git a/r-app-catalogue/api/rac-api.json b/r-app-catalogue/api/rac-api.json index 3741bdd1..64f19d82 100644 --- a/r-app-catalogue/api/rac-api.json +++ b/r-app-catalogue/api/rac-api.json @@ -1,246 +1,252 @@ { - "openapi": "3.0.0", - "info": { - "title": "rAPP Catalogue API", - "description": "The Non RT-RIC Service Catalogue provides a way for services to register themselves for other services to discover.", - "version": "1.0.0" - }, - "paths": { - "/services": { - "get": { - "summary": "Service names", - "deprecated": false, - "operationId": "getServiceNamesUsingGET", - "responses": { - "200": { - "description": "Service names", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } + "openapi": "3.0.0", + "info": { + "title": "rAPP Catalogue API", + "description": "The Non RT-RIC Service Catalogue provides a way for services to register themselves for other services to discover.", + "version": "1.0.0" + }, + "servers": [ + { + "url": "/" + } + ], + "paths": { + "/services": { + "get": { + "summary": "Services", + "deprecated": false, + "operationId": "getServices", + "responses": { + "200": { + "description": "Services", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/service" + } + } + } + } + } }, - "example": [ - "DroneIdentifier", - "Collector" + "tags": [ + "rAPP Catalogue API" ] - } } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Not used" - } }, - "tags": [ - "rAPP Catalogue API" - ] - } - }, - "/services/{serviceName}": { - "get": { - "summary": "Individual Service", - "deprecated": false, - "operationId": "getIndividualServiceUsingGET", - "responses": { - "200": { - "description": "EI Job", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/service" - } - } + "/services/{serviceName}": { + "get": { + "summary": "Individual Service", + "deprecated": false, + "operationId": "getIndividualService", + "responses": { + "200": { + "description": "Service", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/service" + } + } + } + }, + "404": { + "description": "Service is not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_information" + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "serviceName", + "description": "serviceName", + "schema": { + "type": "string" + }, + "required": true, + "example": "DroneIdentifier" + } + ], + "tags": [ + "rAPP Catalogue API" + ] + }, + "put": { + "summary": "Create or update a Service", + "deprecated": false, + "operationId": "putIndividualService", + "responses": { + "200": { + "description": "Service updated" + }, + "201": { + "description": "Service created", + "headers": { + "Location": { + "schema": { + "type": "string" + }, + "description": "URL to the created Service" + } + } + }, + "400": { + "description": "Provided service is not correct", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error_information" + }, + "example": { + "detail": "Service is missing required property: version", + "status": 400 + } + } + } + } + }, + "parameters": [ + { + "name": "serviceName", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "DroneIdentifier" + } + ], + "requestBody": { + "description": "Service to create/update", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inputService" + } + } + } + }, + "tags": [ + "rAPP Catalogue API" + ] + }, + "delete": { + "summary": "Remove a Service from the catalogue", + "deprecated": false, + "operationId": "deleteIndividualService", + "responses": { + "204": { + "description": "Service deleted" + } + }, + "parameters": [ + { + "name": "serviceName", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "DroneIdentifier" + } + ], + "tags": [ + "rAPP Catalogue API" + ] } - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Service is not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_information" + } + }, + "components": { + "schemas": { + "inputService": { + "description": "A Service to register", + "type": "object", + "title": "inputService", + "required": [ + "version" + ], + "properties": { + "version": { + "description": "Version of the Service", + "type": "string", + "example": "1.0.0" + }, + "display_name": { + "description": "Display name for the Service", + "type": "string", + "example": "Drone Identifier" + }, + "description": { + "description": "Description of the Service", + "type": "string", + "example": "Detects if a UE is a drone" + } } - } - } - } - }, - "parameters": [ - { - "in": "path", - "name": "serviceName", - "description": "serviceName", - "schema": { - "type": "string" }, - "required": true, - "example": "DroneIdentifier" - } - ], - "tags": [ - "rAPP Catalogue API" - ] - }, - "put": { - "summary": "Create or update a Service", - "deprecated": false, - "operationId": "putIndividualServiceUsingPUT", - "responses": { - "200": { - "description": "Service updated" - }, - "201": { - "description": "Service created" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Provided service is not correct", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_information" - }, - "example": { - "detail": "Service is missing required property version", - "status": 404 + "service": { + "description": "A Service", + "type": "object", + "title": "service", + "required": [ + "name", + "version", + "registrationDate" + ], + "properties": { + "name": { + "description": "Unique identifier of the Service", + "type": "string", + "example": "DroneIdentifier" + }, + "version": { + "description": "Version of the Service", + "type": "string", + "example": "1.0.0" + }, + "display_name": { + "description": "Display name for the Service", + "type": "string", + "example": "Drone Identifier" + }, + "description": { + "description": "Description of the Service", + "type": "string", + "example": "Detects if a UE is a drone" + }, + "registrationDate": { + "description": "Date when the Service was registered in the catalogue", + "type": "string", + "example": "2020-11-03" + } } - } - } - } - }, - "parameters": [ - { - "name": "serviceName", - "in": "path", - "required": true, - "schema": { - "type": "string" }, - "example": "DroneIdentifier" - } - ], - "requestBody": { - "description": "Service to create/update", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/service" - } - } - } - }, - "tags": [ - "rAPP Catalogue API" - ] - }, - "delete": { - "summary": "Remove a Service from the catalogue", - "deprecated": false, - "operationId": "deleteIndividualServiceUsingDELETE", - "responses": { - "200": { - "description": "Not used" - }, - "204": { - "description": "Job deleted" - }, - "401": { - "description": "Unauthorized" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Service is not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error_information" + "error_information": { + "description": "Problem as defined in https://tools.ietf.org/html/rfc7807", + "type": "object", + "title": "error_information", + "properties": { + "detail": { + "description": "A human-readable explanation specific to this occurrence of the problem.", + "type": "string", + "example": "Service not found" + }, + "status": { + "format": "int32", + "description": "The HTTP status code for this occurrence of the problem.", + "type": "integer", + "example": 404 + } } - } } - } - }, - "parameters": [ - { - "name": "serviceName", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "example": "DroneIdentifier" - } - ], - "tags": [ - "rAPP Catalogue API" - ] - } - } - }, - "components": { - "schemas": { - "service": { - "description": "A Service", - "type": "object", - "title": "service", - "required": [ - "version" - ], - "properties": { - "version": { - "description": "Version of the Service", - "type": "string", - "example": "1.0.0" - }, - "display_name": { - "description": "Display name for the Service", - "type": "string", - "example": "Drone Identifier" - }, - "description": { - "description": "Description of the Service", - "type": "string", - "example": "Detects if a UE is a drone" - } - } - }, - "error_information": { - "description": "Problem as defined in https://tools.ietf.org/html/rfc7807", - "type": "object", - "title": "error_information", - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem.", - "type": "string", - "example": "Service not found" - }, - "status": { - "format": "int32", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "type": "integer", - "example": 404 - } } - } } - } -} \ No newline at end of file +}