elinuxhenrik | b033eaf | 2020-02-03 16:02:21 +0100 | [diff] [blame^] | 1 | swagger: '2.0' |
| 2 | info: |
| 3 | description: Api Documentation |
| 4 | version: '1.0' |
| 5 | title: Api Documentation |
| 6 | termsOfService: 'urn:tos' |
| 7 | contact: {} |
| 8 | license: |
| 9 | name: Apache 2.0 |
| 10 | url: 'http://www.apache.org/licenses/LICENSE-2.0' |
| 11 | host: 'localhost:8081' |
| 12 | basePath: / |
| 13 | tags: |
| 14 | - name: policy-controller |
| 15 | description: Policy Controller |
| 16 | - name: ric-repository-controller |
| 17 | description: Ric Repository Controller |
| 18 | - name: service-controller |
| 19 | description: Service Controller |
| 20 | - name: status-controller |
| 21 | description: Status Controller |
| 22 | paths: |
| 23 | /policies: |
| 24 | get: |
| 25 | tags: |
| 26 | - policy-controller |
| 27 | summary: Returns the policies |
| 28 | operationId: getPoliciesUsingGET |
| 29 | produces: |
| 30 | - '*/*' |
| 31 | parameters: |
| 32 | - name: type |
| 33 | in: query |
| 34 | description: type |
| 35 | required: false |
| 36 | type: string |
| 37 | - name: ric |
| 38 | in: query |
| 39 | description: ric |
| 40 | required: false |
| 41 | type: string |
| 42 | - name: service |
| 43 | in: query |
| 44 | description: service |
| 45 | required: false |
| 46 | type: string |
| 47 | responses: |
| 48 | '200': |
| 49 | description: Policies |
| 50 | schema: |
| 51 | type: array |
| 52 | items: |
| 53 | $ref: '#/definitions/PolicyInfo' |
| 54 | '401': |
| 55 | description: Unauthorized |
| 56 | '403': |
| 57 | description: Forbidden |
| 58 | '404': |
| 59 | description: Not Found |
| 60 | /policy: |
| 61 | get: |
| 62 | tags: |
| 63 | - policy-controller |
| 64 | summary: Returns a policy configuration |
| 65 | operationId: getPolicyUsingGET |
| 66 | produces: |
| 67 | - '*/*' |
| 68 | parameters: |
| 69 | - name: instance |
| 70 | in: query |
| 71 | description: instance |
| 72 | required: true |
| 73 | type: string |
| 74 | responses: |
| 75 | '200': |
| 76 | description: Policy found |
| 77 | schema: |
| 78 | type: object |
| 79 | '204': |
| 80 | description: Policy is not found |
| 81 | schema: |
| 82 | type: string |
| 83 | '401': |
| 84 | description: Unauthorized |
| 85 | '403': |
| 86 | description: Forbidden |
| 87 | '404': |
| 88 | description: Not Found |
| 89 | put: |
| 90 | tags: |
| 91 | - policy-controller |
| 92 | summary: Put a policy |
| 93 | operationId: putPolicyUsingPUT |
| 94 | consumes: |
| 95 | - application/json |
| 96 | produces: |
| 97 | - '*/*' |
| 98 | parameters: |
| 99 | - name: type |
| 100 | in: query |
| 101 | description: type |
| 102 | required: true |
| 103 | type: string |
| 104 | - name: instance |
| 105 | in: query |
| 106 | description: instance |
| 107 | required: true |
| 108 | type: string |
| 109 | - name: ric |
| 110 | in: query |
| 111 | description: ric |
| 112 | required: true |
| 113 | type: string |
| 114 | - name: service |
| 115 | in: query |
| 116 | description: service |
| 117 | required: true |
| 118 | type: string |
| 119 | - in: body |
| 120 | name: jsonBody |
| 121 | description: jsonBody |
| 122 | required: true |
| 123 | schema: |
| 124 | type: object |
| 125 | responses: |
| 126 | '200': |
| 127 | description: Policy created or updated |
| 128 | schema: |
| 129 | type: string |
| 130 | '201': |
| 131 | description: Created |
| 132 | '401': |
| 133 | description: Unauthorized |
| 134 | '403': |
| 135 | description: Forbidden |
| 136 | '404': |
| 137 | description: Not Found |
| 138 | delete: |
| 139 | tags: |
| 140 | - policy-controller |
| 141 | summary: Deletes the policy |
| 142 | operationId: deletePolicyUsingDELETE |
| 143 | produces: |
| 144 | - '*/*' |
| 145 | parameters: |
| 146 | - name: instance |
| 147 | in: query |
| 148 | description: instance |
| 149 | required: true |
| 150 | type: string |
| 151 | responses: |
| 152 | '200': |
| 153 | description: OK |
| 154 | schema: |
| 155 | $ref: '#/definitions/Mono«ResponseEntity«Void»»' |
| 156 | '204': |
| 157 | description: Policy deleted |
| 158 | schema: |
| 159 | $ref: '#/definitions/Mono«ResponseEntity«Void»»' |
| 160 | '401': |
| 161 | description: Unauthorized |
| 162 | '403': |
| 163 | description: Forbidden |
| 164 | /policy_schema: |
| 165 | get: |
| 166 | tags: |
| 167 | - policy-controller |
| 168 | summary: Returns one policy type schema definition |
| 169 | operationId: getPolicySchemaUsingGET |
| 170 | produces: |
| 171 | - '*/*' |
| 172 | parameters: |
| 173 | - name: id |
| 174 | in: query |
| 175 | description: id |
| 176 | required: true |
| 177 | type: string |
| 178 | responses: |
| 179 | '200': |
| 180 | description: Policy schema |
| 181 | schema: |
| 182 | type: object |
| 183 | '401': |
| 184 | description: Unauthorized |
| 185 | '403': |
| 186 | description: Forbidden |
| 187 | '404': |
| 188 | description: Not Found |
| 189 | /policy_schemas: |
| 190 | get: |
| 191 | tags: |
| 192 | - policy-controller |
| 193 | summary: Returns policy type schema definitions |
| 194 | operationId: getPolicySchemasUsingGET |
| 195 | produces: |
| 196 | - '*/*' |
| 197 | parameters: |
| 198 | - name: ric |
| 199 | in: query |
| 200 | description: ric |
| 201 | required: false |
| 202 | type: string |
| 203 | responses: |
| 204 | '200': |
| 205 | description: Policy schemas |
| 206 | schema: |
| 207 | type: array |
| 208 | items: |
| 209 | type: string |
| 210 | '401': |
| 211 | description: Unauthorized |
| 212 | '403': |
| 213 | description: Forbidden |
| 214 | '404': |
| 215 | description: Not Found |
| 216 | /policy_types: |
| 217 | get: |
| 218 | tags: |
| 219 | - policy-controller |
| 220 | summary: Returns policy types |
| 221 | operationId: getPolicyTypesUsingGET |
| 222 | produces: |
| 223 | - '*/*' |
| 224 | parameters: |
| 225 | - name: ric |
| 226 | in: query |
| 227 | description: ric |
| 228 | required: false |
| 229 | type: string |
| 230 | responses: |
| 231 | '200': |
| 232 | description: Policy type names |
| 233 | schema: |
| 234 | type: array |
| 235 | items: |
| 236 | type: string |
| 237 | '401': |
| 238 | description: Unauthorized |
| 239 | '403': |
| 240 | description: Forbidden |
| 241 | '404': |
| 242 | description: Not Found |
| 243 | /ric: |
| 244 | get: |
| 245 | tags: |
| 246 | - ric-repository-controller |
| 247 | summary: Returns the name of a RIC managing one Mananged Element |
| 248 | operationId: getRicUsingGET |
| 249 | produces: |
| 250 | - '*/*' |
| 251 | parameters: |
| 252 | - name: managedElementId |
| 253 | in: query |
| 254 | description: managedElementId |
| 255 | required: false |
| 256 | type: string |
| 257 | responses: |
| 258 | '200': |
| 259 | description: RIC is fond |
| 260 | schema: |
| 261 | type: string |
| 262 | '401': |
| 263 | description: Unauthorized |
| 264 | '403': |
| 265 | description: Forbidden |
| 266 | '404': |
| 267 | description: RIC is not fond |
| 268 | schema: |
| 269 | type: string |
| 270 | /rics: |
| 271 | get: |
| 272 | tags: |
| 273 | - ric-repository-controller |
| 274 | summary: Returns NearRT RIC information |
| 275 | operationId: getRicsUsingGET |
| 276 | produces: |
| 277 | - '*/*' |
| 278 | parameters: |
| 279 | - name: policyType |
| 280 | in: query |
| 281 | description: policyType |
| 282 | required: false |
| 283 | type: string |
| 284 | responses: |
| 285 | '200': |
| 286 | description: OK |
| 287 | schema: |
| 288 | type: array |
| 289 | items: |
| 290 | $ref: '#/definitions/RicInfo' |
| 291 | '401': |
| 292 | description: Unauthorized |
| 293 | '403': |
| 294 | description: Forbidden |
| 295 | '404': |
| 296 | description: Not Found |
| 297 | /service: |
| 298 | put: |
| 299 | tags: |
| 300 | - service-controller |
| 301 | summary: Register a service |
| 302 | operationId: putServiceUsingPUT |
| 303 | consumes: |
| 304 | - application/json |
| 305 | produces: |
| 306 | - '*/*' |
| 307 | parameters: |
| 308 | - in: body |
| 309 | name: registrationInfo |
| 310 | description: registrationInfo |
| 311 | required: true |
| 312 | schema: |
| 313 | $ref: '#/definitions/ServiceRegistrationInfo' |
| 314 | responses: |
| 315 | '200': |
| 316 | description: OK |
| 317 | schema: |
| 318 | type: string |
| 319 | '201': |
| 320 | description: Created |
| 321 | '401': |
| 322 | description: Unauthorized |
| 323 | '403': |
| 324 | description: Forbidden |
| 325 | '404': |
| 326 | description: Not Found |
| 327 | /services: |
| 328 | get: |
| 329 | tags: |
| 330 | - service-controller |
| 331 | summary: Returns service information |
| 332 | operationId: getServicesUsingGET |
| 333 | produces: |
| 334 | - '*/*' |
| 335 | parameters: |
| 336 | - name: name |
| 337 | in: query |
| 338 | description: name |
| 339 | required: false |
| 340 | type: string |
| 341 | responses: |
| 342 | '200': |
| 343 | description: OK |
| 344 | schema: |
| 345 | type: array |
| 346 | items: |
| 347 | $ref: '#/definitions/ServiceStatus' |
| 348 | '401': |
| 349 | description: Unauthorized |
| 350 | '403': |
| 351 | description: Forbidden |
| 352 | '404': |
| 353 | description: Not Found |
| 354 | delete: |
| 355 | tags: |
| 356 | - service-controller |
| 357 | summary: Delete a service |
| 358 | operationId: deleteServiceUsingDELETE |
| 359 | produces: |
| 360 | - '*/*' |
| 361 | parameters: |
| 362 | - name: name |
| 363 | in: query |
| 364 | description: name |
| 365 | required: true |
| 366 | type: string |
| 367 | responses: |
| 368 | '200': |
| 369 | description: OK |
| 370 | schema: |
| 371 | type: string |
| 372 | '204': |
| 373 | description: No Content |
| 374 | '401': |
| 375 | description: Unauthorized |
| 376 | '403': |
| 377 | description: Forbidden |
| 378 | /services/keepalive: |
| 379 | post: |
| 380 | tags: |
| 381 | - service-controller |
| 382 | summary: Keep the poilicies alive for a service |
| 383 | operationId: keepAliveServiceUsingPOST |
| 384 | consumes: |
| 385 | - application/json |
| 386 | produces: |
| 387 | - '*/*' |
| 388 | parameters: |
| 389 | - name: name |
| 390 | in: query |
| 391 | description: name |
| 392 | required: true |
| 393 | type: string |
| 394 | responses: |
| 395 | '200': |
| 396 | description: Policies timeout supervision refreshed |
| 397 | schema: |
| 398 | type: string |
| 399 | '201': |
| 400 | description: Created |
| 401 | '401': |
| 402 | description: Unauthorized |
| 403 | '403': |
| 404 | description: Forbidden |
| 405 | '404': |
| 406 | description: 'The service is not found, needs re-registration' |
| 407 | /status: |
| 408 | get: |
| 409 | tags: |
| 410 | - status-controller |
| 411 | summary: Returns status and statistics of the service |
| 412 | operationId: getStatusUsingGET |
| 413 | produces: |
| 414 | - '*/*' |
| 415 | responses: |
| 416 | '200': |
| 417 | description: Service is living |
| 418 | schema: |
| 419 | type: string |
| 420 | '401': |
| 421 | description: Unauthorized |
| 422 | '403': |
| 423 | description: Forbidden |
| 424 | '404': |
| 425 | description: Not Found |
| 426 | definitions: |
| 427 | Mono«ResponseEntity«Void»»: |
| 428 | type: object |
| 429 | title: Mono«ResponseEntity«Void»» |
| 430 | Mono«ResponseEntity«string»»: |
| 431 | type: object |
| 432 | title: Mono«ResponseEntity«string»» |
| 433 | PolicyInfo: |
| 434 | type: object |
| 435 | properties: |
| 436 | id: |
| 437 | type: string |
| 438 | description: identity of the policy |
| 439 | allowEmptyValue: false |
| 440 | json: |
| 441 | type: string |
| 442 | description: the configuration of the policy |
| 443 | allowEmptyValue: false |
| 444 | lastModified: |
| 445 | type: string |
| 446 | description: 'timestamp, last modification time' |
| 447 | allowEmptyValue: false |
| 448 | ric: |
| 449 | type: string |
| 450 | description: identity the target NearRT RIC |
| 451 | allowEmptyValue: false |
| 452 | service: |
| 453 | type: string |
| 454 | description: the name of the service owning the policy |
| 455 | allowEmptyValue: false |
| 456 | type: |
| 457 | type: string |
| 458 | description: name of the policy type |
| 459 | allowEmptyValue: false |
| 460 | title: PolicyInfo |
| 461 | RicInfo: |
| 462 | type: object |
| 463 | properties: |
| 464 | managedElementIds: |
| 465 | type: array |
| 466 | description: O1 identities for managed entities |
| 467 | allowEmptyValue: false |
| 468 | items: |
| 469 | type: string |
| 470 | name: |
| 471 | type: string |
| 472 | description: identity of the ric |
| 473 | allowEmptyValue: false |
| 474 | policyTypes: |
| 475 | type: array |
| 476 | description: supported policy types |
| 477 | allowEmptyValue: false |
| 478 | items: |
| 479 | type: string |
| 480 | title: RicInfo |
| 481 | ServiceRegistrationInfo: |
| 482 | type: object |
| 483 | properties: |
| 484 | callbackUrl: |
| 485 | type: string |
| 486 | description: callback for notifying of RIC recovery |
| 487 | allowEmptyValue: false |
| 488 | keepAliveIntervalSeconds: |
| 489 | type: integer |
| 490 | format: int64 |
| 491 | description: keep alive interval for policies owned by the service. 0 means no timeout supervision. Polcies that are not refreshed within this time are removed |
| 492 | allowEmptyValue: false |
| 493 | name: |
| 494 | type: string |
| 495 | description: identity of the service |
| 496 | allowEmptyValue: false |
| 497 | title: ServiceRegistrationInfo |
| 498 | ServiceStatus: |
| 499 | type: object |
| 500 | properties: |
| 501 | keepAliveIntervalSeconds: |
| 502 | type: integer |
| 503 | format: int64 |
| 504 | description: policy keep alive timeout |
| 505 | allowEmptyValue: false |
| 506 | name: |
| 507 | type: string |
| 508 | description: identity of the service |
| 509 | allowEmptyValue: false |
| 510 | timeSincePingSeconds: |
| 511 | type: integer |
| 512 | format: int64 |
| 513 | description: time since last invocation by the service |
| 514 | allowEmptyValue: false |
| 515 | title: ServiceStatus |
| 516 | |