Sync saved objects in the default space

GET /api/ml/saved_objects/sync

Synchronizes Kibana saved objects for machine learning jobs and trained models in the default space. You must have all privileges for the Machine Learning feature in the Analytics section of the Kibana feature privileges. This API runs automatically when you start Kibana and periodically thereafter.

Query parameters

  • simulate boolean

    When true, simulates the synchronization by returning only the list of actions that would be performed.

Responses

  • 200 application/json; Elastic-Api-Version=2023-10-31

    Indicates a successful call

    Hide response attributes Show response attributes object
    • The sync machine learning saved objects API response contains this object when there are datafeeds affected by the synchronization. There is an object for each relevant datafeed, which contains the synchronization status.

      Hide datafeedsAdded attributes Show datafeedsAdded attributes object
    • The sync machine learning saved objects API response contains this object when there are datafeeds affected by the synchronization. There is an object for each relevant datafeed, which contains the synchronization status.

      Hide datafeedsRemoved attributes Show datafeedsRemoved attributes object
    • If saved objects are missing for machine learning jobs or trained models, they are created when you run the sync machine learning saved objects API.

      Hide savedObjectsCreated attributes Show savedObjectsCreated attributes object
      • The sync machine learning saved objects API response contains this object when there are anomaly detection jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.

        Hide anomaly-detector attributes Show anomaly-detector attributes object
      • The sync machine learning saved objects API response contains this object when there are data frame analytics jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.

        Hide data-frame-analytics attributes Show data-frame-analytics attributes object
      • The sync machine learning saved objects API response contains this object when there are trained models affected by the synchronization. There is an object for each relevant trained model, which contains the synchronization status.

        Hide trained-model attributes Show trained-model attributes object
    • If saved objects exist for machine learning jobs or trained models that no longer exist, they are deleted when you run the sync machine learning saved objects API.

      Hide savedObjectsDeleted attributes Show savedObjectsDeleted attributes object
      • The sync machine learning saved objects API response contains this object when there are anomaly detection jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.

        Hide anomaly-detector attributes Show anomaly-detector attributes object
      • The sync machine learning saved objects API response contains this object when there are data frame analytics jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.

        Hide data-frame-analytics attributes Show data-frame-analytics attributes object
      • The sync machine learning saved objects API response contains this object when there are trained models affected by the synchronization. There is an object for each relevant trained model, which contains the synchronization status.

        Hide trained-model attributes Show trained-model attributes object
  • 401 application/json; Elastic-Api-Version=2023-10-31

    Authorization information is missing or invalid.

    Hide response attributes Show response attributes object
GET /api/ml/saved_objects/sync
curl \
 -X GET https://localhost:5601/api/ml/saved_objects/sync
Response examples (200)
{
  "datafeedsAdded": {},
  "datafeedsRemoved": {},
  "savedObjectsCreated": {
    "anomaly-detector": {
      "myjob1": {
        "success": true
      },
      "myjob2": {
        "success": true
      }
    }
  },
  "savedObjectsDeleted": {}
}
Response examples (401)
{
  "error": "Unauthorized",
  "message": "string",
  "statusCode": 401
}