I am working on a connector with a Sitecore Content Hub environnement. I am using the REST API, sending POST request to create some Assets.
I wonder if there is a way to set a taxonomy relation with its identifier instead of the id ?
For example to set FinalLifeCycleStatusToAsset
with M.Final.LifeCycle.Status.Approved
instead of 544
.
My request is a POST
to https://{{hostname}}/api/entities/
With the following body :
{
"properties":{
"Title":"REST API Asset",
"Description": {
"en-US": "<p>Description</p>"
}
},
"relations": {
"FinalLifeCycleStatusToAsset": {
"parent": {
"href": "http://{{hostname}}/api/entities/544"
}
}
},
"entitydefinition":{
"href":"http://{{hostname}}/api/entitydefinitions/M.Asset"
}
}
I have tried to set href to http://{{hostname}}/api/entities/identifier/M.Final.LifeCycle.Status.Approved
by it gives me in response this message : "Unable to match the route 'EntityById' template with the available route values."
To conclude, is it possible to use M.Final.LifeCycle.Status.Approved
instead of 544
when created an asset ? And how can I do that ?
Thanks for your help,