Decoration Change to Activity URNs

This page will outline the changes for decoration on activity URN in processedActivity in Compliance Events API . This change took effect on October 20, 2018.

Below outlines the new activity URN schema and a sample response:

New Activity URN Schema

Field Name Object Type Description
actor URN Entity that performed the action.
domainEntity optional URN Urn referencing the action that was performed. This URN can be resolved to get details of the action. For example, if a share action was performed then this field will capture URN of the share. This will be further decorated to provide more contextual reference.
object URN Entity on which action was performed. This will be further decorated to provide more contextual reference.
verb string Type of the action that was performed.

schema format of activity urn decoration response

{
  "object": "urn:li:activity:6422861848709726123",  
  "object~": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "domainEntity": "urn:li:share:6422861848344821123",
    "domainEntity~": {...},
    "object": "urn:li:share:6422861848344821123",
    "object~": {...},
    "verb": "linkedin:share"
  }
}

Activity URNs appear mostly in object fields in Social Actions resources. Below are examples to demonstrate what the new decoration schemas will be:

Share Type Activity

current sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "urn:li:activity:6422861848709726123"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "object~": {
      "actor": {
        "urn": "urn:li:person:yrZCpj2ZYQ",
        "urn~": {...}
      },
      "verb": {
        "properties": {
          "li.verbs.linkedin.Post": {
            "shareUrn": "urn:li:share:6422861848344821123",
            "shareUrn~": {
              "owner": "urn:li:person:yrZCpj2ZYQ",
              "owner~": {...},
              "created": {
                "actor": "urn:li:person:yrZCpj2ZYQ",
                "actor~": {...},
                "time": 1531329595651
              },
              "text": {
                "text": "testing"
              },
              "lastModified": {
                "actor": "urn:li:person:3XwTkgAJbS",
                "time": 1531329806139
              },
              "distribution": {
                "linkedInDistributionTarget": {
                  "visibleToGuest": true
                }
              }
            }
          }
        }
      },
      "object": {}
    },
    "object": "urn:li:activity:6422861848709726123"
  }
}

new sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "urn:li:activity:6422861848709726123"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "object~": {
      "actor": "urn:li:person:yrZCpj2ZYQ",
      "domainEntity~": {
        "owner": "urn:li:person:yrZCpj2ZYQ",
        "owner~": {...},
        "created": {
          "actor": "urn:li:person:yrZCpj2ZYQ",
          "actor~": {...},
          "time": 1531329595651
        },
        "text": {
          "text": "this is a share"
        },
        "lastModified": {
          "actor": "urn:li:person:yrZCpj2ZYQ",
          "time": 1531329806139
        },
        "distribution": {
          "linkedInDistributionTarget": {
            "visibleToGuest": true
          }
        }
      },
      "actor~": {...},
      "verb": "linkedin:share",
      "domainEntity": "urn:li:share:6422861848344821123",
      "object": "urn:li:share:6422861848344821123"
    },
    "object": "urn:li:activity:6422861848709726123"
  }
}

Work Anniversary Type Activity

current sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "urn:li:activity:6424089203360960123"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "object~": {
      "actor": {
        "urn": "urn:li:person:ymtUfDtizK",
        "urn~": {...}
      },
      "verb": {
        "properties": {
          "li.verbs.linkedin.Anniversary": {}
        }
      },
      "object": {
        "com.linkedin.ucp.ObjectSummary": {
          "type": "linkedin:anniversary",
          "properties": {
            "li.objects.linkedin.Anniversary": {
              "numYears": 4,
              "sinceMonth": 7,
              "positionUrn": "urn:li:position:(urn:li:person:ymtUfDtizK,717780123)",
              "companyName": "LinkedIn",
              "positionUrn~": {
                "companyName": {
                  "localized": {
                    "en_US": "LinkedIn"
                  },
                  "preferredLocale": {
                    "country": "US",
                    "language": "en"
                  }
                },
                "title": {
                  "localized": {
                    "en_US": "API Developer"
                  },
                  "preferredLocale": {
                    "country": "US",
                    "language": "en"
                  }
                }
              }
            }
          }
        }
      },
      "target": {
        "urn": "urn:li:company:1384",
        "urn~": {...},
        "title": "LinkedIn",
        "type": "linkedin:company"
      }
    },
    "object": "urn:li:activity:6424089203360960123"
  }
}

new sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "urn:li:activity:6424089203360960123"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "object~": {
      "actor": "urn:li:person:ymtUfDtizK",
      "object~": {
        "companyName": {
          "localized": {
            "en_US": "LinkedIn"
          },
          "preferredLocale": {
            "country": "US",
            "language": "en"
          }
        },
        "title": {
          "localized": {
            "en_US": "API Developer"
          },
          "preferredLocale": {
            "country": "US",
            "language": "en"
          }
        }
      },
      "domainEntity~": {
        "createdAt": 1524166778647,
        "detail": {
          "com.linkedin.props.WorkAnniversary": {
            "date": {
              "month": 7,
              "year": 2014,
              "day": 1
            },
            "numberOfYears": 4,
            "affiliate!": {
              "companyName": {
                "localized": {
                  "en_US": "LinkedIn"
                },
                "preferredLocale": {
                  "country": "US",
                  "language": "en"
                }
              },
              "title": {
                "localized": {
                  "en_US": "API Developer"
                },
                "preferredLocale": {
                  "country": "US",
                  "language": "en"
                }
              }
            },
            "affiliate": "urn:li:position:(urn:li:person:ymtUfDtizK,717780123)"
          }
        }
      },
      "actor~": {
        ...
      },
      "verb": "linkedin:anniversary",
      "domainEntity": "urn:li:prop:(WORK_ANNIVERSARY,BobSmith123456)",
      "object": "urn:li:position:(urn:li:person:ymtUfDtizK,717780123)"
    },
    "object": "urn:li:activity:6424089203360960123"
  }
}

Job Change Type Activity

current sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "object": "urn:li:activity:6422955713366237123"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "object~": {
      "actor": {
        "urn": "urn:li:person:OdrZ9RhHMX",
        "urn~": {...}
      },
      "verb": {
        "properties": {
          "li.verbs.linkedin.Profile_change_position": {}
        }
      },
      "object": {
        "com.linkedin.ucp.ObjectSummary": {
          "type": "linkedin:job-change",
          "properties": {
            "li.objects.linkedin.Job_change": {
              "profileUpdates": [
                {
                  "title": "Co-Founder",
                  "type": "linkedin:position"
                }
              ]
            }
          }
        }
      },
      "target": {
        "urn": "urn:li:company:0000",
        "urn~": {
          "names": [
            {
              "name": "LinkedIn",
              "active": true,
              "locale": "en_US",
              "type": "CANONICAL"
            }
          ]
        },
        "title": "LinkedIn",
        "type": "linkedin:company"
      }
    },
    "object": "urn:li:activity:6422955713366237123"
  }
}

new sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "object": "urn:li:activity:6422955713366237123"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "object~": {
      "actor": "urn:li:person:OdrZ9RhHMX",
      "domainEntity~": {
        "createdAt": 1529711358277,
        "detail": {
          "com.linkedin.props.PositionChange": {
            "newPosition~": {
              "companyName": {
                "localized": {
                  "en_US": "LinkedIn"
                },
                "preferredLocale": {
                  "country": "US",
                  "language": "en"
                }
              },
              "title": {
                "localized": {
                  "en_US": "Co-Founder"
                },
                "preferredLocale": {
                  "country": "US",
                  "language": "en"
                }
              }
            },
            "newPosition": "urn:li:position:(urn:li:person:OdrZ9RhHMX,47290786)"
          }
        }
      },
      "actor~": {...},
      "verb": "linkedin:profile-change-position",
      "domainEntity": "urn:li:prop:(JOB_CHANGE,_019u5ffN900_gz7Lhi6nEd4Z7tEIxli6h3FRcUGlSj5mQ=)",
      "object": "urn:li:prop:(JOB_CHANGE,_019u5ffN900_gz7Lhi6nEd4Z7tEIxli6h3FRcUGlSj5mQ=)"
    },
    "object": "urn:li:activity:6422955713366237123"
  }
}

Comment Type Activity

The comment activity type will surface the same comment schema with an embedded object that can reference to an activity URN . The activity URN will be decorated in the same way as the example types shown above.

current sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "urn:li:comment:(activity:6422861848709726208,6425527540101705728)"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {
      ...
    },
    "object~": {
      "actor": "urn:li:person:yrZCpj2ZYQ",
      "actor~": {...},
      "created": {
        "actor": "urn:li:person:yrZCpj2ZYQ",
        "actor~": {...},
        "time": 1531965146089
      },
      "id": "6425527540101705728",
      "lastModified": {
        "actor": "urn:li:person:yrZCpj2ZYQ",
        "actor~": {...},
        "time": 1531965146089
      },
      "message": {
        "attributes": [],
        "text": "this is a comment"
      },
      "object~": {
        "actor": {
          "urn": "urn:li:person:yrZCpj2ZYQ",
          "urn~": {...}
        },
        "verb": {
          "properties": {
            "li.verbs.linkedin.Post": {
              "shareUrn": "urn:li:share:6422861848344821760",
              "shareUrn~": {
                "owner": "urn:li:person:yrZCpj2ZYQ",
                "owner~": {...},
                "created": {
                  "actor": "urn:li:person:yrZCpj2ZYQ",
                  "actor~": {...},
                  "time": 1531329595651
                },
                "text": {
                  "text": "this is a share"
                },
                "lastModified": {
                  "actor": "urn:li:person:3XwTkgAJbS",
                  "time": 1531329806139
                },
                "distribution": {
                  "linkedInDistributionTarget": {
                    "visibleToGuest": true
                  }
                }
              }
            }
          }
        },
        "object": {}
      },
      "object": "urn:li:activity:6422861848709726208"
    },
    "object": "urn:li:comment:(activity:6422861848709726208,6425527540101705728)"
  }
}

new sample response

{
  "activity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "object": "urn:li:comment:(activity:6422861848709726208,6425527540101705728)"
  },
  "processedActivity": {
    "actor": "urn:li:person:yrZCpj2ZYQ",
    "actor~": {...},
    "object~": {
      "actor": "urn:li:person:yrZCpj2ZYQ",
      "actor~": {...},
      "created": {
        "actor": "urn:li:person:yrZCpj2ZYQ",
        "actor~": {...},
        "time": 1531965146089
      },
      "id": "6425527540101705728",
      "lastModified": {
        "actor": "urn:li:person:yrZCpj2ZYQ",
        "actor~": {...},
        "time": 1531965146089
      },
      "message": {
        "attributes": [],
        "text": "this is a comment"
      },
      "object~": {
        "actor": "urn:li:person:yrZCpj2ZYQ",
        "domainEntity~": {
          "owner": "urn:li:person:yrZCpj2ZYQ",
          "owner~": {...},
          "created": {
            "actor": "urn:li:person:yrZCpj2ZYQ",
            "actor~": {...},
            "time": 1531329595651
          },
          "text": {
            "text": "this is a share"
          },
          "lastModified": {
            "actor": "urn:li:person:yrZCpj2ZYQ",
            "time": 1531329806139
          },
          "distribution": {
            "linkedInDistributionTarget": {
              "visibleToGuest": true
            }
          }
        },
        "actor~": {...},
        "verb": "linkedin:share",
        "domainEntity": "urn:li:share:6422861848344821123",
        "object": "urn:li:share:6422861848344821123"
      },
      "object": "urn:li:activity:6422861848709726208"
    },
    "object": "urn:li:comment:(activity:6422861848709726208,6425527540101705728)"
  }
}