openapi: 3.0.0 info: title: Seldon External API version: '0.1' contact: name: Seldon Core url: https://github.com/SeldonIO/seldon-core externalDocs: description: Seldon Core Documentation url: https://github.com/SeldonIO/seldon-core servers: - url: https://{host}:{port} variables: host: default: localhost description: host running seldon core port: default: '80' - url: https://localhost:8002 description: fixed host as swagger UI has bug with variables for auth paths: /seldon/{namespace}/{deployment}/api/v1.0/predictions: post: security: - HTTPBearer: [] operationId: Predict responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/SeldonMessage' parameters: - name: namespace in: path required: true schema: type: string pattern: ^.{1,2097152} maxLength: 2097152 - name: deployment in: path required: true schema: type: string pattern: ^.{1,2097152} maxLength: 2097152 tags: - External Ambassador API requestBody: content: application/json: schema: $ref: '#/components/schemas/SeldonMessage' example: data: names: - feature1 tensor: shape: - 1 - 1 values: - 1 text/*: schema: type: string pattern: ^.{1,2097152} maxLength: 2097152 application/octet-stream: schema: type: string format: binary pattern: ^.{1,2097152} maxLength: 2097152 required: true /seldon/{namespace}/{deployment}/api/v1.0/feedback: post: security: - HTTPBearer: [] operationId: SendFeedback responses: '200': description: A successful response. content: application/json: schema: $ref: '#/components/schemas/SeldonMessage' parameters: - name: namespace in: path required: true schema: type: string pattern: ^.{1,2097152} maxLength: 2097152 - name: deployment in: path required: true schema: type: string pattern: ^.{1,2097152} maxLength: 2097152 tags: - External Ambassador API requestBody: content: application/json: schema: $ref: '#/components/schemas/Feedback' required: true components: securitySchemes: HTTPBearer: type: http scheme: bearer schemas: StatusStatusFlag: type: string pattern: ^.{1,2097152} maxLength: 2097152 enum: - SUCCESS - FAILURE default: SUCCESS AnyValue: description: 'Can be anything: string, number, array, object, etc.' MetricType: type: string pattern: ^.{1,2097152} maxLength: 2097152 enum: - COUNTER - GAUGE - TIMER default: COUNTER Metric: type: object additionalProperties: false properties: type: $ref: '#/components/schemas/MetricType' key: type: string pattern: ^.{1,2097152} maxLength: 2097152 value: type: number format: float DefaultData: type: object additionalProperties: false properties: names: type: array maxItems: 2097152 items: type: string pattern: ^.{1,2097152} maxLength: 2097152 tensor: $ref: '#/components/schemas/Tensor' ndarray: type: array maxItems: 2097152 items: $ref: '#/components/schemas/AnyValue' tftensor: $ref: '#/components/schemas/TensorflowTensorProto' Feedback: type: object additionalProperties: false properties: request: $ref: '#/components/schemas/SeldonMessage' response: $ref: '#/components/schemas/SeldonMessage' reward: type: number format: float truth: $ref: '#/components/schemas/SeldonMessage' Meta: type: object additionalProperties: false properties: puid: type: string pattern: ^.{1,2097152} maxLength: 2097152 tags: type: object additionalProperties: $ref: '#/components/schemas/AnyValue' example: mytag: myvalue routing: type: object additionalProperties: type: integer format: int32 example: router1: 1 requestPath: type: object additionalProperties: type: string pattern: ^.{1,2097152} maxLength: 2097152 example: classifier: seldonio/mock_classifier:1.0 metrics: type: array maxItems: 2097152 items: $ref: '#/components/schemas/Metric' SeldonMessage: type: object additionalProperties: false properties: status: $ref: '#/components/schemas/Status' meta: $ref: '#/components/schemas/Meta' data: $ref: '#/components/schemas/DefaultData' binData: type: string format: byte pattern: ^.{1,2097152} maxLength: 2097152 strData: type: string pattern: ^.{1,2097152} maxLength: 2097152 SeldonMessageList: type: object additionalProperties: false properties: seldonMessages: type: array maxItems: 2097152 items: $ref: '#/components/schemas/SeldonMessage' Status: type: object additionalProperties: false properties: code: type: integer format: int32 info: type: string pattern: ^.{1,2097152} maxLength: 2097152 reason: type: string pattern: ^.{1,2097152} maxLength: 2097152 status: $ref: '#/components/schemas/StatusStatusFlag' Tensor: type: object additionalProperties: false properties: shape: type: array maxItems: 2097152 items: type: integer format: int32 values: type: array maxItems: 2097152 items: type: number format: double TensorShapeProtoDim: type: object additionalProperties: false properties: size: type: string pattern: ^.{1,2097152} maxLength: 2097152 format: int64 description: Size of the tensor in that dimension. This value must be >= -1, but values of -1 are reserved for "unknown" shapes (values of -1 mean "unknown" dimension). Certain wrappers that work with TensorShapeProto may fail at runtime when deserializing a TensorShapeProto containing a dim value of -1. name: type: string pattern: ^.{1,2097152} maxLength: 2097152 description: Optional name of the tensor dimension. description: One dimension of the tensor. TensorflowDataType: type: string pattern: ^.{1,2097152} maxLength: 2097152 enum: - DT_INVALID - DT_FLOAT - DT_DOUBLE - DT_INT32 - DT_UINT8 - DT_INT16 - DT_INT8 - DT_STRING - DT_COMPLEX64 - DT_INT64 - DT_BOOL - DT_QINT8 - DT_QUINT8 - DT_QINT32 - DT_BFLOAT16 - DT_QINT16 - DT_QUINT16 - DT_UINT16 - DT_COMPLEX128 - DT_HALF - DT_RESOURCE - DT_VARIANT - DT_UINT32 - DT_UINT64 - DT_FLOAT_REF - DT_DOUBLE_REF - DT_INT32_REF - DT_UINT8_REF - DT_INT16_REF - DT_INT8_REF - DT_STRING_REF - DT_COMPLEX64_REF - DT_INT64_REF - DT_BOOL_REF - DT_QINT8_REF - DT_QUINT8_REF - DT_QINT32_REF - DT_BFLOAT16_REF - DT_QINT16_REF - DT_QUINT16_REF - DT_UINT16_REF - DT_COMPLEX128_REF - DT_HALF_REF - DT_RESOURCE_REF - DT_VARIANT_REF - DT_UINT32_REF - DT_UINT64_REF default: DT_INVALID description: '- DT_INVALID: Not a legal value for DataType. Used to indicate a DataType field has not been set. - DT_FLOAT: Data types that all computation devices are expected to be capable to support. - DT_FLOAT_REF: Do not use! These are only for parameters. Every enum above should have a corresponding value below (verified by types_test).' title: LINT.IfChange TensorflowResourceHandleProto: type: object additionalProperties: false properties: device: type: string pattern: ^.{1,2097152} maxLength: 2097152 description: Unique name for the device containing the resource. container: type: string pattern: ^.{1,2097152} maxLength: 2097152 description: Container in which this resource is placed. name: type: string pattern: ^.{1,2097152} maxLength: 2097152 description: Unique name of this resource. hash_code: type: string format: uint64 pattern: ^.{1,2097152} maxLength: 2097152 description: Hash code for the type of the resource. Is only valid in the same device and in the same execution. maybe_type_name: type: string pattern: ^.{1,2097152} maxLength: 2097152 description: For debug-only, the name of the type pointed to by this handle, if available. description: Protocol buffer representing a handle to a tensorflow resource. Handles are not valid across executions, but can be serialized back and forth from within a single run. TensorflowTensorProto: type: object additionalProperties: false properties: dtype: $ref: '#/components/schemas/TensorflowDataType' tensor_shape: $ref: '#/components/schemas/TensorflowTensorShapeProto' description: 'Shape of the tensor. TODO(touts): sort out the 0-rank issues.' version_number: type: integer format: int32 description: 'Version number. In version 0, if the "repeated xxx" representations contain only one element, that element is repeated to fill the shape. This makes it easy to represent a constant Tensor with a single value.' tensor_content: type: string pattern: '.* maxLength: 2097152' format: byte description: Serialized raw tensor content from either Tensor::AsProtoTensorContent or memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation can be used for all tensor types. The purpose of this representation is to reduce serialization overhead during RPC call by avoiding serialization of many repeated small items. half_val: type: array maxItems: 2097152 items: type: integer format: int32 description: DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll have some pointless zero padding for each value here. float_val: type: array maxItems: 2097152 items: type: number format: float description: DT_FLOAT. double_val: type: array maxItems: 2097152 items: type: number format: double description: DT_DOUBLE. int_val: type: array maxItems: 2097152 items: type: integer format: int32 description: DT_INT32, DT_INT16, DT_INT8, DT_UINT8. string_val: type: array maxItems: 2097152 items: type: string pattern: ^.{1,2097152} maxLength: 2097152 format: byte title: DT_STRING scomplex_val: type: array maxItems: 2097152 items: type: number format: float description: DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real and imaginary parts of i-th single precision complex. int64_val: type: array maxItems: 2097152 items: type: string pattern: ^.{1,2097152} maxLength: 2097152 format: int64 title: DT_INT64 bool_val: type: array maxItems: 2097152 items: type: boolean format: boolean title: DT_BOOL dcomplex_val: type: array maxItems: 2097152 items: type: number format: double description: DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real and imaginary parts of i-th double precision complex. resource_handle_val: type: array maxItems: 2097152 items: $ref: '#/components/schemas/TensorflowResourceHandleProto' title: DT_RESOURCE variant_val: type: array maxItems: 2097152 items: $ref: '#/components/schemas/TensorflowVariantTensorDataProto' title: DT_VARIANT uint32_val: type: array maxItems: 2097152 items: type: integer format: int64 title: DT_UINT32 uint64_val: type: array maxItems: 2097152 items: type: string pattern: ^.{1,2097152} maxLength: 2097152 format: uint64 title: DT_UINT64 description: Protocol buffer representing a tensor. TensorflowTensorShapeProto: type: object additionalProperties: false properties: dim: type: array maxItems: 2097152 items: $ref: '#/components/schemas/TensorShapeProtoDim' description: 'Dimensions of the tensor, such as {"input", 30}, {"output", 40} for a 30 x 40 2D tensor. If an entry has size -1, this corresponds to a dimension of unknown size. The names are optional. The order of entries in "dim" matters: It indicates the layout of the values in the tensor in-memory representation. The first entry in "dim" is the outermost dimension used to layout the values, the last entry is the innermost dimension. This matches the in-memory layout of RowMajor Eigen tensors. If "dim.size()" > 0, "unknown_rank" must be false.' unknown_rank: type: boolean format: boolean description: 'If true, the number of dimensions in the shape is unknown. If true, "dim.size()" must be 0.' description: Dimensions of a tensor. TensorflowVariantTensorDataProto: type: object additionalProperties: false properties: type_name: type: string pattern: ^.{1,2097152} maxLength: 2097152 description: Name of the type of objects being serialized. metadata: type: string pattern: ^.{1,2097152} maxLength: 2097152 format: byte description: Portions of the object that are not Tensors. tensors: type: array maxItems: 2097152 items: $ref: '#/components/schemas/TensorflowTensorProto' description: Tensors contained within objects being serialized. description: Protocol buffer representing the serialization format of DT_VARIANT tensors.