DS AP
Last updated
Last updated
GET/infoGet Url
Verify we can connect to the database, and return the database URL in this format: dialect://user:password@host/dbname The password will be hidden with ***
Parameters
Cancel
No parameters
ExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download |
"database_url": "postgresql://aztugzfejptrww:***@ec2-107-22-245-82.compute-1.amazonaws.com:5432/db9egku1e3j21v" | |
} Response headers |
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
POST/vizmap/{query_json}Visual
Creates an interactive map with dots pertaining to location of service. The dots on the map are color coded by service. Because there is no latitude or longitude in BE database, we geocode in order to get latitude and longitude. With the acquired latitude and longitude, the map visualization can be created and sent to the BE in JSON form.
query_json : JSON object Sent to DS API from BE
JSON object sent back to BE
Parameters
Cancel
Name | Description |
---|---|
query_json *(path) |
Execute
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
422 | Validation Error Media typeapplication/json
| |
"detail": [ |
] } | No links |
POST/veteran_counts/{query_json}Veteran Counts
This function will return a bar chart of the count of veterans being served by Family Promise, in JSON form.
Parameters
Cancel
Name | Description |
---|---|
query_json *(path) |
Execute
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
422 | Validation Error Media typeapplication/json
| |
"detail": [ |
] } | No links |
POST/age_metric/{query_json}Age Metric
This function will return a table visual of the count of recipients by age group being served by Family Promise, in JSON form.
Parameters
Cancel
Name | Description |
---|---|
query_json *(path) |
Execute
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
422 | Validation Error Media typeapplication/json
| |
"detail": [ |
] } | No links |
POST/eligibility/{household_id}Check Eligibility
Checks for eligibility for services based on service provider data.
id A household_id entry from the households table.
JSON "resident_assistance_eligibility": bool "reduced_bus_fare_eligibility": bool
Parameters
Cancel
Name | Description |
---|---|
household_id *string(path) |
Execute
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
422 | Validation Error Media typeapplication/json
| |
"detail": [ |
] } | No links |
GET/total_servedGet Total Served
Returns the total number of recipients TODO: Return recipients relavent to user
int total_served
Parameters
Cancel
No parameters
ExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download Response headers |
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/families_servedGet Families Served
Returns the total number of families TODO: Return only those relavent to the user
int families_served
Parameters
Cancel
No parameters
Execute
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/children_servedGet Children Served
Returns the number of recipients under 18, not inclusive.
int children_served
Parameters
Cancel
No parameters
ExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download Response headers |
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/genders_servedGet Genders Served
Returns the count of each gender served.
list genders_served
Parameters
Cancel
No parameters
ExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download |
{ |
}, { "gender": "Male", "total": 12 }, { "gender": "Transgender: M to F", "total": 4 }, { "gender": "Transgender: F to M", "total": 5 }, { "gender": "Gender fluid", "total": 6 }, { "gender": "Agender", "total": 5 }, { "gender": "Androgynous", "total": 8 }, { "gender": "Bi-gender", "total": 8 }, { "gender": "Non-binary", "total": 4 }, { "gender": "Demi-boy", "total": 3 }, { "gender": "Demi-girl", "total": 6 }, { "gender": "Genderqueer", "total": 7 }, { "gender": "Gender nonconforming", "total": 2 }, { "gender": "Tri-gender", "total": 6 }, { "gender": "All genders", "total": 6 }, { "gender": "In the middle of boy and girl", "total": 8 }, { "gender": "Intersex", "total": 10 }, { "gender": "Not sure", "total": 2 }, { "gender": "Prefer not to say", "total": 7 }, { "gender": "Other", "total": 0 } ]
Response headers
|
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/races_servedGet Races Served
Returns the count of each race served.
list races_served
Parameters
Cancel
No parameters
Execute
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/ethnicities_servedGet Ethnicities Served
Returns the count of each ethnicity served.
list ethnicities_served
Parameters
Cancel
No parameters
ExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download |
{ |
}, { "ethnicity": "Non-Hispanic/Non-Latino", "total": 51 }, { "ethnicity": "Prefer not to say", "total": 2 } ]
Response headers
|
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/program_enrollmentGet Program Enrollment
Returns the count of services done for each program.
list program_enrollment
Parameters
Cancel
No parameters
ExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download |
{ |
}, { "program_name": "Prevention/Diversion", "total": 177 }, { "program_name": "Aftercare", "total": 151 }, { "program_name": "Test setup by Admin ", "total": 0 } ]
Response headers
|
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/services_givenGet Services Given
Returns the count of each service provided.
list services_given
Parameters
Try it out
No parameters
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
GET/locations_of_serviceGet Locations
Returns the count of services at each type of location.
list locations_of_service
Parameters
Cancel
No parameters
ExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download |
{ |
}, { "location_type": "Halfway House", "total": 142 }, { "location_type": "Service Distribution Center", "total": 110 }, { "location_type": "Unaffiliated Service Distribution Location", "total": 104 } ]
Response headers
|
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
POST/geocode/Get Latitude Longitude
{"address": "123 Gilman Dr W", "address_line2": "", "city": "Seattle", "state": "WA", "zip": "98119", "country": "United States"}
{"latitude": 47.64971, "longitude": -117.39764}
Parameters
Cancel
No parameters
Request body
application/jsonExecuteClear
Responses
Curl
Request URL
Server response
Code | Details |
---|---|
200 | Response body Download |
"latitude": 47.64971, | |
"longitude": -117.39764 | |
} Response headers |
Responses
Code | Description | Links |
---|---|---|
200 | Successful Response Media typeapplication/jsonControls
| No links |
422 | Validation Error Media typeapplication/json
| |
"detail": [ |
] } | No links |
Schemas
HTTPValidationError{
detail | Detail[...] |
}ValidationError{
loc* | Location[...] |
msg* | string title: Message |
type* | string title: Error Type |
}