Open API Specifications for Web Services

This page lists the OpenAPI specifications for the three web services that are run by default as part of every StreamBase Runtime node. For more information on these services, see StreamBase Runtime REST API in the StreamBase Admin Guide.

Administration Service

This the OpenAPI specification for the admin web service.

{
   "securityDefinitions" : {
      "basicAuth" : {
         "name" : "basic_auth",
         "in" : "header",
         "type" : "basicAuth"
      }
   },
   "components" : {
      "schemas" : {
         "Parameter" : {
            "type" : "object",
            "properties" : {
               "required" : {
                  "type" : "boolean"
               },
               "name" : {
                  "type" : "string"
               },
               "description" : {
                  "type" : "string"
               },
               "type" : {
                  "type" : "String"
               },
               "defaultValue" : {
                  "type" : "string"
               }
            }
         },
         "AdminRESTResponse" : {
            "type" : "object",
            "properties" : {
               "results" : {
                  "type" : "array",
                  "items" : {
                     "$ref" : "#/components/schemas/Result"
                  }
               }
            }
         },
         "AdminErrorResponse" : {
            "properties" : {
               "responseCode" : {
                  "type" : "integer"
               },
               "message" : {
                  "type" : "string"
               },
               "responseStatus" : {
                  "type" : "string"
               }
            },
            "type" : "object"
         },
         "ColumnHeader" : {
            "properties" : {
               "columnType" : {
                  "type" : "string"
               },
               "columnName" : {
                  "type" : "string"
               }
            },
            "type" : "object"
         },
         "Target" : {
            "type" : "object",
            "properties" : {
               "commands" : {
                  "items" : {
                     "$ref" : "#/components/schemas/Command"
                  },
                  "type" : "array"
               },
               "description" : {
                  "type" : "string"
               },
               "name" : {
                  "type" : "string"
               }
            }
         },
         "AdminHelpTargetsResponse" : {
            "properties" : {
               "targetList" : {
                  "type" : "array",
                  "items" : {
                     "$ref" : "#/components/schemas/Target"
                  }
               }
            },
            "type" : "object"
         },
         "Command" : {
            "type" : "object",
            "properties" : {
               "name" : {
                  "type" : "string"
               },
               "description" : {
                  "type" : "string"
               },
               "parameters" : {
                  "items" : {
                     "$ref" : "#/components/schemas/Parameter"
                  },
                  "type" : "array"
               }
            }
         },
         "Result" : {
            "properties" : {
               "statusMessage" : {
                  "type" : "array",
                  "items" : {
                     "type" : "string"
                  }
               },
               "returnCode" : {
                  "type" : "integer"
               },
               "serviceName" : {
                  "type" : "string"
               },
               "rows" : {
                  "type" : "array",
                  "items" : {
                     "type" : "array",
                     "items" : {
                        "type" : "string"
                     }
                  }
               },
               "columnHeaders" : {
                  "type" : "array",
                  "items" : {
                     "$ref" : "#/components/schemas/ColumnHeader"
                  }
               }
            },
            "type" : "object"
         },
         "AdminHelpTargetResponse" : {
            "properties" : {
               "target" : {
                  "items" : {
                     "$ref" : "#/components/schemas/Target"
                  },
                  "type" : "object"
               }
            },
            "type" : "object"
         },
         "AdminHelpCommandResponse" : {
            "properties" : {
               "command" : {
                  "type" : "object",
                  "items" : {
                     "$ref" : "#/components/schemas/Command"
                  }
               }
            },
            "type" : "object"
         }
      }
   },
   "openapi" : "3.0.2",
   "servers" : [
      {
         "url" : "/admin/v1"
      }
   ],
   "info" : {
      "description" : "<b>OpenAPI specification of the Admin REST API</b>",
      "version" : "1.0.0",
      "title" : "Admin REST API"
   },
   "paths" : {
      "/targets/{target}" : {
         "post" : {
            "requestBody" : {
               "content" : {
                  "multipart/form-data" : {
                     "schema" : {
                        "properties" : {
                           "files" : {
                              "items" : {
                                 "format" : "binary",
                                 "type" : "string"
                              },
                              "type" : "array"
                           },
                           "parameters" : {
                              "format" : "json",
                              "type" : "string"
                           }
                        },
                        "type" : "object"
                     }
                  }
               }
            },
            "parameters" : [
               {
                  "schema" : {
                     "type" : "string"
                  },
                  "in" : "path",
                  "description" : "The target name",
                  "name" : "target",
                  "required" : true
               },
               {
                  "description" : "The service name",
                  "name" : "servicename",
                  "required" : false,
                  "schema" : {
                     "type" : "string"
                  },
                  "in" : "query"
               },
               {
                  "in" : "query",
                  "schema" : {
                     "type" : "string"
                  },
                  "description" : "The command name",
                  "required" : true,
                  "name" : "command"
               }
            ],
            "tags" : [
               "Execute administration command"
            ],
            "summary" : "Execute an administration command",
            "responses" : {
               "500" : {
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/AdminErrorResponse"
                        }
                     }
                  },
                  "description" : "Internal Server Error"
               },
               "200" : {
                  "description" : "Success",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/AdminRESTResponse"
                        }
                     }
                  }
               },
               "303" : {
                  "description" : "Redirection",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/AdminErrorResponse"
                        }
                     }
                  }
               },
               "404" : {
                  "description" : "Bad Request",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/AdminErrorResponse"
                        }
                     }
                  }
               }
            }
         },
         "get" : {
            "parameters" : [
               {
                  "in" : "path",
                  "schema" : {
                     "type" : "string"
                  },
                  "description" : "The target name",
                  "required" : true,
                  "name" : "target"
               },
               {
                  "name" : "servicename",
                  "required" : false,
                  "description" : "The service name",
                  "schema" : {
                     "type" : "string"
                  },
                  "in" : "query"
               },
               {
                  "name" : "command",
                  "required" : false,
                  "description" : "The command name",
                  "schema" : {
                     "type" : "string"
                  },
                  "in" : "query"
               }
            ],
            "tags" : [
               "Retrieve help information"
            ],
            "summary" : "Get the help information of a target or a command",
            "responses" : {
               "200" : {
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "oneOf" : [
                              {
                                 "$ref" : "#/components/schemas/AdminRESTResponse"
                              },
                              {
                                 "$ref" : "#/components/schemas/AdminHelpTargetResponse"
                              },
                              {
                                 "$ref" : "#/components/schemas/AdminHelpCommandResponse"
                              }
                           ]
                        }
                     }
                  },
                  "description" : "Success"
               },
               "404" : {
                  "description" : "Not found",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/AdminErrorResponse"
                        }
                     }
                  }
               }
            }
         }
      },
      "/files/{filename}" : {
         "get" : {
            "responses" : {
               "404" : {
                  "description" : "file not found",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "type" : "string"
                        }
                     }
                  }
               },
               "200" : {
                  "content" : {
                     "application/octet-stream" : {
                        "schema" : {
                           "type" : "string",
                           "format" : "binary"
                        }
                     }
                  },
                  "description" : "download success"
               }
            },
            "parameters" : [
               {
                  "in" : "path",
                  "schema" : {
                     "type" : "string"
                  },
                  "required" : true,
                  "name" : "filename",
                  "description" : "The download file name"
               }
            ],
            "tags" : [
               "Download file"
            ],
            "summary" : "Download file from server"
         }
      },
      "/targets" : {
         "get" : {
            "parameters" : [
               {
                  "description" : "The service name",
                  "required" : false,
                  "name" : "servicename",
                  "in" : "query",
                  "schema" : {
                     "type" : "string"
                  }
               }
            ],
            "summary" : "Get the help information of all the targets",
            "tags" : [
               "Retrieve help information"
            ],
            "responses" : {
               "404" : {
                  "description" : "Not found",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/AdminErrorResponse"
                        }
                     }
                  }
               },
               "200" : {
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/AdminHelpTargetsResponse"
                        }
                     }
                  },
                  "description" : "Success"
               }
            }
         }
      }
   }
}

Health Check Service

This the OpenAPI specification for the healthcheck web service.

{
   "paths" : {
      "/status" : {
         "get" : {
            "tags" : [
               "Get the node status"
            ],
            "summary" : "Check the current status of the node",
            "responses" : {
               "200" : {
                  "description" : "Node is running",
                  "content" : {
                     "application/json" : {
                        "example" : {
                           "nodeState" : "STARTED",
                           "nodeName" : "nodeA"
                        },
                        "schema" : {
                           "$ref" : "#/components/schemas/NodeStatus"
                        }
                     }
                  }
               },
               "503" : {
                  "description" : "Node is stopped",
                  "content" : {
                     "application/json" : {
                        "example" : {
                           "nodeName" : "nodeA",
                           "nodeState" : "STOPPED"
                        },
                        "schema" : {
                           "$ref" : "#/components/schemas/NodeStatus"
                        }
                     }
                  }
               }
            }
         }
      }
   },
   "components" : {
      "schemas" : {
         "NodeStatus" : {
            "properties" : {
               "nodeName" : {
                  "type" : "string"
               },
               "nodeState" : {
                  "description" : "Node state",
                  "enum" : [
                     "STARTED",
                     "STOPPED"
                  ],
                  "type" : "string"
               }
            },
            "type" : "object"
         }
      }
   },
   "openapi" : "3.0.1",
   "servers" : [
      {
         "url" : "/healthcheck/v1/"
      }
   ],
   "securityDefinitions" : {
      "basicAuth" : {
         "type" : "basicAuth",
         "in" : "header",
         "name" : "basic_auth"
      }
   },
   "info" : {
      "version" : "1.0.0",
      "title" : "Health Check REST API",
      "description" : "<b>OpenAPI specification of the Health Check REST API</b>"
   }
}

Metrics Service

This the OpenAPI specification for the metrics web service.

{
   "openapi" : "3.0.2",
   "paths" : {
      "/metrics" : {
         "get" : {
            "responses" : {
               "default" : {
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/Error"
                        }
                     }
                  },
                  "description" : "not found error"
               },
               "200" : {
                  "description" : "a map of metrics",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/Metrics"
                        }
                     }
                  }
               }
            },
            "tags" : [
               "metrics"
            ],
            "parameters" : [
               {
                  "required" : false,
                  "description" : "metric name prefix",
                  "schema" : {
                     "type" : "string"
                  },
                  "in" : "query",
                  "name" : "prefix"
               },
               {
                  "description" : "metric type",
                  "name" : "type",
                  "in" : "query",
                  "schema" : {
                     "$ref" : "#/components/schemas/MetricType"
                  },
                  "required" : false
               }
            ],
            "summary" : "List metrics"
         }
      },
      "/metrics/{name}" : {
         "get" : {
            "summary" : "list metric with given name",
            "parameters" : [
               {
                  "description" : "The full name of the metric",
                  "name" : "name",
                  "in" : "path",
                  "schema" : {
                     "type" : "string"
                  },
                  "required" : true
               }
            ],
            "tags" : [
               "metrics"
            ],
            "responses" : {
               "default" : {
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/Error"
                        }
                     }
                  },
                  "description" : "unexpected error"
               },
               "200" : {
                  "description" : "a metric",
                  "content" : {
                     "application/json" : {
                        "schema" : {
                           "$ref" : "#/components/schemas/Metric"
                        }
                     }
                  }
               }
            }
         }
      }
   },
   "components" : {
      "schemas" : {
         "MetricType" : {
            "type" : "string",
            "enum" : [
               "COUNTER",
               "TIMER",
               "GAUGE",
               "HISTOGRAM",
               "METER"
            ]
         },
         "Gauge" : {
            "properties" : {
               "value" : {
                  "type" : "number"
               }
            },
            "type" : "object"
         },
         "Error" : {
            "required" : [
               "code",
               "message"
            ],
            "type" : "object",
            "properties" : {
               "code" : {
                  "format" : "int32",
                  "type" : "integer"
               },
               "message" : {
                  "type" : "string"
               }
            }
         },
         "Snapshot" : {
            "properties" : {
               "max" : {
                  "type" : "number"
               },
               "value" : {
                  "type" : "array",
                  "items" : {
                     "type" : "integer"
                  }
               },
               "95thPercentile" : {
                  "type" : "number"
               },
               "median" : {
                  "type" : "number"
               },
               "mean" : {
                  "type" : "number"
               },
               "min" : {
                  "type" : "number"
               },
               "999thPercentile" : {
                  "type" : "number"
               },
               "75thPercentile" : {
                  "type" : "number"
               },
               "stdDev" : {
                  "type" : "number"
               },
               "98thPercentile" : {
                  "type" : "number"
               },
               "99thPercentile" : {
                  "type" : "number"
               }
            },
            "type" : "object"
         },
         "Metric" : {
            "properties" : {
               "type" : {
                  "$ref" : "#/components/schemas/MetricType"
               },
               "lastUpdatedTimeStamp" : {
                  "type" : "integer"
               },
               "metric" : {
                  "type" : "object",
                  "oneOf" : [
                     {
                        "$ref" : "#/components/schemas/Counter"
                     },
                     {
                        "$ref" : "#/components/schemas/Gauge"
                     },
                     {
                        "$ref" : "#/components/schemas/Timer"
                     },
                     {
                        "$ref" : "#/components/schemas/Histogram"
                     },
                     {
                        "$ref" : "#/components/schemas/Meter"
                     }
                  ]
               },
               "name" : {
                  "type" : "string"
               },
               "description" : {
                  "type" : "string"
               }
            },
            "type" : "object",
            "required" : [
               "name"
            ]
         },
         "Timer" : {
            "type" : "object",
            "properties" : {
               "count" : {
                  "type" : "integer"
               },
               "fiveMinuteRate" : {
                  "type" : "number"
               },
               "fifteenMinuteRate" : {
                  "type" : "number"
               },
               "meanRate" : {
                  "type" : "number"
               },
               "oneMinuteRate" : {
                  "type" : "number"
               },
               "snapshot" : {
                  "$ref" : "#/components/schemas/Snapshot"
               }
            }
         },
         "Meter" : {
            "type" : "object",
            "properties" : {
               "oneMinuteRate" : {
                  "type" : "number"
               },
               "count" : {
                  "type" : "integer"
               },
               "fiveMinuteRate" : {
                  "type" : "number"
               },
               "fifteenMinuteRate" : {
                  "type" : "number"
               },
               "meanRate" : {
                  "type" : "number"
               }
            }
         },
         "Metrics" : {
            "type" : "object",
            "additionalProperties" : {
               "$ref" : "#/components/schemas/Metric"
            }
         },
         "Histogram" : {
            "properties" : {
               "count" : {
                  "type" : "integer"
               },
               "snapshot" : {
                  "$ref" : "#/components/schemas/Snapshot"
               }
            },
            "type" : "object"
         },
         "Counter" : {
            "type" : "object",
            "properties" : {
               "count" : {
                  "type" : "integer"
               }
            }
         }
      }
   },
   "servers" : [
      {
         "url" : "/metrics/v1"
      }
   ],
   "info" : {
      "title" : "Metrics REST API",
      "description" : "<b>OpenAPI specification of the Metrics REST API</b>",
      "version" : "1.0.0"
   }
}