Retrieve a target
https://api.faraday.ai/v1/targets/{target_id}Get details on a specific target
Authentication
Provide your API key in the Authorization header. You can find your API key in the Settings page of the dashboard.
Authorization: Bearer YOUR_TOKENpath parameters
The UUID of a target
Responses
200Information about the target
analysis_configobjectConfiguration for the analysis of the target.
archived_atstring<date-time>If not null, this resource will no longer receive updates, but will still be visable.
connection_idstring<uuid>If this is a replication (externally-hosted) target, the UUID of a connection - see /connections for more detail.
If this is not a replication target, omit this parameter.
"5e0dfa56-2d52-4c06-a870-bc79c71e86a3"countintegerThe number of records in the target. This is only included in the response if the target is built.
When this resource was created. It says nothing about builds; to check status, see Status and timestamps.
custom_structurearray[object]By default, targets include all columns in the target preview, with no name changes.
Users may use this parameter to specify ...
filterobjectFilter the rows exported in a target using the scope payload elements.
- Deprecated: To filter by outcome scores, use
outcome_score. - To filter by outcome probability, use
outcome_probability...
not allowedfinal_structurearray[object]Final structure of the target export. This is only included in the response if the target is built.
human_readablebooleanBy default, column names are exported in a machine-readable format with underscored uuids.
Setting this to true replaces ids with literates in the exported column names.
A unique ID for this resource.
"ba647bc4-55f1-49f9-b0da-fccff5b51bfe"last_read_input_atstring<date-time>When the latest finished build started reading this resource's configuration and inputs; omitted until the first build finishes. Once this is at or after last_updated_config_at, a build with the cur...
last_updated_config_atstring<date-time>When Faraday registered the latest change to this resource's configuration, or the latest force_update. A create, update or force_update response carries the value then on record (an update that c...
last_updated_output_atstring<date-time>When a build last changed this resource's output. A build that finishes with nothing new to write does not move it.
limitdiscriminated type (method)Restrict the number of rows exported in a target.
- To apply an absolute row limit, use
row_count. - Deprecated: To filter by percentile scores, use
percentile(usefilter outcome_percentile...
managedbooleanA managed target requires special configuration from a Faraday admin, and is read-only.
trueA user-friendly name of the target.
^(?!\s*$).+64The export target configuration options. These vary by connection type.
payload_mapdictionary[string, string]Deprecated: use custom_structure.
By default, targets include all columns in the target preview, with no name changes.
...
allowed (values are string)Choose how the scopes's output should be formatted for this target. The following modes are available:
aggregated
- This option will produce one row per geographical area.
- This option...
The state of this resource's latest build. Until last_read_input_at is at or after last_updated_config_at, no build with the current configuration has finished (starting or running means one i...
"ready"new, starting, running, ready, errorstatus_changed_atstring<date-time>When the status of this resource was last updated.
status_errorstringIf this resource has status == "error", this will contain an error message.
status_needs_fix_fromstringWhat Faraday is waiting for before it builds a resource with status == "error" again. user: a configuration change to this resource or a force_update. support: Faraday support, and `force_upda...
user, supportWhen this resource was last changed, by an edit or by Faraday while building it. Don't use it to check status; use last_updated_config_at and last_read_input_at as Status and timestamps explains.
400The request was invalid.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, INVALID_API_KEY, ACCOUNT_SUSPENDED, ACCOUNT_DELETED, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
401No API key was supplied.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, INVALID_API_KEY, ACCOUNT_SUSPENDED, ACCOUNT_DELETED, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
403Access to this resource was forbidden.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, INVALID_API_KEY, ACCOUNT_SUSPENDED, ACCOUNT_DELETED, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
404The requested resource ID was not found.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, INVALID_API_KEY, ACCOUNT_SUSPENDED, ACCOUNT_DELETED, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
500An internal server error occurred.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, INVALID_API_KEY, ACCOUNT_SUSPENDED, ACCOUNT_DELETED, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
Tags
Test request
Request snippet
curl -X GET 'https://api.faraday.ai/v1/targets/{target_id}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'Example response
{
"analysis_config": {
"attributes": [
"fig/age"
],
"geographies": [
"postcode"
],
"traits": [
"orders_total"
]
},
"archived_at": "2024-01-01T12:00:00Z",
"connection_id": "5e0dfa56-2d52-4c06-a870-bc79c71e86a3",
"count": 0,
"created_at": "2024-01-01T12:00:00Z",
"custom_structure": [
{
"aggregation": "avg",
"aggregation_criteria": "string",
"is_identity_col": true,
"output_col": "string (pattern: ^[_a-z][_a-z0-9]*$)",
"scope_col": "string (pattern: ^[_a-z][_a-z0-9]*$)"
}
],
"filter": {
"attribute": [
{
"_eq": "string",
"_gt": 0,
"_gte": 0,
"_in": [
"string"
],
"_lt": 0,
"_lte": 0,
"_matches": "string",
"_neq": "string",
"_nin": [
"string"
],
"_nnull": true,
"_null": true,
"name": "string"
}
],
"cohort_membership": [
{
"_eq": true,
"cohort_id": "b80217ae-7628-4c66-8a19-5bf452495c39"
}
],
"outcome_percentile": [
{
"_eq": 1,
"_gt": 1,
"_gte": 1,
"_lt": 1,
"_lte": 1,
"_nnull": true,
"_null": true,
"outcome_id": "b80217ae-7628-4c66-8a19-5bf452495c39"
}
],
"outcome_probability": [
{
"_eq": 0,
"_gt": 0,
"_gte": 0,
"_lt": 0,
"_lte": 0,
"_nnull": true,
"_null": true,
"outcome_id": "b80217ae-7628-4c66-8a19-5bf452495c39"
}
],
"outcome_score": [
{
"_eq": 0,
"_gt": 0,
"_gte": 0,
"_lt": 0,
"_lte": 0,
"_nnull": true,
"_null": true,
"outcome_id": "b80217ae-7628-4c66-8a19-5bf452495c39"
}
],
"persona": [
{
"_eq": true,
"persona_id": "7a19cdb4-cf4b-4cbd-95ec-aa60b8fda90b",
"persona_set_id": "b80217ae-7628-4c66-8a19-5bf452495c39"
}
],
"recommender_rank": [
{
"_eq": 1,
"_gt": 1,
"_gte": 1,
"_lt": 1,
"_lte": 1,
"_nnull": true,
"_null": true,
"recommender_id": "b80217ae-7628-4c66-8a19-5bf452495c39"
}
],
"recommender_uncalibrated_probability": [
{
"_eq": 0,
"_gt": 0,
"_gte": 0,
"_lt": 0,
"_lte": 0,
"_nnull": true,
"_null": true,
"recommender_id": "b80217ae-7628-4c66-8a19-5bf452495c39"
}
],
"trait": [
{
"_eq": "string",
"_gt": 0,
"_gte": 0,
"_in": [
"string"
],
"_lt": 0,
"_lte": 0,
"_matches": "string",
"_neq": "string",
"_nin": [
"string"
],
"_nnull": true,
"_null": true,
"name": "string"
}
]
},
"final_structure": [
{
"aggregation": "avg",
"aggregation_criteria": "string",
"is_identity_col": true,
"output_col": "string (pattern: ^[_a-z][_a-z0-9]*$)",
"scope_col": "string (pattern: ^[_a-z][_a-z0-9]*$)"
}
],
"human_readable": true,
"id": "ba647bc4-55f1-49f9-b0da-fccff5b51bfe",
"last_read_input_at": "2024-01-01T12:00:00Z",
"last_updated_config_at": "2024-01-01T12:00:00Z",
"last_updated_output_at": "2024-01-01T12:00:00Z",
"limit": {
"direction": "ascending",
"method": "row_count",
"outcome_id": "b80217ae-7628-4c66-8a19-5bf452495c39",
"threshold": 1000
},
"managed": true,
"name": "string (pattern: ^(?!\\s*$).+)",
"options": {
"table_name": "string (pattern: ^[_a-zA-Z][a-zA-Z0-9_]+$)",
"type": "athena"
},
"payload_map": {
"key": "string"
},
"representation": {
"impute_payload": [
"attributes"
],
"mode": "hashed",
"transform_preset": "default"
},
"resource_type": "targets",
"scope_id": "8e63467d-9478-4fba-b05a-d5e98fd06d12",
"status": "ready",
"status_changed_at": "2024-01-01T12:00:00Z",
"status_error": "string",
"status_needs_fix_from": "user",
"updated_at": "2024-01-01T12:00:00Z"
}