Update data

POSThttps://zyldb-demo.zyllion.network/api/v1/data/update

info

You may use this test Bearer token we have created for development

eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6bmlsOnRlc3RuZXQ6bmlsbGlvbjF4dnRuM2FhajQ4dGY3bm5zZW16MGQ2OGVwbjZlcHU0ZjRhNG5mYSIsImF1ZCI6ImRpZDpuaWw6dGVzdG5ldDpuaWxsaW9uMXd3c3Jqbmd4dnU5dGMzMzVsajlrM213d3JybDV3M3EyZDB1ZXR6In0.yOKg-wyJdyn9jK-KNtkjbi9PS0pF9wmgVmd7pIeNGhoTjhgZhzB62atbgzE45OGGYx0gUsw_i2k3K2AdFf_tuQ

Update documents within a schema collection that match the given filter.

Supply fields under update using $set to update their value. Example:

{
    "schema": "c48dcfb6-dd97-4ee6-b227-1f6c334685f8",
    "filter": {
        "_id": "f7bca333-b0b9-472a-9649-e17d23f7ccc0"
    },
    "update": {
        "$set": {
            "steps": 100
        }
    }
}

You can find more options on field update operators other than $set, but take care to not alter the schema by removing required fields.

Request

  • application/json

Responses

  • 200

  • 400

  • 401

  • 500

The result of the update operation

  • application/json

  • Schema

  • Example (auto)

  • curl

  • dart

  • go

  • http

  • java

  • javascript

  • kotlin

  • c

  • nodejs

  • objective-c

  • ocaml

  • php

  • powershell

  • python

  • r

  • ruby

  • rust

  • shell

  • swift

  • HTTPCLIENT

  • RESTSHARP

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://zyldb-demo.zyllion.network/api/v1/data/update");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n  \"schema\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"filter\": {}\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

RequestCollapse all

Send API RequestResponseClear

Click the Send API Request button above and see the response here!

Last updated