swagger: '2.0'
info:
  description: |
    sensitivity.io REST Services API is used by clients and third party apps to interact with our web services.

    API version 1 (v1) is stable as of 2018-03-01

    We provide and maintain [C, C++, C#, Java, PHP and Golang](/#tag/sdks) SDKs for working with our API. They can be downloaded from your Control Panel.

    #### Support

    Support is available as a service and is already part of your subscription. Please find out more at [sensitivity.io Support](https://support.sensitivity.io).

    For any questions on API, please join our sensitivity.io [community](https://developers.sensitivity.io/forum).

    [Bug reports](https://support.sensitivity.io) in the documentation or the API are welcome, but please follow our [Responsible Disclosure](https://developers.sensitivity.io/forum/t/responsible-disclosure/5) guide.

    sensitivity.io is offering Data Loss Prevention SDK for Cloud, Apps, and Services. Powerful REST API and SaaS offering can Inject security, DLP features & HIPAA, GDPR and other compliance policies at the core of your apps.

    Add DLP, scanning and classification to your apps with DLP Windows SDK, DLP Linux SDK, DLP Mac SDK, DLP iOS or Android SDK.
  version: "1"
  title: sensitivity.io REST API Reference
  termsOfService: 'https://sensitivity.io/privacy-policy/'
  contact:
    name: Team sensitivity.io
    email: team@sensitivity.io
  x-logo:
    url: "https://static.sensitivity.io/img/png/logo/sensi-logo_logo-plus-256.png"
    backgroundColor: "#FFFFFF"
basePath: /v1
host: api.sensitivity.io
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
x-servers:
  - url: //api.sensitivity.io/v1
    variables:
      account_id:
        # note! no enum here means it is an open value
        default: 92683310********
        description: this value is used to build the Account path for the API
tags:
  - name: integrations
    description: |
      * [REST API Reference](https://developers.sensitivity.io/api) - This guide

      #### Integrating sensitivity.io SDK in your applications, services or infrastructure
      * [Windows](https://developers.sensitivity.io/installation/install-windows.html)
      * [MacOS](https://developers.sensitivity.io/installation/install-macosx.html)
      * [Linux](https://developers.sensitivity.io/installation/install-centos-7.html)

      #### Mobile platforms integration
      * [sensitivity.io iOS](https://developers.sensitivity.io/installation/install-mobile-ios.html)
      * [sensitivity.io Android SDK](https://developers.sensitivity.io/installation/install-mobile-android.html)
  - name: sdks
    description: |
      The easiest way to interact with sensitivity.io Web Service API is through a language specific SDK.

      #### Documentation for integration
      https://developers.sensitivity.io/integration/index.html

      ____________

      #### Official SDKs
      * [sensitivity.io C and C++ SDKs](https://cp.sensitivity.io/sdks/official/c)
      * [sensitivity.io C#/.NET SDK](https://cp.sensitivity.io/sdks/official/csharp)
      * [sensitivity.io Java SDK](https://cp.sensitivity.io/sdks/official/java)
      # * [sensitivity.io Python SDK](https://cp.sensitivity.io/sdks/official/python)
      * [sensitivity.io PHP SDK](https://cp.sensitivity.io/sdks/official/php)
      * [sensitivity.io Go (golang) SDK](https://cp.sensitivity.io/sdks/official/go)

      #### Platform Specific SDKs
      * [sensitivity.io Android SDK](https://cp.sensitivity.io/sdks/official/android)
      * [sensitivity.io iOS / Swift / MacOs SDK](https://cp.sensitivity.io/sdks/official/ios)

      #### Community SDKs
      * [NodeJS SDK](https://github.com/sensitivityio/community-nodejs) - by [@ocical](https://github.com/ocical)

  - name: authentication
    description: |
      #### Access
      API access is through HTTPS requests at `api.sensitivity.io`.
      #### Requests
      Requests are of Content-Type `application/json`, `multipart/form-data` or `application/x-www-form-urlencoded`.
      #### Responses
      Responses are always of Content-Type `application/json`.
      #### Additional Header
      If not specified otherwise, always make the request with an additional header `Host` with value `api.sensitivity.io`
      #### Authorization
      The authentication method for sesitivity.io API is by using an authentication HTTP Header with the either the special keyword `Auth-Key` or OAuth2 protocol.

      - API Key
      - OAuth2

      Examples assume your API Service is located at https://api.sensitivity.io

      ```
      curl -X GET \
        https://api.sensitivity.io/v1/accounts/92683310********/projects/2c******/apps/045ad58*******/ \
          -H 'Auth-Key: 52ae895c286d44d3****************' \
          -H 'Content-Type: application/json' \
          -H 'Host: api.sensitivity.io'
      ```

      On success, the response will contain a valid response.

      ```
      HTTP/1.1 200 OK
      Date: Mon, 25 Aug 2017 08:00:00 GMT
      Content-Type: application/json
      Content-Length: 501
      Etag: 1.0.1.045ad585ad5a99da.1503667039393.0
      X-Request-Id: ef82d5fe-fa57-47a9-a214-7515e003751d
      X-Version-Id: 1.0.1.054243338249840c0ebc2e1b23021bd7
      X-Kong-Upstream-Latency: 5
      X-Kong-Proxy-Latency: 0
      Via: kong/0.10.3

      {{json object response}}
      ```
      #### OAuth2 Provider

      sensitivity.io is offering OAuth 2.0 services that can acts as [OAuth 2.0](https://tools.ietf.org/html/rfc6749) service provider.

      ```
      curl -X GET \
        https://api.sensitivity.io/v1/accounts/92683310********/projects/2c******/apps/045ad58*******/ \
          -H 'Auth-Key: Bearer 52ae895c286d44d3****************' \
          -H 'Content-Type: application/json' \
          -H 'Host: api.sensitivity.io'
      ```

      More can be found under the [OAuth2](#tag/oauth2) section under this API Reference
  - name: accounts
    description: Accounts operations.  `/my` will retrieve the account requesting the authentication, if valid.
  - name: users
    description: Users operations. `/my` will retrieve the user requesting the authentication, if valid.
  - name: projects
    description: Projects operations.
  - name: apps
    description: Apps/installations operations.
  - name: protection profiles
    description: |
      A **protection profile** represents the link between a **profile definition** and:
      * either a **profile origin** (account, project or app)
      * or a **profile destination** (i.e. cloud storage path).
  - name: profile definitions
    description: |
      A **profile definition** consists of:
      * predefined content definitions
      * file type definitions
      * dictionary definitions
      * regex definitions.

      The resulting collection is used as an instruction set by the scanner.
  - name: profile origins
    description: |
        **Profile origins** are targets for profile definitions. They can be either **accounts**, **projects** or **apps**.
  - name: profile destinations
    description: |
        Target paths in the associated cloud storage accounts. **Profile destinations** are used either for periodical or one-time scans.
  - name: scanner
    description: Interacting with sensitivity.io scanning engine.
  - name: cloud services
    description: Interacting with cloud data storage providers.
  - name: oauth2
    description: oAuth2 Clients and Service.
  - name: preferences
    description: Handling user preferences.
  - name: general
    description: General operations.
x-tagGroups:
  - tags:
      - integrations
      - sdks
  - name: REST API Operations
    tags:
      - authentication
      - accounts
      - users
      - projects
      - apps
      - protection profiles
      - profile definitions
      - profile origins
      - profile destinations
      - definitions - predefined content
      - definitions - file types
      - definitions - dictionaries
      - definitions - regular expressions
      - scanner
      - cloud services
      - oauth2
      - logs
      - preferences
      - general
responses:
  'Forbidden':
    description: Permission denied
    schema:
      $ref: '#/definitions/Error'
  'Unauthorized':
    description: No Auth-Key provided
    schema:
      $ref: '#/definitions/Error'
  'BadRequest':
    description: Invalid or missing parameters in URL or request body
    schema:
      $ref: '#/definitions/Error'
  'NotFound':
    description: Not found
    schema:
      $ref: '#/definitions/Error'
  'TooLarge':
    description: Content too large
    schema:
      $ref: '#/definitions/Error'
  'NotImplemented':
    description: Feature is disabled
    schema:
      $ref: '#/definitions/Error'
  'InternalServerError':
    description: Something went wrong with the server
    schema:
      $ref: '#/definitions/Error'

parameters:
  CommonAuthParameterHeader:
    in: header
    name: Auth-Key
    description: Auth-Key to access your REST API resources
    type: string
    required: true
  CommonHostParameterHeader:
    in: header
    name: Host
    description: Instruct API Gateway to redirect the request to this specific host
    type: string
    required: true
    default: api.sensitivity.io
  AccountApiIdParameterPath:
    in: path
    name: account_id
    description: Account Id
    type: string
    required: true
  ProjectIdParameterPath:
    in: path
    name: project_id
    description: Project Id
    type: string
    required: true
  AppIdParameterPath:
    in: path
    name: app_id
    description: App Id
    type: string
    required: true
  UserIdParameterPath:
    in: path
    name: user_id
    description: User Id
    type: integer
    required: true
  ProtectionProfileIdParameterPath:
    in: path
    name: profile_id
    description: Profile Id
    type: integer
    required: true
  ProfileDefinitionIdParameterPath:
    in: path
    name: definition_id
    description: Profile Definition Id
    type: integer
    required: true
  ProfileOriginIdParameterPath:
    in: path
    name: origin_id
    description: Profile Origin Id
    type: integer
    required: true
  ProfileDestinationIdParameterPath:
    in: path
    name: destination_id
    description: Profile Destination Id
    type: integer
    required: true
  ContentGroupIdParameterPath:
    in: path
    name: content_group_id
    description: Predefined content group id
    type: integer
    required: true
  ContentIdParameterPath:
    in: path
    name: content_id
    description: Predefined content id
    type: integer
    required: true
  FiletypeGroupIdParameterPath:
    in: path
    name: filetype_group_id
    description: File type group id
    type: integer
    required: true
  FiletypeIdParameterPath:
    in: path
    name: filetype_id
    description: File type id
    type: integer
    required: true
  DictionaryIdParameterPath:
    in: path
    name: dictionary_id
    description: Dictionary id
    type: integer
    required: true
  RegexIdParameterPath:
    in: path
    name: regex_id
    description: Regex id
    type: integer
    required: true
  LogIdParameterPath:
    in: path
    name: log_id
    description: Log Id
    type: string
    required: true
  ServiceTypeParameterPath:
    in: path
    name: service_type
    description: Service Type
    type: string
    required: true
  OAuth2ClientIdParameterPath:
    in: path
    name: client_id
    description: oAuth2 Client Id
    type: string
    required: true

paths:
  '/accounts/{account_id}/':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - accounts
      summary: Get account
      description: |
        Get account information, based on the authentication details provided during the request.
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X GET \
              https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}} \
              -H 'auth-key: {{AUTH_KEY}}' \
              -H 'host: {{REQUEST_HOST}}' \
              -H 'content-type: application/json'
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "auth-key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "content-type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("auth-key", "{{AUTH_KEY}}");
            request.AddHeader("host", "{{REQUEST_HOST}}");
            request.AddHeader("content-type", "application/json");
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.get("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}")
              .header("auth-key", "{{AUTH_KEY}}")
              .header("host", "{{REQUEST_HOST}}")
              .header("content-type", "application/json")
              .asString();
        # - lang: 'Python'
        #   source: |
        #     import http.client

        #     conn = http.client.HTTPSConnection("{{REQUEST_HOST}}")

        #     headers = {
        #         'auth-key': "{{AUTH_KEY}}",
        #         'host': "{{REQUEST_HOST}}",
        #         'content-type': "application/json"
        #         }

        #     conn.request("GET", "/v1/accounts/{{ACCOUNT_ID}}", headers=headers)

        #     res = conn.getresponse()
        #     data = res.read()

        #     print(data.decode("utf-8"))
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => array(
                "auth-key: {{AUTH_KEY}}",
                "host: {{REQUEST_HOST}}",
                "content-type: application/json"
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}"

              req, _ := http.NewRequest("GET", url, nil)

              req.Header.Add("auth-key", "{{AUTH_KEY}}")
              req.Header.Add("host", "{{REQUEST_HOST}}")
              req.Header.Add("content-type", "application/json")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: Account retrieval successful
          schema:
            $ref: '#/definitions/Account'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'
    put:
      tags:
        - accounts
      summary: Update account
      description: |
        Update account. Only fields listed bellow in the request body will be updated.
      parameters:
        - in: body
          name: body
          description: Account to be updated
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
              company_name:
                type: string
              display_name:
                type: string
              email:
                type: string
              address:
                type: string
              zip_code:
                type: string
              country_code:
                type: string
              phone:
                type: string
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X PUT \
              https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/ \
              -H 'Auth-Key: {{AUTH_KEY}}' \
              -H 'Host: {{REQUEST_HOST}}' \
              -H 'Content-Type: application/json' \

              -d '{
                "name": "string",
                "company_name": "string",
                "display_name": "string",
                "email": "string",
                "address": "string",
                "zip_code": "string",
                "country_code": "string",
                "phone": "string",
                "type": "string"
              }'
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"name\": \"string\",\n  \"company_name\": \"string\",\n  \"display_name\": \"string\",\n  \"email\": \"string\",\n  \"address\": \"string\",\n  \"zip_code\": \"string\",\n  \"country_code\": \"string\",\n  \"phone\": \"string\",\n  \"type\": \"string\"\n}");

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            request.AddParameter("undefined", "{\n  \"name\": \"string\",\n  \"company_name\": \"string\",\n  \"display_name\": \"string\",\n  \"email\": \"string\",\n  \"address\": \"string\",\n  \"zip_code\": \"string\",\n  \"country_code\": \"string\",\n  \"phone\": \"string\",\n  \"type\": \"string\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.put("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .body("{\n  \"name\": \"string\",\n  \"company_name\": \"string\",\n  \"display_name\": \"string\",\n  \"email\": \"string\",\n  \"address\": \"string\",\n  \"zip_code\": \"string\",\n  \"country_code\": \"string\",\n  \"phone\": \"string\",\n  \"type\": \"string\"\n}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "PUT",
              CURLOPT_POSTFIELDS => "{\n  \"name\": \"string\",\n  \"company_name\": \"string\",\n  \"display_name\": \"string\",\n  \"email\": \"string\",\n  \"address\": \"string\",\n  \"zip_code\": \"string\",\n  \"country_code\": \"string\",\n  \"phone\": \"string\",\n  \"type\": \"string\"\n}",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/"

              payload := strings.NewReader("{\n  \"name\": \"string\",\n  \"company_name\": \"string\",\n  \"display_name\": \"string\",\n  \"email\": \"string\",\n  \"address\": \"string\",\n  \"zip_code\": \"string\",\n  \"country_code\": \"string\",\n  \"phone\": \"string\",\n  \"type\": \"string\"\n}")

              req, _ := http.NewRequest("PUT", url, payload)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: Account update successful
          schema:
            $ref: '#/definitions/Account'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'
    # delete:
    #   tags:
    #     - accounts
    #   summary: Delete account
    #   description: |
    #     Delete account by marking it as deleted in the database.
    #   parameters:
    #     - name: permanent
    #       in: query
    #       description: Permanently delete account.
    #       required: false
    #       default: false
    #       type: boolean
    #   x-code-samples:
    #     - lang: 'cURL'
    #     - lang: 'C/C++'
    #     - lang: 'C#'
    #     - lang: 'Java'
    #     - lang: 'Python'
    #     - lang: 'PHP'
    #     - lang: 'Go'
    #   responses:
    #     '200':
    #       description: Account deletion successful
    #       schema:
    #         $ref: '#/definitions/AllOK'
    #     '400':
    #       $ref: '#/responses/BadRequest'
    #     '401':
    #       $ref: '#/responses/Unauthorized'
    #     '403':
    #       $ref: '#/responses/Forbidden'
    #     '404':
    #       $ref: '#/responses/NotFound'

  '/accounts/{account_id}/license':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - accounts
      summary: Get license for account
      description: |
        Get account license as object
        ##### Permissions
        `view_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X GET \
              https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license \
              -H 'Auth-Key: {{AUTH_KEY}}' \
              -H 'Content-Type: application/json' \
              -H 'Host: {{REQUEST_HOST}}' \
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license");
            var request = new RestRequest(Method.GET);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.get("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license"

              payload := strings.NewReader("")

              req, _ := http.NewRequest("GET", url, payload)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: License retrieval successful
          schema:
            type: array
            items:
              $ref: '#/definitions/License'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'
    post:
      tags:
        - accounts
      summary: Add License to account
      description: |
        Import license to this existing account by posting it as string resource
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: License resource
          required: true
          schema:
            type: object
            properties:
              plan_type:
                type: string
              validity:
                type: integer
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X POST \
            https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license \
            -H 'Auth-Key: {{AUTH_KEY}}' \
            -H 'Content-Type: application/json' \
            -H 'Host: {{REQUEST_HOST}}' \
            -d '{
              "plan_type": "string",
              "validity": 365
            }'
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"plan_type\": \"string\",\n  \"validity\": <integer>\n}");

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license");
            var request = new RestRequest(Method.POST);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            request.AddParameter("undefined", "{\n  \"plan_type\": \"string\",\n  \"validity\": <integer>\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.post("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .body("{\n  \"plan_type\": \"string\",\n  \"validity\": <integer>\n}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\n  \"plan_type\": \"string\",\n  \"validity\": <integer>\n}",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/license"

              payload := strings.NewReader("{\n  \"plan_type\": \"string\",\n  \"validity\": <integer>\n}")

              req, _ := http.NewRequest("POST", url, payload)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: Add License successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - accounts
      summary: Get account profile
      description: |
        Get account profile
        ##### Permissions
        `view_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X GET \
            https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/profile \
            -H 'Auth-Key: {{AUTH_KEY}}' \
            -H 'Content-Type: application/json' \
            -H 'Host: {{REQUEST_HOST}}' \
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/profile");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/profile");
            var request = new RestRequest(Method.GET);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.get("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/profile")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/profile",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/profile"

              payload := strings.NewReader("")

              req, _ := http.NewRequest("GET", url, payload)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: Account profile retrieval successful
          schema:
            type: array
            items:
              $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'

  '/accounts/{account_id}/actions':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - accounts
      summary: Get admin actions list
      description: |
        Get admin actions list. This is the list of all actions a user has performed.
        ##### Permissions
        `view_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X GET \
            https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/actions \
            -H 'Auth-Key: {{AUTH_KEY}}' \
            -H 'Content-Type: application/json' \
            -H 'Host: {{REQUEST_HOST}}' \
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/actions");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/actions");
            var request = new RestRequest(Method.GET);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.get("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/actions")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/actions",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/actions"

              payload := strings.NewReader("")

              req, _ := http.NewRequest("GET", url, payload)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: Admin actions retrieval successful
          schema:
            type: array
            items:
              $ref: '#/definitions/AdminAction'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'

  '/accounts/{account_id}/members':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - accounts
      summary: Get account members
      description: |
        Get list of members for this account
        ##### Permissions
        `view_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X GET \
            https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/ \
            -H 'Auth-Key: {{AUTH_KEY}}' \
            -H 'Content-Type: application/json' \
            -H 'Host: {{REQUEST_HOST}}' \
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/");
            var request = new RestRequest(Method.GET);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.get("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_PORT => "8000",
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "GET",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/"

              req, _ := http.NewRequest("GET", url, nil)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: Account members retrieval successful
          schema:
            type: array
            items:
              $ref: '#/definitions/AccountMember'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'

  '/accounts/{account_id}/members/add':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    post:
      tags:
        - accounts
      summary: Add (attach) member to account
      description: |
        Add member to the account by user_id.
        ##### Requirments
        User must exist, otherwise an invitation email will be sent to the specified address.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Add member to account by user Id
          required: true
          schema:
            type: object
            required:
              - user_id
            properties:
              user_id:
                type: string
                description: Id of the user to be added to this account as member
              roles:
                type: string
                description: Space separated list of roles
                enum:
                  - account_admin
                  - account_user
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X POST \
            https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/add \
            -H 'Auth-Key: {{AUTH_KEY}}' \
            -H 'Content-Type: application/json' \
            -H 'Host: {{REQUEST_HOST}}' \
            -d '{
              "user_id": <integer>
            }'
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/add");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"user_id\": <integer>\n}");

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/add");
            var request = new RestRequest(Method.POST);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            request.AddParameter("undefined", "{\n\t\"user_id\": <integer>\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.post("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/add")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .body("{\n\t\"user_id\": <integer>\n}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_PORT => "8000",
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/add",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\n\t\"user_id\": <integer>\n}",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/add"

              payload := strings.NewReader("{\n\t\"user_id\": <integer>\n}")

              req, _ := http.NewRequest("POST", url, payload)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '201':
          description: Account member creation successful
          schema:
            $ref: '#/definitions/AccountMember'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'

  '/accounts/{account_id}/members/invite':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    post:
      tags:
        - accounts
      summary: Invite members by email
      description: |
        Invite members to this account by providing their emails.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: List of emails
          required: true
          schema:
            type: array
            items:
              type: object
              properties:
                email:
                  type: string
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X POST \
            https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/invite \
            -H 'Auth-Key: {{AUTH_KEY}}' \
            -H 'Content-Type: application/json' \
            -H 'Host: {{REQUEST_HOST}}' \
            -d '{
              "invites": [
                {
                  "email": "string"
                }
              ]
            }'
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/invite");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "Auth-Key: {{AUTH_KEY}}");
            headers = curl_slist_append(headers, "Host: {{REQUEST_HOST}}");
            headers = curl_slist_append(headers, "Content-Type: application/json");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"invites\": [\n\t\t{\n\t\t\t\"email\": \"string\"\n\t\t}\n\t]\n}");

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/invite");
            var request = new RestRequest(Method.POST);
            request.AddHeader("Auth-Key", "{{AUTH_KEY}}");
            request.AddHeader("Host", "{{REQUEST_HOST}}");
            request.AddHeader("Content-Type", "application/json");
            request.AddParameter("undefined", "{\n\t\"invites\": [\n\t\t{\n\t\t\t\"email\": \"string\"\n\t\t}\n\t]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.post("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/invite")
            .header("Content-Type", "application/json")
            .header("Host", "{{REQUEST_HOST}}")
            .header("Auth-Key", "{{AUTH_KEY}}")
            .body("{\n\t\"invites\": [\n\t\t{\n\t\t\t\"email\": \"string\"\n\t\t}\n\t]\n}")
            .asString();
        # - lang: 'Python'
        - lang: 'PHP'
          source: |
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_PORT => "8000",
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/invite",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "{\n\t\"invites\": [\n\t\t{\n\t\t\t\"email\": \"string\"\n\t\t}\n\t]\n}",
              CURLOPT_HTTPHEADER => array(
                "Auth-Key: {{AUTH_KEY}}",
                "Content-Type: application/json",
                "Host: {{REQUEST_HOST}}",
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/members/invite"

              payload := strings.NewReader("{\n\t\"invites\": [\n\t\t{\n\t\t\t\"email\": \"string\"\n\t\t}\n\t]\n}")

              req, _ := http.NewRequest("POST", url, payload)

              req.Header.Add("Content-Type", "application/json")
              req.Header.Add("Host", "{{REQUEST_HOST}}")
              req.Header.Add("Auth-Key", "{{AUTH_KEY}}")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))

            }
      responses:
        '200':
          description: Users invite successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  /users/{user_id}:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/UserIdParameterPath'
    get:
      tags:
        - users
      summary: Get own user
      description: |
        Get own user details.
        ##### Permissions
        Requires valid credentials.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: User retrieval successful
          schema:
            $ref: '#/definitions/User'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '404':
          $ref: '#/responses/NotFound'
    put:
      tags:
        - users
      summary: Update own user
      description: |
        Update own user. Only fields listed bellow in the request body will be updated.
        ##### Permissions
        Requires valid credentials.
      parameters:
        - in: body
          name: body
          description: User object that is to be updated
          required: true
          schema:
            type: object
            required:
              - id
            properties:
              id:
                type: string
              email:
                type: string
              first_name:
                 type: string
              last_name:
                type: string
              address:
                type: string
              zip_code:
                type: string
              country_code:
                type: string
              phone:
                type: string
              locale:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: User update successful
          schema:
            $ref: '#/definitions/User'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - users
      summary: Delete own user.
      description: |
        Delete own user by marking it as deleted in the database.
        ##### Permissions
        Must be logged in as the user being deleted.
      parameters:
        - name: permanent
          in: query
          description: Permanently delete user.
          required: false
          default: false
          type: boolean
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: User deactivation successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'

  /users/{user_id}/update_password:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/UserIdParameterPath'
    put:
      tags:
        - users
      summary: Update user's password
      description: |
        Update user's password by following the password rules.
        ##### Permissions
        Requires valid credentials.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            type: object
            required:
              - old_password
              - new_password
            properties:
              old_password:
                description: Old password for the user
                type: string
              new_password:
                description: New password for the user
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: User password update successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/projects':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - projects
      summary: Get projects
      description: |
        Get list of projects for an account.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Project list retrieval successful
          schema:
            $ref: "#/definitions/ProjectList"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    post:
      tags:
        - projects
      summary: Create project
      description: |
        Create new project for this account.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Project to be created
          required: true
          schema:
            type: object
            required:
              - type
              - name
            properties:
              type:
                type: integer
                description: "`1` = `CloudSDK`, `2` = `LocalSDK`"
              name:
                type: string
              description:
                type: string
              last_app_at:
                type: integer
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: Project creation successful
          schema:
            $ref: '#/definitions/Project'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
    get:
      tags:
        - projects
      summary: Get project
      description: |
        Get single project for this account.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Project retrieval successful
          schema:
            $ref: "#/definitions/Project"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    put:
      tags:
        - projects
      summary: Update project
      description: |
        Update project for this account. Only fields listed bellow in the request body will be updated.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Project to be updated
          required: true
          schema:
            type: object
            required:
              - type
              - name
            properties:
              type:
                type: integer
                description: "`1` = `CloudSDK`, `2` = `LocalSDK`"
              name:
                type: string
              description:
                type: string
              last_app_at:
                type: integer
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Project update successful
          schema:
            $ref: "#/definitions/Project"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - projects
      summary: Delete project
      description: |
        Mark project as deleted in the database.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Project deletion successful
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}/profile':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
    get:
      tags:
        - projects
      summary: Get project protection profile
      description: |
        Get project protection profile as stringp
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Protection profile retrieval successful
          schema:
            type: array
            items:
              $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/with_apps':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - projects
      summary: Get projects with apps
      description: |
        Get list of projects with apps for an account.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Project list retrieval successful
          schema:
            $ref: "#/definitions/ProjectList"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/projects/{project_id}/apps':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
    get:
      tags:
        - apps
      summary: Get apps
      description: |
        Get list of apps for this project.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: App list retrieval successful
          schema:
            $ref: "#/definitions/AppList"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    post:
      tags:
        - apps
      summary: Create app
      description: |
        Create new app for this project.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: App to be created
          required: true
          schema:
            type: object
            required:
              - app_type
              - os_type
              - udid
              - sdk_version
            properties:
              app_name:
                type: string
                description: Identifier for app so you can easily identify them on CP or in responses
              app_type:
                type: string
                description: "`1` = `Windows`, `2` = `Mac`, `3` = `Linux`, `4` = `Android`, `5` = `iOS`"
              device_name:
                type: string
              udid:
                type: string
                description: Your unique Identifier for app so you can easily track it when you have multiple instances of the SDK running
              app_version:
                type: string
              description:
                type: string
              os_type:
                type: integer
                description: "`1` = `Desktop App`, `2` = `Mobile App` || not implemented yet: 3 = App Component (Ex: App inside SAP), 4 = Server App"
              os_version:
                type: string
              sdk_version:
                type: string
              internal_ip:
                type: string
              external_ip:
                type: string
              mac:
                type: string
              local_time:
                type: integer
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: App creation successful
          schema:
            $ref: '#/definitions/App'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}/apps/register':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
    post:
      tags:
        - apps
      summary: Register app
      description: |
        Register new app using sensitivity.io SDK. Will return an App object if identifiers are already present in the system.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: App to be registered
          required: true
          schema:
            type: object
            required:
              - app_type
              - os_type
              - udid
              - sdk_version
            properties:
              app_name:
                type: string
                description: Identifier for app so you can easily identify them on CP or in responses
              app_type:
                type: string
                description: "`1` = `Windows`, `2` = `Mac`, `3` = `Linux`, `4` = `Android`, `5` = `iOS`"
              device_name:
                type: string
              udid:
                type: string
                description: Your unique Identifier for app so you can easily track it when you have multiple instances of the SDK running
              app_version:
                type: string
              description:
                type: string
              os_type:
                type: integer
                description: "`1` = `Desktop App`, `2` = `Mobile App` || not implemented yet: 3 = App Component (Ex: App inside SAP), 4 = Server App"
              os_version:
                type: string
              sdk_version:
                type: string
              internal_ip:
                type: string
              external_ip:
                type: string
              mac:
                type: string
              local_time:
                type: integer
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: App creation successful
          schema:
            $ref: '#/definitions/App'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}/apps/archived':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
    get:
      tags:
        - apps
      summary: Get archived apps
      description: |
        Get list of archived apps for this project.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Archived apps list retrieval successful
          schema:
            $ref: "#/definitions/AppList"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}/apps/{app_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
      - $ref: '#/parameters/AppIdParameterPath'
    get:
      tags:
        - apps
      summary: Get app
      description: |
        Get single app.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: App retrieval successful
          schema:
            $ref: "#/definitions/App"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    put:
      tags:
        - apps
      summary: Update app
      description: |
        Update app. Only fields listed bellow in the request body will be updated.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: App to be updated
          required: true
          schema:
            type: object
            required:
              - app_type
              - os_type
              - udid
              - sdk_version
            properties:
              app_name:
                type: string
                description: Identifier for app so you can easily identify them on CP or in responses
              app_type:
                type: string
                description: "`1` = `Windows`, `2` = `Mac`, `3` = `Linux`, `4` = `Android`, `5` = `iOS`"
              device_name:
                type: string
              udid:
                type: string
                description: Your unique Identifier for app so you can easily track it when you have multiple instances of the SDK running
              app_version:
                type: string
              description:
                type: string
              os_type:
                type: integer
                description: "`1` = `Desktop App`, `2` = `Mobile App` || not implemented yet: 3 = App Component (Ex: App inside SAP), 4 = Server App"
              os_version:
                type: string
              sdk_version:
                type: string
              internal_ip:
                type: string
              external_ip:
                type: string
              mac:
                type: string
              local_time:
                type: integer
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: App update successful
          schema:
            $ref: "#/definitions/App"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - apps
      summary: Delete app
      description: |
        Mark app as deleted in the database.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: App deletion successful
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}/apps/{app_id}/license':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
      - $ref: '#/parameters/AppIdParameterPath'
    get:
      tags:
        - apps
      summary: Get license for app
      description: |
        Get app license as string
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: License retrieval successful
          schema:
            type: string
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}/apps/{app_id}/profile':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
      - $ref: '#/parameters/AppIdParameterPath'
    get:
      tags:
        - apps
      summary: Get app protection profile
      description: |
        Get app protection profile as string
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Protection profile retrieval successful
          schema:
            type: array
            items:
              $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/projects/{project_id}/apps/{app_id}/settings':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
      - $ref: '#/parameters/AppIdParameterPath'
    post:
      tags:
        - apps
      summary: Get app module settings
      description: |
        Get app settings for specific sensitivity.io module as string
        ##### Permissions
        `view_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: User object to be created
          required: true
          schema:
            type: object
            required:
              - module_name
            properties:
              sdk_version:
                type: string
              module_name:
                type: array
                description: Array of modules to request settings for
                enum:
                  - sensitive_data_scanner
                  - sensitive_data_classifier
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Module settings retrieval successful
          schema:
            type: string
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/profiles':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - protection profiles
      summary: Get protection profiles
      description: |
        List protection profiles from your account.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Protection profiles retrieval successful
          schema:
            $ref: '#/definitions/ProtectionProfileList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - protection profiles
      summary: Create protection profile
      description: |
        Create new protection profile and place it under Custom protection profiles section on CP.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Protection Profile to be created
          required: true
          schema:
            type: object
            properties:
              definition_id:
                type: integer
                description: "The `id` of the profile definition"
              origin_id:
                type: integer
                description: "The `id` of the profile origin"
              destination_id:
                type: integer
                description: "The `id` of the profile destination"
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: protection profile creation successful
          schema:
            $ref: '#/definitions/ProtectionProfile'
        '400':
          $ref: '#/responses/BadRequest'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profiles/{profile_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProtectionProfileIdParameterPath'
    get:
      tags:
        - protection profiles
      summary: Get a protection profile
      description: |
        Retrieve a protection profiles from your account.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Protection profile retrieval successful
          schema:
            $ref: '#/definitions/ProtectionProfile'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    delete:
      tags:
        - protection profiles
      summary: Delete a protection profile
      description: |
        Unassign a profile definition from an account/project/app or from a cloud storage location.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: protection profile deleted successfully
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/profile_definitions':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - profile definitions
      summary: List profile definitions
      description: |
        List the profile definitions from your account.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition list successful
          schema:
            $ref: '#/definitions/ProfileDefinitionList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - profile definitions
      summary: Create a custom profile definition
      description: |
        Create a custom profile definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Profile definition to be created
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              content_ids:
                type: object
                description: "The `ids` of the corresponding predefined content definitions along with country codes, where available"
              filetype_ids:
                type: array
                description: "The `ids` of the corresponding filetype definitions"
              dictionary_ids:
                type: array
                description: "The `ids` of the corresponding dictionary definitions"
              regex_ids:
                type: array
                description: "The `ids` of the corresponding regex definitions"
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: Profile definition creation successful
          schema:
            $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/{definition_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProfileDefinitionIdParameterPath'
    get:
      tags:
        - profile definitions
      summary: Get a profile definition
      description: |
        Retrieve a profile definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition retrieved successfully
          schema:
            $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    put:
      tags:
        - profile definitions
      summary: Update a custom profile definition
      description: |
        Update a profile definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      parameters:
        - in: body
          name: body
          description: Profile definition to be updated
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              content_ids:
                type: object
                description: "The `ids` of the corresponding predefined content definitions along with country codes, where available"
              filetype_ids:
                type: array
                description: "The `ids` of the corresponding filetype definitions"
              dictionary_ids:
                type: array
                description: "The `ids` of the corresponding dictionary definitions"
              regex_ids:
                type: array
                description: "The `ids` of the corresponding regex definitions"
      responses:
        '200':
          description: Profile definition updated successfully
          schema:
            $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - profile definitions
      summary: Delete a custom profile definition
      description: |
        Delete a custom profile definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: profile definition deleted successfully
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/{definition_id}/settings':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProfileDefinitionIdParameterPath'
    get:
      tags:
        - profile definitions
      summary: Get the settings from a profile definition
      description: |
        Get the settings from a profile definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition settings retrieved successfully
          schema:
            type: string
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/predefined':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - profile definitions
      summary: Get predefined profile definitions
      description: |
        Get predefined profile definitions.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition list successful
          schema:
            $ref: '#/definitions/ProfileDefinitionList'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/compliance':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - profile definitions
      summary: Get compliance profile definitions
      description: |
        Get compliance profile definitions.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition list successful
          schema:
            $ref: '#/definitions/ProfileDefinitionList'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/regional':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - profile definitions
      summary: Get regional profile definitions
      description: |
        Get regional profile definitions.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition list successful
          schema:
            $ref: '#/definitions/ProfileDefinitionList'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/archived':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - profile definitions
      summary: Get archived profile definitions
      description: |
        Get archived profile definitions.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition list successful
          schema:
            $ref: '#/definitions/ProfileDefinitionList'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/{definition_id}/archive':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProfileDefinitionIdParameterPath'
    put:
      tags:
        - profile definitions
      summary: Move a profile definition to archive
      description: |
        Move a profile definition to archive.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition archived successfully
          schema:
            $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_definitions/{definition_id}/unarchive':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProfileDefinitionIdParameterPath'
    put:
      tags:
        - profile definitions
      summary: Restore a profile definition from archive
      description: |
        Restore a profile definition from archive.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile definition restored successfully
          schema:
            $ref: '#/definitions/ProfileDefinition'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/content_groups':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    get:
      tags:
        - definitions - predefined content
      summary: List content definition groups
      description: |
        List the predefined content definition groups.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Content definition groups list successful
          schema:
            type: array
            items:
              $ref: '#/definitions/DefContentGroup'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/content_groups/{content_group_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/ContentGroupIdParameterPath'
    get:
      tags:
        - definitions - predefined content
      summary: Retrieve the content definition group
      description: |
        Fetch the predefined content definition group.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Content definition group retrieved successfully
          schema:
            $ref: '#/definitions/DefContentGroup'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/content_groups/{content_group_id}/contents':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/ContentGroupIdParameterPath'
    get:
      tags:
        - definitions - predefined content
      summary: List content definitions
      description: |
        List the predefined content definitions.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Content definitions list successful
          schema:
            $ref: '#/definitions/DefContentList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/content_groups/{content_group_id}/contents/{content_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/ContentGroupIdParameterPath'
      - $ref: '#/parameters/ContentIdParameterPath'
    get:
      tags:
        - definitions - predefined content
      summary: Retrieve content definition
      description: |
        Fetch a predefined content definition.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Content definition retrieved successfully
          schema:
            $ref: '#/definitions/DefContent'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
  '/filetype_groups':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    get:
      tags:
        - definitions - file types
      summary: List file type groups
      description: |
        List the file type definition groups.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: File type groups list successful
          schema:
            type: array
            items:
              $ref: '#/definitions/DefFiletypeGroup'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/filetype_groups/{filetype_group_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/FiletypeGroupIdParameterPath'
    get:
      tags:
        - definitions - file types
      summary: Retrieve the file type definition group
      description: |
        Fetch the file type definition group.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: File type definition group retrieved successfully
          schema:
            $ref: '#/definitions/DefFiletypeGroup'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/accounts/{account_id}/filetypes':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - definitions - file types
      summary: List file types
      description: |
        List the file type definitions.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: File type definitions list successful
          schema:
            $ref: '#/definitions/DefFiletypeList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - definitions - file types
      summary: Create a custom file type definition
      description: |
        Create a custom file type definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: File type definition to be created
          required: true
          schema:
            type: object
            properties:
              def_filetype_group_id:
                type: integer
              name:
                type: string
              description:
                type: string
              position:
                type: string
              mime_list:
                type: array
                items:
                  type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: File type definition creation successful
          schema:
            $ref: '#/definitions/DefFiletype'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/filetypes/{filetype_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/FiletypeIdParameterPath'
    get:
      tags:
        - definitions - file types
      summary: Retrieve file type definition
      description: |
        Fetch a file type definition.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: File type definition retrieved successfully
          schema:
            $ref: '#/definitions/DefFiletype'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    put:
      tags:
        - definitions - file types
      summary: Update a custom file type definition
      description: |
        Update a file type definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      parameters:
        - in: body
          name: body
          description: File type definition to be updated
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
      responses:
        '200':
          description: File type definition updated successfully
          schema:
            $ref: '#/definitions/DefFiletype'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - definitions - file types
      summary: Delete a custom file type definition
      description: |
        Delete a custom file type definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: file type definition deleted successfully
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/dictionaries':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - definitions - dictionaries
      summary: List dictionaries
      description: |
        List the dictionary definitions.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Dictionary definitions list successful
          schema:
            $ref: '#/definitions/DefDictionaryList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - definitions - dictionaries
      summary: Create a custom dictionary definition
      description: |
        Create a custom dictionary definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Dictionary definition to be created
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              case-sensitive:
                type: boolean
              whole-words-only:
                type: boolean
              disable:
                type: boolean
              words:
                type: array
                items:
                  type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: Dictionary definition creation successful
          schema:
            $ref: '#/definitions/DefDictionary'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/dictionaries/{dictionary_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/DictionaryIdParameterPath'
    get:
      tags:
        - definitions - dictionaries
      summary: Retrieve dictionary definition
      description: |
        Fetch a dictionary definition.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Dictionary definition retrieved successfully
          schema:
            $ref: '#/definitions/DefDictionary'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    put:
      tags:
        - definitions - dictionaries
      summary: Update a custom dictionary definition
      description: |
        Update a dictionary definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      parameters:
        - in: body
          name: body
          description: Dictionary definition to be updated
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              case-sensitive:
                type: boolean
              whole-words-only:
                type: boolean
              disable:
                type: boolean
              words:
                type: array
                items:
                  type: string
      responses:
        '200':
          description: Dictionary definition updated successfully
          schema:
            $ref: '#/definitions/DefDictionary'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - definitions - dictionaries
      summary: Delete a custom dictionary definition
      description: |
        Delete a custom dictionary definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Dictionary definition deleted successfully
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/regexes':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - definitions - regular expressions
      summary: List regular expressions
      description: |
        List the regex definitions.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Regex definitions list successful
          schema:
            $ref: '#/definitions/DefRegexList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - definitions - regular expressions
      summary: Create a custom regex definition
      description: |
        Create a custom regex definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Regex definition to be created
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              value:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: Regex definition creation successful
          schema:
            $ref: '#/definitions/DefRegex'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/regexes/{regex_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/RegexIdParameterPath'
    get:
      tags:
        - definitions - regular expressions
      summary: Retrieve regex definition
      description: |
        Fetch a regex definition.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Regex definition retrieved successfully
          schema:
            $ref: '#/definitions/DefRegex'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    put:
      tags:
        - definitions - regular expressions
      summary: Update a custom regex definition
      description: |
        Update a regex definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      parameters:
        - in: body
          name: body
          description: Regex definition to be updated
          required: true
          schema:
            type: object
            properties:
              name:
                type: string
              description:
                type: string
              value:
                type: string
      responses:
        '200':
          description: Regex definition updated successfully
          schema:
            $ref: '#/definitions/DefRegex'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - definitions - regular expressions
      summary: Delete a custom regex definition
      description: |
        Delete a custom regex definition.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Regex definition deleted successfully
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/profile_origins':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - profile origins
      summary: List profile origins
      description: |
        List the profile origins from your account.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile origin list successful
          schema:
            $ref: '#/definitions/ProfileOriginList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - profile origins
      summary: Create a profile origin
      description: |
        Create a profile origin.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Profile origin to be created
          required: true
          schema:
            type: object
            properties:
              project_id:
                type: string
              app_id:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: Profile origin creation successful
          schema:
            $ref: '#/definitions/ProfileOrigin'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_origins/{origin_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProfileOriginIdParameterPath'
    get:
      tags:
        - profile origins
      summary: Get profile origin
      description: |
        Retrieve a profile origin.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile origin retrieved successfully
          schema:
            $ref: '#/definitions/ProfileOrigin'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    put:
      tags:
        - profile origins
      summary: Update a profile origin
      description: |
        Update a profile origin.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Profile origin to be updated
          required: true
          schema:
            type: object
            properties:
              project_id:
                type: string
              app_id:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile origin updated successfully
          schema:
            $ref: '#/definitions/ProfileOrigin'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - profile origins
      summary: Delete a profile origin
      description: |
        Delete a profile origin.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile origin deleted successfully
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/profile_destinations':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - profile destinations
      summary: List profile destinations
      description: |
        List the profile destinations from your account.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile destination list successful
          schema:
            $ref: '#/definitions/ProfileDestinationList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - profile destinations
      summary: Create a profile destination
      description: |
        Create a profile destination.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Profile destination to be created
          required: true
          schema:
            type: object
            properties:
              project_id:
                type: string
              app_id:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: Profile destination creation successful
          schema:
            $ref: '#/definitions/ProfileDestination'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/profile_destinations/{destination_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProfileDestinationIdParameterPath'
    get:
      tags:
        - profile destinations
      summary: Get profile destination
      description: |
        Retrieve a profile destination.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile destination retrieved successfully
          schema:
            $ref: '#/definitions/ProfileDestination'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    put:
      tags:
        - profile destinations
      summary: Update a profile destination
      description: |
        Update a profile destination.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Profile destination to be updated
          required: true
          schema:
            type: object
            properties:
              project_id:
                type: string
              app_id:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile destination updated successfully
          schema:
            $ref: '#/definitions/ProfileDestination'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - profile destinations
      summary: Delete a profile destination
      description: |
        Delete a profile destination.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Profile destination deleted successfully
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/cloud_services':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - cloud services
      summary: Get Cloud Services
      description: |
        List all Cloud Services from your Control Panel.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Cloud Services retrieval successful
          schema:
            $ref: '#/definitions/CloudServiceList'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/accounts/{account_id}/cloud_services/{service_type}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ServiceTypeParameterPath'
    get:
      tags:
        - cloud services
      summary: Get Cloud Service
      description: |
        Get Cloud Service by type from your Control Panel.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Cloud Service retrieval successful
          schema:
            $ref: '#/definitions/CloudService'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
    post:
      tags:
        - cloud services
      summary: Create new Cloud Service
      description: |
        Register new cloud service using sensitivity.io SDK.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Cloud Service to be registered
          required: true
          schema:
            type: object
            required:
              - client_id
              - client_secret
              - redirect_uri
              - access_token
            properties:
              client_id:
                type: string
              client_secret:
                type: string
              redirect_uri:
                type: string
              access_token:
                type: string
              expires_in:
                type: integer
              refresh_token:
                type: string
              token_type:
                type: string
              s3_bucket:
                type: string
              s3_region:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: Cloud Service creation successful
          schema:
            $ref: '#/definitions/CloudService'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    put:
      tags:
        - cloud services
      summary: Update cloud service
      description: |
        Update cloud services. Only fields listed bellow in the request body will be updated.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: Cloud Service to be updated
          required: true
          schema:
            type: object
            required:
              - client_id
              - client_secret
              - redirect_uri
              - access_token
            properties:
              client_id:
                type: string
              client_secret:
                type: string
              redirect_uri:
                type: string
              access_token:
                type: string
              expires_in:
                type: integer
              refresh_token:
                type: string
              token_type:
                type: string
              s3_bucket:
                type: string
              s3_region:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Cloud Service update successful
          schema:
            $ref: "#/definitions/CloudService"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - cloud services
      summary: Delete cloud service
      description: |
        Mark cloud service as deleted in the database.
        ##### Permissions
        `manage_account` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Cloud Service deletion successful
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
  '/accounts/{account_id}/projects/{project_id}/apps/{app_id}/scanner/data:':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
      - $ref: '#/parameters/AppIdParameterPath'
    post:
      tags:
        - scanner
      summary: Scan Data
      description: |
        Post plain text data so that sensitivity.io can scan for threats.
        ##### Permissions
        Subscription must be active.
      consumes: ["multipart/form-data"]
      parameters:
        - name: stop_at_first
          in: formData
          description: Instruct the scanning engine to stop after the first found threat.
          type: boolean
        - name: stop_at
          in: formData
          description: Instruct the scanning engine to stop after this threshold is reached.
          type: integer
        - name: mask_threats
          in: formData
          description: Scanner Results JSON will contain masked results (with *) instead of plain text.
          type: boolean
        - name: verbose
          in: formData
          description: Scanner Results JSON will contain detailed information about found threats.
          type: boolean
        - name: data
          in: formData
          description: Text/Data to be scanned along with control parameters
          required: true
          type: array
          items:
            type: string
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X POST \
              https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/data \
              -H 'auth-key: {{AUTH-KEY}}' \
              -H 'host: {{REQUEST-HOST}}' \
              -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
              -F 'data=email@domain.com - SSN: 078-05-8120 email@domain.com - 0740081128 ' \
              -F 'data=American Express: 340000000000009 Mastercard: 5500-0001-6268-3365'
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/data");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "auth-key: {{AUTH-KEY}}");
            headers = curl_slist_append(headers, "host: {{REQUEST-HOST}}");
            headers = curl_slist_append(headers, "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nemail@domain.com - SSN: 078-05-8120 email@domain.com - 0740081128 \r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nAmerican Express: 340000000000009 Mastercard: 5500-0001-6268-3365\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/data");
            var request = new RestRequest(Method.POST);
            request.AddHeader("auth-key", "{{AUTH-KEY}}");
            request.AddHeader("host", "{{REQUEST-HOST}}");
            request.AddHeader("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW");
            request.AddParameter("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW", "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nemail@domain.com - SSN: 078-05-8120 email@domain.com - 0740081128 \r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nAmerican Express: 340000000000009 Mastercard: 5500-0001-6268-3365\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.post("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/data")
              .header("auth-key", "{{AUTH-KEY}}")
              .header("host", "{{REQUEST-HOST}}")
              .header("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
              .body("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nemail@domain.com - SSN: 078-05-8120 email@domain.com - 0740081128 \r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nAmerican Express: 340000000000009 Mastercard: 5500-0001-6268-3365\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")
              .asString();
        # - lang: 'Python'
        #   source: |
        #     import http.client

        #     conn = http.client.HTTPSConnection("{{REQUEST-HOST}}")

        #     payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nemail@domain.com - SSN: 078-05-8120 email@domain.com - 0740081128 \r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nAmerican Express: 340000000000009 Mastercard: 5500-0001-6268-3365\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"

        #     headers = {
        #         'auth-key': "{{AUTH-KEY}}",
        #         'host': "{{REQUEST-HOST}}",
        #         'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
        #         }

        #     conn.request("POST", "/v1/accounts/92683310********/projects/2c******/apps/045ad58*******/scanner/data", payload, headers)

        #     res = conn.getresponse()
        #     data = res.read()

        #     print(data.decode("utf-8"))
        - lang: 'PHP'
          source: |
            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/data",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nemail@domain.com - SSN: 078-05-8120 email@domain.com - 0740081128 \r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nAmerican Express: 340000000000009 Mastercard: 5500-0001-6268-3365\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
              CURLOPT_HTTPHEADER => array(
                "auth-key: {{AUTH-KEY}}",
                "host: {{REQUEST-HOST}}",
                "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {

              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/data"

              payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nemail@domain.com - SSN: 078-05-8120 email@domain.com - 0740081128 \r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\nAmerican Express: 340000000000009 Mastercard: 5500-0001-6268-3365\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")

              req, _ := http.NewRequest("POST", url, payload)

              req.Header.Add("auth-key", "{{AUTH-KEY}}")
              req.Header.Add("host", "{{REQUEST-HOST}}")
              req.Header.Add("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))
            }
      responses:
        '200':
          description: Scan Data successful
          schema:
            $ref: '#/definitions/ScannerResultSingle'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/accounts/{account_id}/projects/{project_id}/apps/{app_id}/scanner/upload_file:':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
      - $ref: '#/parameters/AppIdParameterPath'
    post:
      tags:
        - scanner
      summary: Scan Uploaded File(s)
      description: |
        Upload one or more file that can be scanner for threats.
        ##### Permissions
        Subscription must be active.
      consumes: ["multipart/form-data"]
      parameters:
        - name: stop_at_first
          in: formData
          description: Instruct the scanning engine to stop after the first found threat.
          type: boolean
        - name: stop_at
          in: formData
          description: Instruct the scanning engine to stop after this threshold is reached.
          type: integer
        - name: mask_threats
          in: formData
          description: Scanner Results JSON will contain masked results (with *) instead of plain text.
          type: boolean
        - name: verbose
          in: formData
          description: Scanner Results JSON will contain detailed information about found threats.
          type: boolean
        - name: files
          in: formData
          description: Files to be uploaded using the property name 'files'.
          required: true
          type: array
          items:
            type: string
            format: binary
      x-code-samples:
        - lang: 'cURL'
          source: |
            curl -X POST \
            'https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/upload_file' \
            -H 'auth-key: {{AUTH-KEY}}' \
            -H 'host: {{REQUEST-HOST}}' \
            -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
            -F files=@/home/sensitivity/file.txt \
            -F files=@/home/sensitivity/archive.zip
        - lang: 'C/C++'
          source: |
            CURL *hnd = curl_easy_init();

            curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
            curl_easy_setopt(hnd, CURLOPT_URL, "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/upload_file");

            struct curl_slist *headers = NULL;
            headers = curl_slist_append(headers, "auth-key: {{AUTH-KEY}}");
            headers = curl_slist_append(headers, "host: {{REQUEST-HOST}}");
            headers = curl_slist_append(headers, "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW");
            curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

            curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"archive.zip\"\r\nContent-Type: application/zip\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"file.txt\"\r\nContent-Type: text/plain\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");

            CURLcode ret = curl_easy_perform(hnd);
        - lang: 'C#'
          source: |
            var client = new RestClient("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/upload_file");

            var request = new RestRequest(Method.POST);
            request.AddHeader("auth-key", "{{AUTH-KEY}}");
            request.AddHeader("host", "{{REQUEST-HOST}}");
            request.AddHeader("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW");
            request.AddParameter("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW", "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"file.txt\"\r\nContent-Type: text/plain\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"archive.zip\"\r\nContent-Type: application/zip\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
        - lang: 'Java'
          source: |
            HttpResponse<String> response = Unirest.post("https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/upload_file")
              .header("auth-key", "{{AUTH-KEY}}")
              .header("host", "{{REQUEST-HOST}}")
              .header("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
              .body("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"archive.zip\"\r\nContent-Type: application/zip\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"file.txt\"\r\nContent-Type: text/plain\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")
              .asString();
        # - lang: 'Python'
        #   source: |
        #     import http.client

        #     conn = http.client.HTTPSConnection("{{REQUEST-HOST}}")

        #     payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"archive.zip\"\r\nContent-Type: application/zip\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"file.txt\"\r\nContent-Type: text/plain\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"

        #     headers = {
        #         'auth-key': "{{AUTH-KEY}}",
        #         'host': "{{REQUEST-HOST}}",
        #         'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
        #         }

        #     conn.request("POST", "/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/upload_file", payload, headers)

        #     res = conn.getresponse()
        #     data = res.read()

        #     print(data.decode("utf-8"))
        - lang: 'PHP'
          source: |
            $curl = curl_init();

            curl_setopt_array($curl, array(
              CURLOPT_URL => "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/upload_file",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"archive.zip\"\r\nContent-Type: application/zip\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"file.txt\"\r\nContent-Type: text/plain\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
              CURLOPT_HTTPHEADER => array(
                "auth-key: {{AUTH-KEY}}",
                "host: {{REQUEST-HOST}}",
                "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
              ),
            ));

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: 'Go'
          source: |
            package main

            import (
              "fmt"
              "strings"
              "net/http"
              "io/ioutil"
            )

            func main() {
              url := "https://api.sensitivity.io/v1/accounts/{{ACCOUNT_ID}}/projects/{{PROJECT_ID}}/apps/{{APP_ID}}/scanner/upload_file"

              payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"file.txt\"\r\nContent-Type: text/plain\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"files\"; filename=\"archive.zip\"\r\nContent-Type: application/zip\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--")

              req, _ := http.NewRequest("POST", url, payload)

              req.Header.Add("auth-key", "{{AUTH-KEY}}")
              req.Header.Add("host", "{{REQUEST-HOST}}")
              req.Header.Add("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(res)
              fmt.Println(string(body))
            }
      responses:
        '200':
          description: Scan Uploaded File(s) successful
          schema:
            $ref: '#/definitions/ScannerResult'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'

  '/accounts/{account_id}/projects/{project_id}/apps/{app_id}/scanner/buffer:':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/ProjectIdParameterPath'
      - $ref: '#/parameters/AppIdParameterPath'
    post:
      tags:
        - scanner
      summary: Scan Buffer
      description: |
        Upload any buffer that's UTF8 to get threats from it.
        ##### Permissions
        Subscription must be active.
        ##### Note
        Scan buffer has no active control over the scanner via the request parameters
      consumes: ["application/x-www-form-urlencoded"]
      parameters:
        - in: body
          name: body
          required: true
          description: Body to be sent to sensitivity.io scanning engine.
          schema:
            type: string
            format: binary
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Scan Buffer successful
          schema:
            $ref: '#/definitions/ScannerResultSingle'
        '400':
            $ref: '#/responses/BadRequest'
        '500':
          $ref: '#/responses/InternalServerError'
        '501':
          $ref: '#/responses/NotImplemented'
  /users/{user_id}/preferences:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/UserIdParameterPath'
    get:
      tags:
        - preferences
      summary: Get all preferences
      description: |
        Get list of all preferences.
        ##### Permissions
        Requires valid credentials.
      responses:
        '200':
          description: Preferences retrieval successful
          schema:
            type: array
            items:
              $ref: "#/definitions/Preference"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    put:
      tags:
        - preferences
      summary: Save preferences
      description: |
        Save list of preferences.
        ##### Permissions
        Requires valid credentials.
      parameters:
        - in: body
          name: body
          description: List of preference as object
          required: true
          schema:
            type: array
            items:
              $ref: '#/definitions/Preference'
      responses:
        '200':
          description: Preferences saved successful
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'

  '/users/{user_id}/preferences/delete':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/UserIdParameterPath'
    post:
      tags:
        - preferences
      summary: Delete preferences
      description: |
        Delete list of the preferences.
        ##### Permissions
        Requires valid credentials.
      parameters:
        - in: body
          name: body
          description: List of preferences as object
          required: true
          schema:
            type: array
            items:
              $ref: '#/definitions/Preference'
      responses:
        '200':
          description: Preferences deleted successful
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/users/{user_id}/preferences/{name}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/UserIdParameterPath'
    get:
      tags:
        - preferences
      summary: Get preference by name
      description: |
        Gets single preference by name.
        ##### Permissions
        Requires valid credentials.
      parameters:
        - name: name
          in: path
          description: Name of the preference
          required: true
          type: string 
      responses:
        '200':
          description: Preferences retrieval successful
          schema:
            type: array
            items:
              $ref: "#/definitions/Preference"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

    delete:
      tags:
        - preferences
      summary: Delete preference by name
      description: |
        Delete single preference by name.
        ##### Permissions
        Requires valid credentials.
      parameters:
        - name: name
          in: path
          description: Name of the preference
          required: true
          type: string 
      responses:
        '200':
          description: Preference deletion successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '404':
          $ref: '#/responses/NotFound'
  /verify_email:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    get:
      tags:
        - general
      summary: Verify email
      description: |
        Verify the email used by user to sign-up.
        ##### Permissions
        No special permissions.
      parameters:
        - name: uid
          in: query
          description: User Id received in the verification email.
          required: true
          type: string
        - name: hash
          in: query
          description: Verification hash received in the email.
          required: true
          type: string
        - name: email
          in: query
          description: Email address received in the verification email.
          required: true
          type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: User email verification successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'

  /signup:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    post:
      tags:
        - general
      summary: Register new User
      description: |
        Register new user that must be later attached to an account.
        ##### Permissions
        No special permissions.
      parameters:
        - in: body
          name: body
          description: User object to be created
          required: true
          schema:
            type: object
            required:
              - email
              - username
              - password
            properties:
              email:
                type: string
              password:
                type: string
              first_name:
                 type: string
              last_name:
                type: string
              address:
                type: string
              zip_code:
                type: string
              country_code:
                type: string
              phone:
                type: string
              company_name:
                type: string
              currency:
                type: string
              locale:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: User creation successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '500':
          $ref: '#/responses/InternalServerError'

  /reset_password:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    post:
      tags:
        - general
      summary: Reset password for user
      description: |
        Reset the password using the link for resetting password that is valid one time and for a certain period.
        ##### Permissions
        No special permissions.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            type: object
            required:
              - reset_hash
              - new_password
            properties:
              reset:
                description: Reset hash
                type: string
              new_password:
                description: New password for the user
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: User password update successful
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  /send_password_reset:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    post:
      tags:
        - general
      summary: Send password reset email
      description: |
        Send an email containing a link for resetting password that is valid one time and for a certain period.
        ##### Permissions
        No special permissions.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            type: object
            required:
              - email
            properties:
              email:
                description: Email of the user
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Email sent if account exists
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '500':
          $ref: '#/responses/InternalServerError'

  /send_verification:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    post:
      tags:
        - general
      summary: Send verification email
      description: |
        Send an email with a verification link to the address specified in the request body. Will always return success.
        ##### Permissions
        No special permissions.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            type: object
            required:
              - email
            properties:
              email:
                description: Email of a user
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Email send successful if email exists
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'

  /resend_verification:
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
    post:
      tags:
        - general
      summary: Resend verification email
      description: |
        Resend an email with a verification link to the address specified in the request body. Will always return success.
        ##### Permissions
        No special permissions.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            type: object
            required:
              - email
            properties:
              email:
                description: Email of a user
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Email send successful if email exists
          schema:
            $ref: '#/definitions/AllOK'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
        '500':
          $ref: '#/responses/InternalServerError'
  '/accounts/{account_id}/oauth2':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
    get:
      tags:
        - oauth2
      summary: Get OAuth2 Clients
      description: |
        Get list of OAuth2 Clients for an account.
        ##### Permissions
        Requires valid credentials.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: OAuth2 Clients retrieval successful
          schema:
            $ref: '#/definitions/OAuth2ClientList'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '404':
          $ref: '#/responses/NotFound'
    post:
      tags:
        - oauth2
      summary: Create OAuth2 Client
      description: |
        Create new OAuth2 Client for this account.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: OAuth2 Client to be created
          required: true
          schema:
            type: object
            required:
              - name
              - redirect_uri
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: OAuth2 Client creation successful
          schema:
            $ref: '#/definitions/OAuth2Client'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/oauth2/{client_id}':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/OAuth2ClientIdParameterPath'
    get:
      tags:
        - oauth2
      summary: Get OAuth2 Client
      description: |
        Get single OAuth2 Client for this account.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: OAuth2 Client retrieval successful
          schema:
            $ref: "#/definitions/OAuth2Client"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    put:
      tags:
        - oauth2
      summary: Update OAuth2 Client
      description: |
        Update OAuth2 Client for this account. Only fields listed bellow in the request body will be updated.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          description: OAuth2 Client to be updated
          required: true
          schema:
            type: object
            required:
              - name
              - redirect_uri
            properties:
              name:
                type: string
              description:
                type: string
              redirect_uri:
                type: string
              icon_url:
                type: string
              homepage:
                type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: OAuth2 Client update successful
          schema:
            properties:
              client_secret:
                type: string
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'
    delete:
      tags:
        - oauth2
      summary: Delete OAuth2 Client
      description: |
        Mark OAuth2 Client as deleted in the database.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: OAuth2 Client deletion successful
          schema:
            $ref: "#/definitions/AllOK"
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/accounts/{account_id}/oauth2/{client_id}/new_secret':
    parameters:
      - $ref: '#/parameters/CommonAuthParameterHeader'
      - $ref: '#/parameters/CommonHostParameterHeader'
      - $ref: '#/parameters/AccountApiIdParameterPath'
      - $ref: '#/parameters/OAuth2ClientIdParameterPath'
    get:
      tags:
        - oauth2
      summary: OAuth2 Client New Secret
      description: |
        Regenerate new OAuth2 Client Secret.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: OAuth2 Client new Secret successful
          schema:
            type: object
            properties:
              client_secret:
                type: string
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/oauth2/authorize':
    parameters:
      - $ref: '#/parameters/CommonHostParameterHeader'
    get:
      tags:
        - oauth2
      summary: Authorize OAuth2 Request
      description: |
        Get ```code``` for OAuth2 access_token request.
        ##### Permissions
        `view_project` permission must be allowed to this user.
      parameters:
        - name: response_type
          in: query
          description: Response type expected from the OAuth2 Service
          required: true
          type: string
        - name: client_id
          in: query
          description: OAuth2 Client ID
          required: true
          type: string
        - name: redirect_uri
          in: query
          description: URI for redirect with ```code``` parameter
          required: true
          type: string
        - name: state
          in: query
          description: Optional state parameter to be identified on application side
          required: false
          type: string
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '200':
          description: Authorize OAuth2 Request successful
          schema:
            type: object
            properties:
              code:
                type: string
              state:
                type: string
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

  '/oauth2/token':
    parameters:
      - $ref: '#/parameters/CommonHostParameterHeader'
    post:
      tags:
        - oauth2
      summary: Request an access token
      description: |
        Request OAuth2 access token.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          schema:
            type: object
            required:
              - client_id
              - client_secret
              - grant_type
              - redirect_uri
              - code
            properties:
              client_id:
                type: string
                description: OAuth2 Client ID
              client_secret:
                type: string
                description: OAuth2 Client Secret
              grant_type:
                type: string
                description: Grant type requested ```access_token```
              redirect_uri:
                type: string
                description: Redirect URI - needs to match OAuth2 Client's existing Redirect URI
              code:
                type: string
                description: Provide ```code``` to be exchanged with ```token```
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: OAuth2 access_token
          schema:
            $ref: '#/definitions/OAuth2Token'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'


  '/oauth2/token#':
    parameters:
      - $ref: '#/parameters/CommonHostParameterHeader'
    post:
      tags:
        - oauth2
      summary: Request a refresh token
      description: |
        Request OAuth2 refresh token.
        ##### Permissions
        `edit_project` permission must be allowed to this user.
      parameters:
        - in: body
          name: body
          schema:
            type: object
            required:
              - client_id
              - client_secret
              - grant_type
              - refresh_token
            properties:
              client_id:
                type: string
                description: OAuth2 Client ID
              client_secret:
                type: string
                description: OAuth2 Client Secret
              grant_type:
                type: string
                description: Grant type requested ```refresh_token```
              refresh_token:
                type: string
                description: Provide ```refresh_token``` recieved from previous access token request
      x-code-samples:
        - lang: 'cURL'
        - lang: 'C/C++'
        - lang: 'C#'
        - lang: 'Java'
        # - lang: 'Python'
        - lang: 'PHP'
        - lang: 'Go'
      responses:
        '201':
          description: OAuth2 refresh_token
          schema:
            $ref: '#/definitions/OAuth2Token'
        '400':
          $ref: '#/responses/BadRequest'
        '401':
          $ref: '#/responses/Unauthorized'
        '403':
          $ref: '#/responses/Forbidden'

definitions:
  User:
    type: object
    properties:
      id:
        type: integer
      auth_key:
        type: string
      account_api_id:
        type: string
      account_int_id:
        type: integer
      email:
        type: string
      email_verified:
        type: boolean
      first_name:
        type: string
      last_name:
        type: string
      address:
        type: string
      zip_code:
        type: string
      country_code:
        type: string
      phone:
        type: string
      company_name:
        type: string
      currency:
        type: string
      timezone:
        type: string
      card_verified:
        type: boolean
        default: false
      roles:
        type: string
      last_password_update:
        type: integer
      last_picture_update:
        type: integer
      failed_attempts:
        type: integer
      locale:
        type: string
      type:
        type: integer
      plan:
        type: string
      plan_start_date:
        type: integer
      plan_validity:
        type: integer
      is_license_expired:
        type: boolean
      create_at:
        type: integer
      update_at:
        type: integer
      delete_at:
        type: integer

  Account:
    type: object
    properties:
      id:
        type: integer
      api_id:
        type: string
      auth_key:
        type: string
      api_gateway_status:
        type: integer
      api_gateway_details:
        type: string
      name:
        type: string
      company_name:
        type: string
      card_verified:
        type: boolean
        default: false
      email:
        type: string
      currency:
        type: string
      timezone:
        type: string
      invite_id:
        type: string
      is_license_expired:
        type: boolean
      create_at:
        type: integer
      update_at:
        type: integer
      delete_at:
        type: integer

  AccountMember:
    type: object
    properties:
      account_id:
        type: integer
      user_id:
        type: integer
      roles:
        type: string
      delete_at:
        type: integer

  AdminAction:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      user_id:
        type: integer
      module:
        type: string
      object_id:
        type: string
      identifier:
        type: string
      action:
        type: string
      before_desc:
        type: string
      after_desc:
        type: string
      extra_info:
        type: string
      ip_address:
        type: string
      create_at:
        type: integer

  License:
    type: object
    properties:
      account_id:
        type: integer
      license_type:
        type: integer
      plan_type:
        type: string
      validity:
        type: integer
      unique_id:
        type: string
      start_at:
        type: integer
      create_at:
        type: integer
      update_at:
        type: integer
      delete_at:
        type: integer

  Project:
    type: object
    properties:
      project:
        $ref: '#/definitions/ProjectDetail'

  ProjectDetail:
    type: object
    properties:
      id:
        type: string
      account_id:
        type: integer
      description:
        type: string
      name:
        type: string
      type:
        type: integer
      total_app_count:
        type: integer
      archived_app_count:
        type: integer
      last_app_at:
        type: integer
      create_at:
        type: integer
      update_at:
        type: integer
      delete_at:
        type: integer
      apps:
        type: array
        items:
          $ref: '#/definitions/AppDetail'

  ProjectList:
    type: object
    properties:
      projects:
        type: array
        items:
          $ref: '#/definitions/ProjectDetail'

  App:
    type: object
    properties:
      app:
        $ref: '#/definitions/AppDetail'

  AppDetail:
    type: object
    properties:
      id:
        type: string
      account_id:
        type: integer
      project_id:
        type: string
      app_type:
        type: string
      device_name:
        type: string
      udid:
        type: string
      app_name:
        type: string
      app_version:
        type: string
      description:
        type: string
      os_type:
        type: integer
      os_version:
        type: string
      sdk_version:
        type: string
      internal_ip:
        type: string
      external_ip:
        type: string
      mac:
        type: string
      local_time:
        type: integer
      last_seen:
        type: integer
      create_at:
        type: integer
      update_at:
        type: integer
      delete_at:
        type: integer

  AppList:
    type: object
    properties:
      apps:
        type: array
        items:
          $ref: '#/definitions/AppDetail'

  ProtectionProfile:
    type: object
    properties:
      id:
        type: integer
      user_id:
        type: integer
      account_id:
        type: integer
      definition_id:
        type: integer
      origin_id:
        type: integer
      action_id:
        type: integer
      notification_id:
        type: integer
      destination_id:
        type: integer
      settings:
        type: string
      create_at:
        type: integer
      update_at:
        type: integer

  ProtectionProfileList:
    type: object
    properties:
      protection_profiles:
        type: array
        items:
          $ref: '#/definitions/ProtectionProfile'

  ProfileDefinition:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      name:
        type: string
      description:
        type: string
      type:
        type: integer
      content_ids:
        type: object
      filetype_ids:
        type: array
        items:
          type: string
      dictionary_ids:
        items:
          type: string
      regex_ids:
        items:
          type: string
      create_at:
        type: integer
      update_at:
        type: integer

  ProfileDefinitionList:
    type: object
    properties:
      profile_definitions:
        type: array
        items:
          $ref: '#/definitions/ProfileDefinition'

  DefContent:
    type: object
    properties:
      id:
        type: integer
      def_content_group_id:
        type: integer
      name:
        type: string
      description:
        type: string
      code:
        type: string
      position:
        type: string
      locale_list:
        type: array
        items:
          type: string

  DefContentGroup:
    type: object
    properties:
      id:
        type: integer
      name:
        type: string
      description:
        type: string
      code:
        type: string
      def_contents:
        $ref: '#/definitions/DefContentList'

  DefContentList:
    type: array
    items:
      $ref: '#/definitions/DefContent'

  DefFiletype:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      def_filetype_group_id:
        type: integer
      name:
        type: string
      description:
        type: string
      position:
        type: string
      mime_list:
        type: array
        items:
          type: string
      create_at:
        type: integer
      update_at:
        type: integer

  DefFiletypeGroup:
    type: object
    properties:
      id:
        type: integer
      name:
        type: string
      description:
        type: string
      def_filetypes:
        $ref: '#/definitions/DefFiletypeList'

  DefFiletypeList:
    type: array
    items:
      $ref: '#/definitions/DefFiletype'

  DefDictionary:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      name:
        type: string
      description:
        type: string
      case_sensitive:
        type: boolean
      whole_words_only:
        type: boolean
      disable:
        type: boolean
      words:
        type: array
        items:
          type: string
      external_content:
        type: string
      create_at:
        type: integer
      update_at:
        type: integer

  DefDictionaryList:
    type: array
    items:
      $ref: '#/definitions/DefDictionary'

  DefRegex:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      name:
        type: string
      description:
        type: string
      value:
        type: string
      create_at:
        type: integer
      update_at:
        type: integer

  DefRegexList:
    type: array
    items:
      $ref: '#/definitions/DefRegex'

  ProfileOrigin:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      project_id:
        type: string
      app_id:
        type: string
      create_at:
        type: integer
      update_at:
        type: integer

  ProfileOriginList:
    type: array
    items:
      $ref: '#/definitions/ProfileOrigin'

  ProfileDestination:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      service_type_id:
        type: integer
      cloud_account_id:
        type: string
      service_type:
        type: string
      path:
        type: string
      item_type:
        type: string
      profile_id:
        type: integer
      profile_name:
        type: string
      profile_type:
        type: integer
      create_at:
        type: integer
      update_at:
        type: integer

  ProfileDestinationList:
    type: array
    items:
      $ref: '#/definitions/ProfileDestination'

  Session:
    type: object
    properties:
      id:
        type: integer
      token:
        type: string
      create_at:
        type: integer
      expires_at:
        type: integer
      last_activity_at:
        type: integer
      user_id:
        type: integer
      roles:
        type: string
      account_members:
        type: array
        items:
          $ref: '#/definitions/AccountMember'
      is_oauth:
        type: boolean

  Preference:
    type: object
    properties:
      id:
        type: integer
      user_id:
        description: User Id for this preference
        type: integer
      name:
        type: string
      value:
        type: string
      category:
        type: string
      create_at:
        type: integer

  AllOK:
    type: object
    properties:
      response:
        description: Contains "allok" when request was successful and nothing more has to be returned in the response
        type: string

  Config:
    type: object
    properties:
      AccountSettings:
        type: object
        properties:
          MaxUsersPerAccount:
            type: integer
          EnableUserCreation:
            type: boolean

  ScannerResult:
    type: object
    properties:
      scanner_id:
        type: string
      details:
        type: string
      threat_results:
        type: array
        items:
          $ref: '#/definitions/ThreatResult'

  ScannerResultSingle:
    type: object
    properties:
      scanner_id:
        type: string
      details:
        type: string
      threat_results:
          $ref: '#/definitions/ThreatResult'

  ThreatResult:
    type: object
    properties:
      error:
        type: string
      total:
        type: integer
      elapsed:
        type: integer
      data_info:
          $ref: '#/definitions/DataInfo'
      threats:
        type: array
        items:
          $ref: '#/definitions/Threat'

  DataInfo:
    type: object
    properties:
      id:
        type: string
      name:
        type: string
      size:
        type: integer
      extension:
        type: string

  Threat:
    type: object
    properties:
      type_name:
        type: string
      type_id:
        type: integer
      matched_text:
        type: string
      location:
          $ref: '#/definitions/ThreatLocation'

  ThreatLocation:
    type: object
    properties:
      archive_member:
        type: string

  CloudService:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      service_type_id:
        type: integer
      service_type:
        $ref: '#/definitions/ServiceType'
      client_id:
        type: string
      client_secret:
        type: string
      redirect_uri:
        type: string
      access_token:
        type: string
      expires_in:
        type: integer
      expires_at:
        type: integer
      refresh_token:
        type: string
      token_type:
        type: string
      cloud_account_id:
        type: string
      create_at:
        type: integer
      update_at:
        type: integer

  EnterpriseService:
    type: object
    properties:
      id:
        type: integer
      account_id:
        type: integer
      service_type_id:
        type: integer
      service_type:
        $ref: '#/definitions/ServiceType'
      access_key:
        type: string
      access_secret:
        type: string
      s3_region:
        type: string
      cloud_account_id:
        type: string
      create_at:
        type: integer
      update_at:
        type: integer

  ServiceType:
    type: object
    properties:
      service_id:
        type: integer
      service_name:
        type: string
      service_full_name:
        type: string

  CloudServiceList:
    type: object
    properties:
      cloud_services:
        type: array
        items:
          $ref: '#/definitions/CloudService'

  EnterpriseServiceList:
    type: object
    properties:
      cloud_services:
        type: array
        items:
          $ref: '#/definitions/EnterpriseService'

  OAuth2Client:
    type: object
    properties:
      id:
        type: string
      account_id:
        type: integer
      user_id:
        type: integer
      name:
        type: string
      description:
        type: string
      client_secret:
        type: string
      icon_url:
        type: string
      homepage:
        type: string
      redirect_uri:
        type: string
      create_at:
        type: integer
      update_at:
        type: integer
      delete_at:
        type: integer

  OAuth2ClientList:
    type: object
    properties:
      oauth2_clients:
        type: array
        items:
          $ref: '#/definitions/OAuth2Client'

  OAuth2Token:
    type: object
    properties:
      access_token:
        type: string
      token_type:
        type: string
      scope:
        type: string
      refresh_token:
        type: string
      expires_in:
        type: integer

  Error:
    type: object
    properties:
      http_code:
        type: integer
      code:
        type: string
      message:
        type: string
      details:
        type: string

externalDocs:
  description: To find out more about sensitivity.io, please visit our website at https://sensitivity.io
  url: 'https://sensitivity.io'
