Decoration Change to Share URNs

This page outlines the changes to decoration on share URN in processedActivity in Compliance Events API. These changes will take effect on November 6, 2019.

Currently, the Compliance Events API returns a specific share schema for all decorations of share URNs. Going forward, the schema will change to the UGCPost schema for all new share URN decorations. Any activities generated BEFORE November 6, 2019 will have the existing share schema. Any activities generated AFTER November 6, 2019 will have the new UGCPost schema.

Recommendation

As new activities identified with a Share URN will decorate using the UGCPost schema while the old activities remain decorated with share schema, your application must be able to dynamically handle both UGCPost URN and Share URN schemas. Thankfully in the Compliance Events API, activities are already surfacing UGCPost URNs decorated via UGCPost schema and can be reused to handle the UGCPost schema decoration for share URNs.

To identify which schema to use when parsing the data, look for fields specific to each schema. For example, the owner field is present in the Share URN schema, but not the UGCPost URN schema. Conversely, the author field is present in the UGCPost URN schema and not the Share URN schema.

The example below provides a sample of the current and the new response of a social action using a Share URN. The only change is to the domainEntity~ field which changes the decoration from Share URN schema to UGCPost URN schema.

In addition, you can input share URN into UGC Post API to get UGCPost schema back. This will be what is returned in the Compliance Events API.

Once these changes take effect, no new activities will have the share schema decoration. We recommend cleaning up the share schema logic after November 30, 2019.

Current Response

{
  "owner": "urn:li:person:yrZCpj2ZYQ",
  "resourceId": "urn:li:activity:123456789",
  "configVersion": 18,
  "method": "CREATE",
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "created": {
      "actor": "urn:li:person:yrZCpj2ZYQ",
      "time": 1568060270953
    },
    "lastModified": {
      "actor": "urn:li:person:yrZCpj2ZYQ",
      "time": 1568060270953
    },
    "object": "urn:li:activity:123456789"
  },
  "resourceName": "socialActions/likes",
  "resourceUri": "/socialActions/urn:li:activity:123456789/likes/urn:li:person:yrZCpj2ZYQ",
  "actor": "urn:li:person:yrZCpj2ZYQ",
  "activityId": "8656b42f-47e1-43ec-8f61-7218d6111d92",
  "processedAt": 1568060301290,
  "capturedAt": 1568060270961,
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "created": {...},
    "lastModified": {...},
    "object~": {
      "actor": "urn:li:company:0000",
      "domainEntity~": {
        "owner": "urn:li:company:0000",
        "owner~": {
          "localizedName": "LinkedIn",
          "names": [
            {
              "name": "LinkedIn",
              "active": true,
              "type": "CANONICAL",
              "locale": "en_US"
            }
          ]
        },
        "clientApp~": {
          "name": "Test Application",
          "id": 123456
        },
        "created": {
          "actor": "urn:li:person:r6EOmQFLwk",
          "actor~": {...}
        },
        "clientApp": "urn:li:developerApplication:123456",
        "serviceProvider": "API",
        "text": {
          "annotations": [],
          "text": "Text for sample share demo for #sharedecoration"
        },
        "lastModified": {
          "actor": "urn:li:csUser:0",
          "time": 1567946210796
        },
        "distribution": {
          "linkedInDistributionTarget": {
            "visibleToGuest": true
          }
        },
        "content": {
          "contentEntities": [
            {
              "description": "Description for sample share demo for share decoration",
              "entityLocation": "https://linkedin.com",
              "title": "Title for sample share demo for share decoration",
              "thumbnails": [
                {
                  "imageSpecificContent": {
                    "size": 97227,
                    "width": 938,
                    "height": 528
                  },
                  "resolvedUrl": "https://linkedin.com/thumbnails"
                }
              ],
              "entity": "urn:li:article:123456789"
            }
          ],
          "shareMediaCategory": "ARTICLE",
          "description": "Description for sample share demo for share decoration",
          "title": "Title for sample share demo for share decoration"
        }
      },
      "actor~": {...},
      "verb": "linkedin:share",
      "domainEntity": "urn:li:share:123456789",
      "object": "urn:li:share:123456789"
    },
    "object": "urn:li:activity:123456789"
  },
  "id": 296263969
}

New Response

{
  "owner": "urn:li:person:yrZCpj2ZYQ",
  "resourceId": "urn:li:activity:123456789",
  "configVersion": 18,
  "method": "CREATE",
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "created": {
      "actor": "urn:li:person:yrZCpj2ZYQ",
      "time": 1568060270953
    },
    "lastModified": {
      "actor": "urn:li:person:yrZCpj2ZYQ",
      "time": 1568060270953
    },
    "object": "urn:li:activity:123456789"
  },
  "resourceName": "socialActions/likes",
  "resourceUri": "/socialActions/urn:li:activity:123456789/likes/urn:li:person:yrZCpj2ZYQ",
  "actor": "urn:li:person:yrZCpj2ZYQ",
  "activityId": "8656b42f-47e1-43ec-8f61-7218d6111d92",
  "processedAt": 1568060301290,
  "capturedAt": 1568060270961,
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "created": {...},
    "lastModified": {...},
    "object~": {
      "actor": "urn:li:company:0000",
      "domainEntity~": {
        "lifecycleState": "PUBLISHED",
        "visibility": {
          "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
        },
        "specificContent": {
          "com.linkedin.ugc.ShareContent": {
            "shareMediaCategory": "ARTICLE",
            "shareFeatures": {
              "hashtags": [
                "urn:li:hashtag:sharedecoration"
              ]
            },
            "shareCommentary": {
              "inferredLocale": "en_US",
              "attributes": [
                {
                  "start": 31,
                  "length": 16,
                  "value": {
                    "com.linkedin.common.HashtagAttributedEntity": {
                      "hashtag": "urn:li:hashtag:sharedecoration"
                    }
                  }
                }
              ],
              "text": "Text for sample share demo for #sharedecoration"
            },
            "media": [
              {
                "description": {
                  "text": "Description for sample share demo for share decoration"
                },
                "media": "urn:li:article:123456789",
                "originalUrl": "https://linkedin.com",
                "thumbnails": [
                  {
                    "size": 97227,
                    "width": 938,
                    "url": "https://linkedin.com/thumbnails",
                    "height": 528
                  }
                ],
                "title": {
                  "text": "Title for sample share demo for share decoration"
                },
                "status": "READY"
              }
            ]
          }
        },
        "author": "urn:li:organization:0000",
        "author~": {...},
        "created": {
          "actor": "urn:li:person:r6EOmQFLwk",
          "actor~": {...},
          "time": 1567946103839
        },
        "origin": "API",
        "versionTag": "2",
        "distribution": {
          "feedDistribution": "MAIN_FEED",
          "externalDistributionChannels": [],
          "distributedViaFollowFeed": true
        },
        "clientApplication": "urn:li:developerApplication:123456",
        "clientApplication~": {...},
        "ugcOrigin": "API",
        "id": "urn:li:share:123456789",
        "firstPublishedAt": 1567946103839,
        "lastModified": {
          "actor": "urn:li:csUser:7",
          "time": 1567946210796
        }
      },
      "actor~": {...},
      "verb": "linkedin:share",
      "domainEntity": "urn:li:share:123456789",
      "object": "urn:li:share:123456789"
    },
    "object": "urn:li:activity:123456789"
  },
  "id": 296263969
}