DS AP

DS API - Family Promise

/openapi.jsonarrow-up-right

GET/infoarrow-up-rightGet 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 Accept header.

  • Example Value

  • Schema

No links

POST/vizmap/{query_json}arrow-up-rightVisual

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.

Input:

query_json : JSON object Sent to DS API from BE

Output:

JSON object sent back to BE

Parameters

Cancel

Name
Description

query_json *(path)

Execute

Responses

Code
Description
Links

200

Successful Response

Media typeapplication/jsonControls Accept header.

  • Example Value

  • Schema

No links

422

Validation Error

Media typeapplication/json

  • Example Value

  • Schema

"detail": [

] } | No links |

POST/veteran_counts/{query_json}arrow-up-rightVeteran 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 Accept header.

  • Example Value

  • Schema

No links

422

Validation Error

Media typeapplication/json

  • Example Value

  • Schema

"detail": [

] } | No links |

POST/age_metric/{query_json}arrow-up-rightAge 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 Accept header.

  • Example Value

  • Schema

No links

422

Validation Error

Media typeapplication/json

  • Example Value

  • Schema

"detail": [

] } | No links |

POST/eligibility/{household_id}arrow-up-rightCheck Eligibility

Checks for eligibility for services based on service provider data.

Parameters


id A household_id entry from the households table.

Returns


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 Accept header.

  • Example Value

  • Schema

No links

422

Validation Error

Media typeapplication/json

  • Example Value

  • Schema

"detail": [

] } | No links |

GET/total_servedarrow-up-rightGet Total Served

Returns the total number of recipients TODO: Return recipients relavent to user

Returns


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 Accept header.

  • Example Value

  • Schema

No links

GET/families_servedarrow-up-rightGet Families Served

Returns the total number of families TODO: Return only those relavent to the user

Returns


int families_served

Parameters

Cancel

No parameters

Execute

Responses

Code
Description
Links

200

Successful Response

Media typeapplication/jsonControls Accept header.

  • Example Value

  • Schema

No links

GET/children_servedarrow-up-rightGet Children Served

Returns the number of recipients under 18, not inclusive.

Returns


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 Accept header.

  • Example Value

  • Schema

No links

GET/genders_servedarrow-up-rightGet Genders Served

Returns the count of each gender served.

Returns


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 Accept header.

  • Example Value

  • Schema

No links

GET/races_servedarrow-up-rightGet Races Served

Returns the count of each race served.

Returns


list races_served

Parameters

Cancel

No parameters

Execute

Responses

Code
Description
Links

200

Successful Response

Media typeapplication/jsonControls Accept header.

  • Example Value

  • Schema

No links

GET/ethnicities_servedarrow-up-rightGet Ethnicities Served

Returns the count of each ethnicity served.

Returns


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 Accept header.

  • Example Value

  • Schema

No links

GET/program_enrollmentarrow-up-rightGet Program Enrollment

Returns the count of services done for each program.

Returns


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 Accept header.

  • Example Value

  • Schema

No links

GET/services_givenarrow-up-rightGet Services Given

Returns the count of each service provided.

Returns


list services_given

Parameters

Try it out

No parameters

Responses

Code
Description
Links

200

Successful Response

Media typeapplication/jsonControls Accept header.

  • Example Value

  • Schema

No links

GET/locations_of_servicearrow-up-rightGet Locations

Returns the count of services at each type of location.

Returns


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 Accept header.

  • Example Value

  • Schema

No links

POST/geocode/arrow-up-rightGet 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 Accept header.

  • Example Value

  • Schema

No links

422

Validation Error

Media typeapplication/json

  • Example Value

  • Schema

"detail": [

] } | No links |

Schemas

HTTPValidationError{

detail

Detail[...]

}ValidationError{

loc*

Location[...]

msg*

string title: Message

type*

string title: Error Type

}

Last updated

Was this helpful?