Select to view content in your preferred language

How to set tags on portal items via REST?

1253
2
09-30-2020 03:21 AM
EmreCan
Emerging Contributor

I am trying to create a service with tags via REST. When I look at the service in the portal, the tags were not applied. What am I doing wrong?
I created the service with the createService operation. 

This is what my request and my response look like:

Request

URI: https://<usercontent-url>/createService
Method: POST
Body: createParameters={"name": "Sample"}&outputType=featureService&description=Should be tagged&tagss=custom-tag&snippet=Exported data for Sample&isView=false&f=json

Response

Body: {"encodedServiceURL":"<url>","itemId":"<itemId>","name":"Sample","serviceItemId":"<serviceItemId>","serviceurl":"<serviceUrl>","size":-1,"success":true,"type":"Feature Service","description":"Should be tagged","tags": "custom-tag","snippet":"Exported data for Sample","isView":false}

When I look for the service in the portal afterwards, there are no tags added.

2 Replies
EmreCan
Emerging Contributor

Sorry there is a typo in my request:

createParameters={"name": "Sample"}&outputType=featureService&description=Should be tagged&tags=custom-tag&snippet=Exported data for Sample&isView=false&f=json

But this does not solve my problem.

0 Kudos
by Anonymous User
Not applicable

Hi Emre

It might help you.

Update Item—ArcGIS REST API | ArcGIS for Developers 

Regards,

Bing

0 Kudos