MecServiceMgmtApi.json 55.1 KB
Newer Older
kharimza's avatar
kharimza committed
            "$ref": "#/components/schemas/SerializerType"
          },
          "scopeOfLocality": {
kharimza's avatar
kharimza committed
            "$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": {
kharimza's avatar
kharimza committed
            "$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"
          }
        }
      },
kharimza's avatar
kharimza committed
      "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"
          }
        }
      },
kharimza's avatar
kharimza committed
      "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"
          }
        ]
      }
    }
  }