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