Documentation


Welcome to the SHAMIRI RESTful API. This documentation page contains the information needed to start making your HTTP request to our data endpoints. The documentation should provide you with all information to get you started on any project using our data. If you have any questions, comments, please email Benny Otieno (benny@shamiri.institute) or The Shamiri Institute Team (team@shamiri.institute).

About this API

This API allows for access to data collected during our field studies (2018 to 2020). Data were collected as part of our ongoing efforts to understand the mental health needs of Kenyan youths and to develop cost-effective and scalable interventions for at-risk youths in low-income countries. There are six different datasets available:

1. Shamiri Group Intervention Pilot RCT (2018).
Contains data for our pilot RCT with 51 youths in Kenya (https://doi.org/10.1016/j.beth.2019.09.005)

2. Shamiri 2018 mental health survey (2018).
Contains cross-sectional data for our 2018 mental health survey (https://doi.org/10.1007/s10826-019-01646-8)

3. Shamiri Group Intervention RCT (2019-to-2020).
Contains data for our high-powered RCT with 413 youths in Kenya (https://doi.org/10.21203/rs.2.12649/v1)

4. Shamiri Digital Intervention Pilot (2019).
Contains data for the pilot of our digital adaptation of Shamiri intervention (https://psycnet.apa.org/doi/10.1037/ccp0000505)

5. Shamiri 2019 Mental Health Survey.
Contains cross-sectional data for our 2019 mental health survey (manuscript under preparation).

6.Shamiri 2019 Single-session RCT (2019).
Contains data from our pilot study comparing the efficacy of various single session mental health interventions
(manuscript under preparation).

Support Shamiri


We believe in open-science and open-data, but we are a small nonprofit. Consider donating to support our work by making a

Important information about the API


Rate Limit

This API is free therefore we have no intention of creating authentication. However, to prevent harmful activity, there is a rate limit of 10,000 requests a day. If you happen to reach that limit, you will receive a 429-status code, and regain access after 24 hours. If for some reason, you need a higher rate limit, email your request to benny@shamiri.institute and team@shamiri.institute

Base URL

https://data.shamiri.institute/

Data Endpoints

Data documentation: we are currently building a full documentation of the data types in our dataset. This document is available here.


Important variable:

id - (integer) ; Unique Id per data value
This id is a unique id for every data in the endpoint

Shamiri Group Intervention Pilot RCT (2018)

Get all data

Contains all data for Shamiri Group Intervention Pilot RCT (2018)

Allows you to access the data from the entire dataset

/shamiri_intervention/shamiri_2018_pilot_rct

Get data by id

Example request by data id

Allows you to access data by unique id (i.e. 6)

/shamiri_intervention/shamiri_2018_pilot_rct/6

                    {
                      "id":6,"time":0,"study_id":"OLY_009","group_leader":"Faith",
                      "condition":"Control","phq1":"3","phq2":"3","phq3":"3","phq4":"3",
                      "phq5":"1","phq6":"3","phq7":"3","phq8":"2","phqfunctioning":"2",
                      "phqtotal":"21","gad1":"3","gad2":"1","gad3":"3","gad4":"1","gad5":"3",
                      "gad6":"3","gad7":"3","gadfunctioning":"2","gadtotal":"17","msss1":"7",
                      "msss2":"7","msss3":"7","msss4":"7","msss5":"7","msss6":"6","msss7":"6",
                      "msss8":"6","msss9":"6","msss10":"7","msss11":"7","msss12":"6","msss0":"7",
                      "mssfam":"6.75","mssfriends":"6","mssstotal":"6.583333333","age":"16", "form":"2",
                      "gender":"F","financialstatus":"2","home":"2","tribe":"Luhya",
                      "personalityq1":"6","personalityq2":"7","personalityq3":"7","personalityq4":"7",
                      "personalityq5":"7","personalityrq1":"2","personalityrq4":"1","personalitytotal":"24",
                      "gratitudeq1":"6","gratitudeq2":"2","gratitudeq3":"6","gratitudeq4":"6",
                      "gratituderg2":"6", "gratituderg4":"2","gratitudetotal":"20","pc1":"3","pc2":"3",
                      "pc3":"2","pc4":"3","pc5":"1","pc6":"1","pc7":"3","pc8":"0",
                      "pc9":"3","pc10":"NA","pc11":"3","pc12":"1","pc13":"0","pc14":"3","pc15":"3",
                      "pc16":"1","pc17":"1","pc18":"3","pc19":"0","pc20":"1","pc21":"1","pc22":"3","pc23":"1",
                      "pc24":"3","pcr3":"1","pcr5":"2","pcr6":"2","pcr8":"3","pcr10":"NA","pcr12":"2",
                      "pcr13":"3","pcr16":"2","pcr17":"2","pcr19":"3","pcr21":"2","pcr23":"2","pcrtotal":"58",
                      "pcracademic":"20","pcrsocial":"19","pcrbehavioral":"19"
                    }
                  

Shamiri 2018 mental health survey (2018)

Get all data

Allows you to access the data from the entire dataset

Contains all data for Shamiri 2018 mental health survey (2018)

/shamiri_intervention/shamiri_2018_all_data

Get data by id

Example request by data id

Allows you to access data by unique id (i.e. 1)

/shamiri_intervention/shamiri_2018_all_data/1

                    {
                      "id":1,"participantid":"SR_002","phq1":"3","phq2":"0","phq3":"1",
                      "phq4":"0","phq5":"0","phq6":"1","phq7":"2","phq8":"2","gad1":"0",
                      "gad2":"0","gad3":"0","gad4":"1","gad5":"1","gad6":"0","gad7":"0",
                      "msss1":"1","msss2":"4","msss3":"6","msss4":"5","msss5":"5",
                      "msss6":"3","msss7":"2","msss8":"7","msss9":"5","msss10":"7",
                      "msss11":"3","msss12":"6","tribe":"Minority","gender":"M",
                      "school":"Starays","age":"16","school_resources":"Poor"
                    }
                  

Shamiri Group Intervention RCT (2019-to-2020)

Get all data

Allows you to access the data from the entire dataset

Contains all data for Shamiri Group Intervention RCT (2019-to-2020)

/shamiri_intervention/shamiri_2019_rct

Get data by id

Allows you to access data by unique id (i.e. 10)

Example request by data id

/shamiri_intervention/shamiri_2019_rct/10

                  {
                  "id":10,"time":"0","participant_id":"19","shamiri_id":"\"SHAMIRI_19_00019\"",
                  "school":"\"ABHS\"","group_leader":"\"Frank\"","condition":"\"Study-skills\"",
                  "epoch_optimism_1":"2","epoch_optimism_2":"2","epoch_optimism_3":"1",
                  "epoch_optimism_4":"2","epoch_happiness_1":"1","epoch_happiness_2":"1",
                  "epoch_happiness_3":"2","epoch_happiness_4":"1","phq_1":"2","phq_2":"3","phq_3":"1",
                  "phq_4":"1","phq_5":"3","phq_6":"3","phq_7":"2","phq_8":"1","phq_functioning":"3",
                  "gad_1":"2","gad_2":"3","gad_3":"3","gad_4":"0","gad_5":"2","gad_6":"3","gad_7":"2",
                  "gad_functioning":"3","msss_1":"2","msss_2":"2","msss_3":"4","msss_4":"3","msss_5":"3",
                  "msss_6":"3","msss_7":"3","msss_8":"3","msss_9":"3","msss_10":"4","msss_11":"5",
                  "msss_12":"2","pcs_academic_01":"2","pcs_academic_02":"2","pcs_academic_03":"1",
                  "pcs_academic_04":"2","pcs_academic_05":"2","pcs_academic_06":"2","pcs_academic_07":"1",
                  "pcs_academic_08":"1","pcsc_01":"1","pcsc_02":"0","pcsc_03":"0","pcsc_04":"1","pcsc_05":"0",
                  "pcsc_06":"0","pcsc_07":"1","pcsc_08":"0","gratitude_1":"2","gratitude_2":"2",
                  "gratitude_3":"2","gratitude_4":"2","gratitude_5":"2","gratitude_6":"2","ucla_1":"2",
                  "ucla_2":"3","ucla_3":"1","ucla_4":"3","ucla_5":"3","ucla_6":"2","ucla_7":"4","ucla_8":"\"NA\"",
                  "age":"15","form":"1","gender":"\"Male\"","tribe":"\"KALENJIN\"","county":"\"UASIN GISHU\"",
                  "financial_status":"4","home":"1","siblings":"4","religion":"0","parents":"0","parents_dead":"4",
                  "fathers_education":"2","mothers_education":"3","co_curricular":"2","sports":"2",
                  "percieved_academic_abilities":"4"
                }
                  

Shamiri 2019 Mental Health Survey.

Get all data

Allows you to access the data from the entire dataset

Contains all data for Shamiri 2019 Mental Health Survey.

/shamiri_intervention/shamiri_2019_all_data

Get data by id

Allows you to access data by unique id (i.e. 1)

Example request by data id

/shamiri_intervention/shamiri_2019_all_data/1

                  {
                    "id":1,"shamiri_id":"\"SHAMIRI_19_00002\"","school":"\"ABHS\"","school_type":"\"National\"",
                    "msss_1":"7","msss_2":"2","msss_3":"7","msss_4":"6","msss_5":"3","msss_6":"4","msss_7":"4",
                    "msss_8":"7","msss_9":"5","msss_10":"4","msss_11":"7","msss_12":"6","gad_1":"1","gad_2":"2",
                    "gad_3":"2","gad_4":"2","gad_5":"1","gad_6":"2","gad_7":"1","gad_functioning":"1","phq_1":"1",
                    "phq_2":"1","phq_3":"3","phq_4":"0","phq_5":"1","phq_6":"2","phq_7":"3","phq_8":"1",
                    "phq_functioning":"3","epoch_optimism_1":"2","epoch_optimism_2":"4","epoch_optimism_3":"5",
                    "epoch_optimism_4":"2","epoch_happiness_1":"2","epoch_happiness_2":"4","epoch_happiness_3":"2",
                    "epoch_happiness_4":"5","pcs_academic_01":"3","pcs_academic_02":"3","pcs_academic_03":"3",
                    "pcs_academic_04":"3","pcs_academic_05":"3","pcs_academic_06":"3","pcs_academic_07":"3",
                    "pcs_academic_08":"3","ucla_1":"4","ucla_2":"4","ucla_3":"2","ucla_4":"4","ucla_5":"3","ucla_6":"2",
                    "ucla_7":"4","ucla_8":"3","gratitude_1":"6","gratitude_2":"5","gratitude_3":"6","gratitude_4":"5",
                    "gratitude_5":"6","gratitude_6":"4","age":"14","form":"\"Form 1\"","gender":"\"Male\"",
                    "tribe":"\"KIKUYU\"","tribal_classification":"\"Majority\"","county":"\"NAIROBI\"",
                    "financial_status":"\"Quite well-off\"","home":"\"City\"","siblings":"1",
                    "religion":"\"Christian protestant\"","parents":"\"Both parents\"","parents_dead":"\"None\"",
                    "num_parents_dead":"0","fathers_education":"\"University\"","mothers_education":"\"University\"",
                    "co_curricular":"\"Not involved at all\"","sports":"\"No\"",
                    "percieved_academic_abilities":"\"Not satisfactory\"","phq_total":"12","gad_total":"11"
                  }
                  

Shamiri 2019 Single-session RCT (2019).

Get all data

Allows you to access the data from the entire dataset

Contains all data for Shamiri 2019 Single-session RCT (2019).

/shamiri_intervention/shamiri_2019_single_session_pilot_RCT

Get data by id

Allows you to access data by unique id (i.e. 1)

Example request by data id

/shamiri_intervention/shamiri_2019_single_session_pilot_RCT/1

                    {
                      "id":1,"time":1,"signed":"1","class":"A","school":"KDSS",
                      "participant_id":"7000","group_leader":"Patricia","condition":"Values",
                      "gad_1":"1","gad_2":"0","gad_3":"1","gad_4":"0","gad_5":"2","gad_6":"2",
                      "gad_7":"2","gad_functioning":"0","phq_1":"2","phq_2":"1","phq_3":"0",
                      "phq_4":"1","phq_5":"0","phq_6":"2","phq_7":"2","phq_8":"1","phq_functioning":"2",
                      "epoch_happiness_1":"2","epoch_happiness_2":"1","epoch_happiness_3":"5",
                      "epoch_happiness_4":"2","age":"15","form":"1","gender":"2","financial_status":"2"
                    }
                  

Shamiri Digital Intervention Pilot (2019).

Get all data

Allows you to access the data from the entire dataset

Contains all data for Shamiri Digital Intervention Pilot (2019).

/shamiri_intervention/shamiri_2019_digital_pilot_RCT

Get data by id

Allows you to access data by unique id (i.e. 1)

Example request by data id

/shamiri_intervention/shamiri_2019_digital_pilot_RCT/1

                    {
                      "id":1,"time":0,"study_id":"1WALGGRWF8GALJWUP9GZCN","condition":"Intervention",
                      "phq_1":"0","phq_2":"3","phq_3":"1","phq_4":"0","phq_5":"3","phq_6":"3",
                      "phq_7":"3","phq_8":"1","gad_1":"1","gad_2":"1","gad_3":"3","gad_4":"0",
                      "gad_5":"3","gad_6":"1","gad_7":"1","happiness_1":"2","happiness_2":"2",
                      "happiness_3":"2","happiness_4":"3","optimism_1":"1","optimism_2":"3",
                      "optimism_3":"3","optimism_4":"2","swemwbs_1":"2","swemwbs_2":"4",
                      "swemwbs_3":"1","swemwbs_4":"2","swemwbs_5":"2","swemwbs_6":"2",
                      "swemwbs_7":"4","age":"15","form":"1","gender":"F"
                    }