Tag Creation - Issues (docs & methods)
Closed this issue · 3 comments
Hello,
Trying to create new tags via API. I have full access to the account but the message that is coming back is : {'error_code': '403025', 'message': 'Profile is not valid'}
path used : "/componentmetadata/tags"
message sent:
tagCreationList = [
{
"id": 0,
"name": "segments-review-march2021",
"description": "string",
"components": [
{
"componentType": "segment",
"componentId": "s4222_5fc765f29da6950a3c71a25d",
"tags": [
"segments-review-march2021"
]
}
]
}
]
It is following the documentation
Has anyone successfully created a new tag via API ?
Following this, I tried to update existing components with tags. (I even looked at the UI request)
But that as well is not working.
Method used : https://adobedocs.github.io/analytics-2.0-apis/#/component-metadata%20-%20tags/saveTagComponentList
data passed :
[
{
"componentType": "segment",
"componentId": "s4222_5fc765f29da6950a3c71a25d",
"tags": [
"segments-review-march2021-api",
"AdHoc"
]
}
]
Error being returned
{'errorCode': 'invalid_json_input',
'errorDescription': 'Invalid JSON. At least one field format is not recognized or cannot be parsed. - Error caused by exceptionMessage=Cannot construct instance of `com.adobe.analytics.services.componentmetadata.modules.componentmetadata.tags.model.Tag` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value (\'segments-review-march2021-api\')\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 89] (through reference chain: java.util.ArrayList[0]->com.adobe.analytics.services.componentmetadata.modules.componentmetadata.tags.model.TaggedComponent["tags"]->java.util.ArrayList[0])',
'errorId': 'e97fb2d9-f23e-49f0-aed0-9a41d9d7a760'}
By NOT following the documentation, I am able to add the tags.
Using the following body:
[
{
"componentType": "segment",
"componentId": "s4222_5fc765f29da6950a3c71a25d",
"tags": [
{"id" : "98709"},
{"id": "91930"}
]
}
]
Some questions remained:
- How to create Tags without the UI ?
Because there is no UI option to create Tags without associating it to a component, tough to reverse engineer. - Can someone reviewed and fix the documentation or the method ?
@pitchmuc the Adobe Analytics 2.0 API documentation was recently updated to have more details around tags: https://www.adobe.io/apis/experiencecloud/analytics/docs.html#!AdobeDocs/analytics-2.0-apis/master/tags.md