get_analytics_of_dataset_file

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

Analytics of a file

Returns analytics/profiling for a dataset file plus optional transformed_file_url (presigned or N/A). Query filename is required. analytics.Status may be Unavailable when profiling is not ready. Caller needs dataset access.

Parameters:
  • filename (str) – File key/name to retrieve analytics for. (required)

  • id (str) – Dataset ID containing the file. (required)

  • role_id (str) – Amorphic role ID used for authorization. (required)

  • _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:

FileAnalytics

Returns:

Returns the result object.

Request and Response Examples

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

Success (HTTP 200)

File analytics payload (FileAnalytics).

Request / response example

{
  "analytics": {
    "Status": "Unavailable"
  },
  "transformed_file_url": "N/A"
}

Errors

Documented error codes: AUTH-1012, DS-1002, GE-1034.

HTTP 400

Validation/auth failure. Codes include AUTH-1012 (missing filename or no dataset access). Inactive dataset (DS-1002) and missing IsActive (GE-1034) return 500, not 400.

Missing filename query parameter

{
  "Message": "AUTH-1012 - Invalid resource path, must pass filename as Query Parameter"
}

No dataset access

{
  "Message": "AUTH-1012 - User not authorized to view the dataset abc123 details"
}

HTTP 500

Backend/generic failure. Includes inactive dataset (DS-1002) and missing IsActive metadata (GE-1034).

Inactive dataset

{
  "Message": "DS-1002 - Inactive DatasetId - abc123"
}

Missing IsActive in dataset metadata

{
  "Message": "GE-1034 - Missing required key 'IsActive' in the dataset metadata"
}