get_resource_by_resource_name¶
- RetrieveResourceNamesApi.get_resource_by_resource_name(role_id, resource_type, resource_name, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Get resource id by resource name
Returns ResourceId and ResourceName for the given resource type and name. Supports types such as datasets, dashboards, datasources, roles, and schedules. resource_type is matched case-insensitively. Datasets may use domain::DatasetName when the name alone is not unique. Caller must have access to the resource (roles skip that check). Not found returns IPV-1002; unsupported types such as domains or tenants return GE-1106.
- Parameters:
role_id (str) – Amorphic role ID used for authorization (required)
resource_type (str) – Resource type, for example datasets, dashboards, datasources, roles, or schedules (required)
resource_name (str) – Resource name. For datasets, use domain::DatasetName when the name is not unique across domains (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: GET /resourcetypes/{resource_type}/resources/{resource_name}
Success (HTTP 200)¶
Resource id and name returned
Request / response example
{
"ResourceId": "job-3f2a1b9c",
"ResourceName": "nightly-etl-job"
}
Errors¶
Documented error codes: IPV-1002, AUTH-1026, DS-1068, IPV-1004, GE-1106.
HTTP 400
Invalid input or not authorized. Common codes include IPV-1002 (not found), AUTH-1026 (no access), DS-1068 (ambiguous dataset name), IPV-1004 (unsupported type), and GE-1106
Request / response example
{
"Message": "Invalid resource type - 'invalid-type' is not supported"
}
HTTP 500
Something went wrong at backend