Returns a list of available columns that can be requested in CSV generation for a specific type.
typepossible values:awardortransaction
{
"columns": [{
"title": "Assistance Type",
"value": "assistance_type"
},
{
"title": "Awarding Agency",
"value": "awarding_agency"
}
]
}
POST a JSON body:
{
"filters": {},
"columns": [
"assistance_type",
"awarding_agency"
]
}
filtersis a standard Search v2 JSON filter objectcolumnsis an array of column names (using thevaluestring from the/v2/download/columnsendpoint)- API should generate a CSV with columns in the same order as the array
- An empty columns array returns all available columns
{
"total_size": 12345,
"total_columns": 19,
"total_rows": 55555,
"status": "queued",
"file_name": "award_9fn24der3.csv",
"url": "",
"message": ""
}
total_sizeis the estimated file size of the CSV in kilobytestotal_columnsis the number of columns in the CSVtotal_rowsis the number of rows in the CSVfile_nameis the name of the CSV file that will be generated- File name is
award_followed by a timestamp (hashed)
- File name is
statusis a string representing the current state of the CSV generation request. Possible values are:queued- file is queued for generation or currently being generatedcomplete- file is ready for downloadfailed- an error occurred while generatingdoes_not_exist- no such file generation request exists for that file name and type
url- the URL for the file- If the file is not ready, it returns an empty string
message- a human readable error message if thestatusisfailedordoes_not_exist, otherwise it is an empty string
POST a JSON body:
{
"filters": {},
"columns": [
"assistance_type",
"awarding_agency"
]
}
filtersis a standard Search v2 JSON filter objectcolumnsis an array of column names (using thevaluestring from the/v2/download/columnsendpoint)- API should generate a CSV with columns in the same order as the array
- An empty columns array returns all available columns
{
"total_size": 12345,
"total_columns": 19,
"total_rows": 55555,
"status": "queued",
"file_name": "transaction_9fn24der3.csv",
"url": "",
"message": ""
}
total_sizeis the estimated file size of the CSV in kilobytestotal_columnsis the number of columns in the CSVtotal_rowsis the number of rows in the CSVfile_nameis the name of the CSV file that will be generated- File name is
transaction_followed by a timestamp (hashed)
- File name is
statusis a string representing the current state of the CSV generation request. Possible values are:queued- file is queued for generation or currently being generatedcomplete- file is ready for downloadfailed- an error occurred while generatingdoes_not_exist- no such file generation request exists for that file name and type
url- the URL for the file- If the file is not ready, it returns an empty string
message- a human readable error message if thestatusisfailedordoes_not_exist, otherwise it is an empty string
Returns the current status of a download/CSV generation request.
file_nameis thefile_namereturned in thev2/download/[type]responsetypemust be eitherawardortransaction
{
"total_size": 12345,
"total_columns": 19,
"total_rows": 55555,
"file_name": "transaction_9fn24der3.csv",
"status": "complete",
"url": "https://s3.amazonaws.com/award_9fn24der3.csv",
"message": "Your file failed because the database crashed."
}
total_sizeis the estimated file size of the CSV in kilobytestotal_columnsis the number of columns in the CSVtotal_rowsis the number of rows in the CSVfile_nameis the name of the CSV file that will be generated- File name is
transaction_oraward_followed by a timestamp (hashed)
- File name is
statusis a string representing the current state of the CSV generation request. Possible values are:queued- file is queued for generation or currently being generatedcomplete- file is ready for downloadfailed- an error occurred while generatingdoes_not_exist- no such file generation request exists for that file name and type
url- the URL for the file- If the file is not ready, it returns an empty string
message- a human readable error message if thestatusisfailedordoes_not_exist, otherwise it is an empty string
Slight endpoint changes in code:
/v2/download/award is now /v2/download/awards
/v2/download/transaction is now /v2/download/transactions
/v2/download/columns is still in development due to historical load