get_dataset_files_access¶
- DatasetsApi.get_dataset_files_access(id, role_id, get_dataset_files_access_body, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Check user access for dataset files
Returns per-file access flags for the supplied file keys. When the dataset is not TBAC-enabled, all requested files return true. When TBAC-enabled, flags reflect FileLevelTags vs caller tags. Body Files is required (max 30). Caller needs any dataset access.
- Parameters:
id (str) – Dataset ID containing the files. (required)
role_id (str) – Amorphic role ID used for authorization. (required)
get_dataset_files_access_body (GetDatasetFilesAccessBody) – (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:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /datasets/{id}/file-access
Request¶
Request / response example
{
"Files": [
"data/sales_q1.csv",
"data/sales_q2.csv"
]
}
Success (HTTP 200)¶
Per-file access map under Files.
Request / response example
{
"Files": [
{
"data/sales_q1.csv": true
},
{
"data/sales_q2.csv": false
}
]
}
Errors¶
Documented error codes: IPV-1008, IPV-1076, IPV-1002, AUTH-1011, DS-1002, DS-1003.
HTTP 400
Validation/auth failure. Codes include IPV-1008 (missing Files), IPV-1076 (>30 files), IPV-1002, AUTH-1011. Inactive dataset (DS-1002) and missing IsActive (DS-1003) return 500, not 400.
Too many files
{
"Message": "IPV-1076 - The length of parameter 'Files' exceeds the max limit(30)"
}
Missing Files
{
"Message": "IPV-1008 - Invalid request body, missing key(s) - Files"
}
HTTP 500
Backend/generic failure. Includes inactive dataset (DS-1002) and missing IsActive metadata (DS-1003).