UpsertSourceModel
Writes or updates UModel content in batches.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
log:UpsertSourceModel |
update |
*Project
|
None | None |
Request syntax
POST /source-models/upsert HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
No |
The project name. A model belongs to a project. Each project corresponds to one model. |
my-project |
| body |
object |
No |
The request body. The collection of elements to write in this request. This parameter cannot be empty. |
|
| elements |
array<object> |
No |
The list of elements to create or update. Elements with the exact same type, domain, and name are replaced entirely rather than merged field by field. This operation only writes elements and does not delete any elements. |
[{ "kind": "log_set", "metadata": { "name": "orders_log", "domain": "sls" } }] |
|
object |
No |
An individual element, which consists of kind (the element type), metadata (identifying information such as the name and domain), schema (the structure declaration), and spec (the specific definition of the type). |
{ "kind": "log_set", "metadata": { "name": "orders_log", "domain": "sls" } } |
|
|
any |
No |
The components of the element, such as kind, metadata, schema, and spec. |
log_set |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| status |
string |
The status of the operation. If the write operation succeeds, success is returned. A single model supports up to 50,000 elements, and a single request supports up to 2,000 elements. If the limit is exceeded, no elements are written in the current request. |
success |
Examples
Success response
JSON format
{
"status": "success"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.