Skip to main content

Modify a service state

POST 

/services/:service/state

Modify service state

Request

Path Parameters

    service stringrequired

    Fully qualified service name.

Bodyrequired

    versionVersion (string)nullable

    If set, the latest version of the state is compared with this value and the operation will fail when the versions differ.

    object_keyService key (string)required

    To what virtual object key to apply this change

    new_state objectrequired

    The new state to replace the previous state with

    property name* uint8[]

    Possible values: >= 0

  • Array [
  • uint8

    Possible values: >= 0

  • ]

Responses

Accepted

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://dcfdf86c.documentation-beg.pages.dev/services/:service/state");
var content = new StringContent("{\n \"version\": \"string\",\n \"object_key\": \"string\",\n \"new_state\": {}\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Parameters
— pathrequired
Body required
{
  "version": "string",
  "object_key": "string",
  "new_state": {}
}