Get a list of resource changes for a given time period

Description

Get all of the resources changes during a given time period. This will allow a partner to keep up on which resource records are being changed and keep there copy of the information. Note that this functionality will only be give to certain partners.

Quote of Use Case

“I would like to get a list of service record changes for the last 24 hours.”

Step 1 - Get an access token

This will retrieve an access token from CIE Identity Provider. Please note that if the system has already retrieved a access token that has not yet expired then that can be used with other calls. An access token is valid for 24 hours after it has been minted. The following explains on how to get https://brightstreetgroup.atlassian.net/wiki/spaces/CIEP/pages/1309802703

Step 2 - Call [GET /services/changes?startDateTime=2023-10-10T00:00:00] Get a list of id’s

The services changes call will return a array of objects that identify the service id of the change, the date and time modification, and also the type of data change that was made .

Example CURL

curl -X 'GET' \ 'https://directory-uat.mi-cie.org/v1/services/changes?startDateTime=2023-06-15T13:45:30' \ -H 'accept: application/json' \ -H 'x-api-key: ZGV2ZWxv******OTg2ODhlMDY4ZGNk' \ -H 'authorization: Bearer eyJraWQiOiJsYmFFa05FR25XbWJ4****sccMLjqZxd_HtCudVAPbqdNS_e_w' Request URL

Response

The following is a sample response. These taxonomy IDs (e.g., BD-1800.2000) can be used to filter the query to only resources that provide certain specific services (e.g., food pantries)

[ { "serviceId": 1, "modifiedDateTime": "2023-06-15T13:45:30", "modification": "UPDATE" }, { "serviceId": 2, "modifiedDateTime": "2023-06-15T13:45:30", "modification": "CREATE" } ]

Step 3 - Call [GET /services/complete/{id}] call with the filter query string parameter

Now that we have the the service id a service complete call can be used to get the latest version of the service record.

curl -X 'GET' \ 'https://directory-dev.mi-cie.org/v1/services/complete/{id}' \ -H 'accept: application/json' \ -H 'x-api-key: ZGV2ZWxvcG1******tOTg2ODhlMDY4ZGNk' \ -H 'authorization: Bearer eyJraWQiOiJsYmFFa05F***hmsrnqPtCIqhR8-gg'

Response

The following is a sample response from the query.

 

Step 4 - Use the same steps to get Organization and also Location changes

The same steps will be needed to go through to get the organizations and location changes for a given time period.

Here are links to the changes api’s for locations and organizations

https://brightstreetgroup.atlassian.net/wiki/spaces/CIEP/pages/1862402082

https://brightstreetgroup.atlassian.net/wiki/spaces/CIEP/pages/1862664217