Vald Object APIs

Overview

Object Service is responsible for getting inserted vectors and checking whether vectors are inserted into the vald-agent or not.

service Object {
  rpc Exists(payload.v1.Object.ID) returns (payload.v1.Object.ID) {}

  rpc GetObject(payload.v1.Object.VectorRequest)
      returns (payload.v1.Object.Vector) {}

  rpc StreamGetObject(stream payload.v1.Object.VectorRequest)
      returns (stream payload.v1.Object.StreamVector) {}
}

Exists RPC

Exists RPC is the method to check the a vector exists in the vald-agent.

Input

  • the scheme of payload.v1.Object.ID

    message Object {
        message ID {
            string id = 1 [ (validate.rules).string.min_len = 1 ];
        }
    }
    
    • Object.ID
      fieldtypelabelrequireddesc.
      idstring*the ID of a vector. ID should consist of 1 or more characters.

Output

  • the scheme of payload.v1.Object.ID

    message Object {
        message ID {
            string id = 1 [ (validate.rules).string.min_len = 1 ];
        }
    }
    
    • Object.ID
      fieldtypelabeldesc.
      idstringthe ID of a vector. ID should consist of 1 or more characters.

Status Code

codedesc.
0OK
3INVALID_ARGUMENT
4DEADLINE_EXCEEDED
5NOT_FOUND
13INTERNAL

GetObject RPC

GetObject RPC is the method to get the metadata of a vector inserted into the vald-agent.

Input

  • the scheme of payload.v1.Object.VectorRequest

    message Object {
        message VectorRequest {
          ID id = 1 [ (validate.rules).repeated .min_items = 2 ];
          Filter.Config filters = 2;
        }
    
        message ID {
            string id = 1 [ (validate.rules).string.min_len = 1 ];
        }
    }
    
    • Object.VectorRequest

      fieldtypelabelrequireddesc.
      idObject.ID*the ID of a vector. ID should consist of 1 or more characters.
      filtersFilter.Configconfiguration for filter.
    • Object.ID

      fieldtypelabelrequireddesc.
      idstring*the ID of a vector. ID should consist of 1 or more characters.

Output

  • the scheme of payload.v1.Object.Vector

    message Object {
        message Vector {
            string id = 1 [ (validate.rules).string.min_len = 1 ];
            repeated float vector = 2 [ (validate.rules).repeated .min_items = 2 ];
        }
    }
    
    • Object.Vector
      fieldtypelabeldesc.
      idstringthe ID of a vector. ID should consist of 1 or more characters.
      vectorfloatrepeated(Array[float])the vector data. its dimension is between 2 and 65,536.

Status Code

codedesc.
0OK
3INVALID_ARGUMENT
5NOT_FOUND
13INTERNAL

StreamGetObject RPC

StreamGetObject RPC is the method to get the metadata of multiple exist vectors using the bidirectional streaming RPC.
By using the bidirectional streaming RPC, the GetObject request can be communicated in any order between client and server. Each Upsert request and response are independent.

  • the scheme of payload.v1.Object.VectorRequest stream

    message Object {
        message VectorRequest {
          ID id = 1 [ (validate.rules).repeated .min_items = 2 ];
          Filter.Config filters = 2;
        }
    
        message ID {
            string id = 1 [ (validate.rules).string.min_len = 1 ];
        }
    }
    
    • Object.VectorRequest

      fieldtypelabelrequireddesc.
      idObject.ID*the ID of a vector. ID should consist of 1 or more characters.
      filtersFilter.Configconfiguration for filter.
    • Object.ID

      fieldtypelabelrequireddesc.
      idstring*the ID of a vector. ID should consist of 1 or more characters.

Output

  • the scheme of payload.v1.Object.StreamVector

    message Object {
        message StreamVector {
          oneof payload {
              Vector vector = 1;
              google.rpc.Status status = 2;
          }
        }
        message Vector {
            string id = 1 [ (validate.rules).string.min_len = 1 ];
            repeated float vector = 2 [ (validate.rules).repeated .min_items = 2 ];
        }
    }
    
    • Object.StreamVector

      fieldtypelabeldesc.
      vectorVectorthe information of Object.Vector data.
      statusgoogle.rpc.Statusthe status of google RPC.
    • Object.Vector

      fieldtypelabeldesc.
      idstringthe ID of a vector. ID should consist of 1 or more characters.
      vectorfloatrepeated(Array[float])the vector data. its dimension is between 2 and 65,536.

Status Code

codedesc.
0OK
3INVALID_ARGUMENT
5NOT_FOUND
13INTERNAL

See also