diff --git a/.jenkins.sh b/.jenkins.sh index b24a061fa1ac77a29232f06a9034dd755a41bbc4..448356cdee9aedf84853be89c4f39bbb1353304d 100644 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -1,17 +1,18 @@ #!/bin/bash -specfiles=$(ls | egrep -i "^Mp1.(json|yaml)") +specfiles=$(ls | egrep "^[^.]*.(json|yaml)") fres=0 for i in $specfiles ; do - echo "-- Validating OpenAPI file $i..." - swagger-tools validate $i - res=$? - fres=$(($fres||$res)) - echo -e "-- Validator returned $res.\n" + echo "-- Validating and linting OpenAPI file $i..." + swagger-cli validate "$i" + res=$? + speccy lint "$i" + res2=$? + fres=$(($fres||$res||$res2)) + echo "--- Validator returned $res, linter returned $res2." done -echo "-- Final validator returns $fres." - -exit $fres +echo "-- Final validation returns $fres." +exit $fres \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..3b664107303df336bab8010caad42ddaed24550e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "git.ignoreLimitWarning": true +} \ No newline at end of file diff --git a/COPYRIGHT b/COPYRIGHT deleted file mode 100644 index 8574ed434584939d76e5e9d9f1132bd9434ad65e..0000000000000000000000000000000000000000 --- a/COPYRIGHT +++ /dev/null @@ -1,14 +0,0 @@ -ETSI FORGE COPYRIGHT STATEMENT - -Copyright (c) ETSI 2017. - -This software is subject to copyrights owned by ETSI. Non-exclusive permission -is hereby granted, free of charge, to copy, reproduce and amend this file -under the following conditions: It is provided "as is", without warranty of any -kind, expressed or implied. - -ETSI shall never be liable for any claim, damages, or other liability arising -from its use or inability of use.This permission does not apply to any documentation -associated with this file for which ETSI keeps all rights reserved. The present -copyright notice shall be included in all copies of whole or part of this -software and shall not imply any sub-license right. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4436d6da4c55a84b9f62a8002984f854ba472fa6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +Copyright 2019 ETSI + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Mp1.json b/MecAppSupportApi.json similarity index 58% rename from Mp1.json rename to MecAppSupportApi.json index 431733496fc0a6bfd27f11be83baf179a1c51dc3..239e374faaaebf0bd60138a774b6d58c87e15271 100644 --- a/Mp1.json +++ b/MecAppSupportApi.json @@ -2,67 +2,67 @@ "openapi": "3.0.2", "servers": [ { - "url": "http://127.0.0.1:8081/mp1/v1" + "url": "http://127.0.0.1:8081/mec_app_support/v1" }, { - "url": "https://127.0.0.1:8081/mp1/v1" + "url": "https://127.0.0.1:8081/mec_app_support/v1" } ], "info": { - "title": "Mp1 API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI", + "title": "MEC Application Support API", + "version": "2.1.1", + "description": "The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI", "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" + "name": "BSD-3-Clause", + "url": "https://forge.etsi.org/legal-matters" }, "contact": { "email": "cti_support@etsi.org" } }, "externalDocs": { - "description": "ETSI GS MEC011 Application Enablement API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf" + "description": "ETSI GS MEC011 Application Enablement API, V2.1.1", + "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf" }, "tags": [ { - "name": "trafficRules" + "name": "appTrafficRules" }, { - "name": "dnsRules" + "name": "appDnsRules" }, { - "name": "subscriptions" + "name": "appSubscriptions" }, { - "name": "services" + "name": "appConfirmTermination" }, { - "name": "timing" + "name": "appConfirmReady" }, { - "name": "transports" + "name": "timing" }, { "name": "callbacks" } ], "paths": { - "/applications/{appInstanceId}/dns_rules": { + "/applications/{appInstanceId}/traffic_rules": { "parameters": [ { "$ref": "#/components/parameters/Path.AppInstanceId" } ], "get": { - "description": "This method retrieves information about all the DNS rules associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRules_GET", + "description": "This method retrieves information about all the traffic rules associated with a MEC application instance.", + "operationId": "ApplicationsTrafficRules_GET", "tags": [ - "trafficRules" + "appTrafficRules" ], "responses": { "200": { - "$ref": "#/components/responses/ApplicationsDnsRules.200" + "$ref": "#/components/responses/ApplicationsTrafficRules.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -76,24 +76,24 @@ } } }, - "/applications/{appInstanceId}/dns_rules/{dnsRuleId}": { + "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": { "parameters": [ { "$ref": "#/components/parameters/Path.AppInstanceId" }, { - "$ref": "#/components/parameters/Path.DnsRuleId" + "$ref": "#/components/parameters/Path.TrafficRuleId" } ], "get": { - "description": "This method retrieves information about a DNS rule associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRule_GET", + "description": "This method retrieves information about all the traffic rules associated with a MEC application instance.", + "operationId": "ApplicationsTrafficRule_GET", "tags": [ - "dnsRules" + "appTrafficRules" ], "responses": { "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" + "$ref": "#/components/responses/ApplicationsTrafficRule.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -107,14 +107,14 @@ } }, "put": { - "description": "This method activates, de-activates or updates a traffic rule.", - "operationId": "ApplicationsDnsRule_PUT", + "description": "This method retrieves information about all the traffic rules associated with a MEC application instance.", + "operationId": "ApplicationsTrafficRule_PUT", "tags": [ - "dnsRules" + "appTrafficRules" ], "responses": { "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" + "$ref": "#/components/responses/ApplicationsTrafficRule.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -130,46 +130,25 @@ } }, "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsDnsRule" + "$ref": "#/components/requestBodies/ApplicationsTrafficRule" } } }, - "/applications/{appInstanceId}/subscriptions": { + "/applications/{appInstanceId}/dns_rules": { "parameters": [ { "$ref": "#/components/parameters/Path.AppInstanceId" } ], "get": { - "description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.", - "operationId": "ApplicationsSubscriptions_GET", + "description": "This method retrieves information about all the DNS rules associated with a MEC application instance.", + "operationId": "ApplicationsDnsRules_GET", "tags": [ - "subscriptions" + "appDnsRules" ], "responses": { "200": { - "$ref": "#/components/responses/ApplicationsSubscriptions.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "post": { - "description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the mobile edge service availability notifications. Upon success, the response contains entity body describing the created subscription.", - "operationId": "ApplicationsSubscriptions_POST", - "tags": [ - "subscriptions" - ], - "responses": { - "201": { - "$ref": "#/components/responses/ApplicationsSubscriptions.201" + "$ref": "#/components/responses/ApplicationsDnsRules.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -180,41 +159,27 @@ "404": { "$ref": "#/components/responses/Error.404" } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsSubscriptions" - }, - "callbacks": { - "appTerminationNotification": { - "$ref": "#/components/callbacks/AppTerminationNotification" - }, - "serviceAvailabilityNotification": { - "$ref": "#/components/callbacks/ServiceAvailabilityNotification" - } } } }, - "/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}": { + "/applications/{appInstanceId}/dns_rules/{dnsRuleId}": { "parameters": [ { "$ref": "#/components/parameters/Path.AppInstanceId" }, { - "$ref": "#/components/parameters/Path.SubscriptionType" - }, - { - "$ref": "#/components/parameters/Path.SubscriptionId" + "$ref": "#/components/parameters/Path.DnsRuleId" } ], "get": { - "description": "The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.", - "operationId": "ApplicationsSubscription_GET", + "description": "This method retrieves information about a DNS rule associated with a MEC application instance.", + "operationId": "ApplicationsDnsRule_GET", "tags": [ - "subscriptions" + "appDnsRules" ], "responses": { "200": { - "$ref": "#/components/responses/ApplicationsSubscription.200" + "$ref": "#/components/responses/ApplicationsDnsRule.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -227,40 +192,15 @@ } } }, - "delete": { - "description": "This method deletes a meMp1Subscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure.", - "operationId": "ApplicationsSubscription_DELETE", - "tags": [ - "subscriptions" - ], - "responses": { - "204": { - "description": "No Content" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/traffic_rules": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRules_GET", + "put": { + "description": "This method activates, de-activates or updates a traffic rule.", + "operationId": "ApplicationsDnsRule_PUT", "tags": [ - "trafficRules" + "appDnsRules" ], "responses": { "200": { - "$ref": "#/components/responses/ApplicationsTrafficRules.200" + "$ref": "#/components/responses/ApplicationsDnsRule.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -270,28 +210,31 @@ }, "404": { "$ref": "#/components/responses/Error.404" + }, + "412": { + "$ref": "#/components/responses/Error.412" } + }, + "requestBody": { + "$ref": "#/components/requestBodies/ApplicationsDnsRule" } } }, - "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": { + "/applications/{appInstanceId}/subscriptions": { "parameters": [ { "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.TrafficRuleId" } ], "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_GET", + "description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.", + "operationId": "ApplicationsSubscriptions_GET", "tags": [ - "trafficRules" + "appSubscriptions" ], "responses": { "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" + "$ref": "#/components/responses/ApplicationsSubscriptions.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -304,15 +247,15 @@ } } }, - "put": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_PUT", + "post": { + "description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription.", + "operationId": "ApplicationsSubscriptions_POST", "tags": [ - "trafficRules" + "appSubscriptions" ], "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" + "201": { + "$ref": "#/components/responses/ApplicationsSubscriptions.201" }, "400": { "$ref": "#/components/responses/Error.400" @@ -322,37 +265,36 @@ }, "404": { "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" } }, "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsTrafficRule" + "$ref": "#/components/requestBodies/ApplicationsSubscriptions" + }, + "callbacks": { + "appTerminationNotification": { + "$ref": "#/components/callbacks/AppTerminationNotification" + } } } }, - "/services": { + "/applications/{appInstanceId}/subscriptions/{subscriptionId}": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + }, + { + "$ref": "#/components/parameters/Path.SubscriptionId" + } + ], "get": { - "description": "This method retrieves information about a list of meService resources. This method is typically used in \"service availability query\" procedure", - "operationId": "Services_GET", + "description": "The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.", + "operationId": "ApplicationsSubscription_GET", "tags": [ - "services" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.Ser_instance_id" - }, - { - "$ref": "#/components/parameters/Query.Ser_name" - }, - { - "$ref": "#/components/parameters/Query.Ser_category_id" - } + "appSubscriptions" ], "responses": { "200": { - "$ref": "#/components/responses/Services.200" + "$ref": "#/components/responses/ApplicationsSubscription.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -365,18 +307,15 @@ } } }, - "post": { - "description": "This method is used to create a meService resource. This method is typically used in \"service availability update and new service registration\" procedure", - "operationId": "Services_POST", + "delete": { + "description": "This method deletes a mecAppSuptApiSubscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure.", + "operationId": "ApplicationsSubscription_DELETE", "tags": [ - "services" + "appSubscriptions" ], "responses": { - "201": { - "$ref": "#/components/responses/Services.201" - }, - "400": { - "$ref": "#/components/responses/Error.400" + "204": { + "description": "No Content" }, "403": { "$ref": "#/components/responses/Error.403" @@ -384,87 +323,80 @@ "404": { "$ref": "#/components/responses/Error.404" } - }, - "requestBody": { - "$ref": "#/components/requestBodies/Services.Post" } } }, - "/services/{serviceId}": { + "/applications/{appInstanceId}/confirm_termination": { "parameters": [ { - "$ref": "#/components/parameters/Path.ServiceId" + "$ref": "#/components/parameters/Path.AppInstanceId" } ], - "get": { - "description": "This method retrieves information about a meService resource. This method is typically used in \"service availability query\" procedure", - "operationId": "ServicesServiceId_GET", + "post": { + "description": "This method is used to confirm the application level termination of an application instance.", + "operationId": "ApplicationsConfirmTermination_POST", "tags": [ - "services" + "appConfirmTermination" ], "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" + "204": { + "description": "No Content" }, - "400": { - "$ref": "#/components/responses/Error.400" + "401": { + "$ref": "#/components/responses/Error.401" }, "403": { "$ref": "#/components/responses/Error.403" }, "404": { "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method updates the information about a meService resource", - "operationId": "ServicesServiceId_PUT", - "tags": [ - "services" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" }, - "400": { - "$ref": "#/components/responses/Error.400" + "409": { + "$ref": "#/components/responses/Error.409" }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" + "429": { + "$ref": "#/components/responses/Error.429" } }, "requestBody": { - "$ref": "#/components/requestBodies/ServicesServiceId" + "$ref": "#/components/requestBodies/ApplicationsConfirmTermination" } } }, - "/timing/current_time": { - "get": { - "description": "This method retrieves the information of the platform's current time which corresponds to the get platform time procedure", - "operationId": "TimingCurrentTime_GET", + "/applications/{appInstanceId}/confirm_ready": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + } + ], + "post": { + "description": "This method may be used by the MEC application instance to notify the MEC platform that it is up and running. ", + "operationId": "ApplicationsConfirmReady_POST", "tags": [ - "timing" + "appConfirmReady" ], "responses": { - "200": { - "$ref": "#/components/responses/TimingCurrentTime.200" + "204": { + "description": "No Content" }, - "400": { - "$ref": "#/components/responses/Error.400" + "401": { + "$ref": "#/components/responses/Error.401" }, "403": { "$ref": "#/components/responses/Error.403" }, "404": { "$ref": "#/components/responses/Error.404" + }, + "409": { + "$ref": "#/components/responses/Error.409" + }, + "429": { + "$ref": "#/components/responses/Error.429" } + }, + "requestBody": { + "$ref": "#/components/requestBodies/ApplicationsConfirmReady" } } }, @@ -491,16 +423,16 @@ } } }, - "/transports": { + "/timing/current_time": { "get": { - "description": "This method retrieves information about a list of available transports. This method is typically used by a service-producing application to discover transports provided by the mobile edge platform in the \"transport information query\" procedure", - "operationId": "Transports_GET", + "description": "This method retrieves the information of the platform's current time which corresponds to the get platform time procedure", + "operationId": "TimingCurrentTime_GET", "tags": [ - "transports" + "timing" ], "responses": { "200": { - "$ref": "#/components/responses/Transports.200" + "$ref": "#/components/responses/TimingCurrentTime.200" }, "400": { "$ref": "#/components/responses/Error.400" @@ -520,6 +452,45 @@ "Empty": { "description": "Empty schema" }, + "AppReadyConfirmation": { + "description": "This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running.", + "type": "object", + "required": [ + "indication" + ], + "properties": { + "indication": { + "$ref": "#/components/schemas/ReadyIndicationType" + } + } + }, + "AppTerminationConfirmation": { + "description": "This type represents the information that the MEC application instance provides to the MEC platform when informing it that the application has completed its application level related terminate/stop actions, e.g. retention of application state in the case of stop.", + "type": "object", + "required": [ + "operationAction" + ], + "properties": { + "operationAction": { + "$ref": "#/components/schemas/OperationActionType" + } + } + }, + "AppTerminationNotification.Links": { + "description": "Object containing hyperlinks related to the resource.", + "type": "object", + "required": [ + "subscription" + ], + "properties": { + "subscription": { + "$ref": "#/components/schemas/LinkType" + }, + "confirmTermination": { + "$ref": "#/components/schemas/LinkType.ConfirmTermination" + } + } + }, "AppTerminationNotification.MaxGracefulTimeout": { "description": "Maximum timeout value in seconds for graceful termination or graceful stop of an application instance.", "type": "integer", @@ -532,10 +503,11 @@ "example": "AppTerminationNotification" }, "AppTerminationNotification": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", + "description": "This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop.", "type": "object", "required": [ "notificationType", + "operationAction", "maxGracefulTimeout", "_links" ], @@ -543,11 +515,14 @@ "notificationType": { "$ref": "#/components/schemas/AppTerminationNotification.NotificationType" }, + "operationAction": { + "$ref": "#/components/schemas/OperationActionType" + }, "maxGracefulTimeout": { "$ref": "#/components/schemas/AppTerminationNotification.MaxGracefulTimeout" }, "_links": { - "$ref": "#/components/schemas/Subscription" + "$ref": "#/components/schemas/AppTerminationNotification.Links" } } }, @@ -557,12 +532,12 @@ "example": "ID1" }, "AppTerminationNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. This shall be included in both the request and the response.", + "description": "URI selected by the MEC application instance to receive notifications on the subscribed MEC application instance management information. This shall be included in both the request and the response.", "type": "string", "format": "uri" }, "AppTerminationNotificationSubscription": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", + "description": "This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop.", "type": "object", "required": [ "subscriptionType", @@ -590,52 +565,8 @@ "type": "string", "example": "AppTerminationNotificationSubscription" }, - "CategoryRef.Href": { - "description": "Reference of the catalogue", - "type": "string", - "example": "catItem1" - }, - "CategoryRef.Id": { - "description": "Unique identifier of the category", - "type": "string", - "example": "id12345" - }, - "CategoryRef.Name": { - "description": "Name of the category", - "type": "string", - "example": "RNI" - }, - "CategoryRef.Version": { - "description": "Category version", - "type": "string", - "example": "version1" - }, - "CategoryRef": { - "description": "This type represents the category reference", - "type": "object", - "required": [ - "href", - "id", - "name", - "version" - ], - "properties": { - "href": { - "$ref": "#/components/schemas/CategoryRef.Href" - }, - "id": { - "$ref": "#/components/schemas/CategoryRef.Id" - }, - "name": { - "$ref": "#/components/schemas/CategoryRef.Name" - }, - "version": { - "$ref": "#/components/schemas/CategoryRef.Version" - } - } - }, "CurrentTime": { - "description": "This type represents the information provided by the mobile edge platform in response to the Get Platform Time Request message.", + "description": "This type represents the information provided by the MEC platform in response to the Get Platform Time Request message.", "type": "object", "required": [ "nanoSeconds", @@ -687,7 +618,7 @@ "example": "02-00-00-00-00-00" }, "DestinationInterface": { - "description": "This type represents the destination interface.", + "description": "This type represents the destination interface. If the action is FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED or PASSTHROUGH one value shall be provided. If the action is DUPLICATE_DECAPSULATED or DUPLICATE_ENCAPSULATED, two values shall be provided. If the action is DROP, no value shall be provided.", "type": "object", "required": [ "interfaceType" @@ -735,7 +666,7 @@ "example": "IP_V6" }, "DnsRule.State": { - "description": "DNS rule state", + "description": "DNS rule state. This attribute may be updated using HTTP PUT method", "type": "string", "enum": [ "ACTIVE", @@ -780,85 +711,17 @@ } } }, - "EndPointInfo.Address.Host": { - "description": "Host portion of the address", - "type": "string", - "example": "192.0.2.0" - }, - "EndPointInfo.Address_Port": { - "description": "Port portion of the address", - "type": "integer", - "format": "uint32", - "example": 8080 - }, - "EndPointInfo.Address": { - "description": "A IP address and port pair", - "type": "object", - "required": [ - "host", - "port" - ], - "properties": { - "host": { - "$ref": "#/components/schemas/EndPointInfo.Address.Host" - }, - "port": { - "$ref": "#/components/schemas/EndPointInfo.Address_Port" - } - } - }, - "EndPointInfo.Addresses": { - "description": "Entry point information of the service as one or more pairs of IP address and port", - "type": "object", - "required": [ - "addresses" - ], - "properties": { - "addresses": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Address" - } - } - } - }, - "EndPointInfo.Alternative": { - "description": "Entry point information of the service in a format defined by an implementation, or in an external specification.", - "type": "object", - "required": [ - "alternative" - ], - "properties": { - "alternative": { - "type": "object" - } - } - }, - "EndPointInfo.Uri": { - "description": "Entry point information of the service", - "type": "string", - "format": "uri", - "example": "/meMp1/service/EntryPoint" - }, - "EndPointInfo.Uris": { - "description": "Entry point information of the service as string, formatted according to URI syntax", + "LinkType": { + "description": "This type represents a type of link and may be referenced from data structures", "type": "object", - "required": [ - "uris" - ], "properties": { - "uris": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Uri" - } + "href": { + "$ref": "#/components/schemas/Href" } } }, - "LinkType": { - "description": "This type represents a type of link and may be referenced from data structures", + "LinkType.ConfirmTermination": { + "description": "Link to the task resource where to confirm termination in case the application is ready to be terminated before expiry of the timeout.", "type": "object", "properties": { "href": { @@ -870,9 +733,9 @@ "description": "URI referring to a resource", "type": "string", "format": "uri", - "example": "/meMp1/example" + "example": "/mecAppSuptApi/example" }, - "Mp1SubscriptionLinkList.Links": { + "MecAppSuptApiSubscriptionLinkList.Links": { "description": "Self-referring URI.", "type": "object", "required": [ @@ -882,16 +745,16 @@ "self": { "$ref": "#/components/schemas/LinkType" }, - "subscription": { - "description": "Subscription list", + "subscriptions": { + "description": "The MEC application instance's subscriptions", "type": "array", "items": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Subscription" + "$ref": "#/components/schemas/MecAppSuptApiSubscriptionLinkList.Subscription" } } } }, - "Mp1SubscriptionLinkList.Subscription": { + "MecAppSuptApiSubscriptionLinkList.Subscription": { "description": "A link to a subscription.", "type": "object", "required": [ @@ -903,27 +766,32 @@ "$ref": "#/components/schemas/Href" }, "rel": { - "description": "The values are as defined in the \"subscriptionType\" attribute for each different Mp1 event subscription data type.", - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] + "description": "The values shall be set to AppTerminationNotificationSubscription.", + "type": "string" } } }, - "Mp1SubscriptionLinkList": { - "description": "This type represents a list of links related to currently existing subscriptions for a mobile edge application instance. This information is returned when sending a request to receive current subscriptions.", + "MecAppSuptApiSubscriptionLinkList": { + "description": "This type represents a list of links related to currently existing subscriptions for a MEC application instance. This information is returned when sending a request to receive current subscriptions.", "type": "object", "required": [ "_links" ], "properties": { "_links": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Links" + "$ref": "#/components/schemas/MecAppSuptApiSubscriptionLinkList.Links" } } }, + "OperationActionType": { + "description": "Operation that is being performed on the MEC application instance.", + "type": "string", + "enum": [ + "STOPPING", + "TERMINATING" + ], + "example": "TERMINATING" + }, "ProblemDetails": { "type": "object", "properties": { @@ -963,256 +831,30 @@ "description": "A short, human-readable summary of the problem type" }, "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "SecurityInfo.OAuth2Info.GrantTypes": { - "description": "List of supported OAuth 2.0 grant types", - "type": "string", - "enum": [ - "OAUTH2_AUTHORIZATION_CODE", - "OAUTH2_IMPLICIT_GRANT", - "OAUTH2_RESOURCE_OWNER", - "OAUTH2_CLIENT_CREDENTIALS" - ], - "example": "OAUTH2_CLIENT_CREDENTIALS" - }, - "SecurityInfo.OAuth2Info.TokenEndpoint": { - "description": "The token endpoint", - "type": "string", - "format": "uri", - "example": "/meMp1/security/TokenEndPoint" - }, - "SecurityInfo.OAuth2Info": { - "description": "Parameters related to use of OAuth 2.0", - "required": [ - "grantTypes", - "tokenEndpoint" - ], - "properties": { - "grantTypes": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes" - }, - "tokenEndpoint": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint" - } - }, - "type": "object" - }, - "SecurityInfo": { - "description": "This type represents security information related to a transport", - "type": "object", - "properties": { - "oAuth2Info": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info" - } - } - }, - "Self": { - "description": "Self-referring URI.", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "readOnly": true - }, - "SerAvailabilityNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge service availability information. This shall be included in both the request and the response.", - "type": "string", - "format": "uri" - }, - "SerAvailabilityNotificationSubscription": { - "description": "This type represents a subscription to the notifications from the mobile edge platform regarding the availability of a mobile edge service or a list of mobile edge services.", - "type": "object", - "required": [ - "subscriptionType", - "callbackReference", - "_links", - "filteringCriteria" - ], - "properties": { - "subscriptionType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "callbackReference": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference" - }, - "_links": { - "$ref": "#/components/schemas/Self" - }, - "filteringCriteria": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "SerAvailabilityNotificationSubscription.SubscriptionType": { - "description": "Shall be set to SerAvailabilityNotificationSubscription.", - "type": "string", - "example": "SerAvailabilityNotificationSubscription" - }, - "ServiceAvailabilityNotification": { - "description": "This type represents the service availability information.", - "type": "object", - "required": [ - "notificationType", - "services", - "_links" - ], - "properties": { - "notificationType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "_links": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "SerializerTypes": { - "description": "The enumeration SerializerTypes represents types of serializers", - "type": "string", - "enum": [ - "JSON", - "XML", - "PROTOBUF3" - ], - "example": "JSON" - }, - "ServiceInfo.SerInstanceId": { - "description": "Identifier of the service instance assigned by the MEPM / mobile edge platform.", - "type": "string", - "readOnly": true, - "example": "ServiceInstance123" - }, - "ServiceInfo.SerName": { - "description": "The name of the service. This is how the service producing mobile edge application identifies the service instance it produces.", - "type": "string", - "example": "ExampleService" - }, - "ServiceInfo.State": { - "description": "Contains the state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "ServiceInfo.TransportId": { - "description": "Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.", - "type": "string", - "writeOnly": true, - "example": "Rest1" - }, - "ServiceInfo.Version": { - "description": "Service version", - "type": "string", - "example": "ServiceVersion1" - }, - "ServiceInfo.Post": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "serializer" - ], - "oneOf": [ - { - "required": [ - "transportId" - ] - }, - { - "required": [ - "transportInfo" - ] - } - ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportId": { - "$ref": "#/components/schemas/ServiceInfo.TransportId" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } + "type": "string", + "format": "uri", + "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" }, - "ServiceInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "transportInfo", - "serializer" + "ReadyIndicationType": { + "description": "Indication about the MEC application instance.", + "type": "string", + "enum": [ + "READY" ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } + "example": "READY" }, - "Subscription": { - "description": "A link to the related subscription", + "Self": { + "description": "Self-referring URI.", "type": "object", "required": [ - "subscription" + "self" ], "properties": { - "subscription": { + "self": { "$ref": "#/components/schemas/LinkType" } - } + }, + "readOnly": true }, "TimingCaps.NtpServers.AuthenticationKeyNum": { "description": "Authentication key number", @@ -1358,7 +1000,7 @@ } }, "TimingCaps": { - "description": "This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message.", + "description": "This type represents the information provided by the MEC platform in response to the Timing capabilities Query message.", "type": "object", "properties": { "timeStamp": { @@ -1514,15 +1156,15 @@ } }, "TrafficRule.Action": { - "description": "The action of the ME host data plane when a packet matches the trafficFilter", + "description": "The action of the MEC host data plane when a packet matches the trafficFilter\n ", "type": "string", "enum": [ "DROP", "FORWARD_DECAPSULATED", - "FORWARD_AS_IS", + "FORWARD_ENCAPSULATED", "PASSTHROUGH", "DUPLICATE_DECAPSULATED", - "DUPLICATE_AS_IS" + "DUPLICATE_ENCAPSULATED" ], "example": "DROP" }, @@ -1547,7 +1189,7 @@ "example": 1 }, "TrafficRule.State": { - "description": "Contains the traffic rule state", + "description": "Contains the traffic rule state. This attribute may be updated using HTTP PUT method", "type": "string", "enum": [ "ACTIVE", @@ -1593,103 +1235,6 @@ } } }, - "TransportInfo.Description": { - "description": "Human-readable description of this transport", - "type": "string", - "example": "REST API" - }, - "TransportInfo.Id": { - "description": "The identifier of this transport", - "type": "string", - "example": "TransId12345" - }, - "TransportInfo.ImplSpecificInfo": { - "description": "Additional implementation specific details of the transport", - "type": "object" - }, - "TransportInfo.Name": { - "description": "The name of this transport", - "type": "string", - "example": "REST" - }, - "TransportInfo.Protocol": { - "description": "The name of the protocol used. Shall be set to HTTP for a REST API.", - "type": "string", - "example": "HTTP" - }, - "TransportInfo.Version": { - "description": "The version of the protocol used", - "type": "string", - "example": "2.0" - }, - "TransportInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "id", - "name", - "type", - "protocol", - "version", - "endpoint", - "security" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/TransportInfo.Id" - }, - "name": { - "$ref": "#/components/schemas/TransportInfo.Name" - }, - "description": { - "$ref": "#/components/schemas/TransportInfo.Description" - }, - "type": { - "$ref": "#/components/schemas/TransportTypes" - }, - "protocol": { - "$ref": "#/components/schemas/TransportInfo.Protocol" - }, - "version": { - "$ref": "#/components/schemas/TransportInfo.Version" - }, - "endpoint": { - "description": "This type represents information about a transport endpoint", - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/EndPointInfo.Uris" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Addresses" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Alternative" - } - ] - }, - "security": { - "$ref": "#/components/schemas/SecurityInfo" - }, - "implSpecificInfo": { - "$ref": "#/components/schemas/TransportInfo.ImplSpecificInfo" - } - } - }, - "TransportTypes": { - "description": "The enumeration TransportTypes represents types of transports", - "type": "string", - "enum": [ - "REST_HTTP", - "MB_TOPIC_BASED", - "MB_ROUTING", - "MB_PUBSUB", - "RPC", - "RPC_STREAMING", - "WEBSOCKET" - ], - "example": "REST_HTTP" - }, "TunnelInfo.TunnelDstAddress": { "description": "Destination address of the tunnel", "type": "string", @@ -1731,7 +1276,7 @@ "parameters": { "Path.AppInstanceId": { "name": "appInstanceId", - "description": "Represents a mobile edge application instance. Note that the appInstanceId is allocated by the mobile edge platform manager.", + "description": "Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager.", "in": "path", "required": true, "schema": { @@ -1749,29 +1294,7 @@ }, "Path.SubscriptionId": { "name": "subscriptionId", - "description": "Represents a subscription to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.SubscriptionType": { - "name": "subscriptionType", - "description": "Represents a subscription type to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] - } - }, - "Path.ServiceId": { - "name": "serviceId", - "description": "Represents a mobile edge service instance.", + "description": "Represents a subscription to the notifications from the MEC platform.", "in": "path", "required": true, "schema": { @@ -1786,39 +1309,6 @@ "schema": { "type": "string" } - }, - "Query.Ser_category_id": { - "name": "ser_category_id", - "description": "A mobile edge application instance may use ser_category_id as an input parameter to query the availability of a list of mobile edge service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.Ser_instance_id": { - "name": "ser_instance_id", - "description": "A mobile edge application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.Ser_name": { - "name": "ser_name", - "description": "A mobile edge application instance may use multiple ser_names as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } } }, "responses": { @@ -1869,21 +1359,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList" + "$ref": "#/components/schemas/MecAppSuptApiSubscriptionLinkList" } } }, "links": { - "getIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/GetIndividualMeMp1SubscriptionLinkList" + "getIndividualmecAppSuptApiSubscriptionLinkList": { + "$ref": "#/components/links/GetIndividualmecAppSuptApiSubscriptionLinkList" }, - "delIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/DelIndividualMeMp1SubscriptionLinkList" + "delIndividualmecAppSuptApiSubscriptionLinkList": { + "$ref": "#/components/links/DelIndividualmecAppSuptApiSubscriptionLinkList" } } }, "ApplicationsSubscriptions.201": { - "description": "Entity body in the request contains a subscription to the mobile edge service availability notifications that is to be created.", + "description": "Entity body in the request contains a subscription to the MEC service availability notifications that is to be created.", "headers": { "location": { "description": "The resource URI of the created resource", @@ -1896,23 +1386,16 @@ "content": { "application/json": { "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] + "$ref": "#/components/schemas/AppTerminationNotificationSubscription" } } }, "links": { - "getIndividualMeMp1Subscription": { - "$ref": "#/components/links/GetIndividualMeMp1Subscription" + "getIndividualmecAppSuptApiSubscription": { + "$ref": "#/components/links/GetIndividualmecAppSuptApiSubscription" }, - "delIndividualMeMp1Subscription": { - "$ref": "#/components/links/DelIndividualMeMp1Subscription" + "delIndividualmecAppSuptApiSubscription": { + "$ref": "#/components/links/DelIndividualmecAppSuptApiSubscription" } } }, @@ -1921,14 +1404,7 @@ "content": { "application/json": { "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] + "$ref": "#/components/schemas/AppTerminationNotificationSubscription" } } } @@ -1975,121 +1451,68 @@ } } }, - "Services.200": { + "TimingCurrentTime.200": { "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "content": { "application/json": { "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "examples": { - "ServiceInfoList": { - "$ref": "#/components/examples/ServiceInfoList" - } + "$ref": "#/components/schemas/CurrentTime" } } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } } }, - "Services.201": { - "description": "Upon success, the HTTP response shall include a Location HTTP header that contains the resource URI of the created resource.", - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" - } - } - }, + "TimingCaps.200": { + "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } + "$ref": "#/components/schemas/TimingCaps" } } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } } }, - "ServicesServiceId.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", + "Error.400": { + "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } + "$ref": "#/components/schemas/ProblemDetails" } - } - } - }, - "TimingCurrentTime.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { + }, + "text/plain": { "schema": { - "$ref": "#/components/schemas/CurrentTime" + "$ref": "#/components/schemas/Empty" } } } }, - "TimingCaps.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", + "Error.401": { + "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "$ref": "#/components/schemas/TimingCaps" + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" } } } }, - "Transports.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", + "Error.403": { + "description": "Forbidden. The operation is not allowed given the current status of the resource. ", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/TransportInfo" - } + "$ref": "#/components/schemas/ProblemDetails" } } - }, - "links": { - "getTransportInfo": { - "$ref": "#/components/links/GetTransportInfo" - } } }, - "Error.400": { - "description": "Bad Request", + "Error.404": { + "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", "content": { "application/problem+json": { "schema": { @@ -2103,18 +1526,23 @@ } } }, - "Error.403": { - "description": "Forbidden", + "Error.409": { + "description": "Conflict. The operation cannot be executed currently, due to a conflict with the state of the resource. Typically, this is because the application instance resource is in NOT_INSTANTIATED state.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } } } }, - "Error.404": { - "description": "Not Found", + "Error.412": { + "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.", "content": { "application/problem+json": { "schema": { @@ -2128,8 +1556,8 @@ } } }, - "Error.412": { - "description": "Precondition Failed", + "Error.429": { + "description": "Too Many Requests. It is used when a rate limiter has triggered.", "content": { "application/problem+json": { "schema": { @@ -2145,77 +1573,55 @@ } }, "requestBodies": { - "ApplicationsDnsRule": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRule" - } - } - }, - "description": "The updated state is included in the entity body of the request.", - "required": true - }, - "ApplicationsSubscriptions": { + "ApplicationsConfirmReady": { "content": { "application/json": { "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] + "$ref": "#/components/schemas/AppReadyConfirmation" } } - }, - "description": "Entity body in the request contains a subscription to the mobile edge application termination notifications that is to be created.", - "required": true + } }, - "ApplicationsTrafficRule": { + "ApplicationsConfirmTermination": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TrafficRule" + "$ref": "#/components/schemas/AppTerminationConfirmation" } } - }, - "description": "One or more updated attributes that are allowed to be changed", - "required": true + } }, - "Services": { + "ApplicationsDnsRule": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceInfo" + "$ref": "#/components/schemas/DnsRule" } } }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", + "description": "The updated state is included in the entity body of the request.", "required": true }, - "Services.Post": { + "ApplicationsSubscriptions": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceInfo.Post" + "$ref": "#/components/schemas/AppTerminationNotificationSubscription" } } }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", + "description": "Entity body in the request contains a subscription to the MEC application termination notifications that is to be created.", "required": true }, - "ServicesServiceId": { + "ApplicationsTrafficRule": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceInfo" + "$ref": "#/components/schemas/TrafficRule" } } }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", + "description": "One or more updated attributes that are allowed to be changed", "required": true }, "AppTerminationNotification": { @@ -2225,16 +1631,8 @@ "$ref": "#/components/schemas/AppTerminationNotification" } } - } - }, - "ServiceAvailabilityNotification": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceAvailabilityNotification" - } - } - } + }, + "required": true } }, "callbacks": { @@ -2244,7 +1642,7 @@ "description": "Represents the information that the MEP notifies the subscribed application instance about the corresponding application instance termination/stop", "operationId": "AppTerminationNotification_POST", "tags": [ - "callback" + "callbacks" ], "requestBody": { "$ref": "#/components/requestBodies/AppTerminationNotification" @@ -2256,42 +1654,9 @@ } } } - }, - "ServiceAvailabilityNotification": { - "{$request.body#/callbackReference}": { - "post": { - "description": "'Represents the service availability information that is used in the following cases - when the MEC platform announces the newly available\n services to the authorized relevant MEC applications (e.g. \n the applications that indicate the services as \"optional\" \n or \"required\") that are subscribed to the corresponding \n service availability notifications\n- when the MEC platform notifies the authorized relevant applications that are subscribed to the corresponding service availability notifications about the service availability changes.'", - "operationId": "ServiceAvailabilityNotification_POST", - "tags": [ - "callback" - ], - "requestBody": { - "$ref": "#/components/requestBodies/ServiceAvailabilityNotification" - }, - "responses": { - "200": { - "description": "Expected responses from callback consumer, if it accepts the callback" - } - } - } - } } }, "links": { - "GetIndividualMeService": { - "operationId": "ServicesServiceId_GET", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `GET /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, - "PutIndividualMeService": { - "operationId": "ServicesServiceId_PUT", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `PUT /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, "GetIndividualMeDNSRule": { "operationId": "ApplicationsDnsRule_GET", "description": "The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `GET /applications/{appInstanceId}/dns_rules/{dnsRuleId}`", @@ -2320,42 +1685,35 @@ "trafficRuleId": "$response.body#/trafficRuleId" } }, - "GetTransportInfo": { - "operationId": "AppServices_POST", - "description": "The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported", - "parameters": { - "transportId": "$response.body#/0/id" - } - }, - "GetIndividualMeMp1Subscription": { + "GetIndividualmecAppSuptApiSubscription": { "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}`", "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "description": "regex = \\/mec_app_support\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", "subscriptionId": "TBC" } }, - "DelIndividualMeMp1Subscription": { + "DelIndividualmecAppSuptApiSubscription": { "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}`", "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "description": "regex = \\/mec_app_support\\/v1\\/applications\\/.*\\/subscriptions\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", "subscriptionId": "TBC" } }, - "GetIndividualMeMp1SubscriptionLinkList": { + "GetIndividualmecAppSuptApiSubscriptionLinkList": { "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}`", "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "description": "regex = \\/mec_app_support\\/v1\\/applications\\/.*\\/subscriptions\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", "subscriptionId": "TBC" } }, - "DelIndividualMeMp1SubscriptionLinkList": { + "DelIndividualmecAppSuptApiSubscriptionLinkList": { "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}`", "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "description": "regex = \\/mec_app_support\\/v1\\/applications\\/.*\\/subscriptions\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", "subscriptionId": "TBC" } } @@ -2380,79 +1738,14 @@ "ipAddress": "146.241.7.3", "ttl": 300, "state": "ACTIVE" - } - ] - }, - "ServiceInfo": { - "value": { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "uris": [ - "/meMp1/service/EntryPoint" - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": "OAUTH2_CLIENT_CREDENTIALS", - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } }, - "serializer": "JSON" - } - }, - "ServiceInfoList": { - "value": [ { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "addresses": [ - { - "host": "192.0.2.0", - "port": 8080 - } - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": "OAUTH2_CLIENT_CREDENTIALS", - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } - }, - "serializer": "JSON" + "dnsRuleId": "DnsRule2", + "domainName": "www.example.com", + "ipAddressType": "IP_V4", + "ipAddress": "146.241.7.4", + "ttl": 300, + "state": "INACTIVE" } ] }, @@ -2516,4 +1809,4 @@ } } } -} \ No newline at end of file +} diff --git a/Mp1.yaml b/MecAppSupportApi.yaml similarity index 58% rename from Mp1.yaml rename to MecAppSupportApi.yaml index e31649d4491a36ff4c7659370d8973c1e6ae0dc8..c39a7a1f6339a8c5b4256fae5792a0f2f47d6935 100644 --- a/Mp1.yaml +++ b/MecAppSupportApi.yaml @@ -1,39 +1,98 @@ openapi: 3.0.2 servers: - - url: 'http://127.0.0.1:8081/mp1/v1' - - url: 'https://127.0.0.1:8081/mp1/v1' + - url: 'http://127.0.0.1:8081/mec_app_support/v1' + - url: 'https://127.0.0.1:8081/mec_app_support/v1' info: - title: Mp1 API - version: 1.1.1 - description: The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI + title: MEC Application Support API + version: 2.1.1 + description: The ETSI MEC ISG MEC011 MEC Application Support API described using OpenAPI license: - name: ETSI Forge copyright notice - url: 'https://forge.etsi.org/etsi-forge-copyright-notice.txt' + name: BSD-3-Clause + url: 'https://forge.etsi.org/legal-matters' contact: email: cti_support@etsi.org externalDocs: - description: 'ETSI GS MEC011 Application Enablement API, V1.1.1' + description: 'ETSI GS MEC011 Application Enablement API, V2.1.1' url: >- - http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf + https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf tags: - - name: trafficRules - - name: dnsRules - - name: subscriptions - - name: services + - name: appTrafficRules + - name: appDnsRules + - name: appSubscriptions + - name: appConfirmTermination + - name: appConfirmReady - name: timing - - name: transports - name: callbacks paths: + '/applications/{appInstanceId}/traffic_rules': + parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' + get: + description: >- + This method retrieves information about all the traffic rules associated + with a MEC application instance. + operationId: ApplicationsTrafficRules_GET + tags: + - appTrafficRules + responses: + '200': + $ref: '#/components/responses/ApplicationsTrafficRules.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '/applications/{appInstanceId}/traffic_rules/{trafficRuleId}': + parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' + - $ref: '#/components/parameters/Path.TrafficRuleId' + get: + description: >- + This method retrieves information about all the traffic rules associated + with a MEC application instance. + operationId: ApplicationsTrafficRule_GET + tags: + - appTrafficRules + responses: + '200': + $ref: '#/components/responses/ApplicationsTrafficRule.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + put: + description: >- + This method retrieves information about all the traffic rules associated + with a MEC application instance. + operationId: ApplicationsTrafficRule_PUT + tags: + - appTrafficRules + responses: + '200': + $ref: '#/components/responses/ApplicationsTrafficRule.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '412': + $ref: '#/components/responses/Error.412' + requestBody: + $ref: '#/components/requestBodies/ApplicationsTrafficRule' '/applications/{appInstanceId}/dns_rules': parameters: - $ref: '#/components/parameters/Path.AppInstanceId' get: description: >- This method retrieves information about all the DNS rules associated - with a mobile edge application instance. + with a MEC application instance. operationId: ApplicationsDnsRules_GET tags: - - trafficRules + - appDnsRules responses: '200': $ref: '#/components/responses/ApplicationsDnsRules.200' @@ -50,10 +109,10 @@ paths: get: description: >- This method retrieves information about a DNS rule associated with a - mobile edge application instance. + MEC application instance. operationId: ApplicationsDnsRule_GET tags: - - dnsRules + - appDnsRules responses: '200': $ref: '#/components/responses/ApplicationsDnsRule.200' @@ -67,7 +126,7 @@ paths: description: 'This method activates, de-activates or updates a traffic rule.' operationId: ApplicationsDnsRule_PUT tags: - - dnsRules + - appDnsRules responses: '200': $ref: '#/components/responses/ApplicationsDnsRule.200' @@ -91,7 +150,7 @@ paths: entity body with all the subscriptions for the requestor. operationId: ApplicationsSubscriptions_GET tags: - - subscriptions + - appSubscriptions responses: '200': $ref: '#/components/responses/ApplicationsSubscriptions.200' @@ -104,12 +163,12 @@ paths: post: description: >- The POST method may be used to create a new subscription. One example - use case is to create a new subscription to the mobile edge service + use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription. operationId: ApplicationsSubscriptions_POST tags: - - subscriptions + - appSubscriptions responses: '201': $ref: '#/components/responses/ApplicationsSubscriptions.201' @@ -124,12 +183,9 @@ paths: callbacks: appTerminationNotification: $ref: '#/components/callbacks/AppTerminationNotification' - serviceAvailabilityNotification: - $ref: '#/components/callbacks/ServiceAvailabilityNotification' - '/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}': + '/applications/{appInstanceId}/subscriptions/{subscriptionId}': parameters: - $ref: '#/components/parameters/Path.AppInstanceId' - - $ref: '#/components/parameters/Path.SubscriptionType' - $ref: '#/components/parameters/Path.SubscriptionId' get: description: >- @@ -138,7 +194,7 @@ paths: subscription for the requestor. operationId: ApplicationsSubscription_GET tags: - - subscriptions + - appSubscriptions responses: '200': $ref: '#/components/responses/ApplicationsSubscription.200' @@ -150,12 +206,12 @@ paths: $ref: '#/components/responses/Error.404' delete: description: >- - This method deletes a meMp1Subscription. This method is typically used + This method deletes a mecAppSuptApiSubscription. This method is typically used in "Unsubscribing from service availability event notifications" procedure. operationId: ApplicationsSubscription_DELETE tags: - - subscriptions + - appSubscriptions responses: '204': description: No Content @@ -163,159 +219,57 @@ paths: $ref: '#/components/responses/Error.403' '404': $ref: '#/components/responses/Error.404' - '/applications/{appInstanceId}/traffic_rules': + '/applications/{appInstanceId}/confirm_termination': parameters: - $ref: '#/components/parameters/Path.AppInstanceId' - get: - description: >- - This method retrieves information about all the traffic rules associated - with a mobile edge application instance. - operationId: ApplicationsTrafficRules_GET - tags: - - trafficRules - responses: - '200': - $ref: '#/components/responses/ApplicationsTrafficRules.200' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' - '/applications/{appInstanceId}/traffic_rules/{trafficRuleId}': - parameters: - - $ref: '#/components/parameters/Path.AppInstanceId' - - $ref: '#/components/parameters/Path.TrafficRuleId' - get: - description: >- - This method retrieves information about all the traffic rules associated - with a mobile edge application instance. - operationId: ApplicationsTrafficRule_GET - tags: - - trafficRules - responses: - '200': - $ref: '#/components/responses/ApplicationsTrafficRule.200' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' - put: - description: >- - This method retrieves information about all the traffic rules associated - with a mobile edge application instance. - operationId: ApplicationsTrafficRule_PUT - tags: - - trafficRules - responses: - '200': - $ref: '#/components/responses/ApplicationsTrafficRule.200' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' - '412': - $ref: '#/components/responses/Error.412' - requestBody: - $ref: '#/components/requestBodies/ApplicationsTrafficRule' - '/services': - get: - description: >- - This method retrieves information about a list of meService resources. - This method is typically used in "service availability query" procedure - operationId: Services_GET - tags: - - services - parameters: - - $ref: '#/components/parameters/Query.Ser_instance_id' - - $ref: '#/components/parameters/Query.Ser_name' - - $ref: '#/components/parameters/Query.Ser_category_id' - responses: - '200': - $ref: '#/components/responses/Services.200' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' post: description: >- - This method is used to create a meService resource. This method is - typically used in "service availability update and new service - registration" procedure - operationId: Services_POST + This method is used to confirm the application level termination + of an application instance. + operationId: ApplicationsConfirmTermination_POST tags: - - services + - appConfirmTermination responses: - '201': - $ref: '#/components/responses/Services.201' - '400': - $ref: '#/components/responses/Error.400' + '204': + description: No Content + + + '401': + $ref: '#/components/responses/Error.401' '403': $ref: '#/components/responses/Error.403' '404': $ref: '#/components/responses/Error.404' + '409': + $ref: '#/components/responses/Error.409' + '429': + $ref: '#/components/responses/Error.429' requestBody: - $ref: '#/components/requestBodies/Services.Post' - '/services/{serviceId}': + $ref: '#/components/requestBodies/ApplicationsConfirmTermination' + '/applications/{appInstanceId}/confirm_ready': parameters: - - $ref: '#/components/parameters/Path.ServiceId' - get: + - $ref: '#/components/parameters/Path.AppInstanceId' + post: description: >- - This method retrieves information about a meService resource. This - method is typically used in "service availability query" procedure - operationId: ServicesServiceId_GET - tags: - - services - responses: - '200': - $ref: '#/components/responses/ServicesServiceId.200' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' - put: - description: This method updates the information about a meService resource - operationId: ServicesServiceId_PUT + This method may be used by the MEC application instance to notify the MEC platform that it is up and running. + operationId: ApplicationsConfirmReady_POST tags: - - services + - appConfirmReady responses: - '200': - $ref: '#/components/responses/ServicesServiceId.200' - '400': - $ref: '#/components/responses/Error.400' + '204': + description: No Content + '401': + $ref: '#/components/responses/Error.401' '403': $ref: '#/components/responses/Error.403' '404': $ref: '#/components/responses/Error.404' - '412': - $ref: '#/components/responses/Error.412' + '409': + $ref: '#/components/responses/Error.409' + '429': + $ref: '#/components/responses/Error.429' requestBody: - $ref: '#/components/requestBodies/ServicesServiceId' - '/timing/current_time': - get: - description: >- - This method retrieves the information of the platform's current time - which corresponds to the get platform time procedure - operationId: TimingCurrentTime_GET - tags: - - timing - responses: - '200': - $ref: '#/components/responses/TimingCurrentTime.200' - '400': - $ref: '#/components/responses/Error.400' - '403': - $ref: '#/components/responses/Error.403' - '404': - $ref: '#/components/responses/Error.404' + $ref: '#/components/requestBodies/ApplicationsConfirmReady' '/timing/timing_caps': get: description: >- @@ -333,19 +287,17 @@ paths: $ref: '#/components/responses/Error.403' '404': $ref: '#/components/responses/Error.404' - '/transports': + '/timing/current_time': get: description: >- - This method retrieves information about a list of available transports. - This method is typically used by a service-producing application to - discover transports provided by the mobile edge platform in the - "transport information query" procedure - operationId: Transports_GET + This method retrieves the information of the platform's current time + which corresponds to the get platform time procedure + operationId: TimingCurrentTime_GET tags: - - transports + - timing responses: '200': - $ref: '#/components/responses/Transports.200' + $ref: '#/components/responses/TimingCurrentTime.200' '400': $ref: '#/components/responses/Error.400' '403': @@ -356,6 +308,35 @@ components: schemas: Empty: description: Empty schema + AppReadyConfirmation: + description: >- + This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running. + type: object + required: + - indication + properties: + indication: + $ref: '#/components/schemas/ReadyIndicationType' + AppTerminationConfirmation: + description: >- + This type represents the information that the MEC application instance provides to the MEC platform when informing it that the application has completed its application level related terminate/stop actions, e.g. retention of application state in the case of stop. + type: object + required: + - operationAction + properties: + operationAction: + $ref: '#/components/schemas/OperationActionType' + AppTerminationNotification.Links: + description: >- + Object containing hyperlinks related to the resource. + type: object + required: + - subscription + properties: + subscription: + $ref: '#/components/schemas/LinkType' + confirmTermination: + $ref: '#/components/schemas/LinkType.ConfirmTermination' AppTerminationNotification.MaxGracefulTimeout: description: >- Maximum timeout value in seconds for graceful termination or graceful @@ -369,36 +350,39 @@ components: example: 'AppTerminationNotification' AppTerminationNotification: description: >- - This type represents the information that the mobile edge platform + This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop. type: object required: - notificationType + - operationAction - maxGracefulTimeout - _links properties: notificationType: $ref: '#/components/schemas/AppTerminationNotification.NotificationType' + operationAction: + $ref: '#/components/schemas/OperationActionType' maxGracefulTimeout: $ref: '#/components/schemas/AppTerminationNotification.MaxGracefulTimeout' _links: - $ref: '#/components/schemas/Subscription' + $ref: '#/components/schemas/AppTerminationNotification.Links' AppTerminationNotificationSubscription.AppInstanceId: description: It is used as the filtering criterion for the subscribed events. type: string example: 'ID1' AppTerminationNotificationSubscription.CallbackReference: description: >- - URI selected by the mobile edge application instance to receive - notifications on the subscribed mobile edge application instance + URI selected by the MEC application instance to receive + notifications on the subscribed MEC application instance management information. This shall be included in both the request and the response. type: string format: uri AppTerminationNotificationSubscription: description: >- - This type represents the information that the mobile edge platform + This type represents the information that the MEC platform notifies the subscribed application instance about the corresponding application instance termination/stop. type: object @@ -423,42 +407,9 @@ components: description: Shall be set to AppTerminationNotificationSubscription. type: string example: 'AppTerminationNotificationSubscription' - CategoryRef.Href: - description: Reference of the catalogue - type: string - example: 'catItem1' - CategoryRef.Id: - description: Unique identifier of the category - type: string - example: 'id12345' - CategoryRef.Name: - description: Name of the category - type: string - example: 'RNI' - CategoryRef.Version: - description: Category version - type: string - example: 'version1' - CategoryRef: - description: This type represents the category reference - type: object - required: - - href - - id - - name - - version - properties: - href: - $ref: '#/components/schemas/CategoryRef.Href' - id: - $ref: '#/components/schemas/CategoryRef.Id' - name: - $ref: '#/components/schemas/CategoryRef.Name' - version: - $ref: '#/components/schemas/CategoryRef.Version' CurrentTime: description: >- - This type represents the information provided by the mobile edge + This type represents the information provided by the MEC platform in response to the Get Platform Time Request message. type: object required: @@ -507,7 +458,7 @@ components: type: string example: '02-00-00-00-00-00' DestinationInterface: - description: This type represents the destination interface. + description: This type represents the destination interface. If the action is FORWARD_DECAPSULATED, FORWARD_ENCAPSULATED or PASSTHROUGH one value shall be provided. If the action is DUPLICATE_DECAPSULATED or DUPLICATE_ENCAPSULATED, two values shall be provided. If the action is DROP, no value shall be provided. type: object required: - interfaceType @@ -542,7 +493,7 @@ components: - IP_V4 example: 'IP_V6' DnsRule.State: - description: DNS rule state + description: DNS rule state. This attribute may be updated using HTTP PUT method type: string enum: - ACTIVE @@ -575,69 +526,16 @@ components: $ref: '#/components/schemas/DnsRule.Ttl' state: $ref: '#/components/schemas/DnsRule.State' - EndPointInfo.Address.Host: - description: Host portion of the address - type: string - example: '192.0.2.0' - EndPointInfo.Address_Port: - description: Port portion of the address - type: integer - format: uint32 - example: 8080 - EndPointInfo.Address: - description: A IP address and port pair - type: object - required: - - host - - port - properties: - host: - $ref: '#/components/schemas/EndPointInfo.Address.Host' - port: - $ref: '#/components/schemas/EndPointInfo.Address_Port' - EndPointInfo.Addresses: - description: >- - Entry point information of the service as one or more pairs of IP - address and port + LinkType: + description: This type represents a type of link and may be referenced from data structures type: object - required: - - addresses properties: - addresses: - type: array - minItems: 0 - items: - $ref: '#/components/schemas/EndPointInfo.Address' - EndPointInfo.Alternative: - description: >- - Entry point information of the service in a format defined by an - implementation, or in an external specification. - type: object - required: - - alternative - properties: - alternative: - type: object - EndPointInfo.Uri: - description: Entry point information of the service - type: string - format: uri - example: '/meMp1/service/EntryPoint' - EndPointInfo.Uris: + href: + $ref: '#/components/schemas/Href' + LinkType.ConfirmTermination: description: >- - Entry point information of the service as string, formatted according to - URI syntax - type: object - required: - - uris - properties: - uris: - type: array - minItems: 0 - items: - $ref: '#/components/schemas/EndPointInfo.Uri' - LinkType: - description: This type represents a type of link and may be referenced from data structures + Link to the task resource where to confirm termination in case the + application is ready to be terminated before expiry of the timeout. type: object properties: href: @@ -646,8 +544,8 @@ components: description: URI referring to a resource type: string format: uri - example: '/meMp1/example' - Mp1SubscriptionLinkList.Links: + example: '/mecAppSuptApi/example' + MecAppSuptApiSubscriptionLinkList.Links: description: Self-referring URI. type: object required: @@ -655,12 +553,12 @@ components: properties: self: $ref: '#/components/schemas/LinkType' - subscription: - description: Subscription list + subscriptions: + description: The MEC application instance's subscriptions type: array items: - $ref: '#/components/schemas/Mp1SubscriptionLinkList.Subscription' - Mp1SubscriptionLinkList.Subscription: + $ref: '#/components/schemas/MecAppSuptApiSubscriptionLinkList.Subscription' + MecAppSuptApiSubscriptionLinkList.Subscription: description: A link to a subscription. type: object required: @@ -671,23 +569,26 @@ components: $ref: '#/components/schemas/Href' rel: description: >- - The values are as defined in the "subscriptionType" attribute for - each different Mp1 event subscription data type. + The values shall be set to AppTerminationNotificationSubscription. type: string - enum: - - AppTerminationNotificationSubscription - - SerAvailabilityNotificationSubscription - Mp1SubscriptionLinkList: + MecAppSuptApiSubscriptionLinkList: description: >- This type represents a list of links related to currently existing - subscriptions for a mobile edge application instance. This information + subscriptions for a MEC application instance. This information is returned when sending a request to receive current subscriptions. type: object required: - _links properties: _links: - $ref: '#/components/schemas/Mp1SubscriptionLinkList.Links' + $ref: '#/components/schemas/MecAppSuptApiSubscriptionLinkList.Links' + OperationActionType: + description: Operation that is being performed on the MEC application instance. + type: string + enum: + - STOPPING + - TERMINATING + example: 'TERMINATING' ProblemDetails: type: object properties: @@ -721,37 +622,12 @@ components: description: >- A URI reference according to IETF RFC 3986 that identifies the problem type - SecurityInfo.OAuth2Info.GrantTypes: - description: List of supported OAuth 2.0 grant types + ReadyIndicationType: + description: Indication about the MEC application instance. type: string enum: - - OAUTH2_AUTHORIZATION_CODE - - OAUTH2_IMPLICIT_GRANT - - OAUTH2_RESOURCE_OWNER - - OAUTH2_CLIENT_CREDENTIALS - example: 'OAUTH2_CLIENT_CREDENTIALS' - SecurityInfo.OAuth2Info.TokenEndpoint: - description: The token endpoint - type: string - format: uri - example: '/meMp1/security/TokenEndPoint' - SecurityInfo.OAuth2Info: - description: Parameters related to use of OAuth 2.0 - required: - - grantTypes - - tokenEndpoint - properties: - grantTypes: - $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes' - tokenEndpoint: - $ref: '#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint' - type: object - SecurityInfo: - description: This type represents security information related to a transport - type: object - properties: - oAuth2Info: - $ref: '#/components/schemas/SecurityInfo.OAuth2Info' + - READY + example: 'READY' Self: description: Self-referring URI. type: object @@ -761,160 +637,6 @@ components: self: $ref: '#/components/schemas/LinkType' readOnly: true - SerAvailabilityNotificationSubscription.CallbackReference: - description: >- - URI selected by the mobile edge application instance to receive - notifications on the subscribed mobile edge service availability - information. This shall be included in both the request and the - response. - type: string - format: uri - SerAvailabilityNotificationSubscription: - description: >- - This type represents a subscription to the notifications from the mobile - edge platform regarding the availability of a mobile edge service or a - list of mobile edge services. - type: object - required: - - subscriptionType - - callbackReference - - _links - - filteringCriteria - properties: - subscriptionType: - $ref: >- - #/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType - callbackReference: - $ref: >- - #/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference - _links: - $ref: '#/components/schemas/Self' - filteringCriteria: - $ref: '#/components/schemas/ServiceInfo' - SerAvailabilityNotificationSubscription.SubscriptionType: - description: Shall be set to SerAvailabilityNotificationSubscription. - type: string - example: 'SerAvailabilityNotificationSubscription' - ServiceAvailabilityNotification: - description: >- - This type represents the service availability information. - type: object - required: - - notificationType - - services - - _links - properties: - notificationType: - $ref: >- - #/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType - services: - type: array - items: - $ref: '#/components/schemas/ServiceInfo' - _links: - $ref: '#/components/schemas/Subscription' - SerializerTypes: - description: The enumeration SerializerTypes represents types of serializers - type: string - enum: - - JSON - - XML - - PROTOBUF3 - example: 'JSON' - ServiceInfo.SerInstanceId: - description: >- - Identifier of the service instance assigned by the MEPM / mobile edge - platform. - type: string - readOnly: true - example: 'ServiceInstance123' - ServiceInfo.SerName: - description: >- - The name of the service. This is how the service producing mobile edge - application identifies the service instance it produces. - type: string - example: 'ExampleService' - ServiceInfo.State: - description: Contains the state - type: string - enum: - - ACTIVE - - INACTIVE - example: 'ACTIVE' - ServiceInfo.TransportId: - description: >- - Identifier of the platform-provided transport to be used by the service. - Valid identifiers may be obtained using the "Transport information - query" procedure. May be present in POST requests to signal the use of a - platform-provided transport for the service, and shall be absent - otherwise. - type: string - writeOnly: true - example: 'Rest1' - ServiceInfo.Version: - description: Service version - type: string - example: 'ServiceVersion1' - ServiceInfo.Post: - description: This type represents the general information of a mobile edge service. - type: object - required: - - serName - - version - - state - - serializer - oneOf: - - required: [transportId] - - required: [transportInfo] - properties: - serInstanceId: - $ref: '#/components/schemas/ServiceInfo.SerInstanceId' - serName: - $ref: '#/components/schemas/ServiceInfo.SerName' - serCategory: - $ref: '#/components/schemas/CategoryRef' - version: - $ref: '#/components/schemas/ServiceInfo.Version' - state: - $ref: '#/components/schemas/ServiceInfo.State' - transportId: - $ref: '#/components/schemas/ServiceInfo.TransportId' - transportInfo: - $ref: '#/components/schemas/TransportInfo' - serializer: - $ref: '#/components/schemas/SerializerTypes' - ServiceInfo: - description: This type represents the general information of a mobile edge service. - type: object - required: - - serName - - version - - state - - transportInfo - - serializer - properties: - serInstanceId: - $ref: '#/components/schemas/ServiceInfo.SerInstanceId' - serName: - $ref: '#/components/schemas/ServiceInfo.SerName' - serCategory: - $ref: '#/components/schemas/CategoryRef' - version: - $ref: '#/components/schemas/ServiceInfo.Version' - state: - $ref: '#/components/schemas/ServiceInfo.State' - transportInfo: - $ref: '#/components/schemas/TransportInfo' - serializer: - $ref: '#/components/schemas/SerializerTypes' - Subscription: - description: A link to the related subscription - type: object - required: - - subscription - properties: - subscription: - $ref: '#/components/schemas/LinkType' TimingCaps.NtpServers.AuthenticationKeyNum: description: Authentication key number type: integer @@ -1035,7 +757,7 @@ components: example: 0 TimingCaps: description: >- - This type represents the information provided by the mobile edge + This type represents the information provided by the MEC platform in response to the Timing capabilities Query message. type: object properties: @@ -1164,16 +886,16 @@ components: $ref: '#/components/schemas/TrafficFilter.TC' TrafficRule.Action: description: >- - The action of the ME host data plane when a packet matches the - trafficFilter + The action of the MEC host data plane when a packet matches the trafficFilter + type: string enum: - DROP - FORWARD_DECAPSULATED - - FORWARD_AS_IS + - FORWARD_ENCAPSULATED - PASSTHROUGH - DUPLICATE_DECAPSULATED - - DUPLICATE_AS_IS + - DUPLICATE_ENCAPSULATED example: 'DROP' TrafficRule.FilterType: description: >- @@ -1196,7 +918,7 @@ components: format: uint32 example: 1 TrafficRule.State: - description: Contains the traffic rule state + description: Contains the traffic rule state. This attribute may be updated using HTTP PUT method type: string enum: - ACTIVE @@ -1229,76 +951,6 @@ components: $ref: '#/components/schemas/DestinationInterface' state: $ref: '#/components/schemas/TrafficRule.State' - TransportInfo.Description: - description: Human-readable description of this transport - type: string - example: 'REST API' - TransportInfo.Id: - description: The identifier of this transport - type: string - example: 'TransId12345' - TransportInfo.ImplSpecificInfo: - description: Additional implementation specific details of the transport - type: object - TransportInfo.Name: - description: The name of this transport - type: string - example: 'REST' - TransportInfo.Protocol: - description: The name of the protocol used. Shall be set to HTTP for a REST API. - type: string - example: 'HTTP' - TransportInfo.Version: - description: The version of the protocol used - type: string - example: '2.0' - TransportInfo: - description: This type represents the general information of a mobile edge service. - type: object - required: - - id - - name - - type - - protocol - - version - - endpoint - - security - properties: - id: - $ref: '#/components/schemas/TransportInfo.Id' - name: - $ref: '#/components/schemas/TransportInfo.Name' - description: - $ref: '#/components/schemas/TransportInfo.Description' - type: - $ref: '#/components/schemas/TransportTypes' - protocol: - $ref: '#/components/schemas/TransportInfo.Protocol' - version: - $ref: '#/components/schemas/TransportInfo.Version' - endpoint: - description: This type represents information about a transport endpoint - type: object - oneOf: - - $ref: '#/components/schemas/EndPointInfo.Uris' - - $ref: '#/components/schemas/EndPointInfo.Addresses' - - $ref: '#/components/schemas/EndPointInfo.Alternative' - security: - $ref: '#/components/schemas/SecurityInfo' - implSpecificInfo: - $ref: '#/components/schemas/TransportInfo.ImplSpecificInfo' - TransportTypes: - description: The enumeration TransportTypes represents types of transports - type: string - enum: - - REST_HTTP - - MB_TOPIC_BASED - - MB_ROUTING - - MB_PUBSUB - - RPC - - RPC_STREAMING - - WEBSOCKET - example: 'REST_HTTP' TunnelInfo.TunnelDstAddress: description: Destination address of the tunnel type: string @@ -1330,8 +982,8 @@ components: Path.AppInstanceId: name: appInstanceId description: >- - Represents a mobile edge application instance. Note that the - appInstanceId is allocated by the mobile edge platform manager. + Represents a MEC application instance. Note that the + appInstanceId is allocated by the MEC platform manager. in: path required: true schema: @@ -1346,31 +998,12 @@ components: Path.SubscriptionId: name: subscriptionId description: >- - Represents a subscription to the notifications from the mobile edge + Represents a subscription to the notifications from the MEC platform. in: path required: true schema: type: string - Path.SubscriptionType: - name: subscriptionType - description: >- - Represents a subscription type to the notifications from the mobile edge - platform. - in: path - required: true - schema: - type: string - enum: - - AppTerminationNotificationSubscription - - SerAvailabilityNotificationSubscription - Path.ServiceId: - name: serviceId - description: Represents a mobile edge service instance. - in: path - required: true - schema: - type: string Path.TrafficRuleId: name: trafficRuleId description: Represents a traffic rule. @@ -1378,43 +1011,6 @@ components: required: true schema: type: string - Query.Ser_category_id: - name: ser_category_id - description: >- - A mobile edge application instance may use ser_category_id as an input - parameter to query the availability of a list of mobile edge service - instances in a serCategory. Either "ser_instance_id" or "ser_name" or - "ser_category_id" or none of them shall be present. - in: query - required: false - schema: - type: string - Query.Ser_instance_id: - name: ser_instance_id - description: >- - A mobile edge application instance may use multiple ser_instance_ids as - an input parameter to query the availability of a list of mobile edge - service instances. Either "ser_instance_id" or "ser_name" or - "ser_category_id" or none of them shall be present. - in: query - required: false - schema: - type: array - items: - type: string - Query.Ser_name: - name: ser_name - description: >- - A mobile edge application instance may use multiple ser_names as an - input parameter to query the availability of a list of mobile edge - service instances. Either "ser_instance_id" or "ser_name" or - "ser_category_id" or none of them shall be present. - in: query - required: false - schema: - type: array - items: - type: string responses: ApplicationsDnsRules.200: description: >- @@ -1453,16 +1049,16 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Mp1SubscriptionLinkList' + $ref: '#/components/schemas/MecAppSuptApiSubscriptionLinkList' links: - getIndividualMeMp1SubscriptionLinkList: - $ref: '#/components/links/GetIndividualMeMp1SubscriptionLinkList' - delIndividualMeMp1SubscriptionLinkList: - $ref: '#/components/links/DelIndividualMeMp1SubscriptionLinkList' + getIndividualmecAppSuptApiSubscriptionLinkList: + $ref: '#/components/links/GetIndividualmecAppSuptApiSubscriptionLinkList' + delIndividualmecAppSuptApiSubscriptionLinkList: + $ref: '#/components/links/DelIndividualmecAppSuptApiSubscriptionLinkList' ApplicationsSubscriptions.201: description: >- - Entity body in the request contains a subscription to the mobile - edge service availability notifications that is to be created. + Entity body in the request contains a subscription to the + MEC service availability notifications that is to be created. headers: location: description: The resource URI of the created resource @@ -1472,14 +1068,12 @@ components: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/AppTerminationNotificationSubscription' - - $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + $ref: '#/components/schemas/AppTerminationNotificationSubscription' links: - getIndividualMeMp1Subscription: - $ref: '#/components/links/GetIndividualMeMp1Subscription' - delIndividualMeMp1Subscription: - $ref: '#/components/links/DelIndividualMeMp1Subscription' + getIndividualmecAppSuptApiSubscription: + $ref: '#/components/links/GetIndividualmecAppSuptApiSubscription' + delIndividualmecAppSuptApiSubscription: + $ref: '#/components/links/DelIndividualmecAppSuptApiSubscription' ApplicationsSubscription.200: description: >- Upon success, a response body containing the requested subscription @@ -1487,9 +1081,7 @@ components: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/AppTerminationNotificationSubscription' - - $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + $ref: '#/components/schemas/AppTerminationNotificationSubscription' ApplicationsTrafficRules.200: description: >- It is used to indicate nonspecific success. The response body @@ -1520,58 +1112,6 @@ components: examples: TrafficRule: $ref: '#/components/examples/TrafficRule' - Services.200: - description: >- - It is used to indicate nonspecific success. The response body - contains a representation of the resource. - content: - application/json: - schema: - type: array - minItems: 0 - items: - $ref: '#/components/schemas/ServiceInfo' - examples: - ServiceInfoList: - $ref: '#/components/examples/ServiceInfoList' - links: - getIndividualMeService: - $ref: '#/components/links/GetIndividualMeService' - putIndividualMeService: - $ref: '#/components/links/PutIndividualMeService' - Services.201: - description: >- - Upon success, the HTTP response shall include a Location HTTP header - that contains the resource URI of the created resource. - headers: - location: - description: The resource URI of the created resource - schema: - type: string - format: uri - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceInfo' - examples: - ServiceInfo: - $ref: '#/components/examples/ServiceInfo' - links: - getIndividualMeService: - $ref: '#/components/links/GetIndividualMeService' - putIndividualMeService: - $ref: '#/components/links/PutIndividualMeService' - ServicesServiceId.200: - description: >- - It is used to indicate nonspecific success. The response body - contains a representation of the resource. - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceInfo' - examples: - ServiceInfo: - $ref: '#/components/examples/ServiceInfo' TimingCurrentTime.200: description: >- It is used to indicate nonspecific success. The response body @@ -1588,22 +1128,21 @@ components: application/json: schema: $ref: '#/components/schemas/TimingCaps' - Transports.200: + Error.400: description: >- - It is used to indicate nonspecific success. The response body - contains a representation of the resource. + Bad Request. + It is used to indicate that incorrect parameters were passed to the request. content: - application/json: + application/problem+json: schema: - type: array - minItems: 0 - items: - $ref: '#/components/schemas/TransportInfo' - links: - getTransportInfo: - $ref: '#/components/links/GetTransportInfo' - Error.400: - description: Bad Request + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.401: + description: >- + Unauthorized. + It is used when the client did not submit the appropriate credentials. content: application/problem+json: schema: @@ -1612,13 +1151,31 @@ components: schema: $ref: '#/components/schemas/Empty' Error.403: - description: Forbidden + description: >- + Forbidden. + The operation is not allowed given the current status of the resource. content: application/problem+json: schema: $ref: '#/components/schemas/ProblemDetails' Error.404: - description: Not Found + description: >- + Not Found. + It is used when a client provided a URI that cannot be mapped + to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.409: + description: >- + Conflict. + The operation cannot be executed currently, due to a conflict with + the state of the resource. Typically, this is because the application + instance resource is in NOT_INSTANTIATED state. content: application/problem+json: schema: @@ -1627,7 +1184,21 @@ components: schema: $ref: '#/components/schemas/Empty' Error.412: - description: Precondition Failed + description: >- + Precondition Failed. + It is used when a condition has failed during conditional requests, + e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.429: + description: >- + Too Many Requests. + It is used when a rate limiter has triggered. content: application/problem+json: schema: @@ -1636,6 +1207,16 @@ components: schema: $ref: '#/components/schemas/Empty' requestBodies: + ApplicationsConfirmReady: + content: + application/json: + schema: + $ref: '#/components/schemas/AppReadyConfirmation' + ApplicationsConfirmTermination: + content: + application/json: + schema: + $ref: '#/components/schemas/AppTerminationConfirmation' ApplicationsDnsRule: content: application/json: @@ -1647,11 +1228,9 @@ components: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/AppTerminationNotificationSubscription' - - $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + $ref: '#/components/schemas/AppTerminationNotificationSubscription' description: >- - Entity body in the request contains a subscription to the mobile edge + Entity body in the request contains a subscription to the MEC application termination notifications that is to be created. required: true ApplicationsTrafficRule: @@ -1661,43 +1240,12 @@ components: $ref: '#/components/schemas/TrafficRule' description: One or more updated attributes that are allowed to be changed required: true - Services: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceInfo' - description: >- - New ServiceInfo with updated "state" is included as entity body of the - request - required: true - Services.Post: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceInfo.Post' - description: >- - New ServiceInfo with updated "state" is included as entity body of the - request - required: true - ServicesServiceId: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceInfo' - description: >- - New ServiceInfo with updated "state" is included as entity body of the - request - required: true AppTerminationNotification: content: application/json: schema: $ref: '#/components/schemas/AppTerminationNotification' - ServiceAvailabilityNotification: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceAvailabilityNotification' + required: true callbacks: AppTerminationNotification: '{$request.body#/callbackReference}': @@ -1708,45 +1256,13 @@ components: application instance termination/stop operationId: AppTerminationNotification_POST tags: - - callback + - callbacks requestBody: $ref: '#/components/requestBodies/AppTerminationNotification' responses: '200': description: Expected responses from callback consumer, if it accepts the callback - ServiceAvailabilityNotification: - '{$request.body#/callbackReference}': - post: - description: >- - 'Represents the service availability information that - is used in the following cases - - when the MEC platform announces the newly available - services to the authorized relevant MEC applications (e.g. - the applications that indicate the services as "optional" - or "required") that are subscribed to the corresponding - service availability notifications - - when the MEC platform notifies the authorized relevant - applications that are subscribed to the corresponding - service availability notifications about the service availability changes.' - operationId: ServiceAvailabilityNotification_POST - tags: - - callback - requestBody: - $ref: '#/components/requestBodies/ServiceAvailabilityNotification' - responses: - '200': - description: Expected responses from callback consumer, if it accepts the callback links: - GetIndividualMeService: - operationId: ServicesServiceId_GET - description: The `serviceId` value returned in the response can be used as the `serviceId` parameter in `GET /services/{serviceId}` - parameters: - serviceId: '$response.body#/serviceId' - PutIndividualMeService: - operationId: ServicesServiceId_PUT - description: The `serviceId` value returned in the response can be used as the `serviceId` parameter in `PUT /services/{serviceId}` - parameters: - serviceId: '$response.body#/serviceId' GetIndividualMeDNSRule: operationId: ApplicationsDnsRule_GET description: The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `GET /applications/{appInstanceId}/dns_rules/{dnsRuleId}` @@ -1767,34 +1283,29 @@ components: description: The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `PUT /applications/{appInstanceId}/traffic_rules/{trafficRuleId}` parameters: trafficRuleId: '$response.body#/trafficRuleId' - GetTransportInfo: - operationId: AppServices_POST - description: The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported - parameters: - transportId: '$response.body#/0/id' - GetIndividualMeMp1Subscription: + GetIndividualmecAppSuptApiSubscription: operationId: ApplicationsSubscription_GET - description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}` + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` parameters: - description: regex = \/mp1\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute subscriptionId: 'TBC' - DelIndividualMeMp1Subscription: + DelIndividualmecAppSuptApiSubscription: operationId: ApplicationsSubscription_DELETE - description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}` + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` parameters: - description: regex = \/mp1\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute subscriptionId: 'TBC' - GetIndividualMeMp1SubscriptionLinkList: + GetIndividualmecAppSuptApiSubscriptionLinkList: operationId: ApplicationsSubscription_GET - description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}` + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` parameters: - description: regex = \/mp1\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute subscriptionId: 'TBC' - DelIndividualMeMp1SubscriptionLinkList: + DelIndividualmecAppSuptApiSubscriptionLinkList: operationId: ApplicationsSubscription_DELETE - description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}` + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` parameters: - description: regex = \/mp1\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + description: regex = \/mec_app_support\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute subscriptionId: 'TBC' examples: DnsRule: @@ -1813,59 +1324,12 @@ components: ipAddress: '146.241.7.3' ttl: 300 state: 'ACTIVE' - ServiceInfo: - value: - serInstanceId: 'ServiceInstance123' - serName: 'ExampleService' - serCategory: - href: 'catItem1' - id: 'id12345' - name: 'RNI' - version: 'version1' - version: 'ServiceVersion1' - state: 'ACTIVE' - transportInfo: - id: 'TransId12345' - name: 'REST' - description: 'REST API' - type: 'REST_HTTP' - protocol: 'HTTP' - version: '2.0' - endpoint: - uris: - - '/meMp1/service/EntryPoint' - security: - oAuth2Info: - grantTypes: 'OAUTH2_CLIENT_CREDENTIALS' - tokenEndpoint: '/meMp1/security/TokenEndPoint' - serializer: 'JSON' - ServiceInfoList: - value: - - serInstanceId: 'ServiceInstance123' - serName: 'ExampleService' - serCategory: - href: 'catItem1' - id: 'id12345' - name: 'RNI' - version: 'version1' - version: 'ServiceVersion1' - state: 'ACTIVE' - transportInfo: - id: 'TransId12345' - name: 'REST' - description: 'REST API' - type: 'REST_HTTP' - protocol: 'HTTP' - version: '2.0' - endpoint: - addresses: - - host: '192.0.2.0' - port: 8080 - security: - oAuth2Info: - grantTypes: 'OAUTH2_CLIENT_CREDENTIALS' - tokenEndpoint: '/meMp1/security/TokenEndPoint' - serializer: 'JSON' + - dnsRuleId: 'DnsRule2' + domainName: 'www.example.com' + ipAddressType: 'IP_V4' + ipAddress: '146.241.7.4' + ttl: 300 + state: 'INACTIVE' TrafficRule: value: trafficRuleId: 'TrafficRule123' @@ -1903,4 +1367,4 @@ components: dstInterface: interfaceType: 'IP' dstIpAddress: '20.1.1.1' - state: 'ACTIVE' \ No newline at end of file + state: 'ACTIVE' diff --git a/MecServiceMgmtApi.json b/MecServiceMgmtApi.json new file mode 100644 index 0000000000000000000000000000000000000000..fab08a9b0f4eddb58af205d1d7e738d6dde8ca09 --- /dev/null +++ b/MecServiceMgmtApi.json @@ -0,0 +1,1690 @@ +{ + "openapi": "3.0.2", + "servers": [ + { + "url": "http://127.0.0.1:8081/mec_service_mgmt/v1" + }, + { + "url": "https://127.0.0.1:8081/mec_service_mgmt/v1" + } + ], + "info": { + "title": "MEC Service Management API", + "version": "2.1.1", + "description": "The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI", + "license": { + "name": "BSD-3-Clause", + "url": "https://forge.etsi.org/legal-matters" + }, + "contact": { + "email": "cti_support@etsi.org" + } + }, + "externalDocs": { + "description": "ETSI GS MEC011 Application Enablement API, V2.1.1", + "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf" + }, + "tags": [ + { + "name": "appSubscriptions" + }, + { + "name": "appServices" + }, + { + "name": "services" + }, + { + "name": "transports" + }, + { + "name": "callbacks" + } + ], + "paths": { + "/services": { + "get": { + "description": "This method retrieves information about a list of mecService resources. This method is typically used in \"service availability query\" procedure", + "operationId": "Services_GET", + "tags": [ + "services" + ], + "parameters": [ + { + "$ref": "#/components/parameters/Query.Ser_instance_id" + }, + { + "$ref": "#/components/parameters/Query.Ser_name" + }, + { + "$ref": "#/components/parameters/Query.Ser_category_id" + }, + { + "$ref": "#/components/parameters/Query.Consumed_local_only" + }, + { + "$ref": "#/components/parameters/Query.Is_local" + }, + { + "$ref": "#/components/parameters/Query.LocalityType" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Services.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + }, + "414": { + "$ref": "#/components/responses/Error.414" + } + } + } + }, + "/services/{serviceId}": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.ServiceId" + } + ], + "get": { + "description": "This method retrieves information about a mecService resource. This method is typically used in \"service availability query\" procedure", + "operationId": "ServicesServiceId_GET", + "tags": [ + "services" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ServicesServiceId.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + }, + "/applications/{appInstanceId}/services": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + } + ], + "get": { + "description": "This method retrieves information about a list of mecService resources. This method is typically used in \"service availability query\" procedure", + "operationId": "AppServices_GET", + "tags": [ + "appServices" + ], + "parameters": [ + { + "$ref": "#/components/parameters/Query.Ser_instance_id" + }, + { + "$ref": "#/components/parameters/Query.Ser_name" + }, + { + "$ref": "#/components/parameters/Query.Ser_category_id" + }, + { + "$ref": "#/components/parameters/Query.Consumed_local_only" + }, + { + "$ref": "#/components/parameters/Query.Is_local" + }, + { + "$ref": "#/components/parameters/Query.LocalityType" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Services.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + }, + "414": { + "$ref": "#/components/responses/Error.414" + } + } + }, + "post": { + "description": "This method is used to create a mecService resource. This method is typically used in \"service availability update and new service registration\" procedure", + "operationId": "AppServices_POST", + "tags": [ + "appServices" + ], + "responses": { + "201": { + "$ref": "#/components/responses/Services.201" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/Services.Post" + } + } + }, + "/applications/{appInstanceId}/services/{serviceId}": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + }, + { + "$ref": "#/components/parameters/Path.ServiceId" + } + ], + "get": { + "description": "This method retrieves information about a mecService resource. This method is typically used in \"service availability query\" procedure", + "operationId": "AppServicesServiceId_GET", + "tags": [ + "appServices" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ServicesServiceId.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + }, + "put": { + "description": "This method updates the information about a mecService resource", + "operationId": "AppServicesServiceId_PUT", + "tags": [ + "appServices" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ServicesServiceId.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + }, + "412": { + "$ref": "#/components/responses/Error.412" + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/ServicesServiceId" + } + }, + "delete": { + "description": "This method deletes a mecService resource. This method is typically used in the service deregistration procedure. ", + "operationId": "AppServicesServiceId_DELETE", + "tags": [ + "appServices" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + }, + "/applications/{appInstanceId}/subscriptions": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + } + ], + "get": { + "description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.", + "operationId": "ApplicationsSubscriptions_GET", + "tags": [ + "appSubscriptions" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ApplicationsSubscriptions.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + }, + "post": { + "description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the MEC service availability notifications. Upon success, the response contains entity body describing the created subscription.", + "operationId": "ApplicationsSubscriptions_POST", + "tags": [ + "appSubscriptions" + ], + "responses": { + "201": { + "$ref": "#/components/responses/ApplicationsSubscriptions.201" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/ApplicationsSubscriptions" + }, + "callbacks": { + "serviceAvailabilityNotification": { + "$ref": "#/components/callbacks/ServiceAvailabilityNotification" + } + } + } + }, + "/applications/{appInstanceId}/subscriptions/{subscriptionId}": { + "parameters": [ + { + "$ref": "#/components/parameters/Path.AppInstanceId" + }, + { + "$ref": "#/components/parameters/Path.SubscriptionId" + } + ], + "get": { + "description": "The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.", + "operationId": "ApplicationsSubscription_GET", + "tags": [ + "appSubscriptions" + ], + "responses": { + "200": { + "$ref": "#/components/responses/ApplicationsSubscription.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + }, + "delete": { + "description": "This method deletes a mecSrvMgmtSubscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure.", + "operationId": "ApplicationsSubscription_DELETE", + "tags": [ + "appSubscriptions" + ], + "responses": { + "204": { + "description": "No Content" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + }, + "/transports": { + "get": { + "description": "This method retrieves information about a list of available transports. This method is typically used by a service-producing application to discover transports provided by the MEC platform in the \"transport information query\" procedure", + "operationId": "Transports_GET", + "tags": [ + "transports" + ], + "responses": { + "200": { + "$ref": "#/components/responses/Transports.200" + }, + "400": { + "$ref": "#/components/responses/Error.400" + }, + "403": { + "$ref": "#/components/responses/Error.403" + }, + "404": { + "$ref": "#/components/responses/Error.404" + } + } + } + } + }, + "components": { + "schemas": { + "Empty": { + "description": "Empty schema" + }, + "CategoryRef.Href": { + "description": "Reference of the catalogue", + "type": "string", + "format": "uri", + "example": "/example/catalogue1" + }, + "CategoryRef.Id": { + "description": "Unique identifier of the category", + "type": "string", + "example": "id12345" + }, + "CategoryRef.Name": { + "description": "Name of the category, example values include RNI, Location & Bandwidth Management", + "type": "string", + "example": "RNI" + }, + "CategoryRef.Version": { + "description": "Category version", + "type": "string", + "example": "version1" + }, + "CategoryRef": { + "description": "This type represents the category reference", + "type": "object", + "required": [ + "href", + "id", + "name", + "version" + ], + "properties": { + "href": { + "$ref": "#/components/schemas/CategoryRef.Href" + }, + "id": { + "$ref": "#/components/schemas/CategoryRef.Id" + }, + "name": { + "$ref": "#/components/schemas/CategoryRef.Name" + }, + "version": { + "$ref": "#/components/schemas/CategoryRef.Version" + } + } + }, + "CategoryRefs": { + "description": "Categories of services about which to report events.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/CategoryRef" + } + }, + "EndPointInfo.Address.Host": { + "description": "Host portion of the address", + "type": "string", + "example": "192.0.2.0" + }, + "EndPointInfo.Address_Port": { + "description": "Port portion of the address", + "type": "integer", + "format": "uint32", + "example": 8080 + }, + "EndPointInfo.Address": { + "description": "A IP address and port pair", + "type": "object", + "required": [ + "host", + "port" + ], + "properties": { + "host": { + "$ref": "#/components/schemas/EndPointInfo.Address.Host" + }, + "port": { + "$ref": "#/components/schemas/EndPointInfo.Address_Port" + } + } + }, + "EndPointInfo.Addresses": { + "description": "Entry point information of the service as one or more pairs of IP address and port", + "type": "object", + "required": [ + "addresses" + ], + "properties": { + "addresses": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/EndPointInfo.Address" + } + } + } + }, + "EndPointInfo.Alternative": { + "description": "Entry point information of the service in a format defined by an implementation, or in an external specification.", + "type": "object", + "required": [ + "alternative" + ], + "properties": { + "alternative": { + "type": "object" + } + } + }, + "EndPointInfo.Uri": { + "description": "Entry point information of the service", + "type": "string", + "format": "uri", + "example": "/mecSerMgmtApi/service/EntryPoint" + }, + "EndPointInfo.Uris": { + "description": "Entry point information of the service as string, formatted according to URI syntax", + "type": "object", + "required": [ + "uris" + ], + "properties": { + "uris": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/EndPointInfo.Uri" + } + } + } + }, + "LinkType": { + "description": "This type represents a type of link and may be referenced from data structures", + "type": "object", + "properties": { + "href": { + "$ref": "#/components/schemas/Href" + } + } + }, + "Href": { + "description": "URI referring to a resource", + "type": "string", + "format": "uri", + "example": "/mecSerMgmtApi/example" + }, + "MecServiceMgmtApiSubscriptionLinkList.Links": { + "description": "Self-referring URI.", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "$ref": "#/components/schemas/LinkType" + }, + "subscriptions": { + "description": "The MEC application instance's subscriptions", + "type": "array", + "items": { + "$ref": "#/components/schemas/MecServiceMgmtApiSubscriptionLinkList.Subscription" + } + } + } + }, + "MecServiceMgmtApiSubscriptionLinkList.Subscription": { + "description": "A link to a subscription.", + "type": "object", + "required": [ + "href", + "rel" + ], + "properties": { + "href": { + "$ref": "#/components/schemas/Href" + }, + "rel": { + "description": "The value shall be se to SerAvailabilityNotificationSubscription.", + "type": "string" + } + } + }, + "MecServiceMgmtApiSubscriptionLinkList": { + "description": "This type represents a list of links related to currently existing subscriptions for a MEC application instance. This information is returned when sending a request to receive current subscriptions.", + "type": "object", + "required": [ + "_links" + ], + "properties": { + "_links": { + "$ref": "#/components/schemas/MecServiceMgmtApiSubscriptionLinkList.Links" + } + } + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/Problem.type" + }, + "title": { + "$ref": "#/components/schemas/Problem.title" + }, + "status": { + "$ref": "#/components/schemas/Problem.status" + }, + "detail": { + "$ref": "#/components/schemas/Problem.detail" + }, + "instance": { + "$ref": "#/components/schemas/Problem.instance" + } + } + }, + "Problem.detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the problem" + }, + "Problem.instance": { + "type": "string", + "format": "uri", + "description": "A URI reference that identifies the specific occurrence of the problem" + }, + "Problem.status": { + "type": "integer", + "format": "uint32", + "description": "The HTTP status code for this occurrence of the problem" + }, + "Problem.title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "Problem.type": { + "type": "string", + "format": "uri", + "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" + }, + "SecurityInfo.OAuth2Info.GrantType": { + "description": "OAuth 2.0 grant type", + "type": "string", + "enum": [ + "OAUTH2_AUTHORIZATION_CODE", + "OAUTH2_IMPLICIT_GRANT", + "OAUTH2_RESOURCE_OWNER", + "OAUTH2_CLIENT_CREDENTIALS" + ], + "example": "OAUTH2_CLIENT_CREDENTIALS" + }, + "SecurityInfo.OAuth2Info.GrantTypes": { + "description": "List of supported OAuth 2.0 grant types.", + "type": "array", + "minItems": 1, + "maxItems": 4, + "items": { + "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantType" + } + }, + "SecurityInfo.OAuth2Info.TokenEndpoint": { + "description": "The token endpoint", + "type": "string", + "format": "uri", + "example": "/mecSerMgmtApi/security/TokenEndPoint" + }, + "SecurityInfo.OAuth2Info": { + "description": "Parameters related to use of OAuth 2.0", + "required": [ + "grantTypes", + "tokenEndpoint" + ], + "properties": { + "grantTypes": { + "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes" + }, + "tokenEndpoint": { + "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint" + } + }, + "type": "object" + }, + "SecurityInfo": { + "description": "This type represents security information related to a transport", + "type": "object", + "properties": { + "oAuth2Info": { + "$ref": "#/components/schemas/SecurityInfo.OAuth2Info" + } + } + }, + "Self": { + "description": "Self-referring URI.", + "type": "object", + "required": [ + "self" + ], + "properties": { + "self": { + "$ref": "#/components/schemas/LinkType" + } + }, + "readOnly": true + }, + "SerAvailabilityNotificationSubscription.CallbackReference": { + "description": "URI selected by the MEC application instance to receive notifications on the subscribed MEC service availability information. This shall be included in both the request and the response.", + "type": "string", + "format": "uri" + }, + "SerAvailabilityNotificationSubscription": { + "description": "This type represents a subscription to the notifications from the MEC platform regarding the availability of a MEC service or a list of MEC services.", + "type": "object", + "required": [ + "subscriptionType", + "callbackReference", + "_links" + ], + "properties": { + "subscriptionType": { + "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" + }, + "callbackReference": { + "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference" + }, + "_links": { + "$ref": "#/components/schemas/Self" + }, + "filteringCriteria": { + "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.FilteringCriteria" + } + } + }, + "SerAvailabilityNotificationSubscription.FilteringCriteria": { + "description": "Filtering criteria to match services for which events are requested to be reported. If absent, matches all services. All child attributes are combined with the logical \"AND\" operation.", + "type": "object", + "not": { + "required": [ + "serInstanceIds", + "serNames", + "serCategories" + ] + }, + "properties": { + "serInstanceIds": { + "$ref": "#/components/schemas/SerInstanceIds" + }, + "serNames": { + "$ref": "#/components/schemas/SerNames" + }, + "serCategories": { + "$ref": "#/components/schemas/CategoryRefs" + }, + "states": { + "$ref": "#/components/schemas/ServiceStates" + }, + "isLocal": { + "$ref": "#/components/schemas/ServiceInfo.IsLocal" + } + } + }, + "SerAvailabilityNotificationSubscription.SubscriptionType": { + "description": "Shall be set to SerAvailabilityNotificationSubscription.", + "type": "string", + "example": "SerAvailabilityNotificationSubscription" + }, + "ServiceAvailabilityNotification": { + "description": "This type represents the service availability information.", + "type": "object", + "required": [ + "notificationType", + "serviceReferences", + "_links" + ], + "properties": { + "notificationType": { + "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" + }, + "serviceReferences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceAvailabilityNotification.ServiceReferences" + } + }, + "_links": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "ServiceAvailabilityNotification.ServiceReferences": { + "description": "List of links to services whose availability has changed.", + "type": "object", + "required": [ + "serName", + "serInstanceId", + "state", + "changeType" + ], + "properties": { + "link": { + "$ref": "#/components/schemas/LinkType" + }, + "serName": { + "$ref": "#/components/schemas/ServiceInfo.SerName" + }, + "serInstanceId": { + "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" + }, + "state": { + "$ref": "#/components/schemas/ServiceState" + }, + "changeType": { + "$ref": "#/components/schemas/ServiceAvailabilityNotification.ChangeType" + } + } + }, + "ServiceAvailabilityNotification.ChangeType": { + "description": "Type of the change. Valid values:\n ADDED: The service was newly added.\n REMOVED: The service was removed.\n STATE_CHANGED: Only the state of the service was changed. \n ATTRIBUTES_CHANGED: At least one attribute of the service other than state was changed. The change may or may not include changing the state.", + "type": "string", + "enum": [ + "ADDED", + "REMOVED", + "STATE_CHANGED", + "ATTRIBUTES_CHANGED" + ] + }, + "SerializerType": { + "description": "The enumeration represents types of serializers", + "type": "string", + "enum": [ + "JSON", + "XML", + "PROTOBUF3" + ], + "example": "JSON" + }, + "LocalityType": { + "description": "The scope of locality as expressed by \"consumedLocalOnly\" and \"isLocal\". If absent, defaults to MEC_HOST", + "type": "string", + "enum": [ + "MEC_SYSTEM", + "MEC_HOST", + "NFVI_POP", + "ZONE", + "ZONE_GROUP", + "NFVI_NODE" + ], + "example": "MEC_SYSTEM" + }, + "ServiceState": { + "description": "This enumeration defines the possible states of a service.", + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "example": "ACTIVE" + }, + "ServiceStates": { + "description": "States of the services about which to report events. If the event is a state change, this filter represents the state after the change.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/ServiceState" + } + }, + "ServiceInfo.SerInstanceId": { + "description": "Identifier of the service instance assigned by the MEC platform.", + "type": "string", + "readOnly": true, + "example": "ServiceInstance123" + }, + "SerInstanceIds": { + "description": "Identifiers of service instances about which to report events.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" + } + }, + "ServiceInfo.SerName": { + "description": "The name of the service. This is how the service producing MEC application identifies the service instance it produces.", + "type": "string", + "example": "ExampleService" + }, + "SerNames": { + "description": "Names of services about which to report events.", + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/ServiceInfo.SerName" + } + }, + "ServiceInfo.TransportId": { + "description": "Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.", + "type": "string", + "writeOnly": true, + "example": "Rest1" + }, + "ServiceInfo.Version": { + "description": "Service version", + "type": "string", + "example": "ServiceVersion1" + }, + "ServiceInfo.ConsumedLocalOnly": { + "description": "Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance.", + "type": "boolean", + "example": false + }, + "ServiceInfo.IsLocal": { + "description": "Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application.", + "type": "boolean", + "example": true + }, + "ServiceInfo.Post": { + "description": "This type represents the general information of a MEC service.", + "type": "object", + "required": [ + "serName", + "version", + "state", + "serializer" + ], + "oneOf": [ + { + "required": [ + "transportId" + ] + }, + { + "required": [ + "transportInfo" + ] + } + ], + "properties": { + "serInstanceId": { + "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" + }, + "serName": { + "$ref": "#/components/schemas/ServiceInfo.SerName" + }, + "serCategory": { + "$ref": "#/components/schemas/CategoryRef" + }, + "version": { + "$ref": "#/components/schemas/ServiceInfo.Version" + }, + "state": { + "$ref": "#/components/schemas/ServiceState" + }, + "transportId": { + "$ref": "#/components/schemas/ServiceInfo.TransportId" + }, + "transportInfo": { + "$ref": "#/components/schemas/TransportInfo" + }, + "serializer": { + "$ref": "#/components/schemas/SerializerType" + }, + "scopeOfLocality": { + "$ref": "#/components/schemas/LocalityType" + }, + "consumedLocalOnly": { + "$ref": "#/components/schemas/ServiceInfo.ConsumedLocalOnly" + }, + "isLocal": { + "$ref": "#/components/schemas/ServiceInfo.IsLocal" + } + } + }, + "ServiceInfo": { + "description": "This type represents the general information of a MEC service.", + "type": "object", + "required": [ + "serName", + "version", + "state", + "transportInfo", + "serializer" + ], + "properties": { + "serInstanceId": { + "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" + }, + "serName": { + "$ref": "#/components/schemas/ServiceInfo.SerName" + }, + "serCategory": { + "$ref": "#/components/schemas/CategoryRef" + }, + "version": { + "$ref": "#/components/schemas/ServiceInfo.Version" + }, + "state": { + "$ref": "#/components/schemas/ServiceState" + }, + "transportInfo": { + "$ref": "#/components/schemas/TransportInfo" + }, + "serializer": { + "$ref": "#/components/schemas/SerializerType" + }, + "scopeOfLocality": { + "$ref": "#/components/schemas/LocalityType" + }, + "consumedLocalOnly": { + "$ref": "#/components/schemas/ServiceInfo.ConsumedLocalOnly" + }, + "isLocal": { + "$ref": "#/components/schemas/ServiceInfo.IsLocal" + } + } + }, + "Subscription": { + "description": "A link to the related subscription", + "type": "object", + "required": [ + "subscription" + ], + "properties": { + "subscription": { + "$ref": "#/components/schemas/LinkType" + } + } + }, + "TransportInfo.Description": { + "description": "Human-readable description of this transport", + "type": "string", + "example": "REST API" + }, + "TransportInfo.Id": { + "description": "The identifier of this transport", + "type": "string", + "example": "TransId12345" + }, + "TransportInfo.ImplSpecificInfo": { + "description": "Additional implementation specific details of the transport", + "type": "object" + }, + "TransportInfo.Name": { + "description": "The name of this transport", + "type": "string", + "example": "REST" + }, + "TransportInfo.Protocol": { + "description": "The name of the protocol used. Shall be set to HTTP for a REST API.", + "type": "string", + "example": "HTTP" + }, + "TransportInfo.Version": { + "description": "The version of the protocol used", + "type": "string", + "example": "2.0" + }, + "TransportInfo": { + "description": "This type represents the general information of a MEC service.", + "type": "object", + "required": [ + "id", + "name", + "type", + "protocol", + "version", + "endpoint", + "security" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/TransportInfo.Id" + }, + "name": { + "$ref": "#/components/schemas/TransportInfo.Name" + }, + "description": { + "$ref": "#/components/schemas/TransportInfo.Description" + }, + "type": { + "$ref": "#/components/schemas/TransportType" + }, + "protocol": { + "$ref": "#/components/schemas/TransportInfo.Protocol" + }, + "version": { + "$ref": "#/components/schemas/TransportInfo.Version" + }, + "endpoint": { + "description": "This type represents information about a transport endpoint", + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/EndPointInfo.Uris" + }, + { + "$ref": "#/components/schemas/EndPointInfo.Addresses" + }, + { + "$ref": "#/components/schemas/EndPointInfo.Alternative" + } + ] + }, + "security": { + "$ref": "#/components/schemas/SecurityInfo" + }, + "implSpecificInfo": { + "$ref": "#/components/schemas/TransportInfo.ImplSpecificInfo" + } + } + }, + "TransportType": { + "description": "The enumeration TransportType represents types of transports", + "type": "string", + "enum": [ + "REST_HTTP", + "MB_TOPIC_BASED", + "MB_ROUTING", + "MB_PUBSUB", + "RPC", + "RPC_STREAMING", + "WEBSOCKET" + ], + "example": "REST_HTTP" + } + }, + "parameters": { + "Path.AppInstanceId": { + "name": "appInstanceId", + "description": "Represents a MEC application instance. Note that the appInstanceId is allocated by the MEC platform manager.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + "Path.SubscriptionId": { + "name": "subscriptionId", + "description": "Represents a subscription to the notifications from the MEC platform.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + "Path.ServiceId": { + "name": "serviceId", + "description": "Represents a MEC service instance.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + "Query.Ser_category_id": { + "name": "ser_category_id", + "description": "A MEC application instance may use ser_category_id as an input parameter to query the availability of a list of MEC service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + "Query.Ser_instance_id": { + "name": "ser_instance_id", + "description": "A MEC application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Query.Ser_name": { + "name": "ser_name", + "description": "A MEC application instance may use multiple ser_names as an input parameter to query the availability of a list of MEC service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Query.LocalityType": { + "name": "scope_of_locality", + "description": "A MEC application instance may use scope_of_locality as an input parameter to query the availability of a list of MEC service instances with a certain scope of locality.", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + "Query.Is_local": { + "name": "is_local", + "description": "Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application.", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + "Query.Consumed_local_only": { + "name": "consumed_local_only", + "description": "Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance.", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + }, + "responses": { + "ApplicationsSubscriptions.200": { + "description": "Upon success, a response body containing the list of links to the requested subscriptions is returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MecServiceMgmtApiSubscriptionLinkList" + } + } + }, + "links": { + "getIndividualmecSerMgmtApiSubscriptionLinkList": { + "$ref": "#/components/links/GetIndividualmecSerMgmtApiSubscriptionLinkList" + }, + "delIndividualmecSerMgmtApiSubscriptionLinkList": { + "$ref": "#/components/links/DelIndividualmecSerMgmtApiSubscriptionLinkList" + } + } + }, + "ApplicationsSubscriptions.201": { + "description": "Entity body in the request contains a subscription to the MEC service availability notifications that is to be created.", + "headers": { + "location": { + "description": "The resource URI of the created resource", + "schema": { + "type": "string", + "format": "uri" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" + } + } + }, + "links": { + "getIndividualmecSerMgmtApiSubscription": { + "$ref": "#/components/links/GetIndividualmecSerMgmtApiSubscription" + }, + "delIndividualmecSerMgmtApiSubscription": { + "$ref": "#/components/links/DelIndividualmecSerMgmtApiSubscription" + } + } + }, + "ApplicationsSubscription.200": { + "description": "Upon success, a response body containing the requested subscription is returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" + } + } + } + }, + "Services.200": { + "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/ServiceInfo" + } + }, + "examples": { + "ServiceInfoList": { + "$ref": "#/components/examples/ServiceInfoList" + } + } + } + }, + "links": { + "getIndividualmecService": { + "$ref": "#/components/links/GetIndividualmecService" + }, + "putIndividualmecService": { + "$ref": "#/components/links/PutIndividualmecService" + } + } + }, + "Services.201": { + "description": "Upon success, the HTTP response shall include a Location HTTP header that contains the resource URI of the created resource.", + "headers": { + "location": { + "description": "The resource URI of the created resource", + "schema": { + "type": "string", + "format": "uri" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceInfo" + }, + "examples": { + "ServiceInfo": { + "$ref": "#/components/examples/ServiceInfo" + } + } + } + }, + "links": { + "getIndividualmecService": { + "$ref": "#/components/links/GetIndividualmecService" + }, + "putIndividualmecService": { + "$ref": "#/components/links/PutIndividualmecService" + } + } + }, + "ServicesServiceId.200": { + "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceInfo" + }, + "examples": { + "ServiceInfo": { + "$ref": "#/components/examples/ServiceInfo" + } + } + } + } + }, + "Transports.200": { + "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", + "content": { + "application/json": { + "schema": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/TransportInfo" + } + } + } + }, + "links": { + "getTransportInfo": { + "$ref": "#/components/links/GetTransportInfo" + } + } + }, + "Error.400": { + "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.401": { + "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.403": { + "description": "Forbidden. The operation is not allowed given the current status of the resource. ", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "Error.404": { + "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.409": { + "description": "Conflict. The operation cannot be executed currently, due to a conflict with the state of the resource. Typically, this is because the application instance resource is in NOT_INSTANTIATED state.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.412": { + "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.414": { + "description": "It is used to indicate that the server is refusing to process the request because the request URI is longer than the server is willing or able to process.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + }, + "Error.429": { + "description": "Too Many Requests. It is used when a rate limiter has triggered.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Empty" + } + } + } + } + }, + "requestBodies": { + "ApplicationsSubscriptions": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" + } + } + }, + "description": "Entity body in the request contains a subscription to the MEC application termination notifications that is to be created.", + "required": true + }, + "Services": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceInfo" + } + } + }, + "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", + "required": true + }, + "Services.Post": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceInfo.Post" + } + } + }, + "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", + "required": true + }, + "ServicesServiceId": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceInfo" + } + } + }, + "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", + "required": true + }, + "ServiceAvailabilityNotification": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAvailabilityNotification" + } + } + }, + "required": true + } + }, + "callbacks": { + "ServiceAvailabilityNotification": { + "{$request.body#/callbackReference}": { + "post": { + "description": "'Represents the service availability information that is used in the following cases - when the MEC platform announces the newly available\n services to the authorized relevant MEC applications (e.g. \n the applications that indicate the services as \"optional\" \n or \"required\") that are subscribed to the corresponding \n service availability notifications\n- when the MEC platform notifies the authorized relevant applications that are subscribed to the corresponding service availability notifications about the service availability changes.'", + "operationId": "ServiceAvailabilityNotification_POST", + "tags": [ + "callbacks" + ], + "requestBody": { + "$ref": "#/components/requestBodies/ServiceAvailabilityNotification" + }, + "responses": { + "200": { + "description": "Expected responses from callback consumer, if it accepts the callback" + } + } + } + } + } + }, + "links": { + "GetIndividualmecService": { + "operationId": "ServicesServiceId_GET", + "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `GET /services/{serviceId}`", + "parameters": { + "serviceId": "$response.body#/serviceId" + } + }, + "PutIndividualmecService": { + "operationId": "ServicesServiceId_PUT", + "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `PUT /services/{serviceId}`", + "parameters": { + "serviceId": "$response.body#/serviceId" + } + }, + "GetTransportInfo": { + "operationId": "AppServices_POST", + "description": "The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported", + "parameters": { + "transportId": "$response.body#/0/id" + } + }, + "GetIndividualmecSerMgmtApiSubscription": { + "operationId": "ApplicationsSubscription_GET", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}`", + "parameters": { + "description": "regex = \\/mec_service_mgmt\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "subscriptionId": "TBC" + } + }, + "DelIndividualmecSerMgmtApiSubscription": { + "operationId": "ApplicationsSubscription_DELETE", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}`", + "parameters": { + "description": "regex = \\/mec_service_mgmt\\/v1\\/applications\\/.*\\/subscriptions\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "subscriptionId": "TBC" + } + }, + "GetIndividualmecSerMgmtApiSubscriptionLinkList": { + "operationId": "ApplicationsSubscription_GET", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}`", + "parameters": { + "description": "regex = \\/mec_service_mgmt\\/v1\\/applications\\/.*\\/subscriptions\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "subscriptionId": "TBC" + } + }, + "DelIndividualmecSerMgmtApiSubscriptionLinkList": { + "operationId": "ApplicationsSubscription_DELETE", + "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}`", + "parameters": { + "description": "regex = \\/mec_service_mgmt\\/v1\\/applications\\/.*\\/subscriptions\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", + "subscriptionId": "TBC" + } + } + }, + "examples": { + "ServiceInfo": { + "value": { + "serInstanceId": "ServiceInstance123", + "serName": "ExampleService", + "serCategory": { + "href": "catItem1", + "id": "id12345", + "name": "RNI", + "version": "version1" + }, + "version": "ServiceVersion1", + "state": "ACTIVE", + "transportInfo": { + "id": "TransId12345", + "name": "REST", + "description": "REST API", + "type": "REST_HTTP", + "protocol": "HTTP", + "version": "2.0", + "endpoint": { + "uris": [ + "/mecSerMgmtApi/service/EntryPoint" + ] + }, + "security": { + "oAuth2Info": { + "grantTypes": [ + "OAUTH2_CLIENT_CREDENTIALS" + ], + "tokenEndpoint": "/mecSerMgmtApi/security/TokenEndPoint" + } + } + }, + "serializer": "JSON" + } + }, + "ServiceInfoList": { + "value": [ + { + "serInstanceId": "ServiceInstance123", + "serName": "ExampleService", + "serCategory": { + "href": "catItem1", + "id": "id12345", + "name": "RNI", + "version": "version1" + }, + "version": "ServiceVersion1", + "state": "ACTIVE", + "transportInfo": { + "id": "TransId12345", + "name": "REST", + "description": "REST API", + "type": "REST_HTTP", + "protocol": "HTTP", + "version": "2.0", + "endpoint": { + "addresses": [ + { + "host": "192.0.2.0", + "port": 8080 + } + ] + }, + "security": { + "oAuth2Info": { + "grantTypes": [ + "OAUTH2_CLIENT_CREDENTIALS" + ], + "tokenEndpoint": "/mecSerMgmtApi/security/TokenEndPoint" + } + } + }, + "serializer": "JSON" + } + ] + } + } + } +} diff --git a/MecServiceMgmtApi.yaml b/MecServiceMgmtApi.yaml new file mode 100644 index 0000000000000000000000000000000000000000..99661ea2c76b7eaa599f3170b111a80816363f32 --- /dev/null +++ b/MecServiceMgmtApi.yaml @@ -0,0 +1,1278 @@ +openapi: 3.0.2 +servers: + - url: 'http://127.0.0.1:8081/mec_service_mgmt/v1' + - url: 'https://127.0.0.1:8081/mec_service_mgmt/v1' +info: + title: MEC Service Management API + version: 2.1.1 + description: The ETSI MEC ISG MEC011 MEC Service Management API described using OpenAPI + license: + name: BSD-3-Clause + url: 'https://forge.etsi.org/legal-matters' + contact: + email: cti_support@etsi.org +externalDocs: + description: 'ETSI GS MEC011 Application Enablement API, V2.1.1' + url: >- + https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf +tags: + - name: appSubscriptions + - name: appServices + - name: services + - name: transports + - name: callbacks +paths: + '/services': + get: + description: >- + This method retrieves information about a list of mecService resources. + This method is typically used in "service availability query" procedure + operationId: Services_GET + tags: + - services + parameters: + - $ref: '#/components/parameters/Query.Ser_instance_id' + - $ref: '#/components/parameters/Query.Ser_name' + - $ref: '#/components/parameters/Query.Ser_category_id' + - $ref: '#/components/parameters/Query.Consumed_local_only' + - $ref: '#/components/parameters/Query.Is_local' + - $ref: '#/components/parameters/Query.LocalityType' + responses: + '200': + $ref: '#/components/responses/Services.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '414': + $ref: '#/components/responses/Error.414' + '/services/{serviceId}': + parameters: + - $ref: '#/components/parameters/Path.ServiceId' + get: + description: >- + This method retrieves information about a mecService resource. This + method is typically used in "service availability query" procedure + operationId: ServicesServiceId_GET + tags: + - services + responses: + '200': + $ref: '#/components/responses/ServicesServiceId.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '/applications/{appInstanceId}/services': + parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' + get: + description: >- + This method retrieves information about a list of mecService resources. + This method is typically used in "service availability query" procedure + operationId: AppServices_GET + tags: + - appServices + parameters: + - $ref: '#/components/parameters/Query.Ser_instance_id' + - $ref: '#/components/parameters/Query.Ser_name' + - $ref: '#/components/parameters/Query.Ser_category_id' + - $ref: '#/components/parameters/Query.Consumed_local_only' + - $ref: '#/components/parameters/Query.Is_local' + - $ref: '#/components/parameters/Query.LocalityType' + responses: + '200': + $ref: '#/components/responses/Services.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '414': + $ref: '#/components/responses/Error.414' + post: + description: >- + This method is used to create a mecService resource. This method is + typically used in "service availability update and new service + registration" procedure + operationId: AppServices_POST + tags: + - appServices + responses: + '201': + $ref: '#/components/responses/Services.201' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + requestBody: + $ref: '#/components/requestBodies/Services.Post' + '/applications/{appInstanceId}/services/{serviceId}': + parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' + - $ref: '#/components/parameters/Path.ServiceId' + get: + description: >- + This method retrieves information about a mecService resource. This + method is typically used in "service availability query" procedure + operationId: AppServicesServiceId_GET + tags: + - appServices + responses: + '200': + $ref: '#/components/responses/ServicesServiceId.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + put: + description: This method updates the information about a mecService resource + operationId: AppServicesServiceId_PUT + tags: + - appServices + responses: + '200': + $ref: '#/components/responses/ServicesServiceId.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '412': + $ref: '#/components/responses/Error.412' + requestBody: + $ref: '#/components/requestBodies/ServicesServiceId' + delete: + description: >- + This method deletes a mecService resource. This method is typically used in the service deregistration procedure. + operationId: AppServicesServiceId_DELETE + tags: + - appServices + responses: + '204': + description: No Content + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '/applications/{appInstanceId}/subscriptions': + parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' + get: + description: >- + The GET method may be used to request information about all + subscriptions for this requestor. Upon success, the response contains + entity body with all the subscriptions for the requestor. + operationId: ApplicationsSubscriptions_GET + tags: + - appSubscriptions + responses: + '200': + $ref: '#/components/responses/ApplicationsSubscriptions.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + post: + description: >- + The POST method may be used to create a new subscription. One example + use case is to create a new subscription to the MEC service + availability notifications. Upon success, the response contains entity + body describing the created subscription. + operationId: ApplicationsSubscriptions_POST + tags: + - appSubscriptions + responses: + '201': + $ref: '#/components/responses/ApplicationsSubscriptions.201' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + requestBody: + $ref: '#/components/requestBodies/ApplicationsSubscriptions' + callbacks: + serviceAvailabilityNotification: + $ref: '#/components/callbacks/ServiceAvailabilityNotification' + '/applications/{appInstanceId}/subscriptions/{subscriptionId}': + parameters: + - $ref: '#/components/parameters/Path.AppInstanceId' + - $ref: '#/components/parameters/Path.SubscriptionId' + get: + description: >- + The GET method requests information about a subscription for this + requestor. Upon success, the response contains entity body with the + subscription for the requestor. + operationId: ApplicationsSubscription_GET + tags: + - appSubscriptions + responses: + '200': + $ref: '#/components/responses/ApplicationsSubscription.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + delete: + description: >- + This method deletes a mecSrvMgmtSubscription. This method is typically used + in "Unsubscribing from service availability event notifications" + procedure. + operationId: ApplicationsSubscription_DELETE + tags: + - appSubscriptions + responses: + '204': + description: No Content + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' + '/transports': + get: + description: >- + This method retrieves information about a list of available transports. + This method is typically used by a service-producing application to + discover transports provided by the MEC platform in the + "transport information query" procedure + operationId: Transports_GET + tags: + - transports + responses: + '200': + $ref: '#/components/responses/Transports.200' + '400': + $ref: '#/components/responses/Error.400' + '403': + $ref: '#/components/responses/Error.403' + '404': + $ref: '#/components/responses/Error.404' +components: + schemas: + Empty: + description: Empty schema + CategoryRef.Href: + description: Reference of the catalogue + type: string + format: uri + example: '/example/catalogue1' + CategoryRef.Id: + description: Unique identifier of the category + type: string + example: 'id12345' + CategoryRef.Name: + description: Name of the category, example values include RNI, Location & Bandwidth Management + type: string + example: 'RNI' + CategoryRef.Version: + description: Category version + type: string + example: 'version1' + CategoryRef: + description: This type represents the category reference + type: object + required: + - href + - id + - name + - version + properties: + href: + $ref: '#/components/schemas/CategoryRef.Href' + id: + $ref: '#/components/schemas/CategoryRef.Id' + name: + $ref: '#/components/schemas/CategoryRef.Name' + version: + $ref: '#/components/schemas/CategoryRef.Version' + CategoryRefs: + description: Categories of services about which to report events. + type: array + minItems: 0 + items: + $ref: '#/components/schemas/CategoryRef' + EndPointInfo.Address.Host: + description: Host portion of the address + type: string + example: '192.0.2.0' + EndPointInfo.Address_Port: + description: Port portion of the address + type: integer + format: uint32 + example: 8080 + EndPointInfo.Address: + description: A IP address and port pair + type: object + required: + - host + - port + properties: + host: + $ref: '#/components/schemas/EndPointInfo.Address.Host' + port: + $ref: '#/components/schemas/EndPointInfo.Address_Port' + EndPointInfo.Addresses: + description: >- + Entry point information of the service as one or more pairs of IP + address and port + type: object + required: + - addresses + properties: + addresses: + type: array + minItems: 0 + items: + $ref: '#/components/schemas/EndPointInfo.Address' + EndPointInfo.Alternative: + description: >- + Entry point information of the service in a format defined by an + implementation, or in an external specification. + type: object + required: + - alternative + properties: + alternative: + type: object + EndPointInfo.Uri: + description: Entry point information of the service + type: string + format: uri + example: '/mecSerMgmtApi/service/EntryPoint' + EndPointInfo.Uris: + description: >- + Entry point information of the service as string, formatted according to + URI syntax + type: object + required: + - uris + properties: + uris: + type: array + minItems: 0 + items: + $ref: '#/components/schemas/EndPointInfo.Uri' + LinkType: + description: This type represents a type of link and may be referenced from data structures + type: object + properties: + href: + $ref: '#/components/schemas/Href' + Href: + description: URI referring to a resource + type: string + format: uri + example: '/mecSerMgmtApi/example' + MecServiceMgmtApiSubscriptionLinkList.Links: + description: Self-referring URI. + type: object + required: + - self + properties: + self: + $ref: '#/components/schemas/LinkType' + subscriptions: + description: The MEC application instance's subscriptions + type: array + items: + $ref: '#/components/schemas/MecServiceMgmtApiSubscriptionLinkList.Subscription' + MecServiceMgmtApiSubscriptionLinkList.Subscription: + description: A link to a subscription. + type: object + required: + - href + - rel + properties: + href: + $ref: '#/components/schemas/Href' + rel: + description: >- + The value shall be se to SerAvailabilityNotificationSubscription. + type: string + MecServiceMgmtApiSubscriptionLinkList: + description: >- + This type represents a list of links related to currently existing + subscriptions for a MEC application instance. This information + is returned when sending a request to receive current subscriptions. + type: object + required: + - _links + properties: + _links: + $ref: '#/components/schemas/MecServiceMgmtApiSubscriptionLinkList.Links' + ProblemDetails: + type: object + properties: + type: + $ref: '#/components/schemas/Problem.type' + title: + $ref: '#/components/schemas/Problem.title' + status: + $ref: '#/components/schemas/Problem.status' + detail: + $ref: '#/components/schemas/Problem.detail' + instance: + $ref: '#/components/schemas/Problem.instance' + Problem.detail: + type: string + description: A human-readable explanation specific to this occurrence of the problem + Problem.instance: + type: string + format: uri + description: A URI reference that identifies the specific occurrence of the problem + Problem.status: + type: integer + format: uint32 + description: The HTTP status code for this occurrence of the problem + Problem.title: + type: string + description: 'A short, human-readable summary of the problem type' + Problem.type: + type: string + format: uri + description: >- + A URI reference according to IETF RFC 3986 that identifies the problem + type + SecurityInfo.OAuth2Info.GrantType: + description: OAuth 2.0 grant type + type: string + enum: + - OAUTH2_AUTHORIZATION_CODE + - OAUTH2_IMPLICIT_GRANT + - OAUTH2_RESOURCE_OWNER + - OAUTH2_CLIENT_CREDENTIALS + example: 'OAUTH2_CLIENT_CREDENTIALS' + SecurityInfo.OAuth2Info.GrantTypes: + description: >- + List of supported OAuth 2.0 grant types. + type: array + minItems: 1 + maxItems: 4 + items: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantType' + SecurityInfo.OAuth2Info.TokenEndpoint: + description: The token endpoint + type: string + format: uri + example: '/mecSerMgmtApi/security/TokenEndPoint' + SecurityInfo.OAuth2Info: + description: Parameters related to use of OAuth 2.0 + required: + - grantTypes + - tokenEndpoint + properties: + grantTypes: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes' + tokenEndpoint: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint' + type: object + SecurityInfo: + description: This type represents security information related to a transport + type: object + properties: + oAuth2Info: + $ref: '#/components/schemas/SecurityInfo.OAuth2Info' + Self: + description: Self-referring URI. + type: object + required: + - self + properties: + self: + $ref: '#/components/schemas/LinkType' + readOnly: true + SerAvailabilityNotificationSubscription.CallbackReference: + description: >- + URI selected by the MEC application instance to receive + notifications on the subscribed MEC service availability + information. This shall be included in both the request and the + response. + type: string + format: uri + SerAvailabilityNotificationSubscription: + description: >- + This type represents a subscription to the notifications from the + MEC platform regarding the availability of a MEC service or a + list of MEC services. + type: object + required: + - subscriptionType + - callbackReference + - _links + properties: + subscriptionType: + $ref: >- + #/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType + callbackReference: + $ref: >- + #/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference + _links: + $ref: '#/components/schemas/Self' + filteringCriteria: + $ref: >- + #/components/schemas/SerAvailabilityNotificationSubscription.FilteringCriteria + SerAvailabilityNotificationSubscription.FilteringCriteria: + description: >- + Filtering criteria to match services for which events are requested to be reported. + If absent, matches all services. All child attributes are combined with the logical + "AND" operation. + type: object + not: + required: [serInstanceIds, serNames, serCategories] + properties: + serInstanceIds: + $ref: '#/components/schemas/SerInstanceIds' + serNames: + $ref: '#/components/schemas/SerNames' + serCategories: + $ref: '#/components/schemas/CategoryRefs' + states: + $ref: '#/components/schemas/ServiceStates' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' + SerAvailabilityNotificationSubscription.SubscriptionType: + description: Shall be set to SerAvailabilityNotificationSubscription. + type: string + example: 'SerAvailabilityNotificationSubscription' + ServiceAvailabilityNotification: + description: >- + This type represents the service availability information. + type: object + required: + - notificationType + - serviceReferences + - _links + properties: + notificationType: + $ref: >- + #/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType + serviceReferences: + type: array + items: + $ref: '#/components/schemas/ServiceAvailabilityNotification.ServiceReferences' + _links: + $ref: '#/components/schemas/Subscription' + ServiceAvailabilityNotification.ServiceReferences: + description: List of links to services whose availability has changed. + type: object + required: + - serName + - serInstanceId + - state + - changeType + properties: + link: + $ref: '#/components/schemas/LinkType' + serName: + $ref: '#/components/schemas/ServiceInfo.SerName' + serInstanceId: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + state: + $ref: '#/components/schemas/ServiceState' + changeType: + $ref: '#/components/schemas/ServiceAvailabilityNotification.ChangeType' + ServiceAvailabilityNotification.ChangeType: + description: >- + Type of the change. Valid values: + ADDED: The service was newly added. + REMOVED: The service was removed. + STATE_CHANGED: Only the state of the service was changed. + ATTRIBUTES_CHANGED: At least one attribute of the service other than state was changed. The change may or may not include changing the state. + type: string + enum: + - ADDED + - REMOVED + - STATE_CHANGED + - ATTRIBUTES_CHANGED + SerializerType: + description: The enumeration represents types of serializers + type: string + enum: + - JSON + - XML + - PROTOBUF3 + example: 'JSON' + LocalityType: + description: The scope of locality as expressed by "consumedLocalOnly" and "isLocal". If absent, defaults to MEC_HOST + type: string + enum: + - MEC_SYSTEM + - MEC_HOST + - NFVI_POP + - ZONE + - ZONE_GROUP + - NFVI_NODE + example: 'MEC_SYSTEM' + ServiceState: + description: This enumeration defines the possible states of a service. + type: string + enum: + - ACTIVE + - INACTIVE + example: 'ACTIVE' + ServiceStates: + description: >- + States of the services about which to report events. If the event is + a state change, this filter represents the state after the change. + type: array + minItems: 0 + items: + $ref: '#/components/schemas/ServiceState' + ServiceInfo.SerInstanceId: + description: >- + Identifier of the service instance assigned by the MEC platform. + type: string + readOnly: true + example: 'ServiceInstance123' + SerInstanceIds: + description: Identifiers of service instances about which to report events. + type: array + minItems: 0 + items: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + ServiceInfo.SerName: + description: >- + The name of the service. This is how the service producing MEC + application identifies the service instance it produces. + type: string + example: 'ExampleService' + SerNames: + description: Names of services about which to report events. + type: array + minItems: 0 + items: + $ref: '#/components/schemas/ServiceInfo.SerName' + ServiceInfo.TransportId: + description: >- + Identifier of the platform-provided transport to be used by the service. + Valid identifiers may be obtained using the "Transport information + query" procedure. May be present in POST requests to signal the use of a + platform-provided transport for the service, and shall be absent + otherwise. + type: string + writeOnly: true + example: 'Rest1' + ServiceInfo.Version: + description: Service version + type: string + example: 'ServiceVersion1' + ServiceInfo.ConsumedLocalOnly: + description: >- + Indicate whether the service can only be consumed by the MEC applications + located in the same locality (as defined by scopeOfLocality) as this + service instance. + type: boolean + example: false + ServiceInfo.IsLocal: + description: >- + Indicate whether the service is located in the same locality (as defined + by scopeOfLocality) as the consuming MEC application. + type: boolean + example: true + ServiceInfo.Post: + description: This type represents the general information of a MEC service. + type: object + required: + - serName + - version + - state + - serializer + oneOf: + - required: [transportId] + - required: [transportInfo] + properties: + serInstanceId: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + serName: + $ref: '#/components/schemas/ServiceInfo.SerName' + serCategory: + $ref: '#/components/schemas/CategoryRef' + version: + $ref: '#/components/schemas/ServiceInfo.Version' + state: + $ref: '#/components/schemas/ServiceState' + transportId: + $ref: '#/components/schemas/ServiceInfo.TransportId' + transportInfo: + $ref: '#/components/schemas/TransportInfo' + serializer: + $ref: '#/components/schemas/SerializerType' + scopeOfLocality: + $ref: '#/components/schemas/LocalityType' + consumedLocalOnly: + $ref: '#/components/schemas/ServiceInfo.ConsumedLocalOnly' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' + ServiceInfo: + description: This type represents the general information of a MEC service. + type: object + required: + - serName + - version + - state + - transportInfo + - serializer + properties: + serInstanceId: + $ref: '#/components/schemas/ServiceInfo.SerInstanceId' + serName: + $ref: '#/components/schemas/ServiceInfo.SerName' + serCategory: + $ref: '#/components/schemas/CategoryRef' + version: + $ref: '#/components/schemas/ServiceInfo.Version' + state: + $ref: '#/components/schemas/ServiceState' + transportInfo: + $ref: '#/components/schemas/TransportInfo' + serializer: + $ref: '#/components/schemas/SerializerType' + scopeOfLocality: + $ref: '#/components/schemas/LocalityType' + consumedLocalOnly: + $ref: '#/components/schemas/ServiceInfo.ConsumedLocalOnly' + isLocal: + $ref: '#/components/schemas/ServiceInfo.IsLocal' + Subscription: + description: A link to the related subscription + type: object + required: + - subscription + properties: + subscription: + $ref: '#/components/schemas/LinkType' + TransportInfo.Description: + description: Human-readable description of this transport + type: string + example: 'REST API' + TransportInfo.Id: + description: The identifier of this transport + type: string + example: 'TransId12345' + TransportInfo.ImplSpecificInfo: + description: Additional implementation specific details of the transport + type: object + TransportInfo.Name: + description: The name of this transport + type: string + example: 'REST' + TransportInfo.Protocol: + description: The name of the protocol used. Shall be set to HTTP for a REST API. + type: string + example: 'HTTP' + TransportInfo.Version: + description: The version of the protocol used + type: string + example: '2.0' + TransportInfo: + description: This type represents the general information of a MEC service. + type: object + required: + - id + - name + - type + - protocol + - version + - endpoint + - security + properties: + id: + $ref: '#/components/schemas/TransportInfo.Id' + name: + $ref: '#/components/schemas/TransportInfo.Name' + description: + $ref: '#/components/schemas/TransportInfo.Description' + type: + $ref: '#/components/schemas/TransportType' + protocol: + $ref: '#/components/schemas/TransportInfo.Protocol' + version: + $ref: '#/components/schemas/TransportInfo.Version' + endpoint: + description: This type represents information about a transport endpoint + type: object + oneOf: + - $ref: '#/components/schemas/EndPointInfo.Uris' + - $ref: '#/components/schemas/EndPointInfo.Addresses' + - $ref: '#/components/schemas/EndPointInfo.Alternative' + security: + $ref: '#/components/schemas/SecurityInfo' + implSpecificInfo: + $ref: '#/components/schemas/TransportInfo.ImplSpecificInfo' + TransportType: + description: The enumeration TransportType represents types of transports + type: string + enum: + - REST_HTTP + - MB_TOPIC_BASED + - MB_ROUTING + - MB_PUBSUB + - RPC + - RPC_STREAMING + - WEBSOCKET + example: 'REST_HTTP' + parameters: + Path.AppInstanceId: + name: appInstanceId + description: >- + Represents a MEC application instance. Note that the + appInstanceId is allocated by the MEC platform manager. + in: path + required: true + schema: + type: string + Path.SubscriptionId: + name: subscriptionId + description: >- + Represents a subscription to the notifications from the MEC + platform. + in: path + required: true + schema: + type: string + Path.ServiceId: + name: serviceId + description: Represents a MEC service instance. + in: path + required: true + schema: + type: string + Query.Ser_category_id: + name: ser_category_id + description: >- + A MEC application instance may use ser_category_id as an input + parameter to query the availability of a list of MEC service + instances in a serCategory. Either "ser_instance_id" or "ser_name" or + "ser_category_id" or none of them shall be present. + in: query + required: false + schema: + type: string + Query.Ser_instance_id: + name: ser_instance_id + description: >- + A MEC application instance may use multiple ser_instance_ids as + an input parameter to query the availability of a list of MEC + service instances. Either "ser_instance_id" or "ser_name" or + "ser_category_id" or none of them shall be present. + in: query + required: false + schema: + type: array + items: + type: string + Query.Ser_name: + name: ser_name + description: >- + A MEC application instance may use multiple ser_names as an + input parameter to query the availability of a list of MEC + service instances. Either "ser_instance_id" or "ser_name" or + "ser_category_id" or none of them shall be present. + in: query + required: false + schema: + type: array + items: + type: string + Query.LocalityType: + name: scope_of_locality + description: >- + A MEC application instance may use scope_of_locality as an input + parameter to query the availability of a list of MEC service instances + with a certain scope of locality. + in: query + required: false + schema: + type: string + Query.Is_local: + name: is_local + description: >- + Indicate whether the service is located in the same locality (as + defined by scopeOfLocality) as the consuming MEC application. + in: query + required: false + schema: + type: boolean + Query.Consumed_local_only: + name: consumed_local_only + description: >- + Indicate whether the service can only be consumed by the MEC + applications located in the same locality (as defined by + scopeOfLocality) as this service instance. + in: query + required: false + schema: + type: boolean + responses: + ApplicationsSubscriptions.200: + description: >- + Upon success, a response body containing the list of links to the + requested subscriptions is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/MecServiceMgmtApiSubscriptionLinkList' + links: + getIndividualmecSerMgmtApiSubscriptionLinkList: + $ref: '#/components/links/GetIndividualmecSerMgmtApiSubscriptionLinkList' + delIndividualmecSerMgmtApiSubscriptionLinkList: + $ref: '#/components/links/DelIndividualmecSerMgmtApiSubscriptionLinkList' + ApplicationsSubscriptions.201: + description: >- + Entity body in the request contains a subscription to the MEC + service availability notifications that is to be created. + headers: + location: + description: The resource URI of the created resource + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + links: + getIndividualmecSerMgmtApiSubscription: + $ref: '#/components/links/GetIndividualmecSerMgmtApiSubscription' + delIndividualmecSerMgmtApiSubscription: + $ref: '#/components/links/DelIndividualmecSerMgmtApiSubscription' + ApplicationsSubscription.200: + description: >- + Upon success, a response body containing the requested subscription + is returned. + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + Services.200: + description: >- + It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + type: array + minItems: 0 + items: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfoList: + $ref: '#/components/examples/ServiceInfoList' + links: + getIndividualmecService: + $ref: '#/components/links/GetIndividualmecService' + putIndividualmecService: + $ref: '#/components/links/PutIndividualmecService' + Services.201: + description: >- + Upon success, the HTTP response shall include a Location HTTP header + that contains the resource URI of the created resource. + headers: + location: + description: The resource URI of the created resource + schema: + type: string + format: uri + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + links: + getIndividualmecService: + $ref: '#/components/links/GetIndividualmecService' + putIndividualmecService: + $ref: '#/components/links/PutIndividualmecService' + ServicesServiceId.200: + description: >- + It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + examples: + ServiceInfo: + $ref: '#/components/examples/ServiceInfo' + Transports.200: + description: >- + It is used to indicate nonspecific success. The response body + contains a representation of the resource. + content: + application/json: + schema: + type: array + minItems: 0 + items: + $ref: '#/components/schemas/TransportInfo' + links: + getTransportInfo: + $ref: '#/components/links/GetTransportInfo' + Error.400: + description: >- + Bad Request. + It is used to indicate that incorrect parameters were passed to the request. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.401: + description: >- + Unauthorized. + It is used when the client did not submit the appropriate credentials. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.403: + description: >- + Forbidden. + The operation is not allowed given the current status of the resource. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + Error.404: + description: >- + Not Found. + It is used when a client provided a URI that cannot be mapped + to a valid resource URI. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.409: + description: >- + Conflict. + The operation cannot be executed currently, due to a conflict with + the state of the resource. Typically, this is because the application + instance resource is in NOT_INSTANTIATED state. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.412: + description: >- + Precondition Failed. + It is used when a condition has failed during conditional requests, + e.g. when using ETags to avoid write conflicts. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.414: + description: >- + It is used to indicate that the server is refusing to process the request because the request URI is longer than the server is willing or able to process. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + Error.429: + description: >- + Too Many Requests. + It is used when a rate limiter has triggered. + content: + application/problem+json: + schema: + $ref: '#/components/schemas/ProblemDetails' + text/plain: + schema: + $ref: '#/components/schemas/Empty' + requestBodies: + ApplicationsSubscriptions: + content: + application/json: + schema: + $ref: '#/components/schemas/SerAvailabilityNotificationSubscription' + description: >- + Entity body in the request contains a subscription to the MEC + application termination notifications that is to be created. + required: true + Services: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + description: >- + New ServiceInfo with updated "state" is included as entity body of the + request + required: true + Services.Post: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo.Post' + description: >- + New ServiceInfo with updated "state" is included as entity body of the + request + required: true + ServicesServiceId: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceInfo' + description: >- + New ServiceInfo with updated "state" is included as entity body of the + request + required: true + ServiceAvailabilityNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceAvailabilityNotification' + required: true + callbacks: + ServiceAvailabilityNotification: + '{$request.body#/callbackReference}': + post: + description: >- + 'Represents the service availability information that + is used in the following cases + - when the MEC platform announces the newly available + services to the authorized relevant MEC applications (e.g. + the applications that indicate the services as "optional" + or "required") that are subscribed to the corresponding + service availability notifications + - when the MEC platform notifies the authorized relevant + applications that are subscribed to the corresponding + service availability notifications about the service availability changes.' + operationId: ServiceAvailabilityNotification_POST + tags: + - callbacks + requestBody: + $ref: '#/components/requestBodies/ServiceAvailabilityNotification' + responses: + '200': + description: Expected responses from callback consumer, if it accepts the callback + links: + GetIndividualmecService: + operationId: ServicesServiceId_GET + description: The `serviceId` value returned in the response can be used as the `serviceId` parameter in `GET /services/{serviceId}` + parameters: + serviceId: '$response.body#/serviceId' + PutIndividualmecService: + operationId: ServicesServiceId_PUT + description: The `serviceId` value returned in the response can be used as the `serviceId` parameter in `PUT /services/{serviceId}` + parameters: + serviceId: '$response.body#/serviceId' + GetTransportInfo: + operationId: AppServices_POST + description: The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported + parameters: + transportId: '$response.body#/0/id' + GetIndividualmecSerMgmtApiSubscription: + operationId: ApplicationsSubscription_GET + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/.*\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + subscriptionId: 'TBC' + DelIndividualmecSerMgmtApiSubscription: + operationId: ApplicationsSubscription_DELETE + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + subscriptionId: 'TBC' + GetIndividualmecSerMgmtApiSubscriptionLinkList: + operationId: ApplicationsSubscription_GET + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionId}` + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + subscriptionId: 'TBC' + DelIndividualmecSerMgmtApiSubscriptionLinkList: + operationId: ApplicationsSubscription_DELETE + description: The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionId}` + parameters: + description: regex = \/mec_service_mgmt\/v1\/applications\/.*\/subscriptions\/(.*);subscriptionId = href.match(regex)[1];// where "href" is an attribute within the subscription attribute within the _links attribute + subscriptionId: 'TBC' + examples: + ServiceInfo: + value: + serInstanceId: 'ServiceInstance123' + serName: 'ExampleService' + serCategory: + href: 'catItem1' + id: 'id12345' + name: 'RNI' + version: 'version1' + version: 'ServiceVersion1' + state: 'ACTIVE' + transportInfo: + id: 'TransId12345' + name: 'REST' + description: 'REST API' + type: 'REST_HTTP' + protocol: 'HTTP' + version: '2.0' + endpoint: + uris: + - '/mecSerMgmtApi/service/EntryPoint' + security: + oAuth2Info: + grantTypes: + - 'OAUTH2_CLIENT_CREDENTIALS' + tokenEndpoint: '/mecSerMgmtApi/security/TokenEndPoint' + serializer: 'JSON' + ServiceInfoList: + value: + - serInstanceId: 'ServiceInstance123' + serName: 'ExampleService' + serCategory: + href: 'catItem1' + id: 'id12345' + name: 'RNI' + version: 'version1' + version: 'ServiceVersion1' + state: 'ACTIVE' + transportInfo: + id: 'TransId12345' + name: 'REST' + description: 'REST API' + type: 'REST_HTTP' + protocol: 'HTTP' + version: '2.0' + endpoint: + addresses: + - host: '192.0.2.0' + port: 8080 + security: + oAuth2Info: + grantTypes: + - 'OAUTH2_CLIENT_CREDENTIALS' + tokenEndpoint: '/mecSerMgmtApi/security/TokenEndPoint' + serializer: 'JSON' diff --git a/README.md b/README.md index 3655537cab4b549ee90dc28337cbc30cc191266c..11934b8750938a168a0d11987459cf16fc7fb3ff 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,12 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E ## Online resources -* [Specification document](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf) -* [Navigate the API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/develop/Mp1.yaml). -* [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/develop/Mp1.yaml). +* [Specification document](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/02.01.01_60/gs_MEC011v020101p.pdf) +* [Navigate the MEC Application Support API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/develop/MecAppSupportApi.yaml). +* [Navigate the MEC Service Management API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/develop_2.1.1/Mp1.yaml). +* [Edit the API online](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/gitlab/mec/gs011-app-enablement-api/raw/develop_2.1.1/MecServiceMgmtApi.yaml). +## License - -## ETSI Forge Copyright statement - -Copyright (c) ETSI 2019. - -This software is subject to copyrights owned by ETSI. Non-exclusive permission -is hereby granted, free of charge, to copy, reproduce and amend this file -under the following conditions: It is provided "as is", without warranty of any -kind, expressed or implied. - -ETSI shall never be liable for any claim, damages, or other liability arising -from its use or inability of use.This permission does not apply to any documentation -associated with this file for which ETSI keeps all rights reserved. The present -copyright notice shall be included in all copies of whole or part of this -software and shall not imply any sub-license right. +Unless specified otherwise, the content of this repository and the files contained are released under the BSD-3-Clause license. +See the attached LICENSE file or visit https://forge.etsi.org/legal-matters.