NFVManoLogManagement.yaml 53.8 KB
Newer Older
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 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 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 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 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 778 779 780 781 782 783 784 785 786 787 788 789 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 820 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 859 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 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000
openapi: 3.0.2
info:
  version: 1.0.0-impl:etsi.org:ETSI_NFV_OpenAPI:1
  title: SOL009 - NFV-MANO Log Management interface
  description: >
    SOL009 - NFV-MANO Log Management interface

    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.

    Please report bugs to https://forge.etsi.org/bugzilla/buglist.cgi?component=Nfv-Openapis&list_id=61&product=NFV&resolution=
  license:
    name: ETSI Forge copyright notice
    url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
externalDocs:
  description: ETSI GS NFV-SOL 009 V0.8.0
  url: https://docbox.etsi.org/ISG/NFV/Open/Drafts/SOL009ed331_MANO_mgmt_stage_3/NFV-SOL009ed331v080.zip

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


paths:
  "/api_versions":
      $ref: ../endpoints/SOL009_endpoints.yaml#/endpoints/api_versions
  "/log_jobs":
    description: >-
      This resource represents logging jobs. The API consumer can use this resource to create and query logging jobs.
    post:
      description: >-
        The POST method creates a logging job.
        This method shall follow the provisions specified in the tables 8.5.3.3.1-1 and 8.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 logging job" resource as defined in
        clause 9.5.4 shall have been created.
      parameters:
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/Accept"
        - $ref: "#/components/parameters/Authorization"
      requestBody:
        $ref: "#/components/requestBodies/CreateLoggingJobRequest"
      responses:
        "201":
          $ref: '#/components/responses/LoggingJob.Post'
        "400":
          $ref: ../responses/SOL009_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL009_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL009_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL009_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL009_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL009_resp.yaml#/responses/406
        "422":
          $ref: ../responses/SOL009_resp.yaml#/responses/422
        "500":
          $ref: ../responses/SOL009_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL009_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL009_resp.yaml#/responses/504
    get:
      description: >-
        The API consumer can use this method to retrieve information about logging jobs.
        This method shall follow the provisions specified in the tables 8.5.3.3.2-1 and 8.5.3.3.2-2 for
        URI query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "#/components/parameters/filter"
        - $ref: "#/components/parameters/all_fields"
        - $ref: "#/components/parameters/fields"
        - $ref: "#/components/parameters/exclude_fields"
        - $ref: "#/components/parameters/exclude_default"
        - $ref: "#/components/parameters/nextpage_opaque_marker"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/Accept"
        - $ref: "#/components/parameters/Authorization"
      responses:
        "200":
          $ref: '#/components/responses/LoggingJobs.Get'
        "400":
          $ref: ../responses/SOL009_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL009_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL009_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL009_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL009_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL009_resp.yaml#/responses/406
        "422":
          $ref: ../responses/SOL009_resp.yaml#/responses/422
        "500":
          $ref: ../responses/SOL009_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL009_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL009_resp.yaml#/responses/504

  "/log_jobs/{logJobId}":
    description: >-
      This resource represents an individual logging job. The API consumer can use this resource to delete
      and read the underlying logging job.
    get:
      description: >-
        The API consumer can use this method for reading an individual logging job.
        This method shall follow the provisions specified in the tables 8.5.4.3.2-1 and 8.5.4.3.2-2 for
        URI query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "#/components/parameters/logJobId"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/Accept"
        - $ref: "#/components/parameters/Authorization"

      responses:
        "200":
          $ref: '#/components/responses/LoggingJob.Get'
        "400":
          $ref: ../responses/SOL009_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL009_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL009_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL009_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL009_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL009_resp.yaml#/responses/406
        "422":
          $ref: ../responses/SOL009_resp.yaml#/responses/422
        "500":
          $ref: ../responses/SOL009_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL009_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL009_resp.yaml#/responses/504

    delete:
      description: >-
        This method terminates an individual logging job.
        This method shall follow the provisions specified in the tables 8.5.4.3.5-1 and 8.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 logging job" resource shall not
        exist any longer
      parameters:
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/Authorization"
      responses:
        "204":
          $ref: '#/components/responses/LoggingJob.Delete'
        "400":
          $ref: ../responses/SOL009_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL009_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL009_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL009_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL009_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL009_resp.yaml#/responses/406
        "422":
          $ref: ../responses/SOL009_resp.yaml#/responses/422
        "500":
          $ref: ../responses/SOL009_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL009_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL009_resp.yaml#/responses/504

  "/log_jobs/{logJobId}/log_reports/{logReportId}":
    description: >-
      This resource represents an individual log report. The API consumer can use this resource to read
      information about a log report.
      The log report provides metadata information about a log and location information of the log file
      from where it can be obtained.
      NOTE:	The present document does not specify the mechanism how to retrieve the log files.
    get:
      description: >-
        The API consumer can use this method for reading an individual log report.
        This method shall follow the provisions specified in the tables 8.5.5.3.2-1 and
        8.5.5.3.2-2 for URI query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "#/components/parameters/logJobId"
        - $ref: "#/components/parameters/logJobReportId"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/Accept"
        - $ref: "#/components/parameters/Authorization"
      responses:
        "200":
          $ref: '#/components/responses/LogReport.Get'
        "202":
          $ref: '#/components/responses/LogReport.Get.202'
        "400":
          $ref: ../responses/SOL009_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL009_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL009_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL009_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL009_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL009_resp.yaml#/responses/406
        "422":
          $ref: ../responses/SOL009_resp.yaml#/responses/422
        "500":
          $ref: ../responses/SOL009_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL009_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL009_resp.yaml#/responses/504

  "/log_jobs/{logJobId}/compile_log":
    description: >-
      This resource represents the "Compile log" operation. The API consumer can use this resource to request
      compiling the logged data, collected via a logging job, into a file and creating the associated log report.
      As the result of successfully processing this request, a new "Individual log report" resource shall be created.
      Two modes of operation, synchronous or asynchronous, can take place depending on whether the NFV-MANO functional
      entity can compile the log data and create the log report immediately. In the synchronous case, which is
      indicated by responding with "201 Created", the resource shall be created before the "201 Created" response
      is returned. In the asynchronous case, which is indicated by responding with "202 Accepted", the resource may
      be created after the response is returned.
    post:
      description: >-
        The POST method requests to compile the logged data into a file and create an associated log report.
        This method shall follow the provisions specified in the tables 8.5.6.3.1-1 and 8.5.6.3.1-2 for URI
        query parameters, request and response data structures, and response codes.
      parameters:
        - $ref: "#/components/parameters/logJobId"
        - $ref: "#/components/parameters/Version"
        - $ref: "#/components/parameters/Accept"
        - $ref: "#/components/parameters/Authorization"
      requestBody:
        $ref: "#/components/requestBodies/CompileLogRequest"
      responses:
        "200":
          $ref: '#/components/responses/LogReportCompiled'
        "202":
          $ref: '#/components/responses/LogReportCompiled.202'
        "303":
          $ref: '#/components/responses/LogReportCompiled.303'
        "422":
          $ref: '#/components/responses/LogReportCompiled.422'
        "400":
          $ref: ../responses/SOL009_resp.yaml#/responses/400
        "401":
          $ref: ../responses/SOL009_resp.yaml#/responses/401
        "403":
          $ref: ../responses/SOL009_resp.yaml#/responses/403
        "404":
          $ref: ../responses/SOL009_resp.yaml#/responses/404
        "405":
          $ref: ../responses/SOL009_resp.yaml#/responses/405
        "406":
          $ref: ../responses/SOL009_resp.yaml#/responses/406
        "500":
          $ref: ../responses/SOL009_resp.yaml#/responses/500
        "503":
          $ref: ../responses/SOL009_resp.yaml#/responses/503
        "504":
          $ref: ../responses/SOL009_resp.yaml#/responses/504

  "/subscriptions":

  "/subscriptions/{subscriptionId}":


components:
  parameters:
    Version:
      name: Version
      description: >-
        Version of the API requested to use when responding to this request
      in: header
      required: true
      schema:
        type: string
    Accept:
      name: Accept
      description: >-
        Content-Types that are acceptable for the response. Reference: IETF RFC 7231
      in: header
      required: true
      schema:
        type: string
    Authorization:
      name: Authorization
      description: >-
        The authorization token for the request. Reference: IETF RFC 7235
      in: header
      required: false
      schema:
        type: string
    logJobId:
      name: logJobId
      in: path
      description: >-
        Identifier of the logging job.
      required: true
      schema:
        type: string
    filter:
      name: filter
      in: query
      description: >-
        Attribute-based filtering expression according to clause 5.2 of ETSI GS NFV-SOL 013.
        The NFV-MANO functional entity shall support receiving this parameter as part of the URI query string.
        The API consumer may supply this parameter.
        All attribute names that appear in the LoggingJob and in data types referenced from it shall be supported by
        the NFV-MANO functional entity in the filter expression
      required: false
      schema:
        type: string
    all_fields:
      name: all_fields
      in: query
      description: >-
        Include all complex attributes in the response. See clause 5.3 of ETSI GS NFV-SOL 013 for details.
        The NFV-MANO functional entity shall support this parameter.
      required: false
      schema:
        type: string
    fields:
      name: fields
      in: query
      description: >-
        Complex attributes to be included into the response. See clause 5.3 of ETSI GS NFV-SOL 013 for details.
        The NFV-MANO functional entity should support this parameter.
      required: false
      schema:
        type: string
    exclude_fields:
      name: exclude_fields
      in: query
      description: >-
        Complex attributes to be excluded from the response. See clause 5.3 of ETSI GS NFV-SOL 013 for details.
        The NFV-MANO functional entity should support this parameter.
      required: false
      schema:
        type: string
    exclude_default:
      name: exclude_default
      in: query
      description: >-
       Indicates to exclude the following complex attributes from the response. See clause 5.3 of ETSI GS NFV-SOL 013
      for details. The NFV-MANO functional entity shall support this parameter.
      The following attributes shall be excluded from the LoggingJob structure in the response body if this parameter
      is provided, or none of the parameters "all_fields," "fields", "exclude_fields", "exclude_default" are provided
      -logReports
      required: false
      schema:
        type: string
    nextpage_opaque_marker:
      name: nextpage_opaque_marker
      in: query
      description: >-
        Marker to obtain the next page of a paged response. Shall be supported by the NFV-MANO functional entity if
        the NFV-MANO functional entity supports alternative 2 (paging) according to clause 5.4.2.1 of
        ETSI GS NFV-SOL 013 for this resource.
      required: false
      schema:
        type: string

  requestBodies:
    CreateLoggingJobRequest:
      description: >-
        This type represents a request to create a logging job. It shall comply with the provisions
        defined in table 8.6.2.5-1.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/CreateLoggingJobRequest"
      required: true
    CompileLogRequest:
      description: >-
        Log compilation request.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/CompileLogRequest"
      required: true

  responses:
    LogReportCompiled:
      description: >-
        Shall be returned for a successful compilation of the log data and creation of the associated log report
        (synchronous mode).
        The response body shall contain a representation of the log report resource, as defined in clause 8.6.2.7.
        The HTTP response shall include a "Location" HTTP header that indicate the URI of the
        "Individual log report" resource just created
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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: >
            URI of the "Individual log report" resource just created
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/LogReport"

    LogReportCompiled.202:
      description: >-
        Shall be returned when the request has been accepted for processing, and it is expected to take some
        time to compile the log file and create the associated log report (asynchronous mode).
        The response body shall be empty.
        The HTTP response shall include a "Location" HTTP header that indicates the URI of the
        "Individual log report" resource that will be created once the log file compilation is completed.
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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 URI of the "Individual log report" resource that will be created once the log file
            compilation is completed.
          schema:
            type: string

    LogReportCompiled.303:
      description: >-
        Shall be returned when a log data compilation and report creation is already ongoing, or a log report has just been
        created, for the specified logging job at the time of processing the request.
        The response body shall be empty.
        The HTTP response shall include a "Location" HTTP header that contains the resource URI of the log report
        resource just created, or to be created by the ongoing compilation and report creation.
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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 URI of the log report resource just created, or to be created by the ongoing compilation
            and report creation
          schema:
            type: string

    LogReportCompiled.422:
      description: >-
        The general cause for this error and its handling is specified in clause 6.4 of ETSI GS NFV-SOL 013,
        including rules for the presence of the response body.
        Specifically, in case of this task resource, the response code 422 shall also be returned if the
        "objectInstanceId" value provided in the payload body of the request does not correspond to an object
        instance for which log data is being collected by the logging job represented by this resource.
        The response body shall contain a ProblemDetails structure, in which the "detail" attribute should
        convey more information about the error.
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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: '../definitions/SOL009_def.yaml#/definitions/ProblemDetails'

    LogReport.Get:
      description: >-
        Shall be returned when information of an individual log report has been read successfully.
        The response body shall contain a representation of the "Individual log report" resource, as
        defined in clause 8.6.2.7.
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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/LogReport"

    LogReport.Get.202:
      description: >-
        Shall be returned if the creation of the log report is ongoing and no log report is available yet
        (applicable in asynchronous mode of the "Compile log task" resource).
        The response body shall be empty.
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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

    LoggingJob.Get:
      description: >-
        Shall be returned when information about an individual logging job has been read successfully.
        The response body shall contain a representation of the "Individual logging job" resource,
        as defined in clause 8.6.2.6.
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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/LoggingJob"

    LoggingJob.Delete:
      description: >-
        Shall be returned when the logging job 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

    LoggingJob.Post:
      description: >-
        The response body contains the Application Context as it was created
        by the MEC system
      headers:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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/LoggingJob"
    LoggingJobs.Get:
      description: >-
        Shall be returned when information about zero or more logging jobs has been queried successfully.

        The response body shall contain in an array the representations of zero or more logging jobs, as
        defined in clause 8.6.2.6.

        If the "filter" URI parameter or one of the "all_fields", "fields" (if supported), "exclude_fields"
        (if supported) or "exclude_default" URI parameters was supplied in the request, 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, respectively.

        If the NFV-MANO functional entity 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:
        Content-Type:
          description: The MIME type of the body of the response.
          schema:
            type: string
        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:
            type: array
            items:
              $ref: "#/components/schemas/LoggingJob"
  schemas:
    CompileLogRequest:
      description: >
        This type represents a request to compile the logged data associated to an object instance.
        It shall comply with the provisions defined in table 8.6.2.8-1.
      type: object
      properties:
        objectInstanceId:
          description: >
            Identifier of the object instance for which logging information is requested to be compiled. The provided
            value shall correspond to an object instance for which log data is being collected as specified in the
            corresponding "LoggingJob". If not present, the compile log request is requested for all managed object
            instances associated to the logging job.
          $ref: "#/components/schemas/ManoManagedObjectReference"
    LogReport:
      description: >
        This type represents a log report, which provides information about a compiled log and how to obtain it.
        It shall comply with the provisions defined in table 8.6.2.7-1.
      type: object
      required:
        - id
        - objectInstanceId
        - compilationTrigger
        - readyTime
        - fileFormat
        - fileLocationInfo
        - securityAndIntegrityInfo
        - _links
      properties:
        id:
          description: >-
            Identifier of this log report.
          $ref: '../definitions/SOL009_def.yaml#/definitions/Identifier'
        objectInstanceId:
          description: >-
            Identifiers of the object instance for which logging information is collected.
            This attribute shall contain the identifier of the instance of the object that is
            logged according to their type.
          $ref: '#/components/schemas/ManoManagedObjectReference'
        compilationTrigger:
          description: >-
            The trigger for the compilation of the log file.

            Permitted values:
            - ON_DEMAND: created based on explicit request by a client.
            - AUTOMATIC: created according to the logging job compilation configuration.
          type: string
          enum: [ON_DEMAND, AUTOMATIC]
        readyTime:
          description: >-
            The time when the report and log file was made available.
          $ref: '../definitions/SOL009_def.yaml#/definitions/DateTime'
        expiryTime:
          description: >-
            The time when the report and log file will expire.
          $ref: '../definitions/SOL009_def.yaml#/definitions/DateTime'
        fileSize:
          description: >-
            The size of the compiled log file in bytes, if known.
          type: integer
          format: int32
        fileFormat:
          description: >-
            The encoding used by the file.
          type: string
        fileLocationInfo:
          description: >-
            Location and address information of the compiled log file. The consumer can use this information
            to obtain the compiled log file.
          type: object
          required:
            - protocol
            - fileEndpoint
          properties:
            protocol:
              description: >-
                Protocol over which the compiled log file can be retrieved.

                Permitted values:
                - HTTPS: transmission over HTTP Secure (HTTPS).
                - SFTP: transmission over SSH file transfer protocol (SFTP).
                - SCP: transmission over secure copy protocol (SCP).
                - FTPS: transmission over file transfer protocol secure (FTPS), as specified in IETF RFC 2228 [i.11],
                     using explicit mode as specified in IETF RFC 4217 [i.12]. If FTPS is supported, "private" protection level shall be used.

                HTTPS shall be supported, and other protocols may be supported.
              type: string
              enum: [HTTPS, SFTP, SCP, FTPS]
            fileEndpoint:
              description: >-
                The host name (or IP address), optionally a port number (if the host with the compile log file uses a
                non-standard port number as per the supported transmission protocol), a valid file directory path,
                and the file name of the compiled log file, or a valid URL.
              type: string
              format: URI
        securityAndIntegrityInfo:
          description: >-
            Security and integrity information for the compilation of the log files.
          type: object
          required:
            - algorithm
            - hash
            - logFileSignature
            - signingCertificate
          properties:
            algorithm:
              description: >-
                Algorithm used to generate the hash of the compiled log file. Only SHA-256 and SHA-512 shall be used
              type: string
            hash:
              description: >-
                The hexadecimal value of the hash of the compiled log file. The hash shall be computed
                from the encrypted compiled log file, in case the encryption applies.
              type: string
            encryptionPublicKey:
              description: >-
                Public key used for the encryption of the compiled log file. Shall be present if the
                compiled log file is encrypted.
              type: string
            cipherAlgorithm:
              description: >-
                The cryptographic algorithm used for the encryption. Shall be present if the compiled log file is
                encrypted. Valid values are: "AES-CBC-128", "AES-GCM-128", "AES-CBC-256", and "AES-GCM-256",
                as specified in clause 6.5 of ETSI GS NFV-SEC 012 [14].
              type: string
            logFileSignature:
              description: >-
                Signature to the compiled log file generated with the NFV-MANO functional entity’s private key,
                which is used to ensure the authenticity of the compiled log file. The signature shall be applied
                according to the "encryptAndSignOrder" of the "LoggingJobConfig".
              type: string
            signingCertificate:
              description: >-
                X.509 certificate with the NFV-MANO functional entity’s public key used for verifying the
                log report and compiled log file signatures.
              type: string
        _links:
          description: >-
            Links for this resource.
          type: object
          required:
            - self
          properties:
            self:
              description: >-
                URI of this resource.
              $ref: '../definitions/SOL009_def.yaml#/definitions/Link'
            objects:
              description: >-
                Links to resources representing the object instances that are logged. Shall be present
                if the logged object instance information is accessible as a resource.
              type: array
              items:
                $ref: '../definitions/SOL009_def.yaml#/definitions/Link'

    CreateLoggingJobRequest:
      description: >-
        Information on application context created by the MEC system
      type: object
      required:
        - objectInstanceIds
        - jobCriteria
        - jobConfig
      properties:
        objectInstanceIds:
          description: >-
            Identifiers of the object instance for which logging information is requested to be collected.
            This attribute shall contain the identifier of the instance of the object to be logged according to their type.
            If more than one identifier is provided, values shall all refer to object instances of the same type,
            for which the same criteria is then applicable.
          type: array
          minItems: 1
          items:
            $ref: "#/components/schemas/ManoManagedObjectReference"
        jobCriteria:
          description: >-
            Criteria of the collection of logging information.
          $ref: "#/components/schemas/LoggingJobCriteria"
        jobConfig:
          description: >-
            Configuration about the logging job.
          $ref: "#/components/schemas/LoggingJobConfig"

    ManoManagedObjectReference:
      description: >-
        This type represents the identifier to reference a managed object of a particular type.
        It shall comply with the provisions defined in Table 4.3.2.3-1.
      type: object
      required:
        - type
        - objectId
      properties:
        type:
          description: >-
            Indicates the type of managed object.

            Permitted values:
            - MANO_ENTITY
            - MANO_SERVICE
            - MANO_SERVICE_IF
            - CONSUMED_MANO_IF
            - MANO_ENTITY_COMPONENT
          type: string
          enum: [MANO_ENTITY, MANO_SERVICE, MANO_SERVICE_IF, CONSUMED_MANO_IF, MANO_ENTITY_COMPONENT]
        objectId:
          description: >-
            Identifier of the managed object.

            - If type="MANO_ENTITY", it corresponds to the value of the attribute "id" of the "ManoEntity"
               representing an NFV-MANO functional entity.
            - If type="MANO_SERVICE", it corresponds to the value of the attribute "id" of the "ManoEntity"
               representing the NFV-MANO functional entity that contains the "ManoService" sub-object.
            - If type="MANO_SERVICE_IF", it corresponds to the value of the attribute "id" of the
              "ManoServiceInterface" representing the NFV-MANO functional entity that contains the
              "ManoServiceInterface" sub-object.
            - If type="CONSUMED_MANO_IF", the value corresponds to the value of the attribute "id" of the
              "ConsumedManoInterfaceInfo" representing a consumed NFV-MANO service interface from a peer
               functional entity.
            - If type="MANO_ENTITY_COMPONENT", the value corresponds to the value of the attribute "id" of the
               "ManoEntity" representing the NFV-MANO functional entity that contains
          $ref: '../definitions/SOL009_def.yaml#/definitions/Identifier'
        subObjectId:
          description: >-
            Identifier of the managed sub-object. It shall be present if type equals to "MANO_SERVICE" or
            "MANO_SERVICE_IF" or "MANO_ENTITY_COMPONENT".

            - If type="MANO_SERVICE", it corresponds to the value of the attribute "id" of the "ManoService"
               representing an individual NFV-MANO service.
            - If type="MANO_SERVICE_IF", it corresponds to the value of the attribute "id" of the "ManoServiceInterface"
              representing an individual NFV-MANO service interface.
            - If type="MANO_ENTITY_COMPONENT", it corresponds to the value of the attribute "id" of the "ManoEntityComponent"
              representing an NFV-MANO functional entity component
          $ref: '../definitions/SOL009_def.yaml#/definitions/IdentifierInManoEntity'

    LoggingJob:
      description: >-
        This type represents a logging job. It shall comply with the provisions defined in table 8.6.2.6-1.
      type: object
      required:
        - id
        - objectInstanceIds
        - jobCriteria
        - jobConfig
        - _links
      properties:
        id:
          description: >-
            Identifier of this logging job.
          $ref: '../definitions/SOL009_def.yaml#/definitions/Identifier'
        objectInstanceIds:
          description: >-
            Identifiers of the object instance for which logging information is collected. This attribute shall
            contain the identifier of the instance of the object that is logged according to their type.
          type: array
          items:
            $ref: "#/components/schemas/ManoManagedObjectReference"
        jobCriteria:
          description: >-
            Criteria of the collection of logging information.
          $ref: "#/components/schemas/LoggingJobCriteria"
        jobConfig:
          description: >-
            Configuration about the logging job.
          $ref: "#/components/schemas/LoggingJobConfig"
        logReports:
          description: >-
            Information about available log reports created by the logging job.
          type: array
          items:
            type: object
            required:
              - logReportId
              - logReportLoc
            properties:
              logReportId:
                description: >-
                  Identifier of the available log report.
                '../definitions/SOL009_def.yaml#/definitions/Identifier'
              logReportLoc:
                description: >-
                  Link to the available log report.
                $ref: '../definitions/SOL009_def.yaml#/definitions/Link'
        _links:
          description: >-
            Links for this resource.
          type: object
          required:
            - self
          properties:
            self:
              description: >-
                URI of this resource.
              $ref: '../definitions/SOL009_def.yaml#/definitions/Link'
            objects:
              description: >-
                Links to resources representing the object instances that are logged. Shall be present
                if the logged object instance information is accessible as a resource.
              type: array
              items:
                $ref: '../definitions/SOL009_def.yaml#/definitions/Link'

    LoggingJobCriteria:
      description: >-
        This type represents collection criteria for logging jobs. It shall comply with the provisions
        defined in table 8.6.3.2-1.
      type: object
      required:
        - loggingType
      properties:
        loggingType:
          description: >-
            Type of logging. This defines the types of logged information to collect.

            Permitted values:
            - MESSAGES: logged NFV-MANO service interface messages.
            - SERVICES: logged messages about processes pertaining to NFV-MANO services.
            - SYSTEM: logged messages about the NFV-MANO functional entity’s system enabled by the provider.
          type: string
          enum: [MESSAGES, SERVICES, SYSTEM]
        messagesLogDetail: