Change Responsibility
Changes the responsible person of a document
When you need to change a document owner, you can use this method to set up a new responsible person.
When you need to change a document owner, you can use this method to set up a new responsible person. https://docs.codemash.io/api/database/collections/change-responsibility
Collection name - unique, lowercased, collection name without whitespace. E.g., if your collection title you have entered in the CodeMash dashboard is "Business Trips" then collection name would be "business-trips".
The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v2
Accept Header
API key of your cluster. Can be passed in a header as X-CM-Cluster.
ID of your project. Can be passed in a header as X-CM-ProjectId.
Specify culture code when your response from the API should be localised. E.g.: en
Id of a record to change responsibility for
New responsible user for this record
POST //{version}/db/{CollectionName}/responsibility HTTP/1.1
Host: api.codemash.io
Authorization: YOUR_API_KEY
X-CM-ProjectId: text
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 43
"Id='text'&NewResponsibleUserId='text'"
Success
{
"response_status": {
"error_code": "text",
"message": "text",
"stack_trace": "text",
"errors": [
{
"error_code": "text",
"field_name": "text",
"message": "text",
"meta": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
],
"meta": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
},
"result": {
"is_acknowledged": true,
"matched_count": 1,
"modified_count": 1,
"upserted_id": "text"
}
}
Last updated
Was this helpful?