Defer alarm sysrem init
[ric-plt/xapp-frame.git] / api / xapp_rest_api.yaml
index dbdfced..efd5b8c 100755 (executable)
@@ -1,4 +1,4 @@
-swagger: '2.0'
+swagger: "2.0"
 info:
   description: This is the initial REST API for RIC subscription
   version: 0.0.1
@@ -11,52 +11,42 @@ basePath: /ric/v1
 schemes:
   - http
 paths:
-  /subscriptions/report:
-    post:
+  /subscriptions:
+    get:
+      summary: Returns list of subscriptions
       tags:
-      - "report"
-      summary: Subscribe a list of X2AP event triggers to receive "REPORT" messages sent by RAN
-      operationId: subscribeReport
-      consumes:
-        - application/json
+        - "query"
+      operationId: getAllSubscriptions
       produces:
         - application/json
-      parameters:
-        - name: ReportParams
-          in: body
-          description: Subscription report parameters
-          schema:
-            $ref: '#/definitions/ReportParams'
       responses:
-        '201':
-          description: Subscription successfully created
+        '200':
+          description: successful query of subscriptions
           schema:
-            $ref: '#/definitions/SubscriptionResult'
-        '400':
-          description: Invalid input
+            $ref: '#/definitions/SubscriptionList'
         '500':
           description: Internal error
-  /subscriptions/control:
+  /subscriptions/report:
     post:
       tags:
-      - "control"
-      summary: Subscribe and send "CONTROL" message to RAN to initiate or resume call processing in RAN
-      operationId: subscribeControl
+      - "report"
+      summary: Subscribe a list of X2AP event triggers to receive "REPORT" messages sent by RAN or Subscribe to receive the content of gNB NRT table in REPORT message sent by RAN
+      operationId: subscribeReport
       consumes:
         - application/json
       produces:
         - application/json
       parameters:
-        - name: ControlParams
+        - name: ReportParams
           in: body
-          description: Subscription control parameters
+          description: Subscription report parameters
           schema:
-            $ref: '#/definitions/ControlParams'
+            $ref: '#/definitions/ReportParams'
       responses:
         '201':
           description: Subscription successfully created
           schema:
-            $ref: '#/definitions/SubscriptionResult'
+            $ref: '#/definitions/SubscriptionResponse'
         '400':
           description: Invalid input
         '500':
@@ -81,7 +71,7 @@ paths:
         '201':
           description: Subscription successfully created
           schema:
-            $ref: '#/definitions/SubscriptionResult'
+            $ref: '#/definitions/SubscriptionResponse'
         '400':
           description: Invalid input
         '500':
@@ -92,43 +82,49 @@ paths:
       - "common"
       summary: Unsubscribe X2AP events from Subscription Manager
       operationId: Unsubscribe
+      consumes:
+        - application/json
+      produces:
+        - application/json
       parameters:
         - name: subscriptionId
           in: path
-          description: The subscriptionId to be unsubscribed
+          description: The subscriptionId received in the Subscription Response
           required: true
-          type: integer
+          type: string
       responses:
         '204':
           description: Operation done successfully
         '400':
-          description: Invalid requestorId supplied
+          description: Invalid subscriptionId supplied
         '500':
           description: Internal error
 definitions:
   SubscriptionType:
     type: string
     enum:
-      - control
       - insert
       - policy
       - report
   ReportParams:
     type: object
     required:
-      - RequestorId
+      - RANFunctionID
+      - ClientEndpoint
       - EventTriggers
     properties:
-      RequestorId:
+      Meid:
+        type: string
+      RANFunctionID:
         type: integer
+      ClientEndpoint:
+        type: string
       EventTriggers:
         $ref: '#/definitions/EventTriggerList'
+      ReportActionDefinitions:
+        $ref: '#/definitions/ReportActionDefinition'
   EventTrigger:
     type: object
-    required:
-      - InterfaceDirection
-      - ProcedureCode
-      - TypeOfMessage
     properties:
       InterfaceDirection:
         type: integer
@@ -136,30 +132,155 @@ definitions:
         type: integer
       TypeOfMessage:
         type: integer
+      TriggerNature:
+        type: string
+        enum:
+          - now
+          - on change
       PlmnId:
         type: string
       ENBId:
-        type: integer
+        type: string
   EventTriggerList:
     type: array
     items:
       $ref: '#/definitions/EventTrigger'
-  SubscriptionResult:
-    type: array
-    description: A list of unique IDs
-    items:
-      type: integer
-  ControlParams:
+  ActionParameters:
     type: object
+    required:
+      - ActionParameterID
+      - ActionParameterValue
     properties:
-      RequestorId:
+      ActionParameterID:
         type: integer
-      TBD:
-        type: string
+      ActionParameterValue:
+        type: boolean
+  Format1ActionDefinition:
+    type: object
+    required:
+      - StyleID
+      - ActionParameters
+    properties:
+      StyleID:
+        type: integer
+      ActionParameters:
+        type: array
+        items:
+          $ref: '#/definitions/ActionParameters'
+  ReportActionDefinition:
+    type: object
+    properties:
+      ActionDefinitionFormat1:
+        $ref: '#/definitions/Format1ActionDefinition'
   PolicyParams:
     type: object
+    required:
+      - Meid
+      - RANFunctionID
+      - ClientEndpoint
+      - EventTriggers
+      - PolicyActionDefinitions
+    properties:
+      Meid:
+        type: string
+      RANFunctionID:
+        type: integer
+      ClientEndpoint:
+        type: string
+      EventTriggers:
+        $ref: '#/definitions/EventTriggerList'
+      PolicyActionDefinitions:
+        $ref: '#/definitions/PolicyActionDefinition'
+  PolicyActionDefinition:
+    type: object
+    properties:
+      ActionDefinitionFormat2:
+        $ref: '#/definitions/Format2ActionDefinition'
+  Format2ActionDefinition:
+    type: object
+    required:
+      - RANUeGroupParameters
+    properties:
+      RANUeGroupParameters:
+        type: array
+        items:
+          $ref: '#/definitions/RANUeGroupList'
+  RANUeGroupList:
+    type: object
+    required:
+      - RANUeGroupID
+      - RANUeGroupDefinition
+      - RANImperativePolicy
+    properties:
+      RANUeGroupID:
+        type: integer
+      RANUeGroupDefinition:
+        $ref: '#/definitions/RANUeGroupParams'
+      RANImperativePolicy:
+        $ref: '#/definitions/ImperativePolicyDefinition'
+  RANUeGroupParams:
+    type: object
+    required:
+      - RANParameterID
+      - RANParameterValue
+    properties:
+      RANParameterID:
+        type: integer
+      RANParameterTestCondition:
+        type: string
+        enum:
+          - equal
+          - greaterthan
+          - lessthan
+          - contains
+          - present
+      RANParameterValue:
+        type: integer
+  ImperativePolicyDefinition:
+    type: object
+    required:
+      - PolicyParameterID
+      - PolicyParameterValue
+    properties:
+      PolicyParameterID:
+        type: integer
+      PolicyParameterValue:
+        type: integer
+  SubscriptionInstance:
+    type: object
+    required:
+      - RequestorId
+      - InstanceId
     properties:
       RequestorId:
         type: integer
-      TBD:
-        type: string
\ No newline at end of file
+      InstanceId:
+        type: integer
+  SubscriptionResponse:
+    type: object
+    required:
+      - SubscriptionId
+      - SubscriptionInstances
+    properties:
+      SubscriptionId:
+        type: string
+      SubscriptionInstances:
+        type: array
+        items:
+          $ref: '#/definitions/SubscriptionInstance'
+  SubscriptionData:
+    type: object
+    properties:
+      SubscriptionId:
+        type: integer
+      Meid:
+        type: string
+      Endpoint:
+        type: array
+        items:
+          type: string
+  SubscriptionList:
+    type: array
+    description: A list of subscriptions
+    items:
+       $ref: '#/definitions/SubscriptionData'
\ No newline at end of file