patch

/streams/{owner}/{id}/{streamId}/schema

authorization: oauth2

Set or update a stream’s schema.

The schema of a stream defines its primary key(s) and sort/sequence field.

data.world streams are append-only by default. Alternatively, if a primary key is specified, data.world will replace records with the same primary key value. data.world will sort records by sequence field value and will discard all but the last record appended for each given primary key value.

The updateMethod parameter specifies how data.world should handle existing records when schema is updated. Currently, the only updateMethod supported is TRUNCATED. data.world will discard all records when the schema is updated.

3 Path Parameters

Request Body

Schema
object
primaryKeyFields
array[string]

One or more fields that make up the primary key of a record

sequenceField
string

A numeric or datetime field by which to sort records for the purpose of deduplication.

Numeric fields must fit in a 64-bit signed integer datetime fields must use an ISO-8601 compatible format (https://www.ietf.org/rfc/rfc3339.txt).

updateMethod
string

Specifies how pre-existing records should be affected by a schema change.

required
Allowed Values: TRUNCATE

Responses

OK The request has succeeded.

Schema
object
message
string

Send a Test Request

Path Params
3 path params not set
owner
id
streamId
$$.env
1 variable not set
oauth_access_token