younifyd
Menu

Add an object reference (POST /v1/objects/{className}/{id}/references/{propertyName})

Add an object reference

POST/v1/objects/{className}/{id}/references/{propertyName}

Use it in a workflow

  1. Add a step and choose the Weaviate connector.
  2. Pick the Add an object reference (POST /v1/objects/{className}/{id}/references/{propertyName}) action (under objects).
  3. Fill in the fields below, then reference the result from later steps as {{addAnObjectReferencePostV1ObjectsClassnameIdReferencesPropertyname.response.data}}.

Request

Path parameters

classNamestringrequired

Name of the collection (class) the source object belongs to.

idstring (uuid)required

Unique UUID of the source object.

propertyNamestringrequired

Unique name of the reference property of the source object.

Query parameters

consistency_levelstring

Determines how many replicas must acknowledge a request before it is considered successful.

tenantstring

Specifies the tenant in a request targeting a multi-tenant collection (class).

Request body

Enter the body as JSON in the step's Body field.

classstring (uri)

If using a concept reference (rather than a direct reference), specify the desired collection (class) name here.

schemaobject

Names and values of an individual property. A returned response may also contain additional metadata, such as from classification or feature projection.

beaconstring (uri)

If using a direct reference, specify the URI to point to the cross-reference here. Should be in the form of weaviate://localhost/<uuid> for the example of a local cross-reference to an object

hrefstring (uri)

If using a direct reference, this read-only fields provides a link to the referenced resource. If 'origin' is globally configured, an absolute URI is shown - a relative URI otherwise.

classificationobject

This meta field contains additional info about the classified reference property

overallCountnumber (int64)

overall neighbors checked as part of the classification. In most cases this will equal k, but could be lower than k - for example if not enough data was present

winningCountnumber (int64)

size of the winning group, a number between 1..k

losingCountnumber (int64)

size of the losing group, can be 0 if the winning group size equals k

closestOverallDistancenumber (float32)

The lowest distance of any neighbor, regardless of whether they were in the winning or losing group

winningDistancenumber (float32)

deprecated - do not use, to be removed in 0.23.0

meanWinningDistancenumber (float32)

Mean distance of all neighbors from the winning group

closestWinningDistancenumber (float32)

Closest distance of a neighbor from the winning group

closestLosingDistancenumber (float32)

The lowest distance of a neighbor in the losing group. Optional. If k equals the size of the winning group, there is no losing group

losingDistancenumber (float32)

deprecated - do not use, to be removed in 0.23.0

meanLosingDistancenumber (float32)

Mean distance of all neighbors from the losing group. Optional. If k equals the size of the winning group, there is no losing group.

json
{
  "class": "string",
  "schema": {},
  "beacon": "string",
  "href": "string",
  "classification": {
    "overallCount": 0,
    "winningCount": 0,
    "losingCount": 0,
    "closestOverallDistance": 0,
    "winningDistance": 0,
    "meanWinningDistance": 0,
    "closestWinningDistance": 0,
    "closestLosingDistance": 0,
    "losingDistance": 0,
    "meanLosingDistance": 0
  }
}

Response

Returns 200 with a any. Read it in later steps with {{addAnObjectReferencePostV1ObjectsClassnameIdReferencesPropertyname.response.data.<field>}}.

Need more? See the Weaviate guide for connection setup and behaviour shared by every action.