I am new to ArcGIS. I would like to know where I could find the service URL to list all the items in the MyContents tab which could be found by logging into my organization's ArcGIS URL. I want to do this using the Javascript or Rest API provided by ArcGIS.
I was able to get Token from ArcGIS using
https://www.arcgis.com/sharing/rest/oauth2/token
this URL.
When I try to upload a file to one of the sample servers using Code, I am not able to do it. It works in postman though.
These are the code that I used for uploading a file to a sample server which failed.
$.ajax({
async: true,
crossDomain: true,
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/uploads/upload",
method: "POST",
headers: {
"Content-Type": "multipart/form-data",
"Accept": "application/json"
},
contentType: false,
processData: false,
mimeType: "multipart/form-data",
data: {
"f": "json",
"file": "C:/Users/georgy.f/Downloads/Screenshot_20190422-114420.jpg",
"description": "descrioption",
}
}).done(function(response) {
console.log(response);
});
Another code for uploading that I tried.
var uploadsettings = {
"async": false,
"crossDomain": true,
"url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/uploads/upload",
"method": "POST",
"headers": {
"Content-Type": "multipart/form-data",
"Accept": "application/json"
},
contentType: false,
processData: false,
"mimeType": "multipart/form-data",
"data": form {
"f": "json",
"file": "https://images.pexels.com/photos/67636/rose-blue-flower-rose-blooms-67636.jpeg",
"description": "descrioption",
}
}
My aim is to list all the MapViews and SceneViews available in my organization.
Also, will I be able to view BIM models in ArcGIS using Javascript or REST API by somehow uploading it to ArcGIS server?