Create constant: 
API: http://server/api/constants
JSON Payload: 
{
    "name": "PI",
    "value": "3.14159265359"
}

Response: 
{
    "httpStatus": "Created",
    "httpStatusCode": 201,
    "status": "OK",
    "response": {
        "responseType": "ObjectReport",
        "errorReports": [],
        "uid": "uarMA1P99k1",
        "klass": "org.hisp.dhis.constant.Constant"
    }
}