Update of EI Data Producer API
[nonrtric.git] / enrichment-coordinator-service / api / ecs-api.json
index 79ab5d3..6d2f0fa 100644 (file)
@@ -20,7 +20,7 @@
                 "description": "request",
                 "required": true
             }],
-            "tags": ["Producer Callbacks"],
+            "tags": ["Data Producer Job Control (example producer)"],
             "consumes": ["application/json"]
         }},
         "/A1-EI/v1/eitypes/{eiTypeId}": {"get": {
@@ -77,7 +77,7 @@
                     "required": true
                 }
             ],
-            "tags": ["Consumer Callbacks"],
+            "tags": ["A1-EI (enrichment information) callbacks"],
             "consumes": ["application/json"]
         }},
         "/ei-producer/v1/eitypes": {"get": {
@@ -97,7 +97,7 @@
                 "403": {"description": "Forbidden"},
                 "404": {"description": "Not Found"}
             },
-            "tags": ["Enrichment Data Producer API"]
+            "tags": ["Data Producer Registry API"]
         }},
         "/A1-EI/v1/eitypes": {"get": {
             "summary": "EI type identifiers",
                 "type": "string",
                 "required": true
             }],
-            "tags": ["Enrichment Data Producer API"]
+            "tags": ["Data Producer Registry API"]
         }},
         "/producer_simulator/ei_job/{eiJobId}": {"delete": {
             "summary": "Callback for EI job deletion",
                 "type": "string",
                 "required": true
             }],
-            "tags": ["Producer Callbacks"]
+            "tags": ["Data Producer Job Control (example producer)"]
         }},
         "/ei-producer/v1/eiproducers": {"get": {
             "summary": "EI producer identifiers",
                 "403": {"description": "Forbidden"},
                 "404": {"description": "Not Found"}
             },
-            "tags": ["Enrichment Data Producer API"]
-        }},
-        "/ei-producer/v1/eitypes/{eiTypeId}": {"get": {
-            "summary": "Individual EI type",
-            "deprecated": false,
-            "produces": ["application/json"],
-            "operationId": "getEiTypeUsingGET_1",
-            "responses": {
-                "200": {
-                    "schema": {"$ref": "#/definitions/producer_ei_type_info"},
-                    "description": "EI type"
-                },
-                "401": {"description": "Unauthorized"},
-                "403": {"description": "Forbidden"},
-                "404": {
-                    "schema": {"$ref": "#/definitions/ProblemDetails"},
-                    "description": "Enrichment Information type is not found"
-                }
-            },
             "parameters": [{
-                "in": "path",
-                "name": "eiTypeId",
-                "description": "eiTypeId",
+                "in": "query",
+                "allowEmptyValue": false,
+                "name": "ei_type_id",
+                "description": "If given, only the producers for the EI Data type is returned.",
                 "type": "string",
-                "required": true
+                "required": false
             }],
-            "tags": ["Enrichment Data Producer API"]
+            "tags": ["Data Producer Registry API"]
         }},
+        "/ei-producer/v1/eitypes/{eiTypeId}": {
+            "get": {
+                "summary": "Individual EI type",
+                "deprecated": false,
+                "produces": ["application/json"],
+                "operationId": "getEiTypeUsingGET_1",
+                "responses": {
+                    "200": {
+                        "schema": {"$ref": "#/definitions/producer_ei_type_info"},
+                        "description": "EI type"
+                    },
+                    "401": {"description": "Unauthorized"},
+                    "403": {"description": "Forbidden"},
+                    "404": {
+                        "schema": {"$ref": "#/definitions/ProblemDetails"},
+                        "description": "Enrichment Information type is not found"
+                    }
+                },
+                "parameters": [{
+                    "in": "path",
+                    "name": "eiTypeId",
+                    "description": "eiTypeId",
+                    "type": "string",
+                    "required": true
+                }],
+                "tags": ["Data Producer Registry API"]
+            },
+            "delete": {
+                "summary": "Individual EI type",
+                "deprecated": false,
+                "produces": ["application/json"],
+                "operationId": "deleteEiTypeUsingDELETE",
+                "responses": {
+                    "200": {"description": "Not used"},
+                    "401": {"description": "Unauthorized"},
+                    "204": {"description": "Producer deleted"},
+                    "403": {"description": "Forbidden"},
+                    "404": {
+                        "schema": {"$ref": "#/definitions/ProblemDetails"},
+                        "description": "Enrichment Information type is not found"
+                    },
+                    "406": {
+                        "schema": {"$ref": "#/definitions/ProblemDetails"},
+                        "description": "The Enrichment Information type has one or several active producers"
+                    }
+                },
+                "parameters": [{
+                    "in": "path",
+                    "name": "eiTypeId",
+                    "description": "eiTypeId",
+                    "type": "string",
+                    "required": true
+                }],
+                "tags": ["Data Producer Registry API"]
+            },
+            "put": {
+                "summary": "Individual EI type",
+                "deprecated": false,
+                "produces": ["application/json"],
+                "operationId": "putEiTypeUsingPUT",
+                "responses": {
+                    "200": {
+                        "schema": {"type": "object"},
+                        "description": "OK"
+                    },
+                    "201": {"description": "Created"},
+                    "401": {"description": "Unauthorized"},
+                    "403": {"description": "Forbidden"},
+                    "404": {"description": "Not Found"}
+                },
+                "parameters": [
+                    {
+                        "in": "path",
+                        "name": "eiTypeId",
+                        "description": "eiTypeId",
+                        "type": "string",
+                        "required": true
+                    },
+                    {
+                        "schema": {"$ref": "#/definitions/producer_ei_type_info"},
+                        "in": "body",
+                        "name": "registrationInfo",
+                        "description": "registrationInfo",
+                        "required": true
+                    }
+                ],
+                "tags": ["Data Producer Registry API"],
+                "consumes": ["application/json"]
+            }
+        },
         "/status": {"get": {
             "summary": "Returns status and statistics of this service",
             "deprecated": false,
                     "type": "string",
                     "required": true
                 }],
-                "tags": ["Enrichment Data Producer API"]
+                "tags": ["Data Producer Registry API"]
             },
             "delete": {
                 "summary": "Individual EI producer",
                     "type": "string",
                     "required": true
                 }],
-                "tags": ["Enrichment Data Producer API"]
+                "tags": ["Data Producer Registry API"]
             },
             "put": {
                 "summary": "Individual EI producer",
                         "required": true
                     }
                 ],
-                "tags": ["Enrichment Data Producer API"],
+                "tags": ["Data Producer Registry API"],
                 "consumes": ["application/json"]
             }
         },
                 "403": {"description": "Forbidden"},
                 "404": {"description": "Not Found"}
             },
-            "tags": ["Producer Callbacks"]
+            "tags": ["Data Producer Job Control (example producer)"]
         }},
         "/ei-producer/v1/eiproducers/{eiProducerId}/eijobs": {"get": {
             "summary": "EI job definitions",
                 "type": "string",
                 "required": true
             }],
-            "tags": ["Enrichment Data Producer API"]
+            "tags": ["Data Producer Registry API"]
         }},
         "/A1-EI/v1/eijobs": {"get": {
             "summary": "EI job identifiers",
             "type": "object",
             "title": "EiTypeObject"
         },
-        "producer_ei_type_registration_info": {
-            "description": "Information for an EI type",
-            "type": "object",
-            "title": "producer_ei_type_registration_info",
-            "required": ["ei_type_identity"],
-            "properties": {
-                "ei_type_identity": {
-                    "description": "EI type identity",
-                    "type": "string"
-                },
-                "ei_job_data_schema": {
-                    "description": "Json schema for the job data",
-                    "type": "object"
-                }
-            }
-        },
         "status_info": {
             "type": "object",
             "title": "status_info",
             "description": "Information for an EI type",
             "type": "object",
             "title": "producer_ei_type_info",
-            "properties": {
-                "ei_producer_ids": {
-                    "description": "Registered producers",
-                    "type": "array",
-                    "items": {"type": "string"}
-                },
-                "ei_job_data_schema": {
-                    "description": "Json schema for the job data",
-                    "type": "object"
-                }
-            }
+            "properties": {"ei_job_data_schema": {
+                "description": "Json schema for the job data",
+                "type": "object"
+            }}
         },
         "producer_registration_info": {
             "description": "Information for an EI producer",
             ],
             "properties": {
                 "supported_ei_types": {
-                    "description": "Supported EI types",
+                    "description": "Supported EI type IDs",
                     "type": "array",
-                    "items": {"$ref": "#/definitions/producer_ei_type_registration_info"}
+                    "items": {"type": "string"}
                 },
                 "ei_producer_supervision_callback_url": {
                     "description": "callback for producer supervision",
             "description": "Consumer Controller"
         },
         {
-            "name": "Consumer Callbacks",
+            "name": "A1-EI (enrichment information) callbacks",
             "description": "Consumer Simulator Controller"
         },
         {
-            "name": "Enrichment Data Producer API",
-            "description": "Producer Controller"
+            "name": "Data Producer Job Control (example producer)",
+            "description": "Producer Simulator Controller"
         },
         {
-            "name": "Producer Callbacks",
-            "description": "Producer Simulator Controller"
+            "name": "Data Producer Registry API",
+            "description": "Producer Controller"
         },
         {
             "name": "Service status",