Question

How to update the metadata of an item in ArcGIS Online?


Badge

Hi,

I would like to update metadata of an item in ArcGIS Online using FME Desktop.

With the help of Thomas Maschler I succeeded in updating the AOL metadata using a Python script: https://gist.github.com/FrieseWoudloper/590d428afce5d2d873bd6b4b81acc1d9

I try to do the same in FME Deskop using HTTPCaller, but this isn't working properly. The workspace runs succesfully and returns HTTP status code 200 (OK), but the metadata is unchanged.

See attached my workspace. I also have an XML-file for testing purposes.

Any help would be appreciated.

Willy


10 replies

Badge
I think that this is my problem:

 

 

What is the equivalent of this line of Python code in HTTPCaller?

 

 

f = {'metadata': ('metadata.xml', open(metadata, 'rb'), 'text/xml', {'Expires': '0'})}
Badge

The solution turned out to be quite easy :-)

Still I am interested to know if there is a better way to update the metadata.

Badge

Hi,

I am also trying to upload metadata to argcis online for a very long time now.

Could you please elaborate your solution?

I used the example workspace from friesewoudloper but I keep getting the http status code 200.

What do I put as "item"? Is it simply the name of my arcgis online object?

Best Regards, Ron.

Badge

Hi,

I am also trying to upload metadata to argcis online for a very long time now.

Could you please elaborate your solution?

I used the example workspace from friesewoudloper but I keep getting the http status code 200.

What do I put as "item"? Is it simply the name of my arcgis online object?

Best Regards, Ron.

Item is the global unique identifier of the item.

 

Let's say you want to update metadata of a hosted feature service. Look at the URL of the page of the hosted feature service.

 

For example http://provgroningen.maps.arcgis.com/home/item.html?id=91d9c4ef1f564ee4ac7f8358c54514b6

 

Item is 91d9c4ef1f564ee4ac7f8358c54514b6

 

Maybe I should have named the parameter item_id.

 

 

 

 

Badge

Hi,

I am also trying to upload metadata to argcis online for a very long time now.

Could you please elaborate your solution?

I used the example workspace from friesewoudloper but I keep getting the http status code 200.

What do I put as "item"? Is it simply the name of my arcgis online object?

Best Regards, Ron.

agol-metadata-new.fmw

 

 

Apparently ESRI made some changes to their API. See attached the updated workspace. You have to change the values of all private parameters.

 

 

 

 

Badge

Hi,

I am also trying to upload metadata to argcis online for a very long time now.

Could you please elaborate your solution?

I used the example workspace from friesewoudloper but I keep getting the http status code 200.

What do I put as "item"? Is it simply the name of my arcgis online object?

Best Regards, Ron.

Thanks! It works! :-)

Item is the global unique identifier of the item.

 

Let's say you want to update metadata of a hosted feature service. Look at the URL of the page of the hosted feature service.

 

For example http://provgroningen.maps.arcgis.com/home/item.html?id=91d9c4ef1f564ee4ac7f8358c54514b6

 

Item is 91d9c4ef1f564ee4ac7f8358c54514b6

 

Maybe I should have named the parameter item_id.

 

 

 

 

Hello Friesewoudlooper,

 

Is it possible to share the workspace with again? When i try to download it now it is not available anymore.

 

 

Thanks,

Jan

Badge

Hello Friesewoudlooper,

 

Is it possible to share the workspace with again? When i try to download it now it is not available anymore.

 

 

Thanks,

Jan

https://github.com/FrieseWoudloper/fme/tree/master/agol-metadata

Thanks for the link!

Badge

@friesewoudloper is the workspace (arcgis-rest-api-experiment.fmw) still available? I can't download it via the link....

Reply