list_models_of_dataset_file

DatasetsApi.list_models_of_dataset_file(filename, id, role_id, projection_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

List ML models applicable to a dataset file

Returns ML models the caller can access that are compatible with the given dataset file. Caller must be owner or editor of the dataset (else AUTH-1002). For DWH targets with a supported file type, models are filtered by InputSchema match against DatasetSchema; otherwise models whose SupportedFileFormats include the dataset FileType are returned. Optional projectionExpression limits returned model fields (comma-separated attribute names). Safe to retry (read-only).

Parameters:
  • filename (str) – Dataset file name/key to list compatible models for. Missing filename returns IPV-1008. (required)

  • id (str) – Dataset ID. Must exist and be active with completed registration (else DS-1019 / DS-1002 / DS-1003). (required)

  • role_id (str) – Amorphic role ID the request is authorized against. Must grant owner or editor access on the dataset. (required)

  • projection_expression (str) – Optional comma-separated list of model attribute names to return (DynamoDB-style projection). When omitted, full model items are returned.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

ModelsGetResponseBody

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /datasets/{id}/files/models

Parameter examples

Name

In

Example

filename

query

"sales/monthly_orders/upload_date=2026-08-01/file_orders.csv"

id

path

"b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f"

projectionExpression

query

"ModelId,ModelName,SupportedFileFormats,OutputType"

Success (HTTP 200)

Compatible models returned. Body is ModelsGetResponseBody with models array (may be empty when none match).

Request / response example

{
  "models": [
    {
      "ModelId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "ModelName": "orders_classifier",
      "SupportedFileFormats": [
        "csv"
      ],
      "OutputType": "datasetdata",
      "AccessType": "owner"
    }
  ]
}

Errors

Documented error codes: IPV-1008, DS-1019, DS-1002, AUTH-1002, DS-1003, GE-1008.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: IPV-1008 (missing filename), DS-1019 (dataset not found), DS-1002 (inactive), AUTH-1002 (not owner/editor or no model access).

Missing required filename

{
  "Message": "IPV-1008 - Missing mandatory parameter(s) 'filename'"
}

Dataset does not exist

{
  "Message": "DS-1019 - Dataset with id b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f does not exist"
}

HTTP 500

Backend/generic failure. Body is {“Message”: “<CODE> - <text>”} (e.g. DS-1003 inconsistent metadata, GE-1008).