PolicyManagement.yaml 59.7 KB
Newer Older
          description: >
            Version of the API used in the response.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/ProblemDetails"

    PolicySelectedVersion.Get.200:
      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
          schema:
            type: string
      content:
        application/*:
          schema:
            type: object
            additionalProperties: true
    PolicySelectedVersion.Get.404:
      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.
        Specifically in case of this resource, the response code 404 shall also be returned if the policy is in
        CREATED state.
        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"

    IndividualPolicyVersion.Get.200:
      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
          schema:
            type: string
      content:
        application/*:
          schema:
            type: object
            additionalProperties: true
    PolicyVersionTransfer.Put.201:
      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

    PolicyVersionTransfer.Put.409:
      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"
    PolicyVersion.Delete.204:
      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

    PolicyVersion.Delete.409:
      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"
    Subscriptions.Post.201:
      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"

    Subscriptions.Post.303:
      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
        
    Subscriptions.Get.200:
      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"

    Subscriptions.Get.400:
      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"
        
    IndividualSubscription.Get.200:
      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"
        
    IndividualSubscription.Delete.204:
      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        

    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.
      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:
            $ref: "../components/SOL012_schemas.yaml#/components/schemas/PolicyModifications"

    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:
        application/*:
          schema:
            type: object
            additionalProperties: true

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