I can get values through the REST API.
/**
 *  Implements hook_menu().
 */
function sample_menu() {
    $items['api/sample'] = array(
        'title' => 'Sample REST API',
        'page callback' => 'sample_api',
        'access callback' => true
    )
}
/**
 * callback function for /api/sample
 */
function sample_api() {
   $entityBody = file_get_contents('php://input'); // if you want to get post data
   drupal_add_http_header('Content-Type', 'application/json');
   // set values from Fields and so on
   drupal_json_output(array("output" => 'this is rest api sample module output.', 'id' => 12345));
   drupal_exit();
}