I'm trying to create a user-entity -- as far as i can see i'm doing
everything as listed in the docs, as well as listed in this group --
can anyone help?
here is my POST data in both JSON and PHP array:
{"name":"user-xed9REJotk-6c300461","type":"user-entity","geom":
{"type":"Point","coordinates":[[-73.987121,40.716077]]}}
stdClass Object
(
[name] => user-xed9REJotk-6c300461
[type] => user-entity
[geom] => stdClass Object
(
[type] => Point
[coordinates] => Array
(
[0] => Array
(
[0] => -73.987121
[1] => 40.716077
)
)
)
)
CURL REQUEST
$entity_name = "user-".GEOAPI_KEY."-".$V->getName();
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_HTTPHEADER, array("Accept: application/
json", "Content-Type: application/json"));
curl_setopt($c, CURLOPT_URL, "
http://api.geoapi.com/v1/e/".
$entity_name."?apikey=".GEOAPI_KEY);
curl_setopt($c, CURLOPT_POSTFIELDS, $entity_data);
$content = curl_exec($c);
curl_close($c);
GIVES RESPONSE
stdClass Object
(
[error] => you've encountered an internal error :-( please contact
a...@geoapi.com if it persists
)