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.
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...
final_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>The last time this resource's input was read.
last_updated_config_atstring<date-time>The last time this resource's configuration was updated. If this is more recent than last_updated_output_at, the resource will be rebuilt.
last_updated_output_atstring<date-time>The last time this resource successfully built.
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.
trueThe 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.
...
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 current state of this resource and any updates.
"pending"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.
When this resource was last updated.
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, VALIDATION_FAILED, CONFLICTA 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, VALIDATION_FAILED, CONFLICTA 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, VALIDATION_FAILED, CONFLICTA 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, VALIDATION_FAILED, CONFLICTA 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, VALIDATION_FAILED, CONFLICTA 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": {
"geographies": [
"postcode"
],
"traits": [
"fig/age"
]
},
"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": {
"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": "aws_aurora_mysql"
},
"payload_map": {
"key": "string"
},
"representation": {
"mode": "hashed",
"transform_preset": "default"
},
"resource_type": "targets",
"scope_id": "8e63467d-9478-4fba-b05a-d5e98fd06d12",
"status": "pending",
"status_changed_at": "2024-01-01T12:00:00Z",
"status_error": "string",
"updated_at": "2024-01-01T12:00:00Z"
}