Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

API 2.0 - Created segments will not honor tags

Avatar

Avatar
Affirm 1
Level 1
sesamechicken
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 1
View profile

Avatar
Affirm 1
Level 1
sesamechicken
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 1
View profile
sesamechicken
Level 1

04-06-2021

Howdy! I'm using the API to create a new segment and when the response comes back (as a 200), tags is just an empty array. Am I doing something wrong or is this some kind of bug with the API?

 

POST to https://analytics.adobe.io/api/kroger1/segments?expansion=tags

Also, it seems that no matter what ownerID I use, I am the owner of the segment created. ¯\_(ツ)_/¯

Payload:

 

{
  "name": "chris-test-segment",
  "description": "A segment created using the Adobe REST API",
  "rsid": "MYRSID",
  "owner": {
    "id": OWNERID
  },
  "definition": {
    "container": {
      "context": "hits",
      "func": "container",
      "pred": {
        "str": "my-test_A",
        "val": {
          "func": "attr",
          "name": "variables/evar171"
        },
        "func": "contains",
        "description": "AB Test: Groups (v171)"
      }
    },
    "func": "segment",
     "version": [
      1,
      0,
      0
    ]
  },
 "tags": [
    {
      "id": 119957,
      "name": "ABTesting",
      "components": []
    },
    {
      "id": 125841,
      "name": "Test",
      "components": []
    },
    {
      "id": 154050,
      "name": "AB Test ",
      "components": []
    }
  ],
  "modified": "2021-06-04T16:22:53.842Z",
  "created": "2021-06-04T16:22:53.842Z"
}

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 1
Level 1
sesamechicken
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 1
View profile

Avatar
Affirm 1
Level 1
sesamechicken
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
Validate 1
View profile
sesamechicken
Level 1

08-06-2021

Got the answer via GitHub - tagging segments upon creation is not supported and one must use the `/componentmetadata/tags` endpoint to tag newly created segments.

 

Ref: https://github.com/AdobeDocs/analytics-2.0-apis/issues/200#issuecomment-856044712

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 10
Level 2
amgup
Level 2

Likes

15 likes

Total Posts

61 posts

Correct Reply

9 solutions
Top badges earned
Affirm 10
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Affirm 10
Level 2
amgup
Level 2

Likes

15 likes

Total Posts

61 posts

Correct Reply

9 solutions
Top badges earned
Affirm 10
Boost 5
Boost 3
Boost 10
Boost 1
View profile
amgup
Level 2

06-06-2021

@sesamechicken  Can you try the same request on swagger UI as given below ? Make sure that all the required parameters are filled in proper format.

https://adobedocs.github.io/analytics-2.0-apis/#/segments/segments_createSegment