# Model REST API Guide

## List models

> Get list of model for provided query and filters

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"latest_only":{"name":"latest_only","in":"query","description":"Whether to send only latest version of each model or all version. False by default","required":false,"schema":{"type":"boolean"}},"project_id_query":{"name":"project_id","in":"query","description":"project id query parameter","required":false,"schema":{"type":"string","format":"uuid"}},"filter":{"name":"filter","in":"query","description":"Allows you to filter by any field.","required":false,"schema":{"type":"string"}},"search":{"name":"search","in":"query","description":"Allows you to search by any field.","required":false,"schema":{"type":"string"}},"ordering":{"name":"ordering","in":"query","description":"Allows you to order results by any field. For desc order prefix field name with `-` and provide comman separated values for multiple fields","required":false,"schema":{"type":"string"}},"limit":{"name":"limit","in":"query","description":"Limit for the pagination","required":false,"schema":{"type":"integer"}},"offset":{"name":"offset","in":"query","description":"Offset for the pagination","required":false,"schema":{"type":"integer"}}},"schemas":{"PaginatedApiResponse":{"type":"object","description":"Response object for paginated API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"PAGINATED","enum":["PAGINATED"],"description":"Type of response, indicating a paginated response.\n"},"data":{"type":"object","properties":{"page_size":{"type":"integer","default":10,"description":"Number of items per page in the response.\n"},"item_count":{"type":"integer","default":10,"description":"Number of items in the current page.\n"},"total":{"type":"integer","default":100,"description":"Total number of items across all pages.\n"},"page_count":{"type":"integer","default":10,"description":"Total number of pages.\n"},"page_index":{"type":"integer","default":1,"description":"Current page index.\n"},"offset":{"type":"integer","default":0,"description":"Offset of the first item in the current page.\n"}}}}},"ListModelResponse":{"type":"array","items":{"$ref":"#/components/schemas/ModelObject"}},"ModelObject":{"type":"object","description":"Model fields JSON","required":["id","name","input_type","task","organization","project","algorithm","framework","deleted_at","created_at","updated_at","created_by","version","artifact_status","status"],"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID format unique identifier for model"},"name":{"type":"string","description":"Name of the model"},"version":{"type":"string","description":"Version of the model","default":"v1"},"status":{"type":"string","enum":["LIVE","DRAFT"]},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"input_type":{"$ref":"#/components/schemas/ModelInputTypeEnum"},"task":{"$ref":"#/components/schemas/ModelTaskEnum"},"description":{"type":"string","nullable":true},"owner":{"$ref":"#/components/schemas/UserCompact"},"deployment_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the model was deployed on"},"artifact_status":{"$ref":"#/components/schemas/ModelArtifactStatusEnum"},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"flag used internally to support soft delete of model"},"algorithm":{"type":"string","nullable":true,"description":"Model algorithm"},"framework":{"type":"string","description":"A string providing information about the software library and version used to train and run this model","nullable":true},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},{"$ref":"#/components/schemas/CreateUpdateTimestamp"}]},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"ModelInputTypeEnum":{"type":"string","description":"Enumeration of different model input types.\n","enum":["text","structured"]},"ModelTaskEnum":{"type":"string","description":"Enumeration of different types of model tasks.\n","enum":["binary_classification","multiclass_classification","regression","ranking","not_set","llm"]},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ModelArtifactStatusEnum":{"type":"string","description":"Enumeration of different model artifact statuses.\n","enum":["no_model","surrogate","user_uploaded"]},"CreateUpdateTimestamp":{"type":"object","required":["created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was created.\n"},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was last updated.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models":{"get":{"tags":["model-v3"],"summary":"List models","description":"Get list of model for provided query and filters","operationId":"getModelsV3","parameters":[{"$ref":"#/components/parameters/latest_only"},{"$ref":"#/components/parameters/project_id_query"},{"$ref":"#/components/parameters/filter"},{"$ref":"#/components/parameters/search"},{"$ref":"#/components/parameters/ordering"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"List of models for provided query and filters","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"$ref":"#/components/schemas/ListModelResponse"}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Add a new model under a project

> Add a new model under a project

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"AddModelRequestBody":{"type":"object","required":["name","project_id","input_type","task","schema","spec"],"properties":{"name":{"type":"string","description":"Name of the model"},"version":{"type":"string","minLength":1,"maxLength":64,"default":"v1","description":"Version of the model"},"project_id":{"type":"string","format":"uuid","description":"UUID format unique identifier for the project the model is added in"},"status":{"type":"string","enum":["LIVE","DRAFT"],"default":"LIVE"},"input_type":{"$ref":"#/components/schemas/ModelInputTypeEnum"},"task":{"$ref":"#/components/schemas/ModelTaskEnum"},"schema":{"$ref":"#/components/schemas/ModelSchemaObjectRequest"},"spec":{"$ref":"#/components/schemas/ModelSpecObject"},"task_params":{"$ref":"#/components/schemas/ModelTaskParams"},"xai_params":{"$ref":"#/components/schemas/XaiParams"},"description":{"type":"string","nullable":true,"description":"Description of the model"},"owner_id":{"type":"string","nullable":true,"description":"User ID for the owner of the model"},"deployment_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the model was deployed on"},"algorithm":{"type":"string","nullable":true,"description":"Model algorithm"},"framework":{"type":"string","nullable":true,"description":"A string providing information about the software library and version used to train and run this model"},"event_id_col":{"type":"string","nullable":true,"description":"Event id column to be found in published data for the model"},"event_ts_col":{"type":"string","nullable":true,"description":"Timestamp column to be found in published data for the model"},"event_ts_format":{"type":"string","nullable":true,"description":"Format of the timestamp like datetime, epoch time etc."}}},"ModelInputTypeEnum":{"type":"string","description":"Enumeration of different model input types.\n","enum":["text","structured"]},"ModelTaskEnum":{"type":"string","description":"Enumeration of different types of model tasks.\n","enum":["binary_classification","multiclass_classification","regression","ranking","not_set","llm"]},"ModelSchemaObjectRequest":{"type":"object","description":"Model schema with the details of each column","properties":{"schema_version":{"type":"integer","description":"Schema version","default":1},"columns":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ModelSchemaColumnObject"},{"type":"object","properties":{"id":{"type":"string","description":"Internal column identifier"}}}]}}}},"ModelSchemaColumnObject":{"type":"object","description":"A model column representation","required":["name","data_type"],"properties":{"name":{"type":"string","description":"Column name"},"data_type":{"$ref":"#/components/schemas/ModelColumnsDataTypeEnum"},"min":{"type":"number","description":"Min value of integer/float column"},"max":{"type":"number","description":"Max value of integer/float column"},"categories":{"type":"array","description":"List of unique values of a categorical column","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"bins":{"type":"array","description":"Bin boundary values for integer/float column histograms. Must be a strictly increasing array of numbers spanning [min, max]. If omitted, uniform bins are auto-generated from min and max. Minimum 2 and maximum 16 boundary values (1 to 15 bins).","items":{"type":"number"},"maxItems":16,"minItems":2},"replace_with_nulls":{"type":"array","description":"Replace the list of given values to null if found in the events data","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"n_dimensions":{"type":"integer","description":"Number of dimensions of a vector column"}}},"ModelColumnsDataTypeEnum":{"type":"string","description":"Data type of the column","enum":["int","float","str","bool","category","timestamp","vector"]},"ModelSpecObject":{"type":"object","properties":{"schema_version":{"type":"integer","description":"Schema version. Internally used. Leave empty.","default":1},"inputs":{"type":"array","description":"List of input columns","items":{"type":"string"}},"outputs":{"type":"array","description":"List of output columns","items":{"type":"string"}},"targets":{"type":"array","description":"List of target columns","items":{"type":"string"}},"decisions":{"type":"array","description":"List of decision columns","items":{"type":"string"}},"metadata":{"type":"array","description":"List of metadata columns","items":{"type":"string"}},"custom_features":{"type":"array","description":"List of custom feature columns","items":{"$ref":"#/components/schemas/CustomFeature"}}}},"CustomFeature":{"type":"object","required":["name"],"properties":{"type":{"type":"string","enum":["FROM_COLUMNS","FROM_VECTOR","FROM_TEXT_EMBEDDING","FROM_IMAGE_EMBEDDING","ENRICHMENT"]},"name":{"description":"Name of the custom feature","type":"string"},"columns":{"type":"array","items":{"type":"string"}},"centroids":{"type":"array","items":{"type":"number"}},"tf_idf":{"type":"array","items":{"type":"object"}},"n_clusters":{"type":"integer"},"monitor_components":{"type":"boolean"}}},"ModelTaskParams":{"type":"object","properties":{"binary_classification_threshold":{"type":"number","description":"Threshold for labels."},"target_class_order":{"type":"array","description":"If target is categorical, used to map the categories to a scale of relevance","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"group_by":{"type":"string","description":"Query/session id column for ranking models."},"top_k":{"type":"integer","description":"Top k results to consider when computing ranking metrics."},"class_weights":{"type":"array","description":"Weight of each class.","items":{"type":"number"}},"weighted_ref_histograms":{"description":"Whether baseline histograms must be weighted or not when calculating drift metrics.","type":"boolean"}}},"XaiParams":{"type":"object","description":"XAI parameters set for a model","properties":{"custom_explain_methods":{"type":"array","description":"User-defined explain_custom method of the model object defined in package.py","items":{"type":"string"}},"default_explain_method":{"type":"string","description":"Default explanation method"}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"ModelDetailResponse":{"required":["id","name","input_type","task","organization","project","created_at","updated_at","status"],"allOf":[{"$ref":"#/components/schemas/ModelObject"},{"type":"object","properties":{"task_params":{"$ref":"#/components/schemas/ModelTaskParams"},"schema":{"$ref":"#/components/schemas/ModelSchemaObjectResponse"},"spec":{"$ref":"#/components/schemas/ModelSpecObject"},"event_id_col":{"type":"string","description":"Event id column to be found in published data for the model"},"event_ts_col":{"type":"string","description":"Timestamp column to be found in published data for the model"},"event_ts_format":{"type":"string","description":"Format of the timestamp like datetime, epoch time etc."},"xai_params":{"$ref":"#/components/schemas/XaiParams"},"artifact_files":{"$ref":"#/components/schemas/ModelFilesObject"},"is_binary_ranking_model":{"type":"boolean"}}}]},"ModelObject":{"type":"object","description":"Model fields JSON","required":["id","name","input_type","task","organization","project","algorithm","framework","deleted_at","created_at","updated_at","created_by","version","artifact_status","status"],"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID format unique identifier for model"},"name":{"type":"string","description":"Name of the model"},"version":{"type":"string","description":"Version of the model","default":"v1"},"status":{"type":"string","enum":["LIVE","DRAFT"]},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"input_type":{"$ref":"#/components/schemas/ModelInputTypeEnum"},"task":{"$ref":"#/components/schemas/ModelTaskEnum"},"description":{"type":"string","nullable":true},"owner":{"$ref":"#/components/schemas/UserCompact"},"deployment_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the model was deployed on"},"artifact_status":{"$ref":"#/components/schemas/ModelArtifactStatusEnum"},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"flag used internally to support soft delete of model"},"algorithm":{"type":"string","nullable":true,"description":"Model algorithm"},"framework":{"type":"string","description":"A string providing information about the software library and version used to train and run this model","nullable":true},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},{"$ref":"#/components/schemas/CreateUpdateTimestamp"}]},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ModelArtifactStatusEnum":{"type":"string","description":"Enumeration of different model artifact statuses.\n","enum":["no_model","surrogate","user_uploaded"]},"CreateUpdateTimestamp":{"type":"object","required":["created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was created.\n"},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was last updated.\n"}}},"ModelSchemaObjectResponse":{"type":"object","description":"Model schema with the details of each column","properties":{"schema_version":{"type":"integer","description":"Schema version","default":1},"columns":{"type":"array","items":{"$ref":"#/components/schemas/ModelSchemaColumnObjectResponse"}}}},"ModelSchemaColumnObjectResponse":{"allOf":[{"$ref":"#/components/schemas/ModelSchemaColumnObject"},{"type":"object","properties":{"id":{"type":"string","description":"Internal column identifier"}},"required":["id"]}]},"ModelFilesObject":{"type":"array","items":{"$ref":"#/components/schemas/ModelArtifactsResponse"}},"ModelArtifactsResponse":{"type":"object","required":["name","size","modified"],"properties":{"name":{"type":"string"},"size":{"type":"integer"},"modified":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models":{"post":{"tags":["model-v3"],"summary":"Add a new model under a project","description":"Add a new model under a project","operationId":"addModelV3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddModelRequestBody"}}}},"responses":{"200":{"description":"Created model JSON response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelDetailResponse"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"409":{"$ref":"#/components/responses/409"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get details of a model

> Details of a model for given model id

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"ModelDetailResponse":{"required":["id","name","input_type","task","organization","project","created_at","updated_at","status"],"allOf":[{"$ref":"#/components/schemas/ModelObject"},{"type":"object","properties":{"task_params":{"$ref":"#/components/schemas/ModelTaskParams"},"schema":{"$ref":"#/components/schemas/ModelSchemaObjectResponse"},"spec":{"$ref":"#/components/schemas/ModelSpecObject"},"event_id_col":{"type":"string","description":"Event id column to be found in published data for the model"},"event_ts_col":{"type":"string","description":"Timestamp column to be found in published data for the model"},"event_ts_format":{"type":"string","description":"Format of the timestamp like datetime, epoch time etc."},"xai_params":{"$ref":"#/components/schemas/XaiParams"},"artifact_files":{"$ref":"#/components/schemas/ModelFilesObject"},"is_binary_ranking_model":{"type":"boolean"}}}]},"ModelObject":{"type":"object","description":"Model fields JSON","required":["id","name","input_type","task","organization","project","algorithm","framework","deleted_at","created_at","updated_at","created_by","version","artifact_status","status"],"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID format unique identifier for model"},"name":{"type":"string","description":"Name of the model"},"version":{"type":"string","description":"Version of the model","default":"v1"},"status":{"type":"string","enum":["LIVE","DRAFT"]},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"input_type":{"$ref":"#/components/schemas/ModelInputTypeEnum"},"task":{"$ref":"#/components/schemas/ModelTaskEnum"},"description":{"type":"string","nullable":true},"owner":{"$ref":"#/components/schemas/UserCompact"},"deployment_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the model was deployed on"},"artifact_status":{"$ref":"#/components/schemas/ModelArtifactStatusEnum"},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"flag used internally to support soft delete of model"},"algorithm":{"type":"string","nullable":true,"description":"Model algorithm"},"framework":{"type":"string","description":"A string providing information about the software library and version used to train and run this model","nullable":true},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},{"$ref":"#/components/schemas/CreateUpdateTimestamp"}]},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"ModelInputTypeEnum":{"type":"string","description":"Enumeration of different model input types.\n","enum":["text","structured"]},"ModelTaskEnum":{"type":"string","description":"Enumeration of different types of model tasks.\n","enum":["binary_classification","multiclass_classification","regression","ranking","not_set","llm"]},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ModelArtifactStatusEnum":{"type":"string","description":"Enumeration of different model artifact statuses.\n","enum":["no_model","surrogate","user_uploaded"]},"CreateUpdateTimestamp":{"type":"object","required":["created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was created.\n"},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was last updated.\n"}}},"ModelTaskParams":{"type":"object","properties":{"binary_classification_threshold":{"type":"number","description":"Threshold for labels."},"target_class_order":{"type":"array","description":"If target is categorical, used to map the categories to a scale of relevance","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"group_by":{"type":"string","description":"Query/session id column for ranking models."},"top_k":{"type":"integer","description":"Top k results to consider when computing ranking metrics."},"class_weights":{"type":"array","description":"Weight of each class.","items":{"type":"number"}},"weighted_ref_histograms":{"description":"Whether baseline histograms must be weighted or not when calculating drift metrics.","type":"boolean"}}},"ModelSchemaObjectResponse":{"type":"object","description":"Model schema with the details of each column","properties":{"schema_version":{"type":"integer","description":"Schema version","default":1},"columns":{"type":"array","items":{"$ref":"#/components/schemas/ModelSchemaColumnObjectResponse"}}}},"ModelSchemaColumnObjectResponse":{"allOf":[{"$ref":"#/components/schemas/ModelSchemaColumnObject"},{"type":"object","properties":{"id":{"type":"string","description":"Internal column identifier"}},"required":["id"]}]},"ModelSchemaColumnObject":{"type":"object","description":"A model column representation","required":["name","data_type"],"properties":{"name":{"type":"string","description":"Column name"},"data_type":{"$ref":"#/components/schemas/ModelColumnsDataTypeEnum"},"min":{"type":"number","description":"Min value of integer/float column"},"max":{"type":"number","description":"Max value of integer/float column"},"categories":{"type":"array","description":"List of unique values of a categorical column","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"bins":{"type":"array","description":"Bin boundary values for integer/float column histograms. Must be a strictly increasing array of numbers spanning [min, max]. If omitted, uniform bins are auto-generated from min and max. Minimum 2 and maximum 16 boundary values (1 to 15 bins).","items":{"type":"number"},"maxItems":16,"minItems":2},"replace_with_nulls":{"type":"array","description":"Replace the list of given values to null if found in the events data","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"n_dimensions":{"type":"integer","description":"Number of dimensions of a vector column"}}},"ModelColumnsDataTypeEnum":{"type":"string","description":"Data type of the column","enum":["int","float","str","bool","category","timestamp","vector"]},"ModelSpecObject":{"type":"object","properties":{"schema_version":{"type":"integer","description":"Schema version. Internally used. Leave empty.","default":1},"inputs":{"type":"array","description":"List of input columns","items":{"type":"string"}},"outputs":{"type":"array","description":"List of output columns","items":{"type":"string"}},"targets":{"type":"array","description":"List of target columns","items":{"type":"string"}},"decisions":{"type":"array","description":"List of decision columns","items":{"type":"string"}},"metadata":{"type":"array","description":"List of metadata columns","items":{"type":"string"}},"custom_features":{"type":"array","description":"List of custom feature columns","items":{"$ref":"#/components/schemas/CustomFeature"}}}},"CustomFeature":{"type":"object","required":["name"],"properties":{"type":{"type":"string","enum":["FROM_COLUMNS","FROM_VECTOR","FROM_TEXT_EMBEDDING","FROM_IMAGE_EMBEDDING","ENRICHMENT"]},"name":{"description":"Name of the custom feature","type":"string"},"columns":{"type":"array","items":{"type":"string"}},"centroids":{"type":"array","items":{"type":"number"}},"tf_idf":{"type":"array","items":{"type":"object"}},"n_clusters":{"type":"integer"},"monitor_components":{"type":"boolean"}}},"XaiParams":{"type":"object","description":"XAI parameters set for a model","properties":{"custom_explain_methods":{"type":"array","description":"User-defined explain_custom method of the model object defined in package.py","items":{"type":"string"}},"default_explain_method":{"type":"string","description":"Default explanation method"}}},"ModelFilesObject":{"type":"array","items":{"$ref":"#/components/schemas/ModelArtifactsResponse"}},"ModelArtifactsResponse":{"type":"object","required":["name","size","modified"],"properties":{"name":{"type":"string"},"size":{"type":"integer"},"modified":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}":{"get":{"tags":["model-v3"],"summary":"Get details of a model","description":"Details of a model for given model id","operationId":"getModelV3","parameters":[{"$ref":"#/components/parameters/model_id"}],"responses":{"200":{"description":"Model JSON response for provided model id","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelDetailResponse"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Delete a model

> Delete a model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"DeleteModelResponse":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/JobCompact"}}},"JobCompact":{"type":"object","title":"JobCompact","description":"Compact version of a job which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the job.\n"},"name":{"type":"string","description":"Name of the job.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}":{"delete":{"tags":["model-v3"],"summary":"Delete a model","description":"Delete a model","operationId":"deleteModelV3","parameters":[{"$ref":"#/components/parameters/model_id"}],"responses":{"202":{"description":"Details of a model delete job","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteModelResponse"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Update the fields of a model

> Update the fields of a model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"UpdateModelRequest":{"type":"object","properties":{"status":{"type":"string","enum":["LIVE","DRAFT"],"default":"LIVE"},"version":{"type":"string","minLength":1,"maxLength":64,"default":"v1","description":"Version of the model"},"input_type":{"$ref":"#/components/schemas/ModelInputTypeEnum"},"task":{"$ref":"#/components/schemas/ModelTaskEnum"},"schema":{"$ref":"#/components/schemas/ModelSchemaObjectRequest"},"spec":{"$ref":"#/components/schemas/ModelSpecObject"},"task_params":{"$ref":"#/components/schemas/ModelTaskParams"},"xai_params":{"$ref":"#/components/schemas/XaiParams"},"description":{"type":"string","nullable":true,"description":"Description of the model"},"owner_id":{"type":"string","nullable":true,"description":"User ID for the owner of the model"},"deployment_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the model was deployed on"},"algorithm":{"type":"string","nullable":true,"description":"Model algorithm"},"framework":{"type":"string","nullable":true,"description":"A string providing information about the software library and version used to train and run this model"},"event_id_col":{"type":"string","nullable":true,"description":"Event id column to be found in published data for the model"},"event_ts_col":{"type":"string","nullable":true,"description":"Timestamp column to be found in published data for the model"},"event_ts_format":{"type":"string","nullable":true,"description":"Format of the timestamp like datetime, epoch time etc."}}},"ModelInputTypeEnum":{"type":"string","description":"Enumeration of different model input types.\n","enum":["text","structured"]},"ModelTaskEnum":{"type":"string","description":"Enumeration of different types of model tasks.\n","enum":["binary_classification","multiclass_classification","regression","ranking","not_set","llm"]},"ModelSchemaObjectRequest":{"type":"object","description":"Model schema with the details of each column","properties":{"schema_version":{"type":"integer","description":"Schema version","default":1},"columns":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ModelSchemaColumnObject"},{"type":"object","properties":{"id":{"type":"string","description":"Internal column identifier"}}}]}}}},"ModelSchemaColumnObject":{"type":"object","description":"A model column representation","required":["name","data_type"],"properties":{"name":{"type":"string","description":"Column name"},"data_type":{"$ref":"#/components/schemas/ModelColumnsDataTypeEnum"},"min":{"type":"number","description":"Min value of integer/float column"},"max":{"type":"number","description":"Max value of integer/float column"},"categories":{"type":"array","description":"List of unique values of a categorical column","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"bins":{"type":"array","description":"Bin boundary values for integer/float column histograms. Must be a strictly increasing array of numbers spanning [min, max]. If omitted, uniform bins are auto-generated from min and max. Minimum 2 and maximum 16 boundary values (1 to 15 bins).","items":{"type":"number"},"maxItems":16,"minItems":2},"replace_with_nulls":{"type":"array","description":"Replace the list of given values to null if found in the events data","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"n_dimensions":{"type":"integer","description":"Number of dimensions of a vector column"}}},"ModelColumnsDataTypeEnum":{"type":"string","description":"Data type of the column","enum":["int","float","str","bool","category","timestamp","vector"]},"ModelSpecObject":{"type":"object","properties":{"schema_version":{"type":"integer","description":"Schema version. Internally used. Leave empty.","default":1},"inputs":{"type":"array","description":"List of input columns","items":{"type":"string"}},"outputs":{"type":"array","description":"List of output columns","items":{"type":"string"}},"targets":{"type":"array","description":"List of target columns","items":{"type":"string"}},"decisions":{"type":"array","description":"List of decision columns","items":{"type":"string"}},"metadata":{"type":"array","description":"List of metadata columns","items":{"type":"string"}},"custom_features":{"type":"array","description":"List of custom feature columns","items":{"$ref":"#/components/schemas/CustomFeature"}}}},"CustomFeature":{"type":"object","required":["name"],"properties":{"type":{"type":"string","enum":["FROM_COLUMNS","FROM_VECTOR","FROM_TEXT_EMBEDDING","FROM_IMAGE_EMBEDDING","ENRICHMENT"]},"name":{"description":"Name of the custom feature","type":"string"},"columns":{"type":"array","items":{"type":"string"}},"centroids":{"type":"array","items":{"type":"number"}},"tf_idf":{"type":"array","items":{"type":"object"}},"n_clusters":{"type":"integer"},"monitor_components":{"type":"boolean"}}},"ModelTaskParams":{"type":"object","properties":{"binary_classification_threshold":{"type":"number","description":"Threshold for labels."},"target_class_order":{"type":"array","description":"If target is categorical, used to map the categories to a scale of relevance","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"group_by":{"type":"string","description":"Query/session id column for ranking models."},"top_k":{"type":"integer","description":"Top k results to consider when computing ranking metrics."},"class_weights":{"type":"array","description":"Weight of each class.","items":{"type":"number"}},"weighted_ref_histograms":{"description":"Whether baseline histograms must be weighted or not when calculating drift metrics.","type":"boolean"}}},"XaiParams":{"type":"object","description":"XAI parameters set for a model","properties":{"custom_explain_methods":{"type":"array","description":"User-defined explain_custom method of the model object defined in package.py","items":{"type":"string"}},"default_explain_method":{"type":"string","description":"Default explanation method"}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"ModelDetailResponse":{"required":["id","name","input_type","task","organization","project","created_at","updated_at","status"],"allOf":[{"$ref":"#/components/schemas/ModelObject"},{"type":"object","properties":{"task_params":{"$ref":"#/components/schemas/ModelTaskParams"},"schema":{"$ref":"#/components/schemas/ModelSchemaObjectResponse"},"spec":{"$ref":"#/components/schemas/ModelSpecObject"},"event_id_col":{"type":"string","description":"Event id column to be found in published data for the model"},"event_ts_col":{"type":"string","description":"Timestamp column to be found in published data for the model"},"event_ts_format":{"type":"string","description":"Format of the timestamp like datetime, epoch time etc."},"xai_params":{"$ref":"#/components/schemas/XaiParams"},"artifact_files":{"$ref":"#/components/schemas/ModelFilesObject"},"is_binary_ranking_model":{"type":"boolean"}}}]},"ModelObject":{"type":"object","description":"Model fields JSON","required":["id","name","input_type","task","organization","project","algorithm","framework","deleted_at","created_at","updated_at","created_by","version","artifact_status","status"],"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID format unique identifier for model"},"name":{"type":"string","description":"Name of the model"},"version":{"type":"string","description":"Version of the model","default":"v1"},"status":{"type":"string","enum":["LIVE","DRAFT"]},"organization":{"$ref":"#/components/schemas/OrganizationCompact"},"project":{"$ref":"#/components/schemas/ProjectCompact"},"input_type":{"$ref":"#/components/schemas/ModelInputTypeEnum"},"task":{"$ref":"#/components/schemas/ModelTaskEnum"},"description":{"type":"string","nullable":true},"owner":{"$ref":"#/components/schemas/UserCompact"},"deployment_date":{"type":"string","format":"date-time","nullable":true,"description":"Date the model was deployed on"},"artifact_status":{"$ref":"#/components/schemas/ModelArtifactStatusEnum"},"deleted_at":{"type":"string","format":"date-time","nullable":true,"description":"flag used internally to support soft delete of model"},"algorithm":{"type":"string","nullable":true,"description":"Model algorithm"},"framework":{"type":"string","description":"A string providing information about the software library and version used to train and run this model","nullable":true},"created_by":{"$ref":"#/components/schemas/UserCompact"},"updated_by":{"$ref":"#/components/schemas/UserCompact"}}},{"$ref":"#/components/schemas/CreateUpdateTimestamp"}]},"OrganizationCompact":{"type":"object","title":"OrganizationCompact","description":"Compact version of an organization which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the organization.\n"},"name":{"type":"string","description":"Name of the organization.\n"}}},"ProjectCompact":{"type":"object","title":"ProjectCompact","description":"Compact version of a project which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the project.\n"},"name":{"type":"string","description":"Name of the project.\n"},"asset_type":{"type":"string","enum":["ML_MODEL","GEN_AI_APP"],"description":"Type of assets the project can have.\n"}}},"UserCompact":{"type":"object","title":"UserCompactV3","description":"Compact version of a user which can be included in the response of relevant APIs.\n","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid","readOnly":true,"description":"Unique identifier for the user.\n"},"full_name":{"type":"string","readOnly":true,"description":"Full name of the user.\n"},"email":{"type":"string","format":"email","description":"Email address of the user.\n"}}},"ModelArtifactStatusEnum":{"type":"string","description":"Enumeration of different model artifact statuses.\n","enum":["no_model","surrogate","user_uploaded"]},"CreateUpdateTimestamp":{"type":"object","required":["created_at","updated_at"],"properties":{"created_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was created.\n"},"updated_at":{"type":"string","format":"date-time","readOnly":true,"description":"Date and time when the object was last updated.\n"}}},"ModelSchemaObjectResponse":{"type":"object","description":"Model schema with the details of each column","properties":{"schema_version":{"type":"integer","description":"Schema version","default":1},"columns":{"type":"array","items":{"$ref":"#/components/schemas/ModelSchemaColumnObjectResponse"}}}},"ModelSchemaColumnObjectResponse":{"allOf":[{"$ref":"#/components/schemas/ModelSchemaColumnObject"},{"type":"object","properties":{"id":{"type":"string","description":"Internal column identifier"}},"required":["id"]}]},"ModelFilesObject":{"type":"array","items":{"$ref":"#/components/schemas/ModelArtifactsResponse"}},"ModelArtifactsResponse":{"type":"object","required":["name","size","modified"],"properties":{"name":{"type":"string"},"size":{"type":"integer"},"modified":{"type":"string","format":"date-time"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}":{"patch":{"tags":["model-v3"],"summary":"Update the fields of a model","description":"Update the fields of a model","operationId":"updateModelV3","parameters":[{"$ref":"#/components/parameters/model_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModelRequest"}}}},"responses":{"200":{"description":"Updated model JSON response","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelDetailResponse"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Generate model from the given data sample

> Generate model from the given data sample

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"ModelFactoryRequest":{"type":"object","required":["file_id"],"properties":{"file_id":{"type":"string","format":"uuid"},"spec":{"$ref":"#/components/schemas/ModelSpecObject"},"max_cardinality":{"type":"integer","minimum":1,"maximum":100000,"default":1000},"sample_size":{"type":"integer","minimum":10000,"maximum":100000,"default":10000}}},"ModelSpecObject":{"type":"object","properties":{"schema_version":{"type":"integer","description":"Schema version. Internally used. Leave empty.","default":1},"inputs":{"type":"array","description":"List of input columns","items":{"type":"string"}},"outputs":{"type":"array","description":"List of output columns","items":{"type":"string"}},"targets":{"type":"array","description":"List of target columns","items":{"type":"string"}},"decisions":{"type":"array","description":"List of decision columns","items":{"type":"string"}},"metadata":{"type":"array","description":"List of metadata columns","items":{"type":"string"}},"custom_features":{"type":"array","description":"List of custom feature columns","items":{"$ref":"#/components/schemas/CustomFeature"}}}},"CustomFeature":{"type":"object","required":["name"],"properties":{"type":{"type":"string","enum":["FROM_COLUMNS","FROM_VECTOR","FROM_TEXT_EMBEDDING","FROM_IMAGE_EMBEDDING","ENRICHMENT"]},"name":{"description":"Name of the custom feature","type":"string"},"columns":{"type":"array","items":{"type":"string"}},"centroids":{"type":"array","items":{"type":"number"}},"tf_idf":{"type":"array","items":{"type":"object"}},"n_clusters":{"type":"integer"},"monitor_components":{"type":"boolean"}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"ModelFactoryResponse":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/ModelSchemaObjectResponse"},"spec":{"$ref":"#/components/schemas/ModelSpecObject"}}},"ModelSchemaObjectResponse":{"type":"object","description":"Model schema with the details of each column","properties":{"schema_version":{"type":"integer","description":"Schema version","default":1},"columns":{"type":"array","items":{"$ref":"#/components/schemas/ModelSchemaColumnObjectResponse"}}}},"ModelSchemaColumnObjectResponse":{"allOf":[{"$ref":"#/components/schemas/ModelSchemaColumnObject"},{"type":"object","properties":{"id":{"type":"string","description":"Internal column identifier"}},"required":["id"]}]},"ModelSchemaColumnObject":{"type":"object","description":"A model column representation","required":["name","data_type"],"properties":{"name":{"type":"string","description":"Column name"},"data_type":{"$ref":"#/components/schemas/ModelColumnsDataTypeEnum"},"min":{"type":"number","description":"Min value of integer/float column"},"max":{"type":"number","description":"Max value of integer/float column"},"categories":{"type":"array","description":"List of unique values of a categorical column","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"bins":{"type":"array","description":"Bin boundary values for integer/float column histograms. Must be a strictly increasing array of numbers spanning [min, max]. If omitted, uniform bins are auto-generated from min and max. Minimum 2 and maximum 16 boundary values (1 to 15 bins).","items":{"type":"number"},"maxItems":16,"minItems":2},"replace_with_nulls":{"type":"array","description":"Replace the list of given values to null if found in the events data","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"n_dimensions":{"type":"integer","description":"Number of dimensions of a vector column"}}},"ModelColumnsDataTypeEnum":{"type":"string","description":"Data type of the column","enum":["int","float","str","bool","category","timestamp","vector"]},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/model-factory":{"post":{"tags":["model-v3"],"summary":"Generate model from the given data sample","description":"Generate model from the given data sample","operationId":"modelFactory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelFactoryRequest"}}}},"responses":{"200":{"description":"Generated model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelFactoryResponse"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Update artifacts associated with the model

> Update artifacts associated with the model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}},"deployment_params":{"name":"deployment_params","in":"query","description":"JSON encoded Deployment Params","schema":{"type":"string","properties":{"deployment_type":{"type":"string","enum":["BASE_CONTAINER"],"description":"Model deployment type"},"image_uri":{"type":"string","description":"Model deployment docker image uri"},"replicas":{"type":"integer","description":"Number of model deployment pods to be active","minimum":1,"maximum":10},"cpu":{"type":"integer","description":"Amount of millicpus to allocate per replica","minimum":1,"maximum":4000},"memory":{"type":"integer","description":"Amount of MiBs to allocate per replica","minimum":150,"maximum":16384}}}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"JobCompact":{"type":"object","title":"JobCompact","description":"Compact version of a job which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the job.\n"},"name":{"type":"string","description":"Name of the job.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}/deploy-artifact":{"put":{"tags":["model-v3"],"summary":"Update artifacts associated with the model","description":"Update artifacts associated with the model","operationId":"deployModelArtifactUpdateV3","parameters":[{"$ref":"#/components/parameters/model_id"},{"$ref":"#/components/parameters/deployment_params"}],"responses":{"200":{"description":"Updated Model Artifacts","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/JobCompact"}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Upload artifacts associated with the model

> Upload artifacts associated with the model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}},"deployment_params":{"name":"deployment_params","in":"query","description":"JSON encoded Deployment Params","schema":{"type":"string","properties":{"deployment_type":{"type":"string","enum":["BASE_CONTAINER"],"description":"Model deployment type"},"image_uri":{"type":"string","description":"Model deployment docker image uri"},"replicas":{"type":"integer","description":"Number of model deployment pods to be active","minimum":1,"maximum":10},"cpu":{"type":"integer","description":"Amount of millicpus to allocate per replica","minimum":1,"maximum":4000},"memory":{"type":"integer","description":"Amount of MiBs to allocate per replica","minimum":150,"maximum":16384}}}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"JobCompact":{"type":"object","title":"JobCompact","description":"Compact version of a job which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the job.\n"},"name":{"type":"string","description":"Name of the job.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}/deploy-artifact":{"post":{"tags":["model-v3"],"summary":"Upload artifacts associated with the model","description":"Upload artifacts associated with the model","operationId":"deployModelArtifactV3","parameters":[{"$ref":"#/components/parameters/model_id"},{"$ref":"#/components/parameters/deployment_params"}],"responses":{"200":{"description":"Deployed Model Artifacts","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/JobCompact"}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Update a surrogate model

> Update a surrogate model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"DeploySurrogateRequest":{"type":"object","description":"Request payload for to deploy a surrogate model","required":["env_id","deployment_params"],"properties":{"env_id":{"type":"string","format":"uuid","description":"Unique identifier of the environment associated to the model"},"deployment_params":{"$ref":"#/components/schemas/_SurrogateDeploymentParams"}}},"_SurrogateDeploymentParams":{"description":"Additoinal paramteres specified to deploy surrogate model","allOf":[{"type":"object","properties":{"artifact_type":{"description":"Type of the artifact","type":"string","enum":["SURROGATE"]}}},{"$ref":"#/components/schemas/_DeploymentParams"}]},"_DeploymentParams":{"type":"object","properties":{"deployment_type":{"type":"string","enum":["BASE_CONTAINER"],"description":"Model deployment type"},"image_uri":{"type":"string","description":"Model deployment docker image uri"},"replicas":{"type":"integer","description":"Number of model deployment pods to be active","minimum":1,"maximum":10,"default":1},"cpu":{"type":"integer","description":"Amount of millicpus to allocate per replica","minimum":1,"maximum":4000,"default":1},"memory":{"type":"integer","description":"Amount of MiBs to allocate per replica","minimum":150,"maximum":16384,"default":150}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"JobCompact":{"type":"object","title":"JobCompact","description":"Compact version of a job which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the job.\n"},"name":{"type":"string","description":"Name of the job.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}/deploy-surrogate":{"put":{"tags":["model-v3"],"summary":"Update a surrogate model","description":"Update a surrogate model","operationId":"deploySurrogateUpdateV3","parameters":[{"$ref":"#/components/parameters/model_id"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DeploySurrogateRequest"}]}}}},"responses":{"202":{"description":"Surrogate model updating task with job id","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/JobCompact"}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Deploy a surrogate model

> Deploy a surrogate model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"DeploySurrogateRequest":{"type":"object","description":"Request payload for to deploy a surrogate model","required":["env_id","deployment_params"],"properties":{"env_id":{"type":"string","format":"uuid","description":"Unique identifier of the environment associated to the model"},"deployment_params":{"$ref":"#/components/schemas/_SurrogateDeploymentParams"}}},"_SurrogateDeploymentParams":{"description":"Additoinal paramteres specified to deploy surrogate model","allOf":[{"type":"object","properties":{"artifact_type":{"description":"Type of the artifact","type":"string","enum":["SURROGATE"]}}},{"$ref":"#/components/schemas/_DeploymentParams"}]},"_DeploymentParams":{"type":"object","properties":{"deployment_type":{"type":"string","enum":["BASE_CONTAINER"],"description":"Model deployment type"},"image_uri":{"type":"string","description":"Model deployment docker image uri"},"replicas":{"type":"integer","description":"Number of model deployment pods to be active","minimum":1,"maximum":10,"default":1},"cpu":{"type":"integer","description":"Amount of millicpus to allocate per replica","minimum":1,"maximum":4000,"default":1},"memory":{"type":"integer","description":"Amount of MiBs to allocate per replica","minimum":150,"maximum":16384,"default":150}}},"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"JobCompact":{"type":"object","title":"JobCompact","description":"Compact version of a job which can be included in the response of relevant APIs.\n","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the job.\n"},"name":{"type":"string","description":"Name of the job.\n"}}},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}/deploy-surrogate":{"post":{"tags":["model-v3"],"summary":"Deploy a surrogate model","description":"Deploy a surrogate model","operationId":"deploySurrogateV3","parameters":[{"$ref":"#/components/parameters/model_id"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DeploySurrogateRequest"}]}}}},"responses":{"202":{"description":"Surrogate model generation task with job id","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/JobCompact"}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Details of all columns

> Details of all columns for a model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"PaginatedApiResponse":{"type":"object","description":"Response object for paginated API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"PAGINATED","enum":["PAGINATED"],"description":"Type of response, indicating a paginated response.\n"},"data":{"type":"object","properties":{"page_size":{"type":"integer","default":10,"description":"Number of items per page in the response.\n"},"item_count":{"type":"integer","default":10,"description":"Number of items in the current page.\n"},"total":{"type":"integer","default":100,"description":"Total number of items across all pages.\n"},"page_count":{"type":"integer","default":10,"description":"Total number of pages.\n"},"page_index":{"type":"integer","default":1,"description":"Current page index.\n"},"offset":{"type":"integer","default":0,"description":"Offset of the first item in the current page.\n"}}}}},"ModelColumns":{"type":"array","description":"List of ModelSchemaColumn","items":{"$ref":"#/components/schemas/ModelSchemaColumnObjectResponse"}},"ModelSchemaColumnObjectResponse":{"allOf":[{"$ref":"#/components/schemas/ModelSchemaColumnObject"},{"type":"object","properties":{"id":{"type":"string","description":"Internal column identifier"}},"required":["id"]}]},"ModelSchemaColumnObject":{"type":"object","description":"A model column representation","required":["name","data_type"],"properties":{"name":{"type":"string","description":"Column name"},"data_type":{"$ref":"#/components/schemas/ModelColumnsDataTypeEnum"},"min":{"type":"number","description":"Min value of integer/float column"},"max":{"type":"number","description":"Max value of integer/float column"},"categories":{"type":"array","description":"List of unique values of a categorical column","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"bins":{"type":"array","description":"Bin boundary values for integer/float column histograms. Must be a strictly increasing array of numbers spanning [min, max]. If omitted, uniform bins are auto-generated from min and max. Minimum 2 and maximum 16 boundary values (1 to 15 bins).","items":{"type":"number"},"maxItems":16,"minItems":2},"replace_with_nulls":{"type":"array","description":"Replace the list of given values to null if found in the events data","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"n_dimensions":{"type":"integer","description":"Number of dimensions of a vector column"}}},"ModelColumnsDataTypeEnum":{"type":"string","description":"Data type of the column","enum":["int","float","str","bool","category","timestamp","vector"]},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}/columns":{"get":{"tags":["model-v3"],"summary":"Details of all columns","description":"Details of all columns for a model","operationId":"getModelAllColumnsV3","parameters":[{"$ref":"#/components/parameters/model_id"}],"responses":{"200":{"description":"Details of all columns for a model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"$ref":"#/components/schemas/ModelColumns"}}}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## GET /v3/models/{model\_id}/columns/{column\_id}

> Details of a specific column for a model

```json
{"openapi":"3.0.3","info":{"title":"Fiddler API - 2.0","version":"2.0"},"tags":[{"name":"model-v3"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"model_id":{"name":"model_id","in":"path","description":"model id path parameter","required":true,"schema":{"type":"string","format":"uuid"}},"column_id":{"name":"column_id","in":"path","description":"column_id path parameter","required":true,"schema":{"type":"string"}}},"schemas":{"ApiResponse":{"type":"object","description":"Response object for standard API responses.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version.\n"},"kind":{"type":"string","default":"NORMAL","enum":["NORMAL"],"description":"Type of response, indicating a normal response.\n"}}},"ModelSchemaColumnObject":{"type":"object","description":"A model column representation","required":["name","data_type"],"properties":{"name":{"type":"string","description":"Column name"},"data_type":{"$ref":"#/components/schemas/ModelColumnsDataTypeEnum"},"min":{"type":"number","description":"Min value of integer/float column"},"max":{"type":"number","description":"Max value of integer/float column"},"categories":{"type":"array","description":"List of unique values of a categorical column","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"bins":{"type":"array","description":"Bin boundary values for integer/float column histograms. Must be a strictly increasing array of numbers spanning [min, max]. If omitted, uniform bins are auto-generated from min and max. Minimum 2 and maximum 16 boundary values (1 to 15 bins).","items":{"type":"number"},"maxItems":16,"minItems":2},"replace_with_nulls":{"type":"array","description":"Replace the list of given values to null if found in the events data","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"n_dimensions":{"type":"integer","description":"Number of dimensions of a vector column"}}},"ModelColumnsDataTypeEnum":{"type":"string","description":"Data type of the column","enum":["int","float","str","bool","category","timestamp","vector"]},"ErrorResponse":{"type":"object","description":"Response object for errors returned by the API.\n","properties":{"api_version":{"type":"string","default":"3.0","enum":["2.0","3.0"],"description":"API version of the response.\n"},"kind":{"type":"string","default":"ERROR","enum":["ERROR"],"description":"Type of response, usually indicating an error.\n"},"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","description":"Represents the code for this error, typically an HTTP response code.\n","default":400,"enum":[400,403,404,500]},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there are multiple errors, it will be the message for the first error.\n"},"errors":{"type":"array","description":"Container for additional information regarding the error, especially for multiple errors.\n","items":{"type":"object","properties":{"reason":{"type":"string","description":"Unique identifier for this error, different from the error code.\n"},"message":{"type":"string","description":"A human-readable message providing more details about the error. If there is only one error, this field will match error.message.\n"},"help":{"type":"string","description":"Link to support or documentation providing more information on the error.\n"}}}}}}}}},"responses":{"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/v3/models/{model_id}/columns/{column_id}":{"get":{"tags":["model-v3"],"description":"Details of a specific column for a model","operationId":"getModelColumnV3","parameters":[{"$ref":"#/components/parameters/model_id"},{"$ref":"#/components/parameters/column_id"}],"responses":{"200":{"description":"Details of a specific column for a model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ModelSchemaColumnObject"}}}]}}}},"400":{"$ref":"#/components/responses/400"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fiddler.ai/api/rest-api/rest-api/model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
