PolicyManagement.yaml 59.7 KB
Newer Older
1 2 3 4 5 6 7
openapi: 3.0.2
info:
  version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
  title: SOL012 - Policy Management Interface
  description: >
    SOL012 - Policy Management Interface

8

9 10 11
    IMPORTANT: Please note that this file might be not aligned to the current version of the ETSI Group Specification
    it refers to. In case of discrepancies the published ETSI Group Specification takes precedence.

12

13
    Please report bugs to https://forge.etsi.org/rep/nfv/SOL012/issues
14 15 16 17
  license:
    name: ETSI Forge copyright notice
    url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
externalDocs:
18 19
  description: ETSI GS NFV-SOL 012 v3.4.1
  url: https://docbox.etsi.org/ISG/NFV/Open/Drafts/SOL012ed331_Protocol_Spec_for_Policy_Mgmt_Intface/NFV-SOL012ed341v011.zip
20 21 22 23 24 25 26 27 28 29 30 31

security:
  - OauthSecurity:
      - all
servers:
  - url: http://127.0.0.1/nfvpolicy/v1
  - url: https://127.0.0.1/nfvpolicy/v1

paths:
  "/api_versions":
    $ref: '../endpoints/SOL012_endpoints.yaml#/endpoints/api_versions'

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
  "/policies":
    description: >-
      This resource represents policies. The API consumer can use this resource to create a policy, and to query multiple policies.
    post:
      description: >-
        The POST method creates a new individual policy resource.
        This method shall follow the provisions specified in the tables 5.5.3.3.1-1 and 5.5.3.3.1-2 for URI query parameters,
        request and response data structures, and response codes.
        As the result of successfully executing this method, a new "individual policy" resource as defined in clause
        5.5.4 shall have been created, and the value of the "activationStatus" attribute in the representation of that
        resource shall be "DEACTIVATED". A notification of type PolicyChangeNotification shall be triggered as part of
        successfully executing this method as defined in clause 5.6.2.7.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Version"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
50
        $ref: "#/components/requestBodies/CreatePolicyRequest"
51 52
      responses:
        "201":
53
          $ref: '#/components/responses/Policy.Post.201'
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
74

bernini's avatar
bernini committed
75
    get:
76 77 78 79 80 81 82 83 84 85 86 87
      description: >-
        The GET method queries information about multiple policies.
        This method shall follow the provisions specified in the tables 5.5.3.3.2-1 and 5.5.3.3.2-2
        for URI query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/filter"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/nextpage_opaque_marker"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Version"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
88
          $ref: '#/components/responses/Policy.Get.200'
89
        "400":
90
          $ref: '#/components/responses/Policy.Get.400'
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
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

  "/policies/{policyId}":
    description: >
      This resource represents an individual policy. The API consumer can use this resource to modify an individual
      policy, to read information about the policy and delete the policy.
    parameters:
      - $ref: '#/components/parameters/policyId'
    get:
      description: >
        The GET method retrieves information about a policy by reading an individual policy resource.
        This method shall follow the provisions specified in the tables 5.5.4.3.2-1 and 5.5.4.3.2-2 for URI
        query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
126
          $ref: '#/components/responses/IndividualPolicy.Get.200'
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
147

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
    patch:
      description: >
        The PATCH method modifies a policy.
        This method shall follow the provisions specified in the tables 5.5.4.3.4-1 and 5.5.4.3.4-2 for URI
        query parameters, request and response data structures, and response codes.
        Modification of a policy includes three functionalities: activating/deactivating the policy,
        changing the associations of the policy, and changing the selected version of the policy.
        The three functionalities may be combined flexibly in one request unless there's conflict with
        the state of the policy.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
        $ref: "#/components/requestBodies/ModifyPolicyRequest"
      responses:
        "200":
165
          $ref: '#/components/responses/PolicyModifications.Patch.200'
166 167 168 169 170 171 172 173 174 175 176 177 178
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
179
          $ref: '#/components/responses/PolicyModifications.Patch.409'
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

    delete:
      description: >
        The DELETE method deletes an individual policy.
        This method shall follow the provisions specified in the tables 5.5.4.3.5-1 and 5.5.4.3.5-2 for URI
        query parameters, request and response data structures, and response codes.
        As the result of successfully executing this method, the "individual policy" resource shall not exist
        any longer. A notification of type "PolicyChangeNotification" shall be triggered as part of successfully
        executing this method as defined in clause 5.6.2.7.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "204":
201
          $ref: '#/components/responses/Policy.Delete.204'
202 203 204 205 206 207 208 209 210 211 212 213 214
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
215
          $ref: '#/components/responses/Policy.Delete.409'
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
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

  "/policies/{policyId}/selected_versions":
    description: >
      This resource represents the selected version of an individual policy. The API consumer can use this resource
      to read the content of the selected version of the policy.
      The selected version is the version to be used when activating the policy and is then enforced as long as the
      policy is in ACTIVATED state.
    parameters:
      - $ref: '#/components/parameters/policyId'
    get:
      description: >
        The GET method fetches the content of the selected version of an individual policy.
        This method shall follow the provisions specified in the tables 5.5.5.3.2-1 and 5.5.5.3.2-2 for URI query
        parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
243
          $ref: '#/components/responses/PolicySelectedVersion.Get.200'
244 245 246 247 248 249 250
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
251
          $ref: '#/components/responses/PolicySelectedVersion.Get.404'
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
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504

  "/policies/{policyId}/versions/{version}":
    description: >
      This resource represents a particular version of an individual policy. The API consumer can use this resource
      to transfer the content, read the content and delete a particular version of a policy.
    parameters:
      - $ref: '#/components/parameters/policyId'
      - $ref: '#/components/parameters/version'
    get:
      description: >
        The GET method fetches the content of a particular version of an individual policy.
        This method shall follow the provisions specified in the tables 5.5.6.3.2-1 and 5.5.6.3.2-2 for URI
        query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
282
          $ref: '#/components/responses/IndividualPolicyVersion.Get.200'
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
303

304 305 306 307 308 309 310 311 312 313 314 315 316
    put:
      description: >
        The PUT method transfers the content of a particular version of an individual policy.
        This method shall follow the provisions specified in the tables 5.5.6.3.3-1 and 5.5.6.3.3-2 for
        URI query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
        $ref: '#/components/requestBodies/PolicyVersionTransferRequest'
      responses:
        "201":
317
          $ref: '#/components/responses/PolicyVersionTransfer.Put.201'
318 319 320 321 322 323 324 325 326 327 328 329 330
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
331
          $ref: '#/components/responses/PolicyVersionTransfer.Put.409'
332 333 334 335 336 337 338 339
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
340

341 342 343 344 345 346 347 348 349 350
    delete:
      description: >
        The DELETE method deletes a particular version of an individual policy.
        This method shall follow the provisions specified in the tables 5.5.6.3.5-1 and 5.5.6.3.5-2 for URI query
        parameters, request and response data structures, and response codes.
        As the result of successfully executing this method, the "particular version of an individual policy" resource
        shall be deleted. It's not allowed to delete the selected version of the individual policy.
        A notification of type "PolicyChangeNotification" shall be triggered as part of successfully executing this
        method as defined in clause 5.6.2.8.
      responses:
bernini's avatar
bernini committed
351
        "204":
352
          $ref: '#/components/responses/PolicyVersion.Delete.204'
bernini's avatar
bernini committed
353 354 355 356 357 358 359 360 361 362 363 364 365
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
366
          $ref: '#/components/responses/PolicyVersion.Delete.409'
bernini's avatar
bernini committed
367 368 369 370 371 372 373 374
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
375

376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395
  "/subscriptions":
    description: >-
      This resource represents subscriptions. The API consumer can use this resource to subscribe to notifications 
      related to policy changes and any detected policy conflicts, and to query its subscriptions.
    post:
      description: >-
        The POST method creates a new subscription.
        This method shall follow the provisions specified in the tables 5.5.7.3.1-1 and 5.5.7.3.1-2 for URI query parameters, 
        request and response data structures, and response codes.
        As the result of successfully executing this method, a new "Individual subscription" resource as defined in clause 5.5.6 
        shall have been created. This method shall not trigger any notification.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Version"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/ContentType"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      requestBody:
        $ref: '#/components/requestBodies/PolicySubscriptionCreateRequest'
      responses:
        "201":
396
          $ref: '#/components/responses/Subscriptions.Post.201'
397
        "303":
398
          $ref: '#/components/responses/Subscriptions.Post.303'
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
419

420 421 422 423 424 425 426 427 428 429 430 431 432 433
    get:
      description: >-
        The GET method queries the list of active subscriptions of the functional block that invokes the method. 
        It can be used e.g. for resynchronization after error situations. 
        This method shall follow the provisions specified in the tables 5.5.7.3.2-1 and 5.5.7.3.2-2 for 
        URI query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Version"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/filter"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/nextpage_opaque_marker"
      responses:
        "200":
434
          $ref: '#/components/responses/Subscriptions.Get.200'
435
        "400":
436
          $ref: '#/components/responses/Subscriptions.Get.400'
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
455

456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
  "/subscriptions/{subscriptionId}":
    description: >-
      This resource represents an individual subscription. The API consumer can use this resource to read and to 
      terminate a subscription to notifications related to policy management.
    parameters:
      - $ref: '#/components/parameters/subscriptionId'
    get:
      description: >-
        The GET method retrieves information about a subscription by reading an "Individual subscription" resource.
        This method shall follow the provisions specified in the tables 5.5.8.3.2-1 and 5.5.8.3.2-2 for URI query 
        parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Version"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Accept"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "200":
473
          $ref: '#/components/responses/IndividualSubscription.Get.200'
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
494

495 496 497 498 499 500 501 502 503 504 505 506 507
    delete:
      description: >-
        The DELETE method terminates an individual subscription. This method shall follow the provisions specified 
        in the tables 5.5.8.3.5-1 and 5.5.8.3.5-2 for URI query parameters, request and response data structures, 
        and response codes.
        As the result of successfully executing this method, the "Individual subscription" resource shall not exist 
        any longer. This means that no notifications for that subscription shall be sent to the formerly-subscribed 
        API consumer. 
      parameters:
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Version"
        - $ref: "../components/SOL012_params.yaml#/components/parameters/Authorization"
      responses:
        "204":
508
          $ref: '#/components/responses/IndividualSubscription.Delete.204'
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531
        "400":
          $ref: ../components/SOL012_resp.yaml#/components/responses/400
        "401":
          $ref: ../components/SOL012_resp.yaml#/components/responses/401
        "403":
          $ref: ../components/SOL012_resp.yaml#/components/responses/403
        "404":
          $ref: ../components/SOL012_resp.yaml#/components/responses/404
        "405":
          $ref: ../components/SOL012_resp.yaml#/components/responses/405
        "406":
          $ref: ../components/SOL012_resp.yaml#/components/responses/406
        "409":
          $ref: ../components/SOL012_resp.yaml#/components/responses/409
        "422":
          $ref: ../components/SOL012_resp.yaml#/components/responses/422
        "500":
          $ref: ../components/SOL012_resp.yaml#/components/responses/500
        "503":
          $ref: ../components/SOL012_resp.yaml#/components/responses/503
        "504":
          $ref: ../components/SOL012_resp.yaml#/components/responses/504
      
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555
components:
  parameters:
    policyId:
      name: policyId
      description: >
        Identifier of the policy. This identifier can be retrieved from the resource referenced by the "Location" HTTP
        header in the response to a POST request creating a new "individual policy" resource. It can also be retrieved
        from the "id" attribute in the payload body of that response.
      in: path
      required: true
      schema:
        $ref: '../components/SOL012_schemas.yaml#/components/schemas/Identifier'

    version:
      name: version
      description: >
        Version of the policy. This URI variable is provided by the API consumer in a PUT request creating the new
        particular version of an individual policy resource. It can be retrieved from the "versions" attribute in the
        payload body of the response to a GET request to the “individual policy” resource.
      in: path
      required: true
      schema:
        type: string

556 557 558 559 560 561 562 563 564 565 566
    subscriptionId:
      name: subscriptionId
      description: >
        Identifier of the subscription. This identifier can be retrieved from the resource referenced by the 
        "Location" HTTP header in the response to a POST request creating a new "Individual subscription" resource. 
        It can also be retrieved from the "id" attribute in the payload body of that response.
      in: path
      required: true
      schema:
        $ref: '../components/SOL012_schemas.yaml#/components/schemas/Identifier'

567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
  schemas:
    CreatePolicyRequest:
      description: >
        This type represents request parameters for creating a policy. It shall comply with the provisions defined
        in table 5.6.2.2-1.
      type: object
      properties:
        designer:
          description: >
            Human readable name of the designer of the policy.
          type: string
        name:
          description: >
            Human readable name of the policy.
          type: string
        pfId:
          description: >
584 585
            Identifier of the Policy Function (PF) which enforces the policy. Shall be present when the
            PF is not the API producer and shall be absent otherwise.
586 587
            Shall be absent when the API producer is NFVO-N.
            More information concerning the PF can be found in ETSI GR NFV-IFA 023 [i.2].
588
            For example, the PF can be a VNFM or VIM when the API producer is an NFVO.
589
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/Identifier"
590 591 592
        associations:
          description: >
            Initial value of the “associations” attribute in the “Policy” data structure which represents the policy.
593 594 595 596 597
            Shall be absent when the association feature is not applicable for the PF.
            The associations refer to identifiers of entities that the PF manages. E.g., if the PF is a VNFM,
            the policy can associate to VNF instances; if the PF is NFVO, the policy can associate to an NS instances.
            How the PF determines the scope of applicability of the policy when this attribute is absent is
            outside the scope of the present document.
598 599 600
          type: array
          items:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/Identifier"
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623
      required:
        - designer
        - name

    Policy:
      description: >-
        This type represents an individual policy. It shall comply with the provisions defined in table 5.6.2.3-1.
      type: object
      properties:
        id:
          description: >
            Identifier of the policy.
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/Identifier"
        designer:
          description: >
            Human readable name of the designer of the policy.
          type: string
        name:
          description: >
            Human readable name of the policy.
          type: string
        pfId:
          description: >
624 625
            Identifier of the Policy Function (PF) which enforces the policy. Shall be present when the PF is not
            the API producer and shall be absent otherwise.
626 627
            Shall be absent when the API producer is NFVO-N.
            More information concerning the PF can be found in ETSI GR NFV-IFA 023 [i.2].
628
            For example, the PF can be a VNFM or VIM when the API producer is an NFVO.
629 630 631 632 633 634 635 636 637 638 639 640 641 642
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/Identifier"
        versions:
          description: >
            Versions of the policy. Shall be present if at least one version of the policy has been transferred.
          type: array
          items:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/Version"
        selectedVersion:
          description: >
            Selected version of the policy. Shall be present if one or more versions of the policy have been transferred.
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/Version"
        activationStatus:
          description: >
            Status of the policy on whether it is activated or deactivated.
643
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/ActivationStatus"
644 645 646 647
        transferStatus:
          description: >
            Status of the policy on whether the content of the policy has been transferred.
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/TransferStatus"
648 649
        associations:
          description: >
650
            Identifiers of the entities that the PF manages and to which the policy associates to.
651
            Shall be absent when the association feature is not applicable for the PF.
652 653 654 655 656
            The associations refer to identifiers of entities that the PF manages.
            E.g., if the PF is a VNFM, the policy can associate to VNF instances; if the PF is NFVO, the policy can
            associate to an NS instances.
            How the PF determines the scope of applicability of the policy when this attribute is absent is
            outside the scope of the present document.
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685
          type: array
          items:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/Identifier"
        _links:
          description: >
            Links for this resource
          type: object
          properties:
            self:
              description: >
                URI of this resource
              $ref: "../components/SOL012_schemas.yaml#/components/schemas/Link"
            selected:
              description: >
                URI of the selected version of this policy, if exists.
              $ref: "../components/SOL012_schemas.yaml#/components/schemas/Link"
            versions:
              description: >
                URIs of all the transferred versions of this policy, if exists.
              type: array
              items:
                $ref: "../components/SOL012_schemas.yaml#/components/schemas/Link"
          required:
            - self
      required:
        - id
        - designer
        - name
        - activationStatus
686
        - transferStatus
687 688
        - _links

689
    PolicySubscriptionRequest:
690
      description: >
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711
        This type represents a subscription request related to notifications about policy changes 
        and policy conflicts. It shall comply with the provisions defined in table 5.6.2.5-1.
      type: object
      properties:
        filter:
          description: >
            Filter settings for this subscription, to define the subset of all notifications this subscription relates to. 
            A particular notification is sent to the subscriber if the filter matches, or if there is no filter.
          $ref: "#/components/schemas/PolicyNotificationsFilter"
        callbackUri:
          description: >
            The URI of the endpoint to send the notification to.
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/Uri"
        authentication:
          description: >
            Authentication parameters to configure the use of Authorization when sending notifications 
            corresponding to this subscription, as defined in clause 8.3.4 of ETSI GS NFV-SOL 013.
            This attribute shall only be present if the subscriber requires authorization of notifications.
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/SubscriptionAuthentication"
      required:
        - callbackUri
712

713
    PolicySubscription:
714
      description: >
715 716
        This type represents a subscription related to notifications about policy changes and policy conflicts. 
        It shall comply with the provisions defined in table 5.6.2.6-1.
717 718
      type: object
      properties:
719
        id:
720
          description: >
721 722 723
            Identifier of this subscription resource.
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/Identifier"
        filter:
724
          description: >
725 726 727 728 729
            Filter settings for this subscription, to define the subset of all notifications this subscription 
            relates to. A particular notification is sent to the subscriber if the filter matches, or if there 
            is no filter.
          $ref: "#/components/schemas/PolicyNotificationsFilter"
        callbackUri:
730
          description: >
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777
            The URI of the endpoint to send the notification to.
          $ref: "../components/SOL012_schemas.yaml#/components/schemas/Uri"
        _links:
          description: >
            Links for this resource.
          type: object
          properties:
            self:
              description: >
                URI of this resource.
              $ref: "../components/SOL012_schemas.yaml#/components/schemas/Link"
          required:
            - self  
      required:
        - id
        - callbackUri
        - _links

    PolicyNotificationsFilter:
      description: >
        This type represents a subscription filter related to notifications about policy changes and policy conflicts. 
        It shall comply with the provisions defined in table 5.6.3.2-1.
        At a particular nesting level in the filter structure, the following applies: All attributes shall match in 
        order for the filter to match (logical "and" between different filter attributes). If an attribute is an array, 
        the attribute shall match if at least one of the values in the array matches (logical "or" between the values 
        of one filter attribute).
      type: object
      properties:
        notificationTypes:
          description: >
            Match particular notification types.
            Permitted values:
            -	PolicyChangeNotification
            -	PolicyConflictNotification
            The permitted values of the "notificationTypes" attribute are spelled exactly as the names of the notification 
            types to facilitate automated code generation systems.
          type: array
          items:
            type: string
            enum:
              - PolicyChangeNotification
              - PolicyConflictNotification
        policyIds:
          description: >
            Match particular policy identifiers.
            For "PolicyConflictNotification", the notification is sent if any of the policies specified in the subscription 
            is impacted by the conflict, as defined in clause 5.6.2.8.
778 779 780
          type: array
          items:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/Identifier"
781 782 783 784 785 786
        changeTypes:
          description: >
            Match particular policy management operation types that cause the change of the policy.
          type: array
          items:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/PolicyOperationType"
787 788

  responses:
789
    Policy.Post.201:
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819
      description: >
        201 Created

        Shall be returned when a policy has been created successfully.
        The response body shall contain a representation of the individual policy, as defined in clause 5.6.2.3.
        The HTTP response shall include a "Location" HTTP header that contains the resource URI of the created policy.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Location:
          description: >
            The resource URI of the created resource.
          schema:
            type: string
            format: url
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Policy"

820
    Policy.Get.200:
821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858
      description: >
        Shall be returned when information about zero or more policies has been queried successfully.
        The response body shall contain in an array the representations of zero or more policies, as defined
        in clause 5.6.2.3.
        If the "filter" URI parameter was supplied in the request and is supported, the data in the response body
        shall have been transformed according to the rules specified in clauses 5.2.2 and 5.3.2 of
        ETSI GS NFV-SOL 013 [6], respectively.
        If the API producer supports alternative 2 (paging) according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 [6]
        for this resource, inclusion of the Link HTTP header in this response shall follow the provisions in clause
        5.4.2.3 of ETSI GS NFV-SOL 013 [6].
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Link:
          description: >
            Reference to other resources. Link HTTP header in this response
            shall follow the provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013.
          schema:
            type: string
            minimum: 0
            maximum: 1
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: "#/components/schemas/Policy"

859
    Policy.Get.400:
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885
      description: >
        Shall be returned upon the following error: Invalid attribute-based filtering expression.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute
        should convey more information about the error.

        Shall be returned upon the following error: Response too big.
        If the API producer supports alternative 1 (error) according to clause 5.4.2.1 of ETSI GS NFV-SOL 013 [6]
        for this resource, this error response shall follow the provisions in clause 5.4.2.2 of ETSI GS NFV-SOL 013 [6].
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

886
    IndividualPolicy.Get.200:
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907
      description: >
        Shall be returned when information about an individual policy has been read successfully.
        The response body shall contain a representation of the policy, as defined in clause 5.6.2.3.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Policy"

908
    PolicyModifications.Patch.200:
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929
      description: >
        200 OK

        Shall be returned when the modifications have been processed successfully.
        The response body shall contain a representation of modifications of the policy, as defined in clause 5.6.2.4.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
930
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/PolicyModifications"
931

932
    PolicyModifications.Patch.409:
933 934 935 936 937
      description: >
        409 Conflict

        Shall be returned upon the following error: The operation cannot be executed currently, due to a conflict
        with the state of the resource.
938 939 940 941 942 943 944
        Typical reasons are attempts to:
        •	modify a policy in CREATED state;
        •	activate a policy in ACTIVATED state;
        •	deactivate a policy in DEACTIVATED state.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall
        convey more information about the error.

945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

963
    Policy.Delete.204:
964 965 966 967 968
      description: >
        204 No Content

        Shall be returned when the individual policy has been deleted successfully.
        The response body shall be empty
bernini's avatar
bernini committed
969 970 971 972 973 974 975 976 977 978 979 980 981
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
982

983
    Policy.Delete.409:
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009
      description: >
        409 Conflict

        Shall be returned upon the following error: The operation cannot be executed currently, due to a
        conflict with the state of the resource.
        Typically, this is due to the fact that the policy is in ACTIVATED state.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall
        convey more information about the error.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

1010
    PolicySelectedVersion.Get.200:
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031
      description: >
        200 OK
        Shall be returned when the content of the selected version of an individual policy has been read successfully.
        The response body shall include a copy of the policy content.
        The "Content-Type" HTTP header shall be set according to the type of the policy content.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Content-Type:
          description: >
            The "Content-Type" HTTP header shall be set according to the type of the policy content
bernini's avatar
bernini committed
1032 1033
          schema:
            type: string
bernini's avatar
bernini committed
1034 1035 1036 1037 1038
      content:
        application/*:
          schema:
            type: object
            additionalProperties: true
1039

1040
    PolicySelectedVersion.Get.404:
1041 1042 1043 1044 1045 1046 1047
      description: >
        404 Not Found

        Shall be returned upon the following error: The API producer did not find a current representation for the
        target resource or is not willing to disclose that one exists.
        The general cause for this error and its handling is specified in clause 6.4 of ETSI GS NFV-SOL 013 [6],
        including rules for the presence of the response body.
1048 1049
        Specifically in case of this resource, the response code 404 shall also be returned if the policy is in
        CREATED state.
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
        In this case, the response body shall be present, and shall contain a ProblemDetails structure, in which
        the "detail" attribute shall convey more information about the error.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

1070
    IndividualPolicyVersion.Get.200:
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092
      description: >
        200 OK

        Shall be returned when the content of a particular version of an individual policy has been read successfully.
        The response body shall include a copy of the policy content.
        The "Content-Type" HTTP header shall be set according to the type of the policy content.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Content-Type:
          description: >
            The "Content-Type" HTTP header shall be set according to the type of the policy content
bernini's avatar
bernini committed
1093 1094
          schema:
            type: string
bernini's avatar
bernini committed
1095 1096 1097 1098 1099
      content:
        application/*:
          schema:
            type: object
            additionalProperties: true
1100

1101
    PolicyVersionTransfer.Put.201:
1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120
      description: >
        201 Created

        Shall be returned when the policy content has been transferred successfully.
        The response body shall be empty.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string

1121
    PolicyVersionTransfer.Put.409:
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146
      description: >
        409 Conflict

        Shall be returned upon the following error: The operation cannot be executed currently,
        due to a conflict with an existing resource.
        Typically, this is due to the fact that the particular version has already been transferred to the API producer.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall convey more
        information about the error.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"
bernini's avatar
bernini committed
1147

1148
    PolicyVersion.Delete.204:
bernini's avatar
bernini committed
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
      description: >
        204 No Content

        Shall be returned when a particular version of an individual policy has been deleted successfully.
        The response body shall be empty
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string

1168
    PolicyVersion.Delete.409:
bernini's avatar
bernini committed
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193
      description: >
        409 Conflict

        Shall be returned upon the following error: The operation cannot be executed currently, due to a
        conflict with the state of the resource.
        Typically, this is due to the fact that the requested version is the selected version.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute shall
        convey more information about the error.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided
            authorization, or error details if the corresponding HTTP
            request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"
1194

1195
    Subscriptions.Post.201:
1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226
      description: >
        201 Created

        Shall be returned when the subscription has been created successfully. 
        A representation of the created subscription resource shall be returned in the response body, 
        as defined in clause 5.6.2.6.
        The HTTP response shall include a "Location" HTTP header that points to the created 
        "Individual subscription" resource.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Location:
          description: >
            The resource URI of the created resource.
          schema:
            type: string
            format: url
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/PolicySubscription"

1227
    Subscriptions.Post.303:
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254
      description: >
        303 See Other

        Shall be returned if a subscription with the same callbackUri and the same filter already exists 
        and the policy of the API producer is to not create redundant subscriptions.
        The HTTP response shall include a "Location" HTTP header that contains the resource URI of 
        the existing "individual subscription" resource.
        The response body shall be empty.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Location:
          description: >
            The resource URI of the created resource.
          schema:
            type: string
            format: url
        
1255
    Subscriptions.Get.200:
1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294
      description: >
        200 OK

        Shall be returned when the list of subscriptions has been queried successfully.
        The response body shall contain in an array the representations of all active subscriptions 
        of the functional block that invokes the method, i.e. zero or more representations of policy 
        subscriptions as defined in clause 5.6.2.6.
        If the "filter" URI parameter was supplied in the request, the data in the response body shall 
        have been transformed according to the rules specified in clause 5.2.2 of ETSI GS NFV-SOL 013.
        If the API producer supports alternative 2 (paging) according to clause 5.4.2.1 of 
        ETSI GS NFV-SOL 013 for this resource, inclusion of the Link HTTP header in this response 
        shall follow the provisions in clause 5.4.2.3 of ETSI GS NFV-SOL 013.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
        Link:
          description: >
            Reference to other resources. Link HTTP header in this response shall follow the provisions 
            in clause 5.4.2.3 of ETSI GS NFV-SOL 013.
          schema:
            type: string
            minimum: 0
            maximum: 1
      content:
        application/json:
          schema: 
            type: array
            items:
              $ref: "#/components/schemas/PolicySubscription"

1295
    Subscriptions.Get.400:
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323
      description: >
        400 Bad Request

        Shall be returned upon the following error: Invalid attribute-based filtering expression.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute 
        should convey more information about the error.

        Shall be returned upon the following error: Response too big. 
        If the API producer supports alternative 1 (error) according to clause 5.4.2.1 of ETSI GS NFV-SOL 013
        for this resource, this error response shall follow the provisions in clause 5.4.2.2 of 
        ETSI GS NFV-SOL 013.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"
        
1324
    IndividualSubscription.Get.200:
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347
      description: >
        200 OK

        Shall be returned when information about an individual subscription has been read successfully.
        The response body shall contain a representation of the subscription resource, as defined in 
        clause 5.6.2.6.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema: 
            $ref: "#/components/schemas/PolicySubscription"
        
1348
    IndividualSubscription.Delete.204:
1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366
      description: >
        204 No Content

        Shall be returned when the "individual subscription" resource has been deleted successfully.
        The response body shall be empty.
      headers:
        WWW-Authenticate:
          description: >
            Challenge if the corresponding HTTP request has not provided authorization, or error details 
            if the corresponding HTTP request has provided an invalid authorization token.
          schema:
            type: string
        Version:
          description: >
            Version of the API used in the response.
          schema:
            type: string        

1367
  requestBodies:
1368
    CreatePolicyRequest:
1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383
      description: >
        This type represents request parameters for creating a policy. It shall comply with the provisions defined
        in table 5.6.2.2-1.
      content:
        application/json:
          schema:
           $ref: "#/components/schemas/CreatePolicyRequest"
      required: true

    ModifyPolicyRequest:
      description: >
        The parameter for the policy modifications, as defined in clause 5.6.2.4.
      content:
        application/json:
          schema:
1384
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/PolicyModifications"
1385 1386 1387 1388 1389 1390

    PolicyVersionTransferRequest:
      description: >
        The payload body contains a copy of the policy content.
        The "Content-Type" HTTP header shall be set according to the type of the policy content.
      content:
bernini's avatar
bernini committed
1391 1392 1393 1394
        application/*:
          schema:
            type: object
            additionalProperties: true
1395 1396 1397 1398 1399 1400 1401 1402

    PolicySubscriptionCreateRequest:
      description: >
        Details of the subscription to be created.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/PolicySubscriptionRequest"