{
  "swagger" : "2.0",
  "info" : {
    "version" : "2.32.0",
    "title" : "<API-C Traceability Connector> API v1.0",
    "description" : "The Traceability Connector API allows one to search for metrics stored with AMPLIFY's\nPlatform analytics store. Data can be gathered as follows:\n  - Directly using transactions ID's within the Path\n"
  },
  "basePath" : "/api/v1",
  "schemes" : [ "http", "https" ],
  "consumes" : [ "application/json", "application/xml" ],
  "produces" : [ "application/json", "application/xml" ],
  "paths" : {
    "/traceability/transactionDetails/{transaction-id}" : {
      "parameters" : [ {
        "name" : "transaction-id",
        "in" : "path",
        "required" : true,
        "type" : "string"
      } ],
      "get" : {
        "operationId" : "GET_traceability-transactions-transaction-id",
        "summary" : "Specific transaction by transaction-id",
        "tags" : [ "Provider" ],
        "responses" : {
          "200" : {
            "description" : "",
            "schema" : {
              "$ref" : "#/definitions/transactionDetails"
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/transactions" : {
      "get" : {
        "operationId" : "GET_traceability-transactions",
        "summary" : "Transaction list",
        "tags" : [ "Provider" ],
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to current\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "pageSize",
          "in" : "query",
          "description" : "The number of entities allowed in a page",
          "required" : false,
          "type" : "integer",
          "default" : 20
        }, {
          "name" : "page",
          "in" : "query",
          "description" : "The offset starting page number in the result set to start returning results from, starts at 1",
          "required" : false,
          "type" : "integer",
          "default" : 1
        }, {
          "name" : "query",
          "in" : "query",
          "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
          "required" : false,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "List of all transactions in the selected timeframe",
            "headers" : {
              "X-Axway-Total-Count" : {
                "type" : "integer",
                "description" : "Total number of transactions in the selected timeframe"
              }
            },
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/transactionSummaryEvent"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/transactions/path" : {
      "get" : {
        "operationId" : "GET_traceability-transaction-paths",
        "summary" : "Transaction Paths list",
        "tags" : [ "Provider" ],
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to current\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "pageSize",
          "in" : "query",
          "description" : "The number of entities allowed in a page",
          "required" : false,
          "type" : "integer",
          "default" : 20
        }, {
          "name" : "page",
          "in" : "query",
          "description" : "The offset starting page number in the result set to start returning results from, starts at 1",
          "required" : false,
          "type" : "integer",
          "default" : 1
        }, {
          "name" : "query",
          "in" : "query",
          "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
          "required" : false,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "List of all distinct transaction paths in the selected timeframe",
            "schema" : {
              "type" : "array",
              "items" : {
                "type" : "string",
                "example" : [ "/api/vehicle/car", "/products" ]
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/summary" : {
      "get" : {
        "operationId" : "GET_traceability-summary",
        "summary" : "Computes summary of api calls",
        "tags" : [ "Provider" ],
        "parameters" : [ {
          "name" : "groupBy",
          "in" : "query",
          "description" : "Grouping parameters",
          "required" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "proxyId", "method", "virtualHost", "uri", "applicationId" ]
          }
        }, {
          "name" : "query",
          "in" : "query",
          "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "from",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to current\n",
          "required" : false,
          "type" : "number"
        } ],
        "responses" : {
          "200" : {
            "description" : "Summary of transactions",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/summary"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/chart" : {
      "get" : {
        "operationId" : "GET_traceability-chart",
        "summary" : "Histogram data for transaction counts",
        "tags" : [ "Provider" ],
        "parameters" : [ {
          "name" : "interval",
          "in" : "query",
          "description" : "Interval parameter",
          "required" : true,
          "type" : "string",
          "pattern" : "^[1-9]\\d*[smhd]$"
        }, {
          "name" : "from",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to current\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "query",
          "in" : "query",
          "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
          "required" : false,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "Histogram data for transaction counts",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/chartDataPoint"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/revenue/sumbilledamount" : {
      "get" : {
        "operationId" : "GET_revenue-sum",
        "summary" : "Sum billed amounts for a given time period",
        "tags" : [ "Traceability" ],
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to current\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "query",
          "in" : "query",
          "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
          "required" : false,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "Sum of billings from a given time period",
            "schema" : {
              "$ref" : "#/definitions/revenueSum"
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/revenue/summary" : {
      "get" : {
        "operationId" : "GET_revenue-table",
        "summary" : "Sum billed amounts for a given time period and for a given aggregation",
        "tags" : [ "Traceability" ],
        "parameters" : [ {
          "name" : "from",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "to",
          "in" : "query",
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to current\n",
          "required" : false,
          "type" : "number"
        }, {
          "name" : "query",
          "in" : "query",
          "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "interval",
          "in" : "query",
          "description" : "Interval parameter",
          "required" : true,
          "type" : "string",
          "pattern" : "^[1-9]\\d*[smhdwM]$"
        }, {
          "name" : "groupBy",
          "in" : "query",
          "description" : "Grouping parameters",
          "required" : false,
          "type" : "array",
          "items" : {
            "type" : "string",
            "enum" : [ "consumerOrgId", "productId" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Summary of billings",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/revenueSummary"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/consumer/v2/summary" : {
      "post" : {
        "operationId" : "POST_traceability-consumer-summary",
        "summary" : "Summary for consumer metrics",
        "tags" : [ "Consumer" ],
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "in" : "body",
          "name" : "searchBody",
          "description" : "The summary search body",
          "required" : true,
          "schema" : {
            "$ref" : "#/definitions/consumerSummarySearch"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "List of all consumer summary resource",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/consumerSummary"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/consumer/v2/chart" : {
      "post" : {
        "operationId" : "POST_traceability-consumer-chart",
        "summary" : "Chart for consumer metrics",
        "tags" : [ "Consumer" ],
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "in" : "body",
          "name" : "searchBody",
          "description" : "The chart search body",
          "required" : true,
          "schema" : {
            "$ref" : "#/definitions/consumerChartSearch"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Histogram data for consumer metrics",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/chartDataPoint"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/consumer/v2/chartGroupedBy" : {
      "post" : {
        "operationId" : "POST_traceability-consumer-chartGroupedBy",
        "summary" : "Chart for consumer metrics with aggregation(s)",
        "tags" : [ "Consumer" ],
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "in" : "body",
          "name" : "searchBody",
          "description" : "The chart grouped by search body",
          "required" : true,
          "schema" : {
            "$ref" : "#/definitions/consumerChartGroupedBySearch"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Histogram data for consumer metrics with aggregation(s)",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/subscriptionUsage"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/consumer/v2/transactions" : {
      "post" : {
        "operationId" : "POST_traceability-consumer-transactions",
        "summary" : "Consumer Transaction list",
        "tags" : [ "Consumer" ],
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "in" : "body",
          "name" : "searchBody",
          "description" : "The consumer transactions search body",
          "required" : true,
          "schema" : {
            "$ref" : "#/definitions/commonSearch"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Consumer Transaction list",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/consumerTransactionSummaryEvent"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    },
    "/traceability/consumer/v2/transactionDetails/{transactionId}" : {
      "post" : {
        "operationId" : "POST_traceability-consumer-transactions-details",
        "summary" : "Consumer Transaction details",
        "tags" : [ "Consumer" ],
        "consumes" : [ "application/json" ],
        "produces" : [ "application/json" ],
        "parameters" : [ {
          "in" : "path",
          "name" : "transactionId",
          "description" : "The consumer transaction id",
          "required" : true,
          "type" : "string"
        }, {
          "in" : "body",
          "name" : "searchBody",
          "description" : "The consumer transaction details search body",
          "required" : true,
          "schema" : {
            "$ref" : "#/definitions/commonSearch"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Consumer Transaction list",
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/consumerTransactionSummaryEvent"
              }
            }
          },
          "400" : {
            "description" : "Bad Request, failed to validate request parameters"
          },
          "401" : {
            "description" : "Unauthorized, user failed to authenticate"
          },
          "403" : {
            "description" : "Forbidden, the user does not have the correct permissions to call this API"
          }
        }
      }
    }
  },
  "parameters" : {
    "trait:pageSizeParam:pageSize" : {
      "name" : "pageSize",
      "in" : "query",
      "description" : "The number of entities allowed in a page",
      "required" : false,
      "type" : "integer",
      "default" : 20
    },
    "trait:fromDateParam:from" : {
      "name" : "from",
      "in" : "query",
      "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0\n",
      "required" : false,
      "type" : "number"
    },
    "trait:toDateParam:to" : {
      "name" : "to",
      "in" : "query",
      "description" : "Date-time specified in epoch time (milliseconds). Defaults to current\n",
      "required" : false,
      "type" : "number"
    },
    "trait:rsqlQuery:query" : {
      "name" : "query",
      "in" : "query",
      "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
      "required" : false,
      "type" : "string"
    },
    "trait:intervalParam:interval" : {
      "name" : "interval",
      "in" : "query",
      "description" : "Interval parameter",
      "required" : true,
      "type" : "string",
      "pattern" : "^[1-9]\\d*[smhd]$"
    },
    "trait:groupingParam:groupBy" : {
      "name" : "groupBy",
      "in" : "query",
      "description" : "Grouping parameters",
      "required" : false,
      "type" : "array",
      "items" : {
        "type" : "string",
        "enum" : [ "proxyId", "method", "virtualHost", "uri", "applicationId" ]
      }
    },
    "trait:pageNumberParam:page" : {
      "name" : "page",
      "in" : "query",
      "description" : "The offset starting page number in the result set to start returning results from, starts at 1",
      "required" : false,
      "type" : "integer",
      "default" : 1
    }
  },
  "definitions" : {
    "summary" : {
      "title" : "Summary",
      "type" : "object",
      "properties" : {
        "failureCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions that resulted in a 4xx status"
        },
        "successCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions that resulted in a 2xx status"
        },
        "exceptionCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions that resulted in a 5xx status"
        },
        "totalCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions"
        },
        "avgDurationMs" : {
          "type" : "number",
          "format" : "long",
          "description" : "Average duration of transactions"
        },
        "minDurationMs" : {
          "type" : "number",
          "format" : "long",
          "description" : "Minimum duration of transactions"
        },
        "maxDurationMs" : {
          "type" : "number",
          "format" : "long",
          "description" : "Maximum duration of transactions"
        },
        "proxyId" : {
          "type" : "string",
          "description" : "Proxy identifier"
        },
        "proxyName" : {
          "type" : "string",
          "description" : "Proxy name"
        },
        "applicationId" : {
          "type" : "string",
          "description" : "Application identifier"
        },
        "applicationName" : {
          "type" : "string",
          "description" : "Application name"
        },
        "teamName" : {
          "type" : "string",
          "description" : "Team name"
        },
        "method" : {
          "type" : "string",
          "description" : "Method called"
        },
        "virtualHost" : {
          "type" : "string",
          "description" : "Virtual host"
        },
        "uri" : {
          "type" : "string",
          "description" : "Uri of the call"
        },
        "subscriptionId" : {
          "type" : "string",
          "description" : "Subscription id"
        },
        "subscriptionName" : {
          "type" : "string",
          "description" : "Subscription name"
        },
        "consumerTeamId" : {
          "type" : "string",
          "description" : "Consumer Team id"
        },
        "consumerTeamName" : {
          "type" : "string",
          "description" : "Consumer Team name"
        },
        "environmentId" : {
          "type" : "string",
          "description" : "Environment id"
        },
        "environmentName" : {
          "type" : "string",
          "description" : "Environment name"
        },
        "consumerOrgId" : {
          "type" : "string",
          "description" : "Consumer Organization id"
        },
        "consumerOrgName" : {
          "type" : "string",
          "description" : "Consumer Organization name"
        },
        "marketplaceId" : {
          "type" : "string",
          "description" : "Marketplace id"
        },
        "marketplaceName" : {
          "type" : "string",
          "description" : "Marketplace name"
        },
        "productId" : {
          "type" : "string",
          "description" : "Product identifier"
        },
        "productName" : {
          "type" : "string",
          "description" : "Product name"
        },
        "assetResourceId" : {
          "type" : "string",
          "description" : "Asset resource id"
        },
        "runtimeComplianceGrade" : {
          "type" : "string",
          "description" : "Runtime compliance grade"
        },
        "runtimeComplianceRiskScore" : {
          "type" : "string",
          "description" : "Runtime compliance risk score"
        },
        "planId" : {
          "type" : "string",
          "description" : "Plan id"
        },
        "planTitle" : {
          "type" : "string",
          "description" : "Plan title"
        },
        "quotaId" : {
          "type" : "string",
          "description" : "Quota id"
        },
        "quotaType" : {
          "type" : "string",
          "description" : "Quota type"
        },
        "quotaInterval" : {
          "type" : "string",
          "description" : "Quota interval"
        },
        "quotaLimit" : {
          "type" : "string",
          "description" : "Quota limit"
        }
      },
      "required" : [ "failureCount", "successCount", "exceptionCount", "avgDurationMs", "minDurationMs", "maxDurationMs", "totalCount" ]
    },
    "consumerSummary" : {
      "title" : "ConsumerSummary",
      "type" : "object",
      "properties" : {
        "failureCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions that resulted in a 4xx status"
        },
        "successCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions that resulted in a 2xx status"
        },
        "exceptionCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions that resulted in a 5xx status"
        },
        "totalCount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total count of transactions"
        },
        "avgDurationMs" : {
          "type" : "number",
          "format" : "long",
          "description" : "Average duration of transactions"
        },
        "minDurationMs" : {
          "type" : "number",
          "format" : "long",
          "description" : "Minimum duration of transactions"
        },
        "maxDurationMs" : {
          "type" : "number",
          "format" : "long",
          "description" : "Maximum duration of transactions"
        },
        "apiId" : {
          "type" : "string",
          "description" : "Api identifier"
        },
        "apiName" : {
          "type" : "string",
          "description" : "Api name"
        },
        "applicationId" : {
          "type" : "string",
          "description" : "Application identifier"
        },
        "applicationName" : {
          "type" : "string",
          "description" : "Application name"
        },
        "assetResourceId" : {
          "type" : "string",
          "description" : "Asset resource identifier"
        },
        "planId" : {
          "type" : "string",
          "description" : "Plan identifier"
        },
        "productId" : {
          "type" : "string",
          "description" : "Product identifier"
        },
        "productName" : {
          "type" : "string",
          "description" : "Product name"
        },
        "productVersionId" : {
          "type" : "string",
          "description" : "Product version identifier"
        },
        "quotaId" : {
          "type" : "string",
          "description" : "Quota identifier"
        },
        "subscriptionId" : {
          "type" : "string",
          "description" : "Subscription identifier"
        },
        "subscriptionName" : {
          "type" : "string",
          "description" : "Subscription name"
        }
      },
      "required" : [ "failureCount", "successCount", "exceptionCount", "avgDurationMs", "minDurationMs", "maxDurationMs", "totalCount" ]
    },
    "subscriptionUsage" : {
      "title" : "SubscriptionUsage",
      "type" : "object",
      "properties" : {
        "applicationId" : {
          "type" : "string",
          "description" : "Application identifier"
        },
        "applicationName" : {
          "type" : "string",
          "description" : "Application name"
        },
        "subscriptionId" : {
          "type" : "string",
          "description" : "Subscription identifier"
        },
        "subscriptionName" : {
          "type" : "string",
          "description" : "Subscription name"
        },
        "apiId" : {
          "type" : "string",
          "description" : "Api identifier"
        },
        "apiName" : {
          "type" : "string",
          "description" : "Api name"
        },
        "productId" : {
          "type" : "string",
          "description" : "Product id"
        },
        "productName" : {
          "type" : "string",
          "description" : "Product name"
        },
        "productVersionId" : {
          "type" : "string",
          "description" : "Product version id"
        },
        "assetResourceId" : {
          "type" : "string",
          "description" : "Asset resource id"
        },
        "planId" : {
          "type" : "string",
          "description" : "Plan id"
        },
        "planTitle" : {
          "type" : "string",
          "description" : "Plan title"
        },
        "quotaId" : {
          "type" : "string",
          "description" : "Quota id"
        },
        "quotaType" : {
          "type" : "string",
          "description" : "Quota type"
        },
        "quotaInterval" : {
          "type" : "string",
          "description" : "Quota interval"
        },
        "quotaLimit" : {
          "type" : "string",
          "description" : "Quota limit"
        },
        "consumerOrgId" : {
          "type" : "string",
          "description" : "Consumer org identifier"
        },
        "consumerOrgName" : {
          "type" : "string",
          "description" : "Consumer org name"
        },
        "consumerTeamId" : {
          "type" : "string",
          "description" : "Consumer team identifier"
        },
        "consumerTeamName" : {
          "type" : "string",
          "description" : "Consumer team name"
        },
        "marketplaceName" : {
          "type" : "string",
          "description" : "Marketplace name"
        },
        "usage" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/chartDataPoint"
          },
          "description" : "Api usage"
        }
      }
    },
    "consumerTransactionsResponse" : {
      "title" : "ConsumerTransactionsResponse",
      "type" : "object",
      "properties" : {
        "transactionSummaryEvents" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/consumerTransactionSummaryEvent"
          }
        },
        "totalCount" : {
          "type" : "integer"
        }
      }
    },
    "consumerDetails" : {
      "title" : "ConsumerDetails",
      "description" : "Consumer details of a transactionSummary event",
      "type" : "object",
      "properties" : {
        "application" : {
          "$ref" : "#/definitions/applicationDescriptor"
        },
        "publishedProduct" : {
          "$ref" : "#/definitions/publishedProductDescriptor"
        }
      }
    },
    "transactionSummaryDetails" : {
      "title" : "TransactionSummaryDetails",
      "description" : "Attributes of a transactionSummary event",
      "type" : "object",
      "properties" : {
        "status" : {
          "type" : "string",
          "enum" : [ "Success", "Failure", "Exception", "Unknown" ]
        },
        "statusDetail" : {
          "type" : "string",
          "description" : "Protocol specific response status"
        },
        "duration" : {
          "type" : "integer",
          "description" : "Duration in milliseconds"
        },
        "apicDeployment" : {
          "type" : "string",
          "description" : "Name of apic deployment"
        },
        "proxy" : {
          "$ref" : "#/definitions/proxyDescriptor"
        },
        "runtime" : {
          "$ref" : "#/definitions/runtimeDescriptor"
        },
        "product" : {
          "$ref" : "#/definitions/productDescriptor"
        },
        "team" : {
          "$ref" : "#/definitions/teamDescriptor"
        },
        "application" : {
          "$ref" : "#/definitions/applicationDescriptor"
        },
        "entryPoint" : {
          "$ref" : "#/definitions/entryPoint"
        }
      },
      "required" : [ "status", "statusDetail", "duration", "proxy", "runtime", "entryPoint" ]
    },
    "transactionLegEvent" : {
      "title" : "TransactionLegEvent",
      "description" : "Schema of a standalone Transaction Event",
      "allOf" : [ {
        "$ref" : "#/definitions/common"
      }, {
        "properties" : {
          "transactionEvent" : {
            "$ref" : "#/definitions/transactionEvent"
          }
        },
        "required" : [ "transactionEvent" ]
      } ],
      "type" : "object"
    },
    "protocol" : {
      "title" : "Protocol",
      "type" : "object",
      "description" : "Base protocol details",
      "discriminator" : "type",
      "properties" : {
        "type" : {
          "type" : "string",
          "description" : "Type of protocol",
          "enum" : [ "http", "jms" ]
        }
      },
      "required" : [ "type" ]
    },
    "http" : {
      "title" : "HTTPProtocol",
      "type" : "object",
      "description" : "HTTP Protocol properties",
      "allOf" : [ {
        "$ref" : "#/definitions/protocol"
      }, {
        "type" : "object",
        "properties" : {
          "uri" : {
            "type" : "string",
            "description" : "HTTP URI"
          },
          "args" : {
            "type" : "string",
            "description" : "Request query parameters as serialized json map"
          },
          "method" : {
            "type" : "string",
            "description" : "HTTP Method"
          },
          "status" : {
            "type" : "integer",
            "description" : "HTTP Status code"
          },
          "statusText" : {
            "type" : "string",
            "description" : "HTTP Status text"
          },
          "userAgent" : {
            "type" : "string",
            "description" : "User Agent"
          },
          "host" : {
            "type" : "string",
            "description" : "HTTP Host request header"
          },
          "version" : {
            "type" : "string",
            "description" : "HTTP Version"
          },
          "bytesReceived" : {
            "type" : "integer",
            "description" : "Total bytes received"
          },
          "bytesSent" : {
            "type" : "integer",
            "description" : "Total bytes sent"
          },
          "remoteName" : {
            "type" : "string",
            "description" : "Remote host name"
          },
          "remoteAddr" : {
            "type" : "string",
            "description" : "Remote host address"
          },
          "localAddr" : {
            "type" : "string",
            "description" : "Local address"
          },
          "remotePort" : {
            "type" : "string",
            "description" : "Remote port"
          },
          "localPort" : {
            "type" : "string",
            "description" : "Local port"
          },
          "sslServerName" : {
            "type" : "string",
            "description" : "Requested server name via SNI"
          },
          "sslSubject" : {
            "type" : "string",
            "description" : "Client SSL Subject DN"
          },
          "sslProtocol" : {
            "type" : "string",
            "description" : "Negotiated SSL Protocol."
          },
          "authSubjectId" : {
            "type" : "string",
            "description" : "Id of the authenticated subject."
          },
          "requestHeaders" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "Indexed received headers"
          },
          "responseHeaders" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "Indexed sent headers"
          },
          "requestPayload" : {
            "type" : "string",
            "description" : "URN of the request received payload e.g. urn:objectstore:traffic:6e8bc430-9c3a-11d9-9669-0800200c9a66"
          },
          "responsePayload" : {
            "type" : "string",
            "description" : "URN of the request sent payload e.g. urn:objectstore:traffic:6e8bc430-9c3a-11d9-9669-0800200c9a66"
          },
          "wafStatus" : {
            "type" : "integer",
            "description" : "Waf status "
          },
          "timing" : {
            "type" : "object",
            "properties" : {
              "dnsLookup" : {
                "type" : "integer",
                "description" : "Time to dns lookup"
              },
              "tcpConnection" : {
                "type" : "integer",
                "description" : "Time to tcp connection establishment"
              },
              "sslHandshake" : {
                "type" : "integer",
                "description" : "Time to ssl handshake completion"
              },
              "firstByte" : {
                "type" : "integer",
                "description" : "Time to first byte received"
              },
              "end" : {
                "type" : "integer",
                "description" : "Time to completion"
              }
            },
            "description" : "Detailed timing of http/https requests",
            "required" : [ "tcpConnection", "firstByte" ]
          }
        },
        "required" : [ "uri", "status", "method", "host", "bytesSent", "bytesReceived" ]
      } ]
    },
    "jms" : {
      "title" : "JMSProtocol",
      "type" : "object",
      "description" : "JMS Protocol properties",
      "allOf" : [ {
        "$ref" : "#/definitions/protocol"
      }, {
        "type" : "object",
        "properties" : {
          "authSubjectId" : {
            "description" : "Authentication subject ID (user login) if available",
            "type" : "string"
          },
          "jmsCorrelationID" : {
            "description" : "Message correlation ID",
            "type" : "string"
          },
          "jmsDeliveryMode" : {
            "description" : "Message delivery mode (1 for non-persistent, 2 for persistent)",
            "enum" : [ 1, 2 ],
            "type" : "integer"
          },
          "jmsDestination" : {
            "description" : "Message destination",
            "type" : "string"
          },
          "jmsExpiration" : {
            "description" : "Message expiration timestamp",
            "type" : "integer"
          },
          "jmsMessageID" : {
            "description" : "Message ID",
            "type" : "string"
          },
          "jmsPriority" : {
            "description" : "Messaage priority rank",
            "type" : "integer"
          },
          "jmsProviderURL" : {
            "description" : "Provider URL configured in JMS service",
            "type" : "string"
          },
          "jmsRedelivered" : {
            "description" : "Indicate if message is marked for potential redelivery (0 for no)",
            "enum" : [ 0, 1 ],
            "type" : "integer"
          },
          "jmsReplyTo" : {
            "description" : "Reply destination configured in message",
            "type" : "string"
          },
          "jmsStatus" : {
            "description" : "JMS operation status",
            "enum" : [ "Success", "Failed" ],
            "type" : "string"
          },
          "jmsStatusText" : {
            "description" : "JMS operation error message (if available)",
            "type" : "string"
          },
          "jmsTimestamp" : {
            "description" : "Time at which the message was originally handed off to a provider to be sent",
            "type" : "number"
          },
          "jmsType" : {
            "description" : "Message type identifier",
            "type" : "string"
          }
        },
        "required" : [ "jmsDestination", "jmsReplyTo", "jmsStatus", "jmsTimestamp" ]
      } ]
    },
    "productDescriptor" : {
      "title" : "Product",
      "type" : "object",
      "description" : "Descriptor of the product",
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "Product id"
        },
        "version" : {
          "type" : "string",
          "description" : "Product version"
        }
      },
      "required" : [ "id" ]
    },
    "publishedProductDescriptor" : {
      "title" : "Product",
      "type" : "object",
      "description" : "Descriptor of the product",
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "Product id"
        },
        "name" : {
          "type" : "string",
          "description" : "Product name"
        }
      },
      "required" : [ "id" ]
    },
    "applicationDescriptor" : {
      "title" : "Applications",
      "type" : "object",
      "description" : "Descriptor of the application that triggered the action",
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "Application id"
        },
        "name" : {
          "type" : "string",
          "description" : "Application name"
        }
      },
      "required" : [ "id" ]
    },
    "transactionSummaryEvent" : {
      "title" : "TransactionSummaryEvent",
      "description" : "Schema of a Transaction Summary",
      "allOf" : [ {
        "$ref" : "#/definitions/common"
      }, {
        "properties" : {
          "transactionSummary" : {
            "$ref" : "#/definitions/transactionSummaryDetails"
          }
        },
        "required" : [ "transactionSummary" ]
      } ],
      "type" : "object"
    },
    "consumerTransactionSummaryEvent" : {
      "title" : "TransactionSummaryEvent",
      "description" : "Schema of a Transaction Summary",
      "allOf" : [ {
        "$ref" : "#/definitions/common"
      }, {
        "properties" : {
          "transactionSummary" : {
            "$ref" : "#/definitions/consumerTransactionSummaryDetails"
          }
        },
        "required" : [ "transactionSummary" ]
      } ],
      "type" : "object"
    },
    "consumerTransactionSummaryDetails" : {
      "title" : "TransactionSummaryDetails",
      "description" : "Attributes of a transactionSummary event",
      "type" : "object",
      "properties" : {
        "status" : {
          "type" : "string",
          "enum" : [ "Success", "Failure", "Exception", "Unknown" ]
        },
        "statusDetail" : {
          "type" : "string",
          "description" : "Protocol specific response status"
        },
        "duration" : {
          "type" : "integer",
          "description" : "Duration in milliseconds"
        },
        "apicDeployment" : {
          "type" : "string",
          "description" : "Name of apic deployment"
        },
        "runtime" : {
          "$ref" : "#/definitions/runtimeDescriptor"
        },
        "entryPoint" : {
          "$ref" : "#/definitions/entryPoint"
        },
        "proxy" : {
          "$ref" : "#/definitions/proxyDescriptor"
        },
        "consumerDetails" : {
          "$ref" : "#/definitions/consumerDetails"
        }
      },
      "required" : [ "status", "statusDetail", "duration", "runtime", "proxy", "entryPoint" ]
    },
    "common" : {
      "title" : "Common",
      "type" : "object",
      "description" : "Common attributes of a API Central event",
      "properties" : {
        "version" : {
          "type" : "string",
          "title" : "Event version"
        },
        "timestamp" : {
          "type" : "number",
          "title" : "Unix timestamp of the event"
        },
        "transactionId" : {
          "type" : "string",
          "title" : "Unique business transaction id. Generated by APIC.",
          "description" : "transaction ID expected as URL Encoded parameter"
        },
        "environmentName" : {
          "type" : "string",
          "title" : "Name of the environment"
        },
        "apicDeployment" : {
          "type" : "string",
          "title" : "Name of the APIC deployment environment"
        },
        "environmentId" : {
          "type" : "string",
          "title" : "Unique ID denoting the origin environment"
        },
        "tenantId" : {
          "type" : "string",
          "title" : "Tenant identifier"
        },
        "trcbltPartitionId" : {
          "type" : "string",
          "title" : "Axway condor partition id. Must match an org id."
        },
        "type" : {
          "type" : "string",
          "title" : "Type of event"
        }
      },
      "required" : [ "version", "timestamp", "apicDeployment", "environmentId", "type" ]
    },
    "transactionEvent" : {
      "title" : "TransactionEvent",
      "type" : "object",
      "description" : "Attributes of a transaction event",
      "properties" : {
        "id" : {
          "type" : "string"
        },
        "parentId" : {
          "type" : "string"
        },
        "source" : {
          "type" : "string"
        },
        "destination" : {
          "type" : "string"
        },
        "duration" : {
          "type" : "integer"
        },
        "direction" : {
          "type" : "string"
        },
        "status" : {
          "type" : "string"
        },
        "apicDeployment" : {
          "type" : "string",
          "description" : "Name of apic deployment"
        },
        "protocol" : {
          "$ref" : "#/definitions/protocol"
        }
      }
    },
    "usageMetricEvent" : {
      "title" : "UsageMetricEvent",
      "type" : "object",
      "description" : "Schema of a Usage Metric Event published by an agent",
      "properties" : {
        "app" : {
          "type" : "string"
        },
        "data" : {
          "$ref" : "#/definitions/data"
        },
        "id" : {
          "type" : "string"
        },
        "event" : {
          "type" : "string"
        },
        "distribution" : {
          "$ref" : "#/definitions/distribution"
        },
        "version" : {
          "type" : "string"
        },
        "timestamp" : {
          "type" : "number"
        }
      }
    },
    "data" : {
      "title" : "Data",
      "type" : "object",
      "description" : "Details of usage metrics",
      "properties" : {
        "response" : {
          "$ref" : "#/definitions/response"
        },
        "observation" : {
          "$ref" : "#/definitions/observation"
        },
        "count" : {
          "type" : "integer",
          "description" : "Count of transactions in this interval."
        },
        "api" : {
          "$ref" : "#/definitions/api"
        },
        "statusCode" : {
          "type" : "string",
          "description" : "HTTP code of the transaction status"
        },
        "status" : {
          "type" : "string",
          "enum" : [ "Success", "Failure", "Exception" ]
        }
      }
    },
    "response" : {
      "title" : "Response",
      "type" : "object",
      "description" : "Minimum, maximum and average response times during the usage metric reporting interval",
      "properties" : {
        "min" : {
          "type" : "number"
        },
        "max" : {
          "type" : "number"
        },
        "avg" : {
          "type" : "number"
        }
      }
    },
    "observation" : {
      "title" : "Observation",
      "type" : "object",
      "description" : "Contains start and end times for usage metric reporting interval",
      "properties" : {
        "start" : {
          "type" : "number"
        },
        "end" : {
          "type" : "number"
        }
      }
    },
    "api" : {
      "title" : "API",
      "type" : "object",
      "description" : "Contains remote API ID & name",
      "properties" : {
        "name" : {
          "type" : "string"
        },
        "id" : {
          "type" : "string"
        }
      }
    },
    "distribution" : {
      "title" : "Distribution",
      "type" : "object",
      "description" : "Contains environment ID & event version",
      "properties" : {
        "environment" : {
          "type" : "string"
        },
        "version" : {
          "type" : "string"
        }
      }
    },
    "chartDataPoint" : {
      "title" : "ChartDataPoint",
      "required" : [ "time" ],
      "type" : "object",
      "properties" : {
        "time" : {
          "type" : "number",
          "format" : "long",
          "description" : "Data point timestamp"
        },
        "total" : {
          "type" : "number",
          "format" : "long",
          "description" : "Value based on chart type"
        }
      }
    },
    "transactionDetails" : {
      "title" : "TransactionDetails",
      "type" : "object",
      "properties" : {
        "transactionLegEvent" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/transactionLegEvent"
          }
        },
        "transactionSummaryEvent" : {
          "$ref" : "#/definitions/transactionSummaryEvent"
        }
      }
    },
    "teamDescriptor" : {
      "title" : "Team",
      "type" : "object",
      "description" : "Descriptor of a team",
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "Team id"
        },
        "name" : {
          "type" : "string",
          "description" : "Team name"
        }
      },
      "required" : [ "id" ]
    },
    "proxyDescriptor" : {
      "title" : "Proxy",
      "type" : "object",
      "description" : "Descriptor of the proxy called",
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "Proxy id"
        },
        "name" : {
          "type" : "string",
          "description" : "Proxy name"
        }
      },
      "required" : [ "id" ]
    },
    "entryPoint" : {
      "title" : "EntryPoint",
      "type" : "object",
      "description" : "Descriptor of the HTTP entry point",
      "properties" : {
        "type" : {
          "type" : "string",
          "enum" : [ "http" ]
        },
        "method" : {
          "type" : "string",
          "description" : "HTTP Method"
        },
        "path" : {
          "type" : "string",
          "description" : "HTTP Path"
        }
      },
      "required" : [ "method", "path" ]
    },
    "runtimeDescriptor" : {
      "title" : "Runtime",
      "type" : "object",
      "description" : "Descriptor of the runtime environment",
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "Runtime id"
        },
        "name" : {
          "type" : "string",
          "description" : "Runtime name"
        }
      },
      "required" : [ "id" ]
    },
    "revenueSum" : {
      "title" : "Sum of billings",
      "type" : "object",
      "properties" : {
        "total" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total amount of the billing sum"
        }
      },
      "required" : [ "total" ]
    },
    "revenueSummary" : {
      "title" : "Summary of billings",
      "type" : "object",
      "properties" : {
        "consumerOrgId" : {
          "type" : "string",
          "format" : "long",
          "description" : "Consumer Organization identifier"
        },
        "consumerOrgName" : {
          "type" : "string",
          "format" : "long",
          "description" : "Consumer Organization name"
        },
        "productId" : {
          "type" : "string",
          "format" : "long",
          "description" : "Product identifier"
        },
        "productName" : {
          "type" : "string",
          "format" : "long",
          "description" : "Product name"
        },
        "ownerTeamId" : {
          "type" : "string",
          "format" : "long",
          "description" : "Owner team identifier"
        },
        "ownerTeamName" : {
          "type" : "string",
          "format" : "long",
          "description" : "Owner team name"
        },
        "totalSubscriptions" : {
          "type" : "integer",
          "description" : "Count of distinct subscriptions in this interval."
        },
        "billedAmount" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/revenueChartDataPoint"
          }
        }
      }
    },
    "revenueChartDataPoint" : {
      "title" : "RevenueChartDataPoint",
      "required" : [ "time", "totalAmount" ],
      "type" : "object",
      "properties" : {
        "time" : {
          "type" : "number",
          "format" : "long",
          "description" : "Data point timestamp"
        },
        "totalAmount" : {
          "type" : "number",
          "format" : "long",
          "description" : "Total of billed amount for that period"
        }
      }
    },
    "commonSearch" : {
      "title" : "CommonSearch",
      "type" : "object",
      "description" : "Common search request body resource",
      "required" : [ "tenantId" ],
      "properties" : {
        "from" : {
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to 0",
          "type" : "integer",
          "format" : "int64",
          "default" : 0,
          "minimum" : 0
        },
        "to" : {
          "description" : "Date-time specified in epoch time (milliseconds). Defaults to current",
          "type" : "integer",
          "format" : "int64",
          "default" : 0,
          "minimum" : 0
        },
        "query" : {
          "description" : "Query string for filtering. Expressed in FIQL/RSQL language",
          "type" : "string"
        },
        "subscriptionIds" : {
          "type" : "array",
          "description" : "List of subscription ids to search",
          "items" : {
            "type" : "string"
          }
        },
        "tenantId" : {
          "type" : "string",
          "description" : "Consumer organization identifier",
          "minLength" : 1
        }
      }
    },
    "consumerSummarySearch" : {
      "title" : "ConsumerSummarySearch",
      "type" : "object",
      "description" : "Consumer summary search request body resource",
      "allOf" : [ {
        "$ref" : "#/definitions/commonSearch"
      }, {
        "properties" : {
          "durationDetails" : {
            "type" : "boolean",
            "description" : "If duration details should be included in the response",
            "default" : false
          },
          "groupBy" : {
            "type" : "array",
            "description" : "List of group bys",
            "items" : {
              "type" : "string"
            }
          },
          "unitId" : {
            "type" : "string",
            "description" : "Unit identifier",
            "default" : "transactions",
            "pattern" : "^[a-z0-9-.]+$"
          }
        }
      } ]
    },
    "consumerChartSearch" : {
      "title" : "ConsumerChartSummarySearch",
      "type" : "object",
      "description" : "Consumer Chart search request body resource",
      "allOf" : [ {
        "$ref" : "#/definitions/commonSearch"
      }, {
        "properties" : {
          "interval" : {
            "type" : "string",
            "description" : "Interval for the chart",
            "pattern" : "^[1-9]\\d*[smhd]$",
            "example" : "1h",
            "minLength" : 1
          },
          "unitId" : {
            "type" : "string",
            "description" : "Unit identifier",
            "default" : "transactions",
            "pattern" : "^[a-z0-9-.]+$"
          }
        },
        "required" : [ "interval" ]
      } ]
    },
    "consumerChartGroupedBySearch" : {
      "title" : "ConsumerChartGroupedBySummarySearch",
      "type" : "object",
      "description" : "Consumer Chart search request body resource",
      "allOf" : [ {
        "$ref" : "#/definitions/commonSearch"
      }, {
        "properties" : {
          "interval" : {
            "type" : "string",
            "description" : "Interval for the chart",
            "pattern" : "^[1-9]\\d*[smhdwM]$",
            "example" : "1M",
            "minLength" : 1
          },
          "unitId" : {
            "type" : "string",
            "description" : "Unit identifier",
            "default" : "transactions",
            "pattern" : "^[a-z0-9-.]+$"
          },
          "groupBy" : {
            "type" : "array",
            "description" : "List of group bys",
            "items" : {
              "type" : "string"
            }
          }
        },
        "required" : [ "interval" ]
      } ]
    }
  }
}