Forum Discussion

GSYSJobs's avatar
GSYSJobs
Copper Contributor
Jul 06, 2023

Create a new Enterprise Keyword via REST API

I am trying to make a CRUD system for the Enterprise keywords of SharePoint with the REST API. I've managed to change the value of an existing keyword, but I don't know how to create a new keyword by scratch.

 

This is the POST Url that I use for updating an existing keyword with a new one:

 

_api/Web/lists/getByTitle('TaxonomyHiddenList')/items(21)

 

In the body I specify the new values of the keyword. As you can see I access to the TaxonomyHiddenList because is more easy to work with.

When I create a new tag manually, it will appear on this list

 

 

 

{
                "__metadata": {
                    "id": "b7d2be55-ced0-44fb-af44-5754f7156cec",
                    "uri": "https://contoso.sharepoint.com/sites/Test1/_api/Web/Lists(guid'd4d5c300-331f-4077-b59c-f0fd60e04a5e')/Items(21)",
                    "etag": "\"1\"",
                    "type": "SP.Data.TaxonomyHiddenListListItem"
                },
                "IdForTerm": "dc5e5716-5f14-41dd-b500-339a4b1acd1d",
                "Term": "YesTAG"
            }

 

So, is there any way to create a new Keyword without typing it manually?

 

Thank you,

No RepliesBe the first to reply

Resources