Links, changes, or unlinks the current Worker for a user.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Put, RequestUri = new Uri("https://example.com/api/workspace/users/example/worker"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"WorkerId\": \"example\", \"ExpectedAssociationVersion\": \"example\", \"OperationId\": \"example\", \"ChangeReason\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/users/example/worker';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"WorkerId":"example","ExpectedAssociationVersion":"example","OperationId":"example","ChangeReason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/workspace/users/example/worker \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "WorkerId": "example", "ExpectedAssociationVersion": "example", "OperationId": "example", "ChangeReason": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Links, changes, or unlinks the current Worker for a workspace user.
object
Target Worker id, or null to unlink.
Expected current association version.
Caller-provided idempotency key.
Optional audit reason.
Examplegenerated
{ "WorkerId": "example", "ExpectedAssociationVersion": "example", "OperationId": "example", "ChangeReason": "example"}Links, changes, or unlinks the current Worker for a workspace user.
object
Target Worker id, or null to unlink.
Expected current association version.
Caller-provided idempotency key.
Optional audit reason.
Examplegenerated
{ "WorkerId": "example", "ExpectedAssociationVersion": "example", "OperationId": "example", "ChangeReason": "example"}Links, changes, or unlinks the current Worker for a workspace user.
object
Target Worker id, or null to unlink.
Expected current association version.
Caller-provided idempotency key.
Optional audit reason.
Examplegenerated
{ "WorkerId": "example", "ExpectedAssociationVersion": "example", "OperationId": "example", "ChangeReason": "example"}Responses
Section titled “Responses”OK
object
Current Work Schedule association projected into a user read model.
object
Field-safe reference to the Worker associated with a workspace user.
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Current Work Schedule association projected into a user read model.
object
Field-safe reference to the Worker associated with a workspace user.
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Current Work Schedule association projected into a user read model.
object
Field-safe reference to the Worker associated with a workspace user.
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Not Found
object
Current Work Schedule association projected into a user read model.
object
Field-safe reference to the Worker associated with a workspace user.
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Conflict
object
Current Work Schedule association projected into a user read model.
object
Field-safe reference to the Worker associated with a workspace user.
object
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}