Select to view content in your preferred language

Publishing services through REST API

1671
0
05-29-2013 05:57 AM
AnttiKajanus1
Deactivated User
I try to publish a service through REST API. I have uploaded csv file into ArcGIS Online and I try to publish it with publishParameters.

The file is shared and it is uploaded with my account. I have managed to do this couple months ago but it seems that this works differently now. Any pointers what have happened or have I just broken my code?

Call:
"https://www.arcgis.com/sharing/rest/content/users/-myname-/publish?itemId=f0d499594c7c4600a439481b07...{\"name\":\"TestService123456\",\"locationType\":\"coordinates\",\"latitudeFieldName\":\"Latitude\",\"longitudeFieldName\":\"Longitude\",\"description\":\"test description\",\"maxRecordCount\":500,\"copyrightText\":\"test copyright\",\"layerInfo\":{\"fields\":[{\"name\":\"ObjectId\",\"type\":\"esriFieldTypeInteger\",\"alias\":\"FID\",\"sqlType\":\"sqlTypeInteger\",\"nullable\":false,\"editable\":false,\"domain\":null},{\"name\":\"Level\",\"type\":\"esriFieldTypeInteger\",\"alias\":\"Level\",\"sqlType\":\"sqlTypeOther\",\"nullable\":false,\"editable\":true,\"domain\":{\"type\":\"codedValue\",\"name\":\"RouteDifficulty\",\"codedValues\":[{\"name\":\"Easy\",\"code\":1},{\"name\":\"Normal\",\"code\":2},{\"name\":\"Hard\",\"code\":3},{\"name\":\"Extreme\",\"code\":4}]},\"defaultValue\":null},{\"name\":\"Longitude\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Longitude\",\"nullable\":false,\"editable\":true,\"domain\":null},{\"name\":\"Latitude\",\"type\":\"esriFieldTypeDouble\",\"alias\":\"Latitude\",\"nullable\":false,\"editable\":true,\"domain\":null}]}}&f=json"

Response:
"{\"error\":{\"code\":403,\"messageCode\":\"GWM_0003\",\"message\":\"You do not have permissions to access this resource or perform this operation.\",\"details\":[]}}"
0 Kudos
0 Replies