-
Notifications
You must be signed in to change notification settings - Fork 9
APMIS v1 API Documentation
APMIS (Afghanistan Polio Management Information System) is a supplemental immunization activities management system to manage the vaccination activities in the country.
APMIS API v1 is built from the ground up with a REST API that makes it easy for developers and sysadmins to automate access to campaign data through REST endpoints.
These docs describe how to use the APMIS API. We hope you enjoy these docs, and please don't hesitate to file an issue if you see anything missing.
There are many reasons to use the APMIS API. The most common use case is to gather report information for a given campaign, so that you can build custom reports in software you're most familiar with, such as Excel or Power Bi.
To authenticate an API request, you should provide your APMIS REST USER username and password in the Authorization
header. This can also be passed through a browser provided prompt at your first request call.
Please note that this is likely to leave traces in things like your history if accessing the API through a browser.
GET /sormas-rest/v1/campaigns
Parameter | Type | Description |
---|---|---|
username |
string |
Required. Your REST USER USERNAME |
password |
string |
Required. Your REST USER PASSWORD |
All API endpoints return the JSON representation of the resources requested. However, if an invalid request is submitted, or some other error occurs, APMIS returns a JSON response in the following format:
{
"message" : string,
"success" : bool,
"data" : string
}
The message
attribute contains a message commonly used to indicate errors.
The success
attribute describes if the transaction was successful or not.
The data
attribute contains any other metadata associated with the response. This will be an escaped string containing JSON data.
APMIS returns the following status codes in its API:
Status Code | Description |
---|---|
200 | OK |
400 | BAD REQUEST |
404 | NOT FOUND |
500 | INTERNAL SERVER ERROR |
The following endpoints are available in this version
Endpoint | Parameter | Description |
---|---|---|
/v1/campaigns | return a list of all active campaigns | |
/v1/campaigns/{uuid} | Campaign uuid Long
|
return the campaign information a campaign |
/v1/campaigns/{uuid}/forms | Campaign uuid Long
|
return the campaign form metas of the campaign |
/v1/campaigns/{campaign_uuid}/forms/{form_uuid} | Campaign uuid Long , Form uuid Long
|
return all campaign form data of a form associated with the campaign |
The /v1/campaigns
is the starting point for all requests.