Modify a service state
POST/services/:service/state
Modify service state
Request
Path Parameters
service stringrequired
Fully qualified service name.
- application/json
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
Responses
- 202
- 400
- 403
- 404
- 409
- 500
- 503
Accepted
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
restate_codeRestate code (string)nullable
Restate error code describing this error
{
"message": "string",
"restate_code": "string"
}
- csharp
- 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://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());