NeuVector File API

Operations about File

OpenAPI Specification

neuvector-file-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: Secure Docker and Kubernetes based container deployments with the NeuVector run-time security solution.
  version: 5.6.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: NeuVector File API
  contact:
    email: support@neuvector.com
schemes:
- https
tags:
- name: File
  description: Operations about File
paths:
  /v1/file/compliance/profile:
    post:
      tags:
      - File
      summary: Export compliance profile as a yaml format. The exported yaml file can be imported by CRD or REST API to update the compliance profile.
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: header
        name: X-Auth-Token
        required: true
        type: string
      - in: body
        name: body
        description: Names of profiles to export
        schema:
          $ref: '#/definitions/RESTCompProfilesExport'
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/admission:
    post:
      tags:
      - File
      summary: Export admission control configuration as a yaml format. The exported yaml file can be imported by CRD (non-fed scope only) or REST API to update the admission control settings.
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It exports the federated admission control rules when the scope is fed. Otherwise it's for exporting local admission control rules & state configurations.
      - in: body
        name: body
        description: Configuration data
        required: true
        schema:
          $ref: '#/definitions/RESTAdmCtrlRulesExport'
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/admission/config:
    post:
      tags:
      - File
      description: Importing admission config. The payload body is the content of the admission config yaml file.
      summary: import admission config
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      - text/plain; charset=utf-8
      parameters:
      - in: header
        name: X-Transaction-ID
        required: false
        type: string
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It imports the federated admission control rules when the scope is fed. Otherwise it's for importing local admission control rules & state configurations.
      - in: body
        name: body
        description: admission config yaml file
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
  /v1/file/response/rule:
    post:
      tags:
      - File
      summary: Export non-group-dependent (federated) response rules as a yaml format. The exported yaml file can be imported by CRD (non-fed scope only) or REST API to update the response rules.
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It exports the federated non-group-dependent response rules when the scope is fed. Otherwise it's for exporting local non-group-dependent response rules.
      - in: body
        name: body
        description: Non-group-dependent response rules yaml file
        required: true
        schema:
          $ref: '#/definitions/RESTResponseRulesExport'
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/response/rule/config:
    post:
      tags:
      - File
      description: Importing non-group-dependent response rules. The payload body is the content of the response rules yaml file.
      summary: import non-group-dependent response rules
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      - text/plain; charset=utf-8
      parameters:
      - in: header
        name: X-Transaction-ID
        required: false
        type: string
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It imports the federated non-group-dependent response rules when the scope is fed. Otherwise it's for importing local non-group-dependent response rules.
      - in: body
        name: body
        description: response rules yaml file
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
  /v1/file/config:
    get:
      tags:
      - File
      summary: Download a configure file
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      produces:
      - application/json
      responses:
        '200':
          description: Success. Get a configure file.
    post:
      tags:
      - File
      summary: Upload configure file
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - multipart/form-data
      parameters:
      - in: header
        name: X-Transaction-ID
        required: false
        type: string
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It imports the federated configurations when the scope is fed. Otherwise it's for importing local configurations
      - in: formData
        type: file
        name: configuration
        description: a yaml configure file
      responses:
        '200':
          description: Success. Upload a configure file.
  /v1/file/fed_config:
    post:
      tags:
      - File
      summary: Export federated webhooks configuration as a yaml format
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: header
        name: X-Transaction-ID
        required: false
        type: string
      - in: body
        name: body
        description: Configuration data
        required: true
        schema:
          $ref: '#/definitions/RESTFedConfigExport'
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/dlp:
    post:
      tags:
      - File
      summary: Export (federated) DLP configuration as a yaml format. The exported yaml file can be imported by CRD (non-fed scope only) or REST API to update the DLP configurations.
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It exports the federated DLP configurations when the scope is fed. Otherwise it's for exporting local DLP configurations
      - in: body
        name: body
        description: Configuration data
        required: true
        schema:
          $ref: '#/definitions/RESTDlpSensorExport'
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/dlp/config:
    post:
      tags:
      - File
      description: Importing DLP config. The payload body is the content of the DLP config yaml file.
      summary: import DLP config
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      - text/plain; charset=utf-8
      parameters:
      - in: header
        name: X-Transaction-ID
        required: false
        type: string
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It imports the federated DLP configurations when the scope is fed. Otherwise it's for importing local DLP configurations
      - in: body
        name: body
        description: DLP config yaml file
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
  /v1/file/vulnerability/profile:
    post:
      tags:
      - File
      summary: Export vulnerability profile as a yaml format. The exported yaml file can be imported by CRD or REST API to update the compliance profile.
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: header
        name: X-Auth-Token
        required: true
        type: string
      - in: body
        name: body
        description: Names of profiles to export
        schema:
          $ref: '#/definitions/RESTVulnProfilesExport'
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/waf:
    post:
      tags:
      - File
      summary: Export (federated) WAF configuration as a yaml format. The exported yaml file can be imported by CRD (non-fed scope only) or REST API to update the WAF configurations.
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It exports the federated WAF configurations when the scope is fed. Otherwise it's for exporting local WAF configurations.
      - in: body
        name: body
        description: Configuration data
        required: true
        schema:
          $ref: '#/definitions/RESTWafSensorExport'
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/waf/config:
    post:
      tags:
      - File
      description: Importing WAF config. The payload body is the content of the WAF config yaml file.
      summary: import waf config
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      - text/plain; charset=utf-8
      parameters:
      - in: header
        name: X-Transaction-ID
        required: false
        type: string
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It imports the federated WAF configurations when the scope is fed. Otherwise it's for importing local WAF configurations.
      - in: body
        name: body
        description: waf config yaml file
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
  /v1/file/group:
    get:
      tags:
      - File
      summary: (Obsolete, please use POST method.) Export the yaml format configuration file ( used for CRD or group policy ).
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        description: Configuration data
        required: true
        schema:
          $ref: '#/definitions/RESTGroupExport'
      responses:
        '200':
          description: Success. Get a yaml file.
    post:
      tags:
      - File
      summary: Export (federated) group configuration as a yaml format. The exported yaml file can be imported by CRD (non-fed scope only) or REST API to update the group policy.
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      parameters:
      - in: body
        name: body
        description: Configuration data
        required: true
        schema:
          $ref: '#/definitions/RESTGroupExport'
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It exports the federated group configurations when the scope is fed. Otherwise it's for exporting local group configurations.
      responses:
        '200':
          description: Success. (1) Get a yaml file when export to local. (2) Get RESTRemoteExportData payload when export to remote repository.
          schema:
            $ref: '#/definitions/RESTRemoteExportData'
  /v1/file/group/config:
    get:
      tags:
      - File
      summary: Get import status
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      produces:
      - application/json
      responses:
        '200':
          description: Success
          schema:
            $ref: '#/definitions/RESTImportTaskData'
    post:
      tags:
      - File
      description: Importing group policy. The payload body is the content of the group policy yaml file.
      summary: import group policy
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      consumes:
      - application/json
      - text/plain; charset=utf-8
      parameters:
      - in: header
        name: X-Transaction-ID
        required: false
        type: string
      - in: query
        name: scope
        type: string
        required: false
        enum:
        - local
        - fed
        description: It imports the federated group policy when the scope is fed. Otherwise it's for importing local group policy.
      - in: body
        name: body
        description: group policy yaml file
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
  /v1/csp/file/support:
    post:
      tags:
      - File
      summary: Export support config tarball in gz format
      security:
      - ApiKeyAuth: []
      - TokenAuth: []
      responses:
        '200':
          description: Success. Get a tarball gz file.
definitions:
  RESTDlpSensorExport:
    type: object
    required:
    - names
    properties:
      names:
        type: array
        items:
          type: string
        example:
        - ''
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
  RESTVulnProfilesExport:
    type: object
    properties:
      names:
        type: array
        items:
          type: string
          example:
          - default
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
  RESTCompProfilesExport:
    type: object
    properties:
      names:
        type: array
        items:
          type: string
          example:
          - default
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
  RESTAdmCtrlRulesExport:
    type: object
    properties:
      export_config:
        type: boolean
        example: true
      ids:
        type: array
        items:
          type: integer
          format: uint32
          example: 12
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
  RESTGroupExport:
    type: object
    required:
    - groups
    properties:
      use_name_referral:
        type: boolean
        example: false
        description: Do not export groups' criteria. Instead, refer to NvGroupDefinition CRs for all groups involved in the export.
      groups:
        type: array
        items:
          type: string
          example: demo
      policy_mode:
        type: string
        example: Monitor
        enum:
        - Learn
        - Monitor
        - Protect
      profile_mode:
        type: string
        example: Monitor
        enum:
        - Learn
        - Monitor
        - Protect
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
  RESTRemoteExportData:
    type: object
    properties:
      file_path:
        type: string
        description: the destination file path when exported to remote repository
  RESTRemoteExportOptions:
    type: object
    required:
    - file_path
    - remote_repository_nickname
    properties:
      file_path:
        type: string
        example: my_exports/example.yaml
      comment:
        type: string
        description: commit message
        example: commit for poc
      remote_repository_nickname:
        type: string
        example: default
  RESTImportTaskData:
    type: object
    required:
    - data
    properties:
      data:
        $ref: '#/definitions/RESTImportTask'
  RESTWafSensorExport:
    type: object
    required:
    - names
    properties:
      names:
        type: array
        items:
          type: string
          example: test4321546242574254672462572452615362453
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
  RESTResponseRulesExport:
    type: object
    properties:
      ids:
        type: array
        items:
          type: integer
          format: uint32
          example: 12
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
  RESTImportTask:
    type: object
    required:
    - tid
    - ctrler_id
    - percentage
    properties:
      tid:
        type: string
        example: c5af897b62a258212ece91c0551d3a4a
      ctrler_id:
        type: string
        example: 6e60452b244b90456f3450c9fed0a50f57f4b849dcb74a5fad289e8116f32f36
      last_update_time:
        type: string
        format: date-time
        example: '2022-03-17T17:31:55.832768041Z'
      percentage:
        type: integer
        example: 100
      triggered_by:
        type: string
        example: admin
      status:
        type: string
        example: done
      temp_token:
        type: string
        example: ''
      fail_to_decrypt_key_fields:
        type: object
        description: Object key is kv key and value is array of cloaked fields that cannot be decrypted
        additionalProperties:
          type: array
          items:
            type: string
          example:
          - x509_cert
          - signing_cert
  RESTFedConfigExport:
    type: object
    properties:
      remote_export_options:
        $ref: '#/definitions/RESTRemoteExportOptions'
securityDefinitions:
  ApiKeyAuth:
    type: apiKey
    in: header
    name: X-Auth-Apikey
  TokenAuth:
    type: apiKey
    in: header
    name: X-Auth-Token
externalDocs:
  description: Find out more about NeuVector
  url: https://www.suse.com/products/neuvector/