How to add a geojson file as a hosted feature service using the ArcGIS Rest API
Why is 'diphthong' pronounced the way it is?
Memory usage: #define vs. static const for uint8_t
How much mayhem could I cause as a fish?
When obtaining gender reassignment/plastic surgery overseas, is an emergency travel document required to return home?
Non-Cancer terminal illness that can affect young (age 10-13) girls?
Are the positive and negative planes inner or outer planes in the Great Wheel cosmology model?
Which scales have a major chord built on second note? Which scales have a minor chord built on the seventh note?
Will rerolling initiative each round stop meta-gaming about initiative?
Possible issue with my W4 and tax return
What makes papers publishable in top-tier journals?
A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?
Custom shape shows unwanted extra line
Why didn't Tom Riddle take the presence of Fawkes and the Sorting Hat as more of a threat?
Subsurf on a crown. How can I smooth some edges and keep others sharp?
What species should be used for storage of human minds?
Why do neural networks need so many training examples to perform?
How do I prevent a homebrew Grappling Hook feature from trivializing Tomb of Annihilation?
Can the "Friends" spell be used without making the target hostile?
Am I correct in stating that the study of topology is purely theoretical?
Website seeing my Facebook data?
Not a Long-Winded Riddle
Why is the "Domain users" group missing from this Powershell AD Query?
Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?
Translation needed for 130 years old church document
How to add a geojson file as a hosted feature service using the ArcGIS Rest API
I'm trying to programmatically create a hosted feature service from a .geojson file. I can do this manually without problem using the arcgis.com website. However I cannot get it to work using the rest api. Making a request such as:
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=GEOJSON&title=TestUpload&token=xxxxx
returns an error {"error":{"code":400,"messageCode":"CONT_0113","message":"Item type not valid.","details":[]}}
.
I can upload other content types such as .csv using the same code without problem such as
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=CSV&title=TestUpload&token=xxxxxxx
I don't see geojson listed as an item type here so is it unsupported by the api or an I using the wrong key word?
arcgis-online arcgis-rest-api arcgis-portal
add a comment |
I'm trying to programmatically create a hosted feature service from a .geojson file. I can do this manually without problem using the arcgis.com website. However I cannot get it to work using the rest api. Making a request such as:
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=GEOJSON&title=TestUpload&token=xxxxx
returns an error {"error":{"code":400,"messageCode":"CONT_0113","message":"Item type not valid.","details":[]}}
.
I can upload other content types such as .csv using the same code without problem such as
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=CSV&title=TestUpload&token=xxxxxxx
I don't see geojson listed as an item type here so is it unsupported by the api or an I using the wrong key word?
arcgis-online arcgis-rest-api arcgis-portal
add a comment |
I'm trying to programmatically create a hosted feature service from a .geojson file. I can do this manually without problem using the arcgis.com website. However I cannot get it to work using the rest api. Making a request such as:
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=GEOJSON&title=TestUpload&token=xxxxx
returns an error {"error":{"code":400,"messageCode":"CONT_0113","message":"Item type not valid.","details":[]}}
.
I can upload other content types such as .csv using the same code without problem such as
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=CSV&title=TestUpload&token=xxxxxxx
I don't see geojson listed as an item type here so is it unsupported by the api or an I using the wrong key word?
arcgis-online arcgis-rest-api arcgis-portal
I'm trying to programmatically create a hosted feature service from a .geojson file. I can do this manually without problem using the arcgis.com website. However I cannot get it to work using the rest api. Making a request such as:
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=GEOJSON&title=TestUpload&token=xxxxx
returns an error {"error":{"code":400,"messageCode":"CONT_0113","message":"Item type not valid.","details":[]}}
.
I can upload other content types such as .csv using the same code without problem such as
https://xxxx.maps.arcgis.com/sharing/rest/content/users/xxxx/additem?f=json&&type=CSV&title=TestUpload&token=xxxxxxx
I don't see geojson listed as an item type here so is it unsupported by the api or an I using the wrong key word?
arcgis-online arcgis-rest-api arcgis-portal
arcgis-online arcgis-rest-api arcgis-portal
asked 1 min ago
DowlersDowlers
1,7221423
1,7221423
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313588%2fhow-to-add-a-geojson-file-as-a-hosted-feature-service-using-the-arcgis-rest-api%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313588%2fhow-to-add-a-geojson-file-as-a-hosted-feature-service-using-the-arcgis-rest-api%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown