$schema: http://support.riverbed.com/apis/service_def/2.2
description: Policy export and import service
id: http://support.riverbed.com/apis/npm.policies.export/1.0
name: npm.policies.export
provider: riverbed
resources:
  export_policies:
    additionalProperties: false
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/export_policies'
      self:
        path: $/policies
      set:
        method: POST
        request:
          $ref: '#/resources/export_policy'
        response:
          $ref: '#/resources/export_policy'
    properties:
      items:
        items:
          $ref: '#/resources/export_policy'
        type: array
    required:
    - items
    type: object
  export_policy:
    additionalProperties: false
    description: Exported policy
    links:
      get:
        method: GET
        response:
          $ref: '#/resources/export_policy'
      self:
        path: $/policies/items/{id}
      set:
        method: PUT
        request:
          $ref: '#/resources/export_policy'
        response:
          $ref: '#/resources/export_policy'
    properties:
      fh_profile_mapping:
        additionalProperties: false
        description: Mapping of FH profile ID to name
        properties:
          id:
            description: FH Profile ID
            type: integer
          name:
            description: FH Profile name
            type: string
        required:
        - id
        - name
        type: object
      filter_mappings:
        description: List of filter mappings
        items:
          $ref: '#/types/filter_mapping'
        type: array
      policy:
        additionalProperties: true
        description: Original policy
        type: object
      recipient_mappings:
        $ref: /apis/npm.usernotify/3.0#/resources/recipients_list
    required:
    - policy
    type: object
title: Policy export service
types:
  filter_mapping:
    additionalProperties: false
    description: A column ID and its value name/ID used in a policy filter
    properties:
      column_id:
        description: Column ID on which the filter applies
        type: string
      mappings:
        description: Individual ID-to-Value mappings for the column
        items:
          additionalProperties: false
          properties:
            item_id:
              description: ID of the mapping or enum
              type: integer
            item_value:
              description: String value of the mapping or enum
              type: string
          required:
          - item_id
          - item_value
          type: object
        type: array
    required:
    - column_id
    - mappings
    type: object
version: '1.0'
