aboutsummaryrefslogtreecommitdiffstats
path: root/docs/offeredapis/swagger/a1-adapter-api.yaml
blob: 1db8415623a07186e8e622832a27fd714d004cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
apiVersion: 1.0.0
swagger: '2.0'
basePath: /
info:
  x-audience: external-partner
  contact:
    name: Ericsson Software Technology
    email: nonrtric@est.tech
  description: >-
    The O-RAN A1 Adapter provides an internal REST API for management of A1
    policices, useful for test and verification. <b>Note!</b> For production,
    the
    https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/offeredapis/pms-api.html
    should be used!
  title: A1 Adapter
  version: 1.1.0
paths:
  '/restconf/operations/A1-ADAPTER-API:putA1Policy':
    post:
      summary: Create or update a policy
      description: >-
        <b>Note!</b> For production, the
        https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/offeredapis/pms-api.html
        PUT /policy method should be used!
      nickname: putA1Policy
      produces: application/json
      responses:
        '200':
          schema:
            $ref: '#/models/(putA1Policy)output'
          description: Policy created/updated
          examples:
            application/json:
              'A1-ADAPTER-API:body': {}
              'A1-ADAPTER-API:http-status': 200
      parameters:
        - schema:
            $ref: '#/models/(putA1Policy)input'
          in: body
          name: null
          description: null
          required: false
  '/operations/A1-ADAPTER-API:getA1Policy':
    post:
      summary: Get policy configuration/s
      description: >-
        <b>Note!</b> For production, the
        https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/offeredapis/pms-api.html
        GET /policy method should be used!
      nickname: getA1Policy
      produces: application/json
      responses:
        '200':
          schema:
            $ref: '#/models/(getA1Policy)output'
          description: Policy found
          examples:
            application/json:
              'A1-ADAPTER-API:body':
                id: Policy 1
                json:
                  scope:
                    ueId: 'UE1 '
                    cellId: Cell 1
                  qosObjectives:
                    gfbr: 319.5
                    mfbr: 782.75
                    priorityLevel: 268.5
                    pdb: 44
                  qoeObjectives:
                    qoeScore: 329
                    initialBuffering: 27.75
                    reBuffFreq: 539
                    stallRatio: 343
                  resources: []
                ownerServiceName: Service 1
                ric: ric1
                type: STD_PolicyModelUnconstrained_0.2.0
                lastModified: 'Wed, 01 Apr 2020 07:45:45 GMT'
              'A1-ADAPTER-API:http-status': 200
      parameters:
        - schema:
            $ref: '#/models/(getA1Policy)input'
          in: body
          name: null
          description: null
          required: false
  '/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus':
    post:
      summary: Get a policy status
      description: >-
        <b>Note!</b> For production, the
        https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/offeredapis/pms-api.html
        GET /policy-status method should be used!
      nickname: getA1PolicyStatus
      produces: application/json
      responses:
        '200':
          schema:
            $ref: '#/models/(getA1PolicyStatus)output'
          description: Policy status
          examples:
            application/json:
              'A1-ADAPTER-API:body':
                enforceStatus: UNDEFINED
              'A1-ADAPTER-API:http-status': 200
      parameters:
        - schema:
            $ref: '#/models/(getA1PolicyStatus)input'
          in: body
          name: null
          description: null
          required: false
  '/restconf/operations/A1-ADAPTER-API:getA1PolicyType':
    post:
      summary: Get a policy type schema definition
      description: >-
        <b>Note!</b> For production, the
        https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/offeredapis/pms-api.html
        GET /policy-types method should be used!
      nickname: getA1PolicyType
      produces: application/json
      responses:
        '200':
          schema:
            $ref: '#/models/(getA1PolicyType)output'
          description: Policy schema
          examples:
            application/json:
              'A1-ADAPTER-API:body':
                $schema: 'http://json-schema.org/draft-07/schema#'
                title: Example_QoETarget_1.0.0
                description: Example QoE Target policy type
                type: object
                properties:
                  scope:
                    type: object
                    properties:
                      ueId:
                        type: string
                      sliceId:
                        type: string
                      qosId:
                        type: string
                      cellId:
                        type: string
                    additionalProperties: false
                    required:
                      - ueId
                      - sliceId
                  statement:
                    type: object
                    properties:
                      qoeScore:
                        type: number
                      initialBuffering:
                        type: number
                      reBuffFreq:
                        type: number
                      stallRatio:
                        type: number
                    minProperties: 1
                    additionalProperties: false
              'A1-ADAPTER-API:http-status': 200
      parameters:
        - schema:
            $ref: '#/models/(getA1PolicyType)input'
          in: body
          name: null
          description: null
          required: false
  '/restconf/operations/A1-ADAPTER-API:deleteA1Policy':
    post:
      summary: Delete a policy
      description: >-
        <b>Note!</b> For production, the
        https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/offeredapis/pms-api.html
        DELETE /policy method should be used!
      nickname: deleteA1Policy
      produces: application/json
      responses:
        '200':
          schema:
            $ref: '#/models/(deleteA1Policy)output'
          description: Policy deleted
          examples:
            application/json:
              'A1-ADAPTER-API:body': {}
              'A1-ADAPTER-API:http-status': 200
      parameters:
        - schema:
            $ref: '#/models/(deleteA1Policy)input'
          in: body
          name: null
          description: null
          required: false
models:
  (putA1Policy)input:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:near-rt-ric-url':
        required: false
        type: Some near-rt-ric-url
        example: 'http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000'
      'A1-ADAPTER-API:body':
        required: false
        type: Some body
        example:
          blocking_rate: 20
          enforce: true
          trigger_threshold: 10
          window_length: 10
    id: (putA1Policy)input
  (putA1Policy)output:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:body':
        required: false
        type: Some body
      'A1-ADAPTER-API:http-status':
        required: false
        type: '-2147483648'
    id: (putA1Policy)output
  (getA1Policy)input:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:near-rt-ric-url':
        required: false
        type: Some near-rt-ric-url
        example: 'http://localhost:8081/policy?id=Policy 1'
    id: (getA1Policy)input
  (getA1Policy)output:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:body':
        required: false
        type: object
      'A1-ADAPTER-API:http-status':
        required: false
        type: '-2147483648'
    id: (getA1Policy)output
  (getA1PolicyStatus)input:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:near-rt-ric-url':
        required: false
        type: Some near-rt-ric-url
        example: 'http://ricsim_g2_1:8085/A1-P/v1/policies/5000/status'
    id: (getA1PolicyStatus)input
  (getA1PolicyStatus)output:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:body':
        required: false
        type: Some body
      'A1-ADAPTER-API:http-status':
        required: false
        type: '-2147483648'
    id: (getA1PolicyStatus)output
  (getA1PolicyType)input:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:near-rt-ric-url':
        required: false
        type: Some near-rt-ric-url
        example: 'http://nearRtRic-sim1:8085/a1-p/policytypes/11'
    id: (getA1PolicyType)input
  (getA1PolicyType)output:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:body':
        required: false
        type: Some body
      'A1-ADAPTER-API:http-status':
        required: false
        type: '-2147483648'
    id: (getA1PolicyType)output
  (deleteA1Policy)input:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:near-rt-ric-url':
        required: false
        type: Some near-rt-ric-url
        example: >-
          http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy
    id: (deleteA1Policy)input
  (deleteA1Policy)output:
    $schema: 'http://json-schema.org/draft-04/schema'
    type: object
    properties:
      'A1-ADAPTER-API:body':
        required: false
        type: Some body
      'A1-ADAPTER-API:http-status':
        required: false
        type: '-2147483648'
    id: (deleteA1Policy)output