Update Model
- PDF
Update Model
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback!
Overview
The API is used to update a serialized model for a specific master RID.
URL Path
/player/api/model-storing/update-model
Method
A POST request should be performed with the following HTTP Header: Content-Type: application/json.
Authentication Using apiKeyField
The apiKey enables EasySend to use a simple authentication mechanism that authenticates the client against the server. The apiKey must be passed with every API call.
Request Content
Table 1 describes the required request content parameters.
Table 1: Request Content
| Parameter | Type | Optional/Required | Discerption |
| apiKey | string | Required | The API key for the provided environment |
| customerId | string | Required | As given by EasySend |
| masterId | string | Required | The master resource identifier for the model. |
Request Body
{
"serializedModel": {
"field1": "updated_value1",
"field2": "updated_value2",
"nested_object": {
"nested_field": "updated_nested_value"
}
}
}Example Request
curl -X POST "https://api.example.com/player/api/model-storing/update-model?masterRid=ABC123&customerId=customer1" -H "apiKey: your-api-key-here" -H "Content-Type: application/json" -d '{
"serializedModel": {
"field1": "new_value",
"field2": "another_value"
}
}'Success Response (200 OK)
OK - data is updated.
Error Responses
400 Bad Request: Missing required parameters
{
"error": "Missing required parameter: masterRid"
}401 Unauthorized: Invalid API key or customer ID
{
"error": "Unauthorized"
}500 Internal Server Error: Server error (e.g., missing process ID or model fetch failure)
{
"error": "Detailed error description"
}Was this article helpful?