MecServiceMgmtApi.yaml 43.5 KB
Newer Older
      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.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
kharimza's avatar
kharimza committed
            -  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'