Hi,
I just started playing with the API. Looks great so far, but I still get some 500 errors.
I tried the following and all are working as expected:
- /api/v1/study-cost-calculator/
- /api/v1/eligibility-requirements/
- /api/v1/studies/
- /api/v1/studies/{id}
- /api/v1/submissions/
- /api/v1/submissions/{id}/transition/
- /api/v1/submissions/bonus-payments/
- /api/v1/bulk-bonus-payments/{id}/pay/
But when trying to use /api/v1/eligibility-count/
or /api/v1/studies/
(POST to create a draft) I get a 500 status.
Trying the two POST data examples in the API docs with /api/v1/eligibility-count/
I get:
Status 500, when using first example:
{
"eligibility_requirements": []
}
Status 500, when using second example:
{
"eligibility_requirements": [
{
"type": "range",
"attributes": [
{
"name": "min_age",
"value": 27
},
{
"name": "max_age",
"value": 61
}
],
"query": {
"id": "54ac6ea9fdf99b2204feb893"
},
"_cls": "web.eligibility.models.AgeRangeEligibilityRequirement"
}
]
}
However, I get status 200 when using:
{}
Error message of status 500:
{'error': {'additional_information': '/api/v1/errors/',
'detail': 'The API was unable to process the request.: \n'
' A problem has occurred while trying to process the request.\n'
' Please see error message for more details.\n'
' If the issue persists please contact an admin.\n'
' ',
'error_code': 100000,
'interactive': False,
'status': 500,
'title': "We're sorry. There was an error while performing the "
'requested action.'}}
Also get the same error when trying the minimal_study
example for /api/v1/studies/
.
What am I doing wrong here?