Select to view content in your preferred language

Publish agol feature service from a JSON featurecollection

3761
2
07-29-2014 08:28 AM
jamieeyre
Deactivated User

I am trying to publish a feature service to agol over the rest api (java command line application) using the "publish" end point. I am using a JSON featurecollection.

When I make the call to publish, the result in agol is two feature services with the same name.

One of the feature services has a layer, and this layer is always inaccessible, and the other featureservice has no layer and is just broken. I have checked the featurecollection json, and it looks fine. I do not get any error back from the rest response. Is there anyway i can look at some log files from agol to see what is going wrong?

Also, is this the wrong approach? I was thinking that maybe I should use the createService end point, and then maybe the addFeatures end point, but i don't see an endpoint for creating a layer in the service.

Any help would be appreciated.

Cheers,

Jamie

Tags (2)
0 Kudos
2 Replies
jamieeyre
Deactivated User

When I try to access the created featurelayer, I get the following error:

Layer 'xxxxxxx' does not exist or is inaccessible.

0 Kudos
jamieeyre
Deactivated User

It seems I actually did have a problem with the featureCollection JSON. I was missing the OBJECTID field.

The service is now created, but, as i said before, there are two Feature Services created, one with the layer I specified in my featurecollection JSON, and another that contains no layers. Just an empty FeatureService.

Any idea why this might be?

0 Kudos