Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Introduction

This API will return social services data in one of four categories:
organizations, locations, services, contacts
A swagger page is available for testing purposes: /wiki/spaces/CDF/pages/1058340865

Authorization

The authorization will contain an API key and also will use an OAuth2 access token. An API key will be provided to each client that intends to consume this API. A development key and also a separate production key will be provided. If this key is not included then an authorization error will be returned.

The process for getting an OAuth2 token can be found here Authorization

Scope Needed For This API

SouthEast Michigan Social Services Directory - semi-cie.directory/read

Michigan Social Services Directory - cie.directory/read

Base Rest URL

The following are the URLs for this API. Please note that base url for the region you are looking for can be found here Community of Information Exchange Hub Region URL

Headers

The following will be headers that will need to be supplied

Header

Description

x-api-key

This will be a key that will provided by a community information exchange administrator.

ContentType

application/json

Authorization

This will be the access token that was retrieved using your client id and secret

Request URLs:

The following are request URLs that can be appended to valid base urls.

By Category ID:
Each ID call will return basic data for a single result.

/organizations/{organizationId}
/locations/{locationsId}
/services/{servicesId}
/contacts/{contactsId}

 

By Category ID complete:
Each ID complete call will return complete data for a single result.

/organizations/complete/{organizationId}
/locations/complete/{locationsId}
/services/complete/{servicesId}
/contacts/complete/{contactsId}

 

By Category:
Each category call will return the full data set for 1-10 results.
Parameters (All parameters are optional)
query - Allows multiple filtering options: Query Guide
page - Page of results to be returned
per_page - Number of results per page. Default is 10.
sort_by - What field to sort by
order_by - What order to sort by (asc, desc). Default is asc

/organizations
/locations
/services
/contacts

 

By Category Complete:
Each category complete call will return complete data for 1-10 results.
Parameters (All parameters are optional)
query - This allows multiple filtering options: /wiki/spaces/CDF/pages/1270808579
page - Page of results returned
per_page - Number of results per page

/organizations/complete
/locations/complete
/services/complete
/contacts/complete

 

Response

The following will be the response values from the calling of the API. The error responses will conform to the following specification. https://tools.ietf.org/html/rfc7807 .

HTTP Status Code

Description

Response Example

HTTP Status Code

Description

Response Example

200

Successful return of data.

 

[
  {
    "id": 969,
    "organization_id": 969,
    "name": "CHILDREN'S ADVOCACY CENTER OF SOUTHWEST MICHIGAN",
    "alternate_name": "BERRIEN COUNTY COUNCIL FOR CHILDREN,CHILDRENS ADVOCACY CENTER OF SOUTHWEST MICHIGAN",
    "description": null,
    "transportation": "No public transportation available",
    "latitude": "42.0225356",
    "longitude": "86.4205098",
    "region": "GRYP"
  }
]

 

200

Successful return of NO data

 

[]

403

Request is unauthorized and will not be processed. This will happen if the x-api-key is invalid.

 

 

{
  "message": "Forbidden"
}

 

 

400

Request query parameter is malformed and will not be processed.

{
  "type": "cie-directory/validation-error",
  "title": "Invalid Query Object: All query types",
  "detail": "query is not a valid JSON object. Query given: '{\"id\":\"1}' Error message: Unexpected end of JSON input",
  "instance": "4c81a2f2-3272-4fc0-a4f8-f6e0d617b939"
}

 

  • No labels