Commit 5b506968 authored by Simon Pastor's avatar Simon Pastor
Browse files

remove app-info copied file from advantEDGE-ops, was moved

parent 5fa5e9e8
Loading
Loading
Loading
Loading
+0 −299
Original line number Diff line number Diff line
swagger: '2.0'
info:
  title: AdvantEDGE Application Information API
  version: 1.0.0
  description: AdvantEDGE implementation to create an Application Instance information using OpenAPI. Developed as an extension to Application Enablement API.
  license:
    name: Apache 2.0
    url: 'https://github.com/InterDigitalInc/AdvantEDGE/blob/master/LICENSE'
  contact:
    name: InterDigital AdvantEDGE Support
    email: AdvantEDGE@InterDigital.com
basePath: "/sandboxname/app_info/v1"
externalDocs:
  description: GitHub Wiki
  url: 'https://github.com/InterDigitalInc/AdvantEDGE/wiki'
tags:
  - name: apps
consumes:
  - application/json
produces:
  - application/json
parameters:
  Path.AppInstanceId:
    name: appInstanceId
    description: >-
      Represents a MEC application instance. Note that the
      appInstanceId is allocated by the MEC application manager POST method.
    in: path
    required: true
    type: string
  Query.App_name:
    name: app_name
    description: >-
      A MEC application manager may use app_name as an input
      parameter to query the existence of a list of MEC application
      instances with the same name.
    in: query
    required: false
    type: string
  Query.App_state:
    name: app_state
    description: >-
      A MEC application manager may use app_state as an input
      parameter to query the state of a list of MEC application
      instances with the same state.
    in: query
    required: false
    type: string
  Body.ApplicationInfo:
    name: applicationInfo
    in: body
    description: Application information
    required: true
    schema:
      $ref: '#/definitions/ApplicationInfo'  
paths:
  '/applications':
    get:
      description: This method retrieves information about a list of mec application resources.
      operationId: Applications_GET
      tags:
        - apps
      parameters:
        - $ref: '#/parameters/Query.App_name'
        - $ref: '#/parameters/Query.App_state'
      responses:
        '200':
          $ref: '#/responses/Applications.200'
        '400':
          $ref: '#/responses/Error.400'
        '403':
          $ref: '#/responses/Error.403'
        '404':
          $ref: '#/responses/Error.404'
        '414':
          $ref: '#/responses/Error.414'
    post:
      description: This method is used to create a mec application resource.
      operationId: Applications_POST
      tags:
        - apps
      responses:
        '201':
          $ref: '#/responses/Application.201'
        '400':
          $ref: '#/responses/Error.400'
        '403':
          $ref: '#/responses/Error.403'
        '404':
          $ref: '#/responses/Error.404'
      parameters:
        - $ref: '#/parameters/Body.ApplicationInfo'
  '/applications/{appInstanceId}':
    parameters:
      - $ref: '#/parameters/Path.AppInstanceId'
    get:
      description: This method retrieves information about a mec application resource.
      operationId: ApplicationsAppInstanceId_GET
      tags:
        - apps
      responses:
        '200':
          $ref: '#/responses/ApplicationAppInstanceId.200'
        '400':
          $ref: '#/responses/Error.400'
        '403':
          $ref: '#/responses/Error.403'
        '404':
          $ref: '#/responses/Error.404'
    put:
      description: This method updates the information about a mec application resource.
      operationId: ApplicationsAppInstanceId_PUT
      tags:
        - apps
      responses:
        '200':
          $ref: '#/responses/ApplicationAppInstanceId.200'
        '400':
          $ref: '#/responses/Error.400'
        '403':
          $ref: '#/responses/Error.403'
        '404':
          $ref: '#/responses/Error.404'
        '412':
          $ref: '#/responses/Error.412'
      parameters:
        - $ref: '#/parameters/Body.ApplicationInfo'
    delete:
      description: This method deletes a mec application resource.
      operationId: ApplicationsAppInstanceId_DELETE
      tags:
        - apps
      responses:
        '204':
          description: No Content
        '403':
          $ref: '#/responses/Error.403'
        '404':
          $ref: '#/responses/Error.404'
definitions:
  ProblemDetails:
    type: object
    properties:
      type:
        $ref: '#/definitions/Problem.type'
      title:
        $ref: '#/definitions/Problem.title'
      status:
        $ref: '#/definitions/Problem.status'
      detail:
        $ref: '#/definitions/Problem.detail'
      instance:
        $ref: '#/definitions/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
  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'
  ApplicationState:
    description: This enumeration defines the possible states of an application.
    type: string
    enum:
      - ACTIVE
      - INACTIVE
    example: 'ACTIVE'
  ApplicationInfo:
    description: This type represents the general information of a MEC application.
    type: object
    required:
      - appInstanceId
      - state
    properties:
      appInstanceId:
        description: Application Instance Id
        type: string
      appName:
        description: Application Name
        type: string
      appLocality:
        description: Application Locality
        type: string
      mepName:
        description: Mep Name on which the application is running
        type: string
      version:
        description: Application Version
        type: string
      state:
        $ref: '#/definitions/ApplicationState'
    example:
      appInstanceId: 'ApplicationInstance123'
      appName: 'MyAppName'
      version: 'ApplicationVersion1'
      state: 'ACTIVE'        
responses:
  Applications.200:
    description: >-
      It is used to indicate nonspecific success. The response body
      contains a representation of the resource.
    schema:
      type: array
      minItems: 0
      items:
        $ref: '#/definitions/ApplicationInfo'
  Application.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
        type: string
        format: uri
    schema:
      $ref: '#/definitions/ApplicationInfo'
  ApplicationAppInstanceId.200:
    description: >-
      It is used to indicate nonspecific success. The response body
      contains a representation of the resource.
    schema:
      $ref: '#/definitions/ApplicationInfo'
  Error.400:
    description: >-
      Bad Request.
      It is used to indicate that incorrect parameters were passed to the request.
    schema:
      $ref: '#/definitions/ProblemDetails'
  Error.401:
    description: >-
      Unauthorized.
      It is used when the client did not submit the appropriate credentials.
    schema:
      $ref: '#/definitions/ProblemDetails'
  Error.403:
    description: >-
      Forbidden.
      The operation is not allowed given the current status of the resource.
    schema:
      $ref: '#/definitions/ProblemDetails'
  Error.404:
    description: >-
      Not Found.
      It is used when a client provided a URI that cannot be mapped
      to a valid resource URI.
    schema:
      $ref: '#/definitions/ProblemDetails'
  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.
    schema:
      $ref: '#/definitions/ProblemDetails'
  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.
    schema:
      $ref: '#/definitions/ProblemDetails'
  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.
    schema:
      $ref: '#/definitions/ProblemDetails'
  Error.429:
    description: >-
      Too Many Requests.
      It is used when a rate limiter has triggered.
    schema:
      $ref: '#/definitions/ProblemDetails'