Sync machine learning saved objects Beta

GET /api/ml/saved_objects/sync

Synchronizes Kibana saved objects for machine learning jobs and trained models. 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
    • If a saved object for an anomaly detection job is missing a datafeed identifier, it is added when you run the sync machine learning saved objects API.

      Hide datafeedsAdded attribute Show datafeedsAdded attribute object
      • * object Additional properties

        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.

        Additional properties are allowed.

        Hide * attribute Show * attribute object
        • success boolean

          The success or failure of the synchronization.

    • If a saved object for an anomaly detection job references a datafeed that no longer exists, it is deleted when you run the sync machine learning saved objects API.

      Hide datafeedsRemoved attribute Show datafeedsRemoved attribute object
      • * object Additional properties

        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.

        Additional properties are allowed.

        Hide * attribute Show * attribute object
        • success boolean

          The success or failure of the synchronization.

    • 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.

      Additional properties are allowed.

      Hide savedObjectsCreated attributes Show savedObjectsCreated attributes object
      • If saved objects are missing for anomaly detection jobs, they are created.

        Hide anomaly-detector attribute Show anomaly-detector attribute object
        • * object Additional properties

          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.

          Additional properties are allowed.

          Hide * attribute Show * attribute object
          • success boolean

            The success or failure of the synchronization.

      • If saved objects are missing for data frame analytics jobs, they are created.

        Hide data-frame-analytics attribute Show data-frame-analytics attribute object
        • * object Additional properties

          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.

          Additional properties are allowed.

          Hide * attribute Show * attribute object
          • success boolean

            The success or failure of the synchronization.

      • If saved objects are missing for trained models, they are created.

        Hide trained-model attribute Show trained-model attribute object
        • * object Additional properties

          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.

          Additional properties are allowed.

          Hide * attribute Show * attribute object
          • success boolean

            The success or failure of the synchronization.

    • 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.

      Additional properties are allowed.

      Hide savedObjectsDeleted attributes Show savedObjectsDeleted attributes object
      • If there are saved objects exist for nonexistent anomaly detection jobs, they are deleted.

        Hide anomaly-detector attribute Show anomaly-detector attribute object
        • * object Additional properties

          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.

          Additional properties are allowed.

          Hide * attribute Show * attribute object
          • success boolean

            The success or failure of the synchronization.

      • If there are saved objects exist for nonexistent data frame analytics jobs, they are deleted.

        Hide data-frame-analytics attribute Show data-frame-analytics attribute object
        • * object Additional properties

          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.

          Additional properties are allowed.

          Hide * attribute Show * attribute object
          • success boolean

            The success or failure of the synchronization.

      • If there are saved objects exist for nonexistent trained models, they are deleted.

        Hide trained-model attribute Show trained-model attribute object
        • * object Additional properties

          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.

          Additional properties are allowed.

          Hide * attribute Show * attribute object
          • success boolean

            The success or failure of the synchronization.

  • 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://<KIBANA_URL>/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
}