X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=api%2Fxapp_rest_api.yaml;h=8f08dd97dbdbf33c3dc44ddcb239e1ce6f1d1974;hb=refs%2Fchanges%2F04%2F6704%2F1;hp=f5a6f57c5d75cb8d08191d03943081cc605e9cdf;hpb=9568a2d73b96516b27f54650e309f0d157fb97d9;p=ric-plt%2Fxapp-frame.git diff --git a/api/xapp_rest_api.yaml b/api/xapp_rest_api.yaml old mode 100755 new mode 100644 index f5a6f57..8f08dd9 --- a/api/xapp_rest_api.yaml +++ b/api/xapp_rest_api.yaml @@ -1,7 +1,7 @@ swagger: '2.0' info: description: This is the initial REST API for RIC subscription - version: 0.0.1 + version: 0.0.3 title: RIC subscription license: name: Apache 2.0 @@ -11,173 +11,314 @@ basePath: /ric/v1 schemes: - http paths: - /subscriptions: + /config: get: - summary: Returns list of subscriptions + summary: Returns the configuration of all xapps tags: - - "query" - operationId: getAllSubscriptions + - xapp + operationId: getXappConfigList produces: - application/json + - application/xml responses: '200': - description: successful query of subscriptions + description: successful query of xApp config schema: - $ref: '#/definitions/SubscriptionList' + $ref: '#/definitions/XappConfigList' '500': description: Internal error - /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 + - common + 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: post: tags: - - "control" - summary: Subscribe and send "CONTROL" message to RAN to initiate or resume call processing in RAN - operationId: subscribeControl + - common + operationId: Subscribe + summary: Subscribe a list of X2AP event triggers to receive messages sent by RAN consumes: - application/json produces: - application/json parameters: - - name: ControlParams + - name: SubscriptionParams in: body - description: Subscription control parameters + description: Subscription parameters schema: - $ref: '#/definitions/ControlParams' + $ref: '#/definitions/SubscriptionParams' responses: '201': description: Subscription successfully created schema: - $ref: '#/definitions/SubscriptionResult' + $ref: '#/definitions/SubscriptionResponse' '400': description: Invalid input '500': description: Internal error - /subscriptions/policy: - post: + '/subscriptions/{subscriptionId}': + delete: tags: - - "policy" - summary: Subscribe and send "POLICY" message to RAN to execute a specific POLICY during call processing in RAN after each occurrence of a defined SUBSCRIPTION - operationId: subscribePolicy + - common + summary: Unsubscribe X2AP events from Subscription Manager + operationId: Unsubscribe consumes: - application/json produces: - application/json - parameters: - - name: PolicyParams - in: body - description: Subscription policy parameters - schema: - $ref: '#/definitions/PolicyParams' - responses: - '201': - description: Subscription successfully created - schema: - $ref: '#/definitions/SubscriptionResult' - '400': - description: Invalid input - '500': - description: Internal error - /subscriptions/{subscriptionId}: - delete: - tags: - - "common" - summary: Unsubscribe X2AP events from Subscription Manager - operationId: Unsubscribe 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: + ConfigMetadata: type: object required: - - RequestorId - - EventTriggers + - xappName + - configType properties: - RequestorId: - type: integer - EventTriggers: - $ref: '#/definitions/EventTriggerList' - EventTrigger: + xappName: + type: string + description: Name of the xApp + configType: + type: string + description: The type of the content + enum: + - json + - xml + - other + XAppConfig: type: object required: - - InterfaceDirection - - ProcedureCode - - TypeOfMessage + - metadata + - config properties: - InterfaceDirection: - type: integer - ProcedureCode: - type: integer - TypeOfMessage: - type: integer - PlmnId: + metadata: + $ref: '#/definitions/ConfigMetadata' + config: + type: object + description: Configuration in JSON format + XappConfigList: + type: array + items: + $ref: '#/definitions/XAppConfig' + ActionDefinition: + type: array + description: E2SM byte array. ActionDefinition is an OPTIONAL IE + items: + type: integer + SubsequentAction: + description: SubsequentAction is an OPTIONAL IE + type: object + required: + - SubsequentActionType + - TimeToWait + properties: + SubsequentActionType: type: string - ENBId: + enum: + - continue + - wait + TimeToWait: + type: string + enum: + - zero + - w1ms + - w2ms + - w5ms + - w10ms + - w20ms + - w30ms + - w40ms + - w50ms + - w100ms + - w200ms + - w500ms + - w1s + - w2s + - w5s + - w10s + - w20s + - w60s + ActionToBeSetup: + type: object + required: + - ActionID + - ActionType + properties: + ActionID: type: integer - EventTriggerList: + minimum: 0 + maximum: 255 + ActionType: + type: string + enum: + - insert + - policy + - report + ActionDefinition: + $ref: '#/definitions/ActionDefinition' + SubsequentAction: + $ref: '#/definitions/SubsequentAction' + ActionsToBeSetup: type: array items: - $ref: '#/definitions/EventTrigger' - SubscriptionResult: + $ref: '#/definitions/ActionToBeSetup' + EventTriggerDefinition: type: array - description: A list of unique IDs + description: E2SM byte array items: type: integer - ControlParams: + SubscriptionDetail: + type: object + required: + - XappEventInstanceId + - EventTriggers + - ActionToBeSetupList + properties: + XappEventInstanceId: + type: integer + minimum: 0 + maximum: 65535 + EventTriggers: + $ref: '#/definitions/EventTriggerDefinition' + ActionToBeSetupList: + $ref: '#/definitions/ActionsToBeSetup' + SubscriptionDetailsList: + type: array + items: + $ref: '#/definitions/SubscriptionDetail' + SubscriptionParams: type: object + required: + - ClientEndpoint + - Meid + - RANFunctionID + - SubscriptionDetails properties: - RequestorId: + SubscriptionId: + type: string + description: Optional subscription ID (Submgr allocates if not given) + ClientEndpoint: + type: object + description: xApp service address and port + properties: + Host: + description: >- + xApp service address name like + 'service-ricxapp-xappname-http.ricxapp' + type: string + HTTPPort: + description: xApp HTTP service address port + type: integer + minimum: 0 + maximum: 65535 + RMRPort: + description: xApp RMR service address port + type: integer + minimum: 0 + maximum: 65535 + Meid: + type: string + RANFunctionID: type: integer - TBD: + minimum: 0 + maximum: 4095 + E2SubscriptionDirectives: + type: object + properties: + E2TimeoutTimerValue: + description: How long time response is waited from E2 node + type: integer + default: 2 + minimum: 1 + maximum: 10 + E2RetryCount: + description: How many times E2 subscription request is retried + type: integer + default: 2 + minimum: 0 + maximum: 10 + RMRRoutingNeeded: + description: Subscription needs RMR route from E2Term to xApp + type: boolean + default: True + SubscriptionDetails: + $ref: '#/definitions/SubscriptionDetailsList' + SubscriptionResponse: + type: object + required: + - SubscriptionId + - SubscriptionInstances + properties: + SubscriptionId: type: string - PolicyParams: + SubscriptionInstances: + type: array + items: + $ref: '#/definitions/SubscriptionInstance' + SubscriptionInstance: type: object + required: + - XappEventInstanceId + - E2EventInstanceId + - ErrorCause + - ErrorSource + - TimeoutType properties: - RequestorId: + XappEventInstanceId: + type: integer + minimum: 0 + maximum: 65535 + E2EventInstanceId: type: integer - TBD: + minimum: 0 + maximum: 65535 + RejectCause: + description: Reason for REST subscription rejection. type: string + default: None + enum: + - None + - REST-subscription-ongoing # xApp should retry after delay + - REST-subscription-delete-ongoing # xApp should retry after delay + - Invalid-REST-request-message + - REST-subscription-with-given-id-does-not-exist + - E2-interface-down + - Other + ErrorCause: + description: Descriptive error cause. Empty string when no error. + type: string + default: '' + ErrorSource: + description: Source of error cause. + type: string + default: None + enum: [None, SUBMGR, RTMGR, DBAAS, ASN1, E2Node] + TimeoutType: + description: Type timeout. xApp should retry if timeout occours. + type: string + default: None + enum: [None, E2-Timeout, RTMGR-Timeout, DBAAS-Timeout] SubscriptionData: type: object properties: @@ -185,12 +326,16 @@ definitions: type: integer Meid: type: string - Endpoint: + ClientEndpoint: type: array items: type: string + SubscriptionInstances: + type: array + items: + $ref: '#/definitions/SubscriptionInstance' SubscriptionList: type: array description: A list of subscriptions items: - $ref: '#/definitions/SubscriptionData' \ No newline at end of file + $ref: '#/definitions/SubscriptionData'