Overview
This API reference is organized by resource. To perform an operation on a resource, make an RPC call. For more information, see the Yandex Cloud API guidelines.
| Service | Description | Use cases |
|---|---|---|
| DashboardService | Methods for managing dashboards | grpcurl |
Processing mutating operation responses
Any operation changing a resource state has an asynchronous signature. When these operations are called, the server returns the Operation
The Operation object contains operation data, e.g., its status, ID, creation date, etc. You can use it for operation status monitoring. The operation status is displayed in the done field. Once the operation is completed, the done field value changes to true. Currently, all operations are synchronous and return done=true or an error.
An error during an asynchronous operation causes the server to abort all running procedures and add the error description field to the Operation object.
If in response to your request, you receive an Operation object, proceed as follows:
- Check that
done=true. - Check that the
errorfield is empty. - Get the value of the
responsefield.
Error example:
code: 6
message: "ALREADY_EXISTS: Name must be uniq in parentId"
Error handling
If an error occurs, the Monitoring API returns the gRPC status != OK. The response body contains an error description in the following format:
code: <number> error code
message: <string> error message
Error description example:
code: 6
message: "ALREADY_EXISTS: Name must be uniq in parentId"
Currently, there is no fixed list of error codes, so the code field is reserved for use in future Monitoring versions.
Tip
We recommend logging error messages, which will help the support team understand the problems’s cause.
Object update conflicts
To resolve conflicts when updating objects, use the optional etag field that you can provide to the mutating operations and retrieve using the Get method. An object will be updated if it is not modified by another concurrent request, and the operation's etag matches the server value. If an error occurs, get a new etag and retry the operation.
etag: Optional field. If it is not provided, the last-write-wins policy will be in effect.