Links
Comment on page

Data Sources database

Use the API to find, use, and manage Data Sources.

Base URL

https://data-sources.pdap.io

Search Tokens

get
[base-url]
/quick-search/{search}/{location}
Quick Search Data Sources by search term and location
The quick search endpoint is located in resources/QuickSearch.py. The quick search endpoint executes its search using the agency_source_link table in the Data Sources database, which links each data source in the data_sources table with its associated agency in the agencies table. This endpoint is meant for use by the search tokens endpoint only.
Parameters
Path
search*
String
Checks partial matches on any of the following properties on the data_source table: "name", "description", "record_type", and "tags". The search term will is case insensitive and will match singular and pluralized versions of the term.
location*
String
Checks partial matches on any of the following properties on the agencies table: "county_name", "state_iso", "municipality", "agency_type", "jurisdiction_type", "name"
Header
Authorization*
Value formatted as "Bearer [access token/api key]”
Responses
200: OK
Successful operation
400: Bad Request
No API key found
403: Forbidden
Invalid API key
500: Internal Server Error
Something went wrong

Data Sources

get
[base-url]
/data-sources
Get all Data Sources
The data sources endpoint is located in resources/DataSources.py. The data sources endpoint returns all rows in the corresponding Data Sources database table.
Parameters
Header
Authorization*
Value formatted as "Bearer [access token/api key]”
Responses
200: OK
Successful operation
400: Bad Request
No API key found
403: Forbidden
Invalid API key
get
[base-url]
/data-sources/id
Get Data Source by Id
The data sources endpoint is located in resources/DataSources.py. The data source by id endpoint returns just the row for the data source that corresponds to the id passed.
Parameters
Header
Authorization*
Value formatted as "Bearer [access token/api key]”
Responses
200: OK
Successful operation
400: Bad Request
No API key found
403: Forbidden
Invalid API key

Agencies

get
[base-url]
/agencies/{page}
Get all Agencies
The agencies endpoint is located in resources/Agencies.py. The agencies endpoint returns 1000 rows from the corresponding Data Sources database table offset by the page number passed.
Parameters
Path
page*
Passing 1 will return the first 1000 rows. Subsequent page number return subsequent results
Header
Authorization
Value formatted as "Bearer [access token/api key]”
Responses
200: OK
Successful operation
400: Bad Request
No API key found
403: Forbidden
Invalid API key