{
  "swagger": "2.0",
  "info": {
    "title": "Asset service",
    "version": "0.1507.0",
    "description": "Send your API key as a bearer token: `Authorization: Bearer <api key>`."
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Your API key as a bearer token: `Authorization: Bearer <api key>`."
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/scout/v1/asset": {
      "post": {
        "operationId": "AssetService_createAsset",
        "summary": "Create asset",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "details",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateAssetRequest"
            },
            "required": true,
            "x-example": {
              "title": "<title>"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Asset"
            },
            "x-example": {
              "rid": "<asset rid>",
              "title": "<title>",
              "description": "<description>",
              "properties": {
                "<key>": "<property value>"
              },
              "typedProperties": {
                "<key>": {
                  "type": "stringValue",
                  "stringValue": "<property value>"
                }
              },
              "labels": [
                "<label>"
              ],
              "links": [
                {
                  "title": "<title>",
                  "url": "<url>"
                }
              ],
              "dataScopes": [
                {
                  "dataScopeName": "<data source ref name>",
                  "dataSource": {
                    "type": "dataset",
                    "dataset": "<dataset rid>"
                  },
                  "offset": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "timestampType": "ABSOLUTE",
                  "seriesTags": {
                    "<key>": "<tag value>"
                  }
                }
              ],
              "createdBy": "<created by>",
              "createdAt": "2026-01-01T00:00:00Z",
              "updatedAt": "2026-01-01T00:00:00Z",
              "attachments": [
                "<attachment rid>"
              ],
              "types": [
                "<type rid>"
              ],
              "isStaged": true,
              "isArchived": true,
              "datasetRid": "<dataset rid>"
            }
          }
        }
      }
    },
    "/scout/v1/asset/{rid}": {
      "put": {
        "operationId": "AssetService_updateAsset",
        "summary": "Update asset",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid",
            "required": true
          },
          {
            "name": "details",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateAssetRequest"
            },
            "required": true,
            "x-example": {
              "title": "<title>",
              "description": "<description>",
              "properties": {
                "<key>": "<property value>"
              },
              "typedProperties": {
                "<key>": {
                  "type": "stringValue",
                  "stringValue": "<property value>"
                }
              },
              "labels": [
                "<label>"
              ],
              "links": [
                {
                  "url": "<url>"
                }
              ],
              "dataScopes": [
                {
                  "dataScopeName": "<data source ref name>",
                  "dataSource": {
                    "type": "dataset",
                    "dataset": "<dataset rid>"
                  }
                }
              ],
              "types": [
                "<type rid>"
              ],
              "isStaged": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Asset"
            },
            "x-example": {
              "rid": "<asset rid>",
              "title": "<title>",
              "description": "<description>",
              "properties": {
                "<key>": "<property value>"
              },
              "typedProperties": {
                "<key>": {
                  "type": "stringValue",
                  "stringValue": "<property value>"
                }
              },
              "labels": [
                "<label>"
              ],
              "links": [
                {
                  "title": "<title>",
                  "url": "<url>"
                }
              ],
              "dataScopes": [
                {
                  "dataScopeName": "<data source ref name>",
                  "dataSource": {
                    "type": "dataset",
                    "dataset": "<dataset rid>"
                  },
                  "offset": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "timestampType": "ABSOLUTE",
                  "seriesTags": {
                    "<key>": "<tag value>"
                  }
                }
              ],
              "createdBy": "<created by>",
              "createdAt": "2026-01-01T00:00:00Z",
              "updatedAt": "2026-01-01T00:00:00Z",
              "attachments": [
                "<attachment rid>"
              ],
              "types": [
                "<type rid>"
              ],
              "isStaged": true,
              "isArchived": true,
              "datasetRid": "<dataset rid>"
            }
          }
        }
      }
    },
    "/scout/v1/asset/{assetRid}/data-sources": {
      "post": {
        "operationId": "AssetService_addDataScopesToAsset",
        "summary": "Add data scopes to asset",
        "tags": [
          "Asset Service"
        ],
        "description": "Adds data scopes to an asset.\n\nThrows if the asset already has data scopes with data scope names matching those in the request.",
        "parameters": [
          {
            "name": "assetRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid",
            "required": true
          },
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/AddDataScopesToAssetRequest"
            },
            "required": true,
            "x-example": {
              "dataScopes": [
                {
                  "dataScopeName": "<data source ref name>",
                  "dataSource": {
                    "type": "dataset",
                    "dataset": "<dataset rid>"
                  }
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Asset"
            },
            "x-example": {
              "rid": "<asset rid>",
              "title": "<title>",
              "description": "<description>",
              "properties": {
                "<key>": "<property value>"
              },
              "typedProperties": {
                "<key>": {
                  "type": "stringValue",
                  "stringValue": "<property value>"
                }
              },
              "labels": [
                "<label>"
              ],
              "links": [
                {
                  "title": "<title>",
                  "url": "<url>"
                }
              ],
              "dataScopes": [
                {
                  "dataScopeName": "<data source ref name>",
                  "dataSource": {
                    "type": "dataset",
                    "dataset": "<dataset rid>"
                  },
                  "offset": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "timestampType": "ABSOLUTE",
                  "seriesTags": {
                    "<key>": "<tag value>"
                  }
                }
              ],
              "createdBy": "<created by>",
              "createdAt": "2026-01-01T00:00:00Z",
              "updatedAt": "2026-01-01T00:00:00Z",
              "attachments": [
                "<attachment rid>"
              ],
              "types": [
                "<type rid>"
              ],
              "isStaged": true,
              "isArchived": true,
              "datasetRid": "<dataset rid>"
            }
          }
        }
      }
    },
    "/scout/v1/asset/multiple": {
      "post": {
        "operationId": "AssetService_getAssets",
        "summary": "Get assets",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "rids",
            "in": "body",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "rid",
                "x-alias": "AssetRid"
              },
              "uniqueItems": true,
              "example": [
                "<asset rid>"
              ]
            },
            "required": false,
            "x-example": [
              "<asset rid>"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/definitions/Asset"
              },
              "x-map-key": "AssetRid"
            },
            "x-example": {
              "<key>": {
                "rid": "<asset rid>",
                "title": "<title>",
                "description": "<description>",
                "properties": {
                  "<key>": "<property value>"
                },
                "typedProperties": {
                  "<key>": {
                    "type": "stringValue",
                    "stringValue": "<property value>"
                  }
                },
                "labels": [
                  "<label>"
                ],
                "links": [
                  {
                    "title": "<title>",
                    "url": "<url>"
                  }
                ],
                "dataScopes": [
                  {
                    "dataScopeName": "<data source ref name>",
                    "dataSource": {
                      "type": "dataset",
                      "dataset": "<dataset rid>"
                    },
                    "offset": {
                      "seconds": 1,
                      "nanos": 1
                    },
                    "timestampType": "ABSOLUTE",
                    "seriesTags": {
                      "<key>": "<tag value>"
                    }
                  }
                ],
                "createdBy": "<created by>",
                "createdAt": "2026-01-01T00:00:00Z",
                "updatedAt": "2026-01-01T00:00:00Z",
                "attachments": [
                  "<attachment rid>"
                ],
                "types": [
                  "<type rid>"
                ],
                "isStaged": true,
                "isArchived": true,
                "datasetRid": "<dataset rid>"
              }
            }
          }
        }
      }
    },
    "/scout/v1/asset/by-data-source/{dataSourceRid}": {
      "post": {
        "operationId": "AssetService_getAssetsByDataSource",
        "summary": "Get assets by data source",
        "tags": [
          "Asset Service"
        ],
        "description": "Returns all assets with given data source as a data scope.",
        "parameters": [
          {
            "name": "dataSourceRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "DataSourceRid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Asset"
              },
              "uniqueItems": true
            },
            "x-example": [
              {
                "rid": "<asset rid>",
                "title": "<title>",
                "description": "<description>",
                "properties": {
                  "<key>": "<property value>"
                },
                "typedProperties": {
                  "<key>": {
                    "type": "stringValue",
                    "stringValue": "<property value>"
                  }
                },
                "labels": [
                  "<label>"
                ],
                "links": [
                  {
                    "title": "<title>",
                    "url": "<url>"
                  }
                ],
                "dataScopes": [
                  {
                    "dataScopeName": "<data source ref name>",
                    "dataSource": {
                      "type": "dataset",
                      "dataset": "<dataset rid>"
                    },
                    "offset": {
                      "seconds": 1,
                      "nanos": 1
                    },
                    "timestampType": "ABSOLUTE",
                    "seriesTags": {
                      "<key>": "<tag value>"
                    }
                  }
                ],
                "createdBy": "<created by>",
                "createdAt": "2026-01-01T00:00:00Z",
                "updatedAt": "2026-01-01T00:00:00Z",
                "attachments": [
                  "<attachment rid>"
                ],
                "types": [
                  "<type rid>"
                ],
                "isStaged": true,
                "isArchived": true,
                "datasetRid": "<dataset rid>"
              }
            ]
          }
        }
      }
    },
    "/scout/v1/archive/{rid}": {
      "post": {
        "operationId": "AssetService_archive",
        "summary": "Archive",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid",
            "required": true
          },
          {
            "name": "includeLinkedWorkbooks",
            "in": "query",
            "type": "boolean",
            "required": false,
            "description": "If true, all workbooks that are linked to the asset and associated runs will be archived as well. Defaults to false."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/scout/v1/unarchive/{rid}": {
      "post": {
        "operationId": "AssetService_unarchive",
        "summary": "Unarchive",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid",
            "required": true
          },
          {
            "name": "includeLinkedWorkbooks",
            "in": "query",
            "type": "boolean",
            "required": false,
            "description": "If true, all auto-archived workbooks that are linked to the asset and associated runs will be unarchived as well. Defaults to false."
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/scout/v1/search-assets": {
      "post": {
        "operationId": "AssetService_searchAssets",
        "summary": "Search assets",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "searchAssetsRequest",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/SearchAssetsRequest"
            },
            "required": true,
            "x-example": {
              "sort": {
                "isDescending": true
              },
              "query": {
                "type": "searchText",
                "searchText": "<search text>"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SearchAssetsResponse"
            },
            "x-example": {
              "results": [
                {
                  "rid": "<asset rid>",
                  "title": "<title>",
                  "description": "<description>",
                  "properties": {
                    "<key>": "<property value>"
                  },
                  "typedProperties": {
                    "<key>": {
                      "type": "stringValue",
                      "stringValue": "<property value>"
                    }
                  },
                  "labels": [
                    "<label>"
                  ],
                  "links": [
                    {
                      "title": "<title>",
                      "url": "<url>"
                    }
                  ],
                  "dataScopes": [
                    {
                      "dataScopeName": "<data source ref name>",
                      "dataSource": {
                        "type": "dataset",
                        "dataset": "<dataset rid>"
                      },
                      "offset": {
                        "seconds": 1,
                        "nanos": 1
                      },
                      "timestampType": "ABSOLUTE",
                      "seriesTags": {
                        "<key>": "<tag value>"
                      }
                    }
                  ],
                  "createdBy": "<created by>",
                  "createdAt": "2026-01-01T00:00:00Z",
                  "updatedAt": "2026-01-01T00:00:00Z",
                  "attachments": [
                    "<attachment rid>"
                  ],
                  "types": [
                    "<type rid>"
                  ],
                  "isStaged": true,
                  "isArchived": true,
                  "datasetRid": "<dataset rid>"
                }
              ],
              "nextPageToken": "<token>",
              "totalCount": 1
            }
          }
        }
      }
    },
    "/scout/v1/asset/metadata/batch-edit": {
      "post": {
        "operationId": "AssetService_batchEditAssetMetadata",
        "summary": "Batch edit asset metadata",
        "tags": [
          "Asset Service"
        ],
        "description": "Batch edits metadata across multiple assets. Supports rename/merge for labels and properties. If more than 1000 assets are targeted, this endpoint will throw a 400.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/BatchEditAssetMetadataRequest"
            },
            "required": true,
            "x-example": {
              "operation": {
                "type": "renameLabel",
                "renameLabel": {
                  "target": "<label>"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchEditAssetMetadataResponse"
            },
            "x-example": {
              "modifiedAssetRids": [
                "<asset rid>"
              ],
              "conflictingAssetRids": [
                "<asset rid>"
              ]
            }
          }
        }
      }
    },
    "/scout/v1/search-types": {
      "post": {
        "operationId": "AssetService_searchTypes",
        "summary": "Search types",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "searchTypesRequest",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/SearchTypesRequest"
            },
            "required": true,
            "x-example": {
              "sort": {
                "isDescending": true,
                "field": "CREATED_AT"
              },
              "query": {
                "type": "searchText",
                "searchText": "<search text>"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SearchTypesResponse"
            },
            "x-example": {
              "results": [
                {
                  "rid": "<type rid>",
                  "name": "<name>",
                  "description": "<description>",
                  "propertyConfigs": {
                    "<key>": {
                      "requirement": "REQUIRED",
                      "valueType": "STRING"
                    }
                  },
                  "createdAt": "2026-01-01T00:00:00Z",
                  "iconName": "<icon name>",
                  "primaryKey": "<property name>",
                  "isArchived": true,
                  "dataRequirements": {
                    "type": "series",
                    "series": {
                      "series": [
                        {
                          "name": "<channel>",
                          "type": "NUMERIC"
                        }
                      ]
                    }
                  }
                }
              ],
              "nextPageToken": "<token>"
            }
          }
        }
      }
    },
    "/scout/v1/asset/{rid}/attachments": {
      "post": {
        "operationId": "AssetService_updateAssetAttachments",
        "summary": "Update asset attachments",
        "tags": [
          "Asset Service"
        ],
        "description": "Update the attachments associated with an asset.",
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid",
            "required": true
          },
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateAttachmentsRequest"
            },
            "required": true,
            "x-example": {
              "attachmentsToAdd": [
                "<attachment rid>"
              ],
              "attachmentsToRemove": [
                "<attachment rid>"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/scout/v1/asset/{rid}/ref-names": {
      "post": {
        "operationId": "AssetService_updateAssetRefNames",
        "summary": "Update asset ref names",
        "tags": [
          "Asset Service"
        ],
        "description": "Update the ref names for the data scopes on the asset. This update will also be applied on all associated workbooks.",
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid",
            "required": true
          },
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateAssetRefNamesRequest"
            },
            "required": true,
            "x-example": {
              "dataScopeRefNameUpdates": {
                "<key>": "<data source ref name>"
              }
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/scout/v1/type": {
      "post": {
        "operationId": "AssetService_createType",
        "summary": "Create type",
        "tags": [
          "Asset Service"
        ],
        "description": "Creates a new type.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateTypeRequest"
            },
            "required": true,
            "x-example": {
              "name": "<name>",
              "primaryKey": "<property name>"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Type"
            },
            "x-example": {
              "rid": "<type rid>",
              "name": "<name>",
              "description": "<description>",
              "propertyConfigs": {
                "<key>": {
                  "requirement": "REQUIRED",
                  "valueType": "STRING"
                }
              },
              "createdAt": "2026-01-01T00:00:00Z",
              "iconName": "<icon name>",
              "primaryKey": "<property name>",
              "isArchived": true,
              "dataRequirements": {
                "type": "series",
                "series": {
                  "series": [
                    {
                      "name": "<channel>",
                      "type": "NUMERIC"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/scout/v1/type/{typeRid}": {
      "put": {
        "operationId": "AssetService_updateType",
        "summary": "Update type",
        "tags": [
          "Asset Service"
        ],
        "description": "Updates a type. Will throw unless all assets that reference the type pass the updated type check. A property or primary-key change throws TooManyActiveTypeMembers when the type has more active members than that check can scan.",
        "parameters": [
          {
            "name": "typeRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid",
            "required": true
          },
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateTypeRequest"
            },
            "required": true,
            "x-example": {
              "name": "<name>",
              "primaryKey": "<property name>",
              "propertyConfigs": {
                "<key>": {
                  "requirement": "REQUIRED",
                  "valueType": "STRING"
                }
              },
              "dataRequirements": {
                "type": "series",
                "series": {
                  "series": [
                    {
                      "name": "<channel>",
                      "type": "NUMERIC"
                    }
                  ]
                }
              },
              "description": "<description>",
              "iconName": "<icon name>"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Type"
            },
            "x-example": {
              "rid": "<type rid>",
              "name": "<name>",
              "description": "<description>",
              "propertyConfigs": {
                "<key>": {
                  "requirement": "REQUIRED",
                  "valueType": "STRING"
                }
              },
              "createdAt": "2026-01-01T00:00:00Z",
              "iconName": "<icon name>",
              "primaryKey": "<property name>",
              "isArchived": true,
              "dataRequirements": {
                "type": "series",
                "series": {
                  "series": [
                    {
                      "name": "<channel>",
                      "type": "NUMERIC"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/scout/v1/type/multiple": {
      "post": {
        "operationId": "AssetService_getTypes",
        "summary": "Get types",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "rids",
            "in": "body",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "rid",
                "x-alias": "TypeRid"
              },
              "uniqueItems": true,
              "example": [
                "<type rid>"
              ]
            },
            "required": false,
            "x-example": [
              "<type rid>"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/definitions/Type"
              },
              "x-map-key": "TypeRid"
            },
            "x-example": {
              "<key>": {
                "rid": "<type rid>",
                "name": "<name>",
                "description": "<description>",
                "propertyConfigs": {
                  "<key>": {
                    "requirement": "REQUIRED",
                    "valueType": "STRING"
                  }
                },
                "createdAt": "2026-01-01T00:00:00Z",
                "iconName": "<icon name>",
                "primaryKey": "<property name>",
                "isArchived": true,
                "dataRequirements": {
                  "type": "series",
                  "series": {
                    "series": [
                      {
                        "name": "<channel>",
                        "type": "NUMERIC"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/scout/v1/type/{rid}": {
      "delete": {
        "operationId": "AssetService_deleteType",
        "summary": "Delete type",
        "tags": [
          "Asset Service"
        ],
        "description": "Deletes a type. The type must not be referenced by any assets.",
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/scout/v1/type/archive/{rid}": {
      "post": {
        "operationId": "AssetService_archiveType",
        "summary": "Archive type",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/scout/v1/type/unarchive/{rid}": {
      "post": {
        "operationId": "AssetService_unarchiveType",
        "summary": "Unarchive type",
        "tags": [
          "Asset Service"
        ],
        "parameters": [
          {
            "name": "rid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    }
  },
  "definitions": {
    "ArchivedStatus": {
      "type": "string",
      "enum": [
        "NOT_ARCHIVED",
        "ARCHIVED"
      ]
    },
    "NumericPropertyPredicate": {
      "description": "Matches resources that have a numeric value for the named property and whose value satisfies the operator. NEQ excludes resources that lack the property or store a string value under the same name.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "value": {
          "type": "number",
          "format": "double"
        },
        "operator": {
          "$ref": "#/definitions/PropertyComparisonOperator"
        }
      },
      "required": [
        "name",
        "value",
        "operator"
      ]
    },
    "NumericPropertyRangeOperator": {
      "type": "string",
      "enum": [
        "BETWEEN",
        "NOT_BETWEEN"
      ]
    },
    "NumericPropertyRangePredicate": {
      "description": "Inclusive range on a numeric property. At least one bound is required. BETWEEN: min <= x <= max. An absent bound is unbounded on that side. NOT_BETWEEN: x < min OR x > max. An absent bound drops that side. Both operators require a numeric value for `name`. Missing properties and string values never match. Bounds are closed [min, max] to match the number chip (is between / is not between), not half-open.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "min": {
          "type": "number",
          "format": "double"
        },
        "max": {
          "type": "number",
          "format": "double"
        },
        "operator": {
          "$ref": "#/definitions/NumericPropertyRangeOperator"
        }
      },
      "required": [
        "name",
        "operator"
      ]
    },
    "Property": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "value": {
          "type": "string",
          "x-alias": "PropertyValue"
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "PropertyComparisonOperator": {
      "type": "string",
      "enum": [
        "EQ",
        "NEQ",
        "GT",
        "GTE",
        "LT",
        "LTE"
      ]
    },
    "SetOperator": {
      "type": "string",
      "enum": [
        "AND",
        "OR"
      ]
    },
    "TypedPropertyValue": {
      "description": "Typed metadata value. Additional variants may be added as property types expand.\n\nSet `type` to the name of one of the other fields, and set only that field.",
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "stringValue",
            "numericValue"
          ]
        },
        "stringValue": {
          "type": "string",
          "x-alias": "PropertyValue"
        },
        "numericValue": {
          "type": "number",
          "format": "double"
        }
      },
      "required": [
        "type"
      ],
      "example": {
        "type": "stringValue",
        "stringValue": "string"
      }
    },
    "AddDataScopesToAssetRequest": {
      "type": "object",
      "properties": {
        "dataScopes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreateAssetDataScope"
          },
          "uniqueItems": true,
          "description": "The data scopes to add to the asset.\n\nThrows if any existing data scopes have data scope names that conflict with the data scope names in the request."
        }
      },
      "example": {
        "dataScopes": [
          {
            "dataScopeName": "<data source ref name>",
            "dataSource": {
              "type": "dataset",
              "dataset": "<dataset rid>"
            }
          }
        ]
      }
    },
    "Asset": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "AssetRid"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "x-map-key": "PropertyName",
          "x-deprecated": "use typedProperties"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          },
          "x-map-key": "PropertyName"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true,
          "description": "Labels associated with the asset. These labels do not have a time dimension. To associate labels with a range of time, create a time range on the asset with labels."
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Link"
          },
          "description": "Links associated with the asset. These links do not have a time dimension. To associate links with a range of time, create a time range on the asset with links."
        },
        "dataScopes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DataScope"
          },
          "description": "The data scopes associated with the asset."
        },
        "createdBy": {
          "type": "string",
          "format": "rid"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AttachmentRid"
          },
          "uniqueItems": true
        },
        "types": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid"
          },
          "uniqueItems": true,
          "description": "Types attached to the asset. At most 10."
        },
        "isStaged": {
          "type": "boolean",
          "description": "Auto created assets are considered staged by default."
        },
        "isArchived": {
          "type": "boolean"
        },
        "datasetRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "DatasetRid",
          "description": "The dataset that backs this asset's data. Present when created with datasetRid. May be absent for legacy assets without representable scopes."
        }
      },
      "required": [
        "rid",
        "title",
        "createdAt",
        "updatedAt",
        "isStaged",
        "isArchived"
      ]
    },
    "AssetSortField": {
      "type": "string",
      "enum": [
        "NAME",
        "CREATED_AT",
        "MOST_RECENT_RUN_START"
      ]
    },
    "AssetSortOptions": {
      "type": "object",
      "properties": {
        "isDescending": {
          "type": "boolean"
        },
        "field": {
          "allOf": [
            {
              "$ref": "#/definitions/AssetSortField"
            }
          ],
          "x-deprecated": "use SortKey with SortField union type instead"
        },
        "sortKey": {
          "allOf": [
            {
              "$ref": "#/definitions/SortKey"
            }
          ],
          "description": "Field to sort by. Includes both field and property-based sorting. Must be supplied if field is not provided separately."
        }
      },
      "required": [
        "isDescending"
      ]
    },
    "AssetTypesFilter": {
      "description": "Matches an asset when any of its types is in assetTypes.",
      "type": "object",
      "properties": {
        "assetTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid"
          }
        }
      }
    },
    "BatchEditAssetMetadataRequest": {
      "type": "object",
      "properties": {
        "assetSearchQuery": {
          "allOf": [
            {
              "$ref": "#/definitions/SearchAssetsQuery"
            }
          ],
          "description": "Additional search query to filter which assets are targeted by the edit. Source labels/properties from the metadata change are automatically included as filters."
        },
        "operation": {
          "$ref": "#/definitions/MetadataChange"
        }
      },
      "required": [
        "operation"
      ],
      "example": {
        "operation": {
          "type": "renameLabel",
          "renameLabel": {
            "target": "<label>"
          }
        }
      }
    },
    "BatchEditAssetMetadataResponse": {
      "type": "object",
      "properties": {
        "modifiedAssetRids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid"
          },
          "description": "RIDs for assets that were modified by the batch edit."
        },
        "conflictingAssetRids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AssetRid"
          },
          "description": "RIDs for assets that matched the source filter but already had the target property key and were skipped (SkipOnConflict behavior). Empty for operations without conflict semantics or when using OverwriteOnConflict."
        }
      }
    },
    "CreateAssetDataScope": {
      "type": "object",
      "properties": {
        "dataScopeName": {
          "type": "string",
          "x-alias": "DataSourceRefName",
          "description": "The name of the data scope. The name is guaranteed to be be unique within the context of an asset."
        },
        "dataSource": {
          "$ref": "#/definitions/DataSource"
        },
        "offset": {
          "$ref": "#/definitions/Duration"
        },
        "seriesTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "TagValue"
          },
          "x-map-key": "TagName",
          "description": "Filters the data source to series matching these tag values. The filtered set of series should be the ones that belong to the asset."
        }
      },
      "required": [
        "dataScopeName",
        "dataSource"
      ]
    },
    "CreateAssetRequest": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "datasetRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "DatasetRid",
          "description": "Dataset to back this asset. Must be readable and in the asset's workspace. Composition datasets attach directly and must not already back another asset. Raw datasets are wrapped in a new composition dataset; the source remains unchanged. The response datasetRid identifies the backing dataset, which may differ from this RID. Mutually exclusive with nonempty dataScopes. Omit to use legacy scope-based creation."
        },
        "description": {
          "type": "string"
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "x-map-key": "PropertyName",
          "x-deprecated": "use typedProperties"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          },
          "x-map-key": "PropertyName"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Link"
          }
        },
        "dataScopes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreateAssetDataScope"
          },
          "uniqueItems": true,
          "description": "The data scopes associated with the asset."
        },
        "attachments": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AttachmentRid"
          },
          "uniqueItems": true
        },
        "types": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid"
          },
          "uniqueItems": true,
          "description": "Types to attach to the asset. Empty attaches none. At most 10 types."
        },
        "workspace": {
          "type": "string",
          "format": "rid",
          "x-alias": "WorkspaceRid",
          "description": "The workspace in which to create the asset. If not provided, the asset will be created in the default workspace for the user's organization, if the default workspace for the organization is configured. All data scopes, attachments, and asset types must be in the same workspace."
        }
      },
      "required": [
        "title"
      ],
      "example": {
        "title": "<title>"
      }
    },
    "CreateTypeRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "primaryKey": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "propertyConfigs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/PropertyConfig"
          },
          "x-map-key": "PropertyName"
        },
        "description": {
          "type": "string"
        },
        "iconName": {
          "type": "string"
        },
        "workspace": {
          "type": "string",
          "format": "rid",
          "x-alias": "WorkspaceRid",
          "description": "The workspace in which to create the asset type. If not provided, the asset type will be created in the default workspace for the user's organization, if the default workspace for the organization is configured."
        },
        "dataRequirements": {
          "allOf": [
            {
              "$ref": "#/definitions/DataRequirements"
            }
          ],
          "description": "Requirements on the data of assets of this type."
        }
      },
      "required": [
        "name",
        "primaryKey"
      ],
      "example": {
        "name": "<name>",
        "primaryKey": "<property name>"
      }
    },
    "DataRequirements": {
      "description": "The requirements on the data of assets of a type. Clients should treat an unknown variant as requirements they cannot display: it is a kind added after the client was built.\n\nSet `type` to the name of one of the other fields, and set only that field.",
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "series"
          ]
        },
        "series": {
          "$ref": "#/definitions/SeriesRequirements"
        }
      },
      "required": [
        "type"
      ],
      "example": {
        "type": "series",
        "series": {
          "series": [
            {
              "name": "string",
              "type": "NUMERIC"
            }
          ]
        }
      }
    },
    "DataScope": {
      "type": "object",
      "properties": {
        "dataScopeName": {
          "type": "string",
          "x-alias": "DataSourceRefName",
          "description": "The name of the data scope. The name is guaranteed to be be unique within the context of an asset."
        },
        "dataSource": {
          "$ref": "#/definitions/DataSource"
        },
        "offset": {
          "$ref": "#/definitions/Duration"
        },
        "timestampType": {
          "$ref": "#/definitions/WeakTimestampType"
        },
        "seriesTags": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "TagValue"
          },
          "x-map-key": "TagName",
          "description": "Filters the data source to series matching these tag values. The filtered set of series should be the ones that belong to the asset."
        }
      },
      "required": [
        "dataScopeName",
        "dataSource",
        "timestampType"
      ]
    },
    "PropertyConfig": {
      "type": "object",
      "properties": {
        "requirement": {
          "$ref": "#/definitions/PropertyRequirement"
        },
        "valueType": {
          "$ref": "#/definitions/PropertyValueType"
        }
      },
      "required": [
        "requirement",
        "valueType"
      ]
    },
    "PropertyRequirement": {
      "type": "string",
      "enum": [
        "REQUIRED",
        "SUGGESTED"
      ]
    },
    "PropertyValueType": {
      "type": "string",
      "enum": [
        "STRING",
        "NUMBER"
      ]
    },
    "SearchAssetsQuery": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "searchText",
            "exactSubstring",
            "label",
            "labels",
            "property",
            "propertyKey",
            "properties",
            "numericProperty",
            "numericPropertyRange",
            "typeRid",
            "assetTypes",
            "isStaged",
            "archived",
            "and",
            "or",
            "not",
            "workspace"
          ]
        },
        "searchText": {
          "type": "string"
        },
        "exactSubstring": {
          "type": "string",
          "description": "An case-insensitive substring match of the title or description of the asset."
        },
        "label": {
          "type": "string",
          "x-alias": "Label",
          "x-deprecated": "use labels instead"
        },
        "labels": {
          "$ref": "#/definitions/LabelsFilter"
        },
        "property": {
          "allOf": [
            {
              "$ref": "#/definitions/Property"
            }
          ],
          "x-deprecated": "use properties"
        },
        "propertyKey": {
          "type": "string",
          "x-alias": "PropertyName",
          "description": "Matches assets that have a property with this key, regardless of value."
        },
        "properties": {
          "$ref": "#/definitions/PropertiesFilter"
        },
        "numericProperty": {
          "allOf": [
            {
              "$ref": "#/definitions/NumericPropertyPredicate"
            }
          ],
          "description": "Matches assets using a numeric property comparison."
        },
        "numericPropertyRange": {
          "allOf": [
            {
              "$ref": "#/definitions/NumericPropertyRangePredicate"
            }
          ],
          "description": "Matches assets using an inclusive numeric property range."
        },
        "typeRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "TypeRid",
          "x-deprecated": "use assetTypes"
        },
        "assetTypes": {
          "$ref": "#/definitions/AssetTypesFilter"
        },
        "isStaged": {
          "type": "boolean",
          "x-deprecated": "staged assets are no longer returned in the search endpoint"
        },
        "archived": {
          "type": "boolean"
        },
        "and": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchAssetsQuery"
          }
        },
        "or": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchAssetsQuery"
          }
        },
        "not": {
          "$ref": "#/definitions/SearchAssetsQuery"
        },
        "workspace": {
          "type": "string",
          "format": "rid",
          "x-alias": "WorkspaceRid"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "searchText",
        "searchText": "string"
      }
    },
    "SearchAssetsRequest": {
      "type": "object",
      "properties": {
        "sort": {
          "$ref": "#/definitions/AssetSortOptions"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "description": "Page sizes greater than 10_000 will be rejected. Default pageSize is 100."
        },
        "nextPageToken": {
          "type": "string",
          "x-alias": "Token"
        },
        "query": {
          "$ref": "#/definitions/SearchAssetsQuery"
        },
        "archivedStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ArchivedStatus"
          },
          "uniqueItems": true,
          "description": "Default search status is NOT_ARCHIVED if none are provided. Allows for including archived assets in search."
        },
        "includeMatchCount": {
          "type": "boolean",
          "description": "When true, the response populates totalCount with the number of assets matching the query. Defaults to false. Computing the count is an additional query whose cost grows with the size of the matching set, so only set this when the count is needed."
        }
      },
      "required": [
        "sort",
        "query"
      ],
      "example": {
        "sort": {
          "isDescending": true
        },
        "query": {
          "type": "searchText",
          "searchText": "<search text>"
        }
      }
    },
    "SearchAssetsResponse": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Asset"
          }
        },
        "nextPageToken": {
          "type": "string",
          "x-alias": "Token"
        },
        "totalCount": {
          "type": "integer",
          "format": "int32",
          "description": "The number of assets matching the query, workspace, and archived filters. Present only when includeMatchCount was set to true on the request."
        }
      }
    },
    "SearchTypesQuery": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "searchText",
            "property",
            "and",
            "or",
            "workspace"
          ]
        },
        "searchText": {
          "type": "string"
        },
        "property": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "and": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchTypesQuery"
          }
        },
        "or": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SearchTypesQuery"
          }
        },
        "workspace": {
          "type": "string",
          "format": "rid",
          "x-alias": "WorkspaceRid"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "searchText",
        "searchText": "string"
      }
    },
    "SearchTypesRequest": {
      "type": "object",
      "properties": {
        "sort": {
          "$ref": "#/definitions/TypeSortOptions"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "description": "Page sizes greater than 10_000 will be rejected. Default pageSize is 100."
        },
        "nextPageToken": {
          "type": "string",
          "x-alias": "Token"
        },
        "query": {
          "$ref": "#/definitions/SearchTypesQuery"
        },
        "archivedStatuses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ArchivedStatus"
          },
          "uniqueItems": true,
          "x-deprecated": "Use the isArchived search query option instead. If no filter is applied and this field is empty, the default search status is NOT_ARCHIVED."
        }
      },
      "required": [
        "sort",
        "query"
      ],
      "example": {
        "sort": {
          "isDescending": true,
          "field": "CREATED_AT"
        },
        "query": {
          "type": "searchText",
          "searchText": "<search text>"
        }
      }
    },
    "SearchTypesResponse": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Type"
          }
        },
        "nextPageToken": {
          "type": "string",
          "x-alias": "Token"
        }
      }
    },
    "SeriesRequirement": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "Channel",
          "description": "A channel name of 1 to 200 characters, matched exactly."
        },
        "type": {
          "$ref": "#/definitions/SeriesType"
        }
      },
      "required": [
        "name",
        "type"
      ]
    },
    "SeriesRequirements": {
      "description": "Met when, for each required series, the asset's data has a series with that exact name and type under the data scopes' tag filters, at any time. No series requires nothing, which is how an update clears the requirements.",
      "type": "object",
      "properties": {
        "series": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SeriesRequirement"
          },
          "description": "At most 200, with unique names."
        }
      }
    },
    "SeriesType": {
      "description": "The kind of a required series. A series of any stored type within the kind satisfies the requirement. NUMERIC is double, int64 or uint64 points.",
      "type": "string",
      "enum": [
        "NUMERIC",
        "STRING",
        "LOG",
        "NUMERIC_ARRAY",
        "STRING_ARRAY",
        "STRUCT"
      ]
    },
    "SortKey": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "field",
            "property",
            "numericProperty"
          ]
        },
        "field": {
          "$ref": "#/definitions/AssetSortField"
        },
        "property": {
          "$ref": "#/definitions/SortProperty"
        },
        "numericProperty": {
          "allOf": [
            {
              "$ref": "#/definitions/SortProperty"
            }
          ],
          "description": "Sort by a numeric property value. String-valued and missing properties are null and always sort last."
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "field",
        "field": "NAME"
      }
    },
    "SortProperty": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        }
      },
      "required": [
        "name"
      ]
    },
    "Type": {
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "TypeRid"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "propertyConfigs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/PropertyConfig"
          },
          "x-map-key": "PropertyName"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "iconName": {
          "type": "string",
          "description": "The name of the icon to display for the type. This name maps to a Lucide icon in the frontend."
        },
        "primaryKey": {
          "type": "string",
          "x-alias": "PropertyName",
          "description": "The property that identifies an asset of this type. It is a required nonempty string and is not repeated in propertyConfigs."
        },
        "isArchived": {
          "type": "boolean"
        },
        "dataRequirements": {
          "allOf": [
            {
              "$ref": "#/definitions/DataRequirements"
            }
          ],
          "description": "Requirements on the data of assets of this type, absent if none were ever set. Checked when the type is attached to an asset; later data or definition changes are not rechecked."
        }
      },
      "required": [
        "rid",
        "name",
        "createdAt",
        "primaryKey",
        "isArchived"
      ]
    },
    "TypeSortField": {
      "type": "string",
      "enum": [
        "CREATED_AT"
      ]
    },
    "TypeSortOptions": {
      "type": "object",
      "properties": {
        "isDescending": {
          "type": "boolean"
        },
        "field": {
          "$ref": "#/definitions/TypeSortField"
        }
      },
      "required": [
        "isDescending",
        "field"
      ]
    },
    "UpdateAssetRefNamesRequest": {
      "type": "object",
      "properties": {
        "dataScopeRefNameUpdates": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "DataSourceRefName"
          },
          "x-map-key": "DataSourceRefName"
        }
      },
      "example": {
        "dataScopeRefNameUpdates": {
          "<key>": "<data source ref name>"
        }
      }
    },
    "UpdateAssetRequest": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "x-map-key": "PropertyName",
          "x-deprecated": "use typedProperties"
        },
        "typedProperties": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/TypedPropertyValue"
          },
          "x-map-key": "PropertyName"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Link"
          }
        },
        "dataScopes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/CreateAssetDataScope"
          },
          "uniqueItems": true,
          "description": "The data scopes for the asset. This will replace all existing data scopes with the scopes specified."
        },
        "types": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "TypeRid"
          },
          "uniqueItems": true,
          "description": "Types attached to the asset. Absent leaves memberships unchanged. Present, including empty, replaces them. At most 10 types."
        },
        "isStaged": {
          "type": "boolean"
        }
      },
      "example": {
        "title": "<title>",
        "description": "<description>",
        "properties": {
          "<key>": "<property value>"
        },
        "typedProperties": {
          "<key>": {
            "type": "stringValue",
            "stringValue": "<property value>"
          }
        },
        "labels": [
          "<label>"
        ],
        "links": [
          {
            "url": "<url>"
          }
        ],
        "dataScopes": [
          {
            "dataScopeName": "<data source ref name>",
            "dataSource": {
              "type": "dataset",
              "dataset": "<dataset rid>"
            }
          }
        ],
        "types": [
          "<type rid>"
        ],
        "isStaged": true
      }
    },
    "UpdateAttachmentsRequest": {
      "type": "object",
      "properties": {
        "attachmentsToAdd": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AttachmentRid"
          },
          "uniqueItems": true
        },
        "attachmentsToRemove": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "rid",
            "x-alias": "AttachmentRid"
          },
          "uniqueItems": true
        }
      },
      "example": {
        "attachmentsToAdd": [
          "<attachment rid>"
        ],
        "attachmentsToRemove": [
          "<attachment rid>"
        ]
      }
    },
    "UpdateTypeRequest": {
      "description": "The request to update a type. Present propertyConfigs replace the whole property set.",
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "primaryKey": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "propertyConfigs": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/PropertyConfig"
          },
          "x-map-key": "PropertyName"
        },
        "dataRequirements": {
          "allOf": [
            {
              "$ref": "#/definitions/DataRequirements"
            }
          ],
          "description": "Absent leaves the requirements unchanged. Present replaces them; requiring no series clears them. Assets that already have the type are not rechecked, unlike propertyConfigs, which every such asset must still satisfy."
        },
        "description": {
          "type": "string"
        },
        "iconName": {
          "type": "string"
        }
      },
      "example": {
        "name": "<name>",
        "primaryKey": "<property name>",
        "propertyConfigs": {
          "<key>": {
            "requirement": "REQUIRED",
            "valueType": "STRING"
          }
        },
        "dataRequirements": {
          "type": "series",
          "series": {
            "series": [
              {
                "name": "<channel>",
                "type": "NUMERIC"
              }
            ]
          }
        },
        "description": "<description>",
        "iconName": "<icon name>"
      }
    },
    "ConflictBehavior": {
      "description": "Controls what happens when a rename target property key already exists on a document.\n\nSet `type` to the name of one of the other fields, and set only that field.",
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "skip",
            "overwrite"
          ]
        },
        "skip": {
          "$ref": "#/definitions/SkipOnConflict"
        },
        "overwrite": {
          "$ref": "#/definitions/OverwriteOnConflict"
        }
      },
      "required": [
        "type"
      ],
      "example": {
        "type": "skip",
        "skip": {}
      }
    },
    "MergePropertyValuesForKey": {
      "description": "Merge one or more string values of a property key into a single target value. Merge applies to categorical aliases; continuous numeric values are intentionally excluded.",
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "source": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "PropertyValue"
          },
          "uniqueItems": true
        },
        "target": {
          "type": "string",
          "x-alias": "PropertyValue"
        }
      },
      "required": [
        "key",
        "target"
      ]
    },
    "MetadataChange": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "renameLabel",
            "renamePropertyKey",
            "mergePropertyValuesForKey"
          ]
        },
        "renameLabel": {
          "$ref": "#/definitions/RenameLabel"
        },
        "renamePropertyKey": {
          "$ref": "#/definitions/RenamePropertyKey"
        },
        "mergePropertyValuesForKey": {
          "$ref": "#/definitions/MergePropertyValuesForKey"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "renameLabel",
        "renameLabel": {
          "source": [
            "string"
          ],
          "target": "string"
        }
      }
    },
    "OverwriteOnConflict": {
      "description": "Documents that already have the target property key are included in the rename. The priority list determines which value wins via ordered precedence. Must contain exactly the source keys + target key.",
      "type": "object",
      "properties": {
        "priority": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "PropertyName"
          }
        }
      }
    },
    "RenameLabel": {
      "description": "Rename or merge one or more source labels into a single target label.",
      "type": "object",
      "properties": {
        "source": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          },
          "uniqueItems": true
        },
        "target": {
          "type": "string",
          "x-alias": "Label"
        }
      },
      "required": [
        "target"
      ]
    },
    "RenamePropertyKey": {
      "description": "Rename one or more source property keys to a single target key. Existing values are preserved under the new key. The rename should be skipped in the service for resources w/ conflicting keys.",
      "type": "object",
      "properties": {
        "source": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "PropertyName"
          },
          "uniqueItems": true
        },
        "target": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "onConflict": {
          "$ref": "#/definitions/ConflictBehavior"
        }
      },
      "required": [
        "target",
        "onConflict"
      ]
    },
    "SkipOnConflict": {
      "description": "Documents are skipped when:\n- The target property key already exists on the document, or\n- Multiple source property keys exist on the document (ambiguous merge). Conflicting document RIDs are returned in the response.",
      "type": "object",
      "properties": {}
    },
    "LabelsFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/definitions/SetOperator"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "Label"
          }
        }
      },
      "required": [
        "operator"
      ]
    },
    "PropertiesFilter": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "x-alias": "PropertyName"
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "PropertyValue"
          }
        }
      },
      "required": [
        "name"
      ]
    },
    "DataSource": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "dataset",
            "connection",
            "logSet",
            "video",
            "spatial"
          ]
        },
        "dataset": {
          "type": "string",
          "format": "rid",
          "x-alias": "DatasetRid"
        },
        "connection": {
          "type": "string",
          "format": "rid",
          "x-alias": "ConnectionRid"
        },
        "logSet": {
          "type": "string",
          "format": "rid",
          "x-alias": "LogSetRid"
        },
        "video": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoRid"
        },
        "spatial": {
          "type": "string",
          "format": "rid",
          "x-alias": "SpatialRid"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "dataset",
        "dataset": "string"
      }
    },
    "Duration": {
      "type": "object",
      "properties": {
        "seconds": {
          "type": "integer",
          "format": "int64"
        },
        "nanos": {
          "type": "integer",
          "format": "int64"
        }
      },
      "required": [
        "seconds",
        "nanos"
      ]
    },
    "Link": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "url"
      ]
    },
    "WeakTimestampType": {
      "description": "If a CSV data source is still being split, the timestamp type is not known.",
      "type": "string",
      "enum": [
        "ABSOLUTE",
        "RELATIVE",
        "PENDING"
      ]
    }
  },
  "tags": [
    {
      "name": "Asset Service",
      "x-displayName": "Asset service",
      "description": "An asset is a physical entity within an organization, such as a vehicle or ground station. Assets are comprised of some metadata about the data, as well as a set of data scopes that define the data belonging to the asset. API endpoints allow for CRUD operations on asset objects.",
      "x-errors": [
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "Assets:AssetNotFound"
        },
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "Assets:AssetsNotFound"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:DuplicateDataScopeNames",
          "description": "Multiple data scopes within the same asset share the same refname"
        },
        {
          "status": 409,
          "errorCode": "CONFLICT",
          "errorName": "Assets:TypeAlreadyExists"
        },
        {
          "status": 403,
          "errorCode": "PERMISSION_DENIED",
          "errorName": "Assets:TypeReferencedByAssets",
          "description": "The type is referenced by one or more assets and cannot be deleted."
        },
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "Assets:TypeNotFound"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:TypeArchived"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:TypeCheckFailed",
          "description": "The asset's properties do not satisfy one of its types. missingProperties lists properties the type requires, including its primary key, that are absent or blank. wrongValueTypeProperties lists set values whose type does not match the type's declared value type for that property."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:InvalidTypeDefinition"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:DataRequirementsNotMet",
          "description": "The asset's data does not satisfy the data requirements of a type being attached. missingSeries lists, by name, every required series that has no series of that name and type in the asset's data."
        },
        {
          "status": 500,
          "errorCode": "TIMEOUT",
          "errorName": "Assets:DataRequirementsCheckTimedOut",
          "description": "Looking up the series in the asset's data, to check the data requirements of a type being attached, took too long. Nothing was written; the request can be retried."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:TypeUpdateRejected",
          "description": "Updating the type would leave active members that do not conform. exampleAssetRids is a bounded sample."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:TooManyActiveTypeMembers",
          "description": "A property or primary-key update cannot be checked because the type has more active members than maxActiveMembers."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Assets:PrimaryKeyInUse",
          "description": "Another active asset already uses this primary key for this type."
        }
      ]
    }
  ]
}
