### HTTP GET Request for Member Snapshot Data Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-snapshot-api Use this HTTP GET request to query snapshot data for a user. The 'q=criteria' parameter is used for querying. ```http GET https://api.linkedin.com/rest/memberSnapshotData?q=criteria ``` -------------------------------- ### GET Request for Member Changelog Events Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api Use this HTTP GET request to query changelog events for a member. Ensure you replace placeholder values with actual data. ```http GET https://api.linkedin.com/rest/memberChangeLogs?q=memberAndApplication ``` -------------------------------- ### Sample Get Response for Member Snapshot Data Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-snapshot-api This is a sample JSON response for a member snapshot data query. The response includes paging information and an array of elements, each containing snapshot domain and data. ```json { "paging": { "start": 0, "count": 10, "links": [ { "type": "application/json", "rel": "next", "href": "/rest/memberSnapshotData?count=10&domain=PROFILE&q=criteria&start=1" } ], "total": 2 }, "elements": [ { "snapshotData": [ { "Websites": "", "Address": "", "Maiden Name": "", "Instant Messengers": "", "First Name": "Tom", "Geo Location": "", "Twitter Handles": "", "Industry": "", "Zip Code": "94086", "Headline": "Marketing Manager at Microsoft, Inc.", "Summary": "", "Birth Date": "", "Last Name": "Cruise" } ], "snapshotDomain": "PROFILE" } ] } ``` -------------------------------- ### Curl Request for Member Changelog Events Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api This curl command demonstrates how to make a GET request to the Member Changelog API. It includes necessary headers for authentication and versioning. ```curl curl --location --request GET 'https://api.linkedin.com/rest/memberChangeLogs?q=memberAndApplication' \ --header 'Linkedin-Version: {version number in the format YYYYMM}' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Sample Get Response Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api This JSON object represents a sample response from the Member Changelog API. It includes details about a message activity, its owner, timestamps, content, and associated thread information. It's recommended to archive fields like method, resourceName, resourceId, and processedActivity. ```json { "owner": "urn:li:person:2qXA98-mVk", "resourceId": "0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw", "configVersion": 1, "method": "CREATE", "activity": { "owner": "urn:li:person:kAq_1ptj-v", "createdAt": 1574449632116, "clientExperience": { "clientGeneratedToken": "11daeca1-34af-47c2-b22e-d02a947c33a2" }, "author": "urn:li:person:kAq_1ptj-v", "id": "0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw", "thread": "urn:li:messagingThread:0-NjU5OTczMDkxNTAzODAyNzc3Ng==", "readAt": 1574449632000, "content": { "format": "TEXT", "fallback": "Hello back to Sales Navigator inbox", "formatVersion": 1, "content": { "string": "Hello back to Sales Navigator inbox" } }, "deliveredAt": 1574449632116 }, "resourceName": "messages", "resourceUri": "/messages/0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw", "actor": "urn:li:person:kAq_1ptj-v", "activityId": "c86c3c71-7844-4ed1-b1fc-66deeac14192", "processedAt": 1574449662997, "capturedAt": 1574449632331, "processedActivity": { "owner": "urn:li:person:kAq_1ptj-v", "owner~": {}, "createdAt": 1574449632116, "deliveredAt": 1574449632116, "author~": {}, "thread~": { "owner": "urn:li:salesIdentity:334326", "membership": [ { "createdAt": 1573498467712, "identity~": { "member": "urn:li:person:2qXA98-mVk", "member~": {}, "id": 334326 }, "identity": "urn:li:salesIdentity:334326" }, { "createdAt": 1573498467712, "identity~": {}, "identity": "urn:li:person:kAq_1ptj-v" } ] }, "author": "urn:li:person:kAq_1ptj-v", "thread": "urn:li:messagingThread:0-NjU5OTczMDkxNTAzODAyNzc3Ng==", "id": "0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw", "readAt": 1574449632000, "content": { "format": "TEXT", "fallback": "Hello back to Sales Navigator inbox", "formatVersion": 1, "content": { "string": "Hello back to Sales Navigator inbox" } } }, "id": 978988628 } ``` -------------------------------- ### Sample Paginated Response Structure Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-snapshot-api This JSON structure illustrates a paginated response from the Member Snapshot API. It includes 'paging' information with 'start', 'count', 'total', and 'links' for navigating between pages. Use the 'next' link to fetch subsequent pages. ```json { "paging": { "start": 1, "count": 10, "links": [ { "type": "application/json", "rel": "prev", "href": "/rest/memberSnapshotData?q=criteria&start=0&domain=GROUP_POSTS" }, { "type": "application/json", "rel": "next", "href": "/rest/memberSnapshotData?q=criteria&start=2&domain=GROUP_POSTS" } ], "total": 16 }, "elements" :{ ... } } ``` -------------------------------- ### POST /memberAuthorizations Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-authorization-management-api Manually enables changelog event generation for a user. This is an alternative method to ensure data generation is active if it's not starting automatically. ```APIDOC ## POST /memberAuthorizations ### Description Manually enables changelog event generation for the user associated with the provided access token. This is useful to ensure data generation is active, especially if it's not starting automatically after consent and access token generation. ### Method POST ### Endpoint https://api.linkedin.com/rest/memberAuthorizations ### Parameters #### Request Body - **{}** (object) - Required - An empty JSON object must be supplied to successfully enable changelog event generation. #### Request Headers - **Linkedin-Version** (string) - Required - Version number in the format YYYYMM. - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - Should be `application/json`. ### Request Example ```json {} ``` ``` -------------------------------- ### GET /memberAuthorizations Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api Checks if changelog events are being generated for a user. This API can be used after the user has consented and an access token is generated. ```APIDOC ## GET /memberAuthorizations ### Description Retrieves information about changelog event generation for a user. This is useful to verify if the system is actively archiving changelog events for a given user after consent and token generation. ### Method GET ### Endpoint https://api.linkedin.com/rest/memberAuthorizations?q=memberAndApplication ### Parameters #### Query Parameters - **q** (string) - Required - Must be 'memberAndApplication' to filter authorizations. #### Request Body This endpoint does not accept a request body. ### Response #### Success Response (200) - **elements** (Array) - Contains a list of member compliance authorizations. - **memberComplianceAuthorizationKey** (Object) - Key identifying the authorization. - **developerApplication** (string) - URN of the developer application the user consented to. - **member** (string) - URN of the user whose compliance events are being archived. - **regulatedAt** (long) - Epoch timestamp since which the user's compliance activities are being monitored. - **memberComplianceScopes** (Array of ENUM) - Array of compliance products the user has consented to, e.g., ["DMA"]. #### Response Example ```json { "elements": [ { "memberComplianceAuthorizationKey": { "developerApplication": "urn:li:developerApplication:123456", "member": "urn:li:person:123ABC" }, "regulatedAt": 1698382869085, "memberComplianceScopes": [ "DMA" ] } ] } ``` ``` -------------------------------- ### Check Member Changelog Events (HTTP) Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api Use this HTTP GET request to check if changelog events are being generated for a specific user. Ensure you have a valid access token. ```http GET https://api.linkedin.com/rest/memberAuthorizations?q=memberAndApplication ``` -------------------------------- ### GET /memberChangeLogs Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api Retrieves changelog events for a user. This endpoint allows querying for changes related to member data and applications, with options to filter by time. ```APIDOC ## GET /memberChangeLogs ### Description Retrieves changelog events for a user. This endpoint allows querying for changes related to member data and applications, with options to filter by time. ### Method GET ### Endpoint https://api.linkedin.com/rest/memberChangeLogs?q=memberAndApplication ### Parameters #### Query Parameters - **startTime** (long) - Optional - Represented as an inclusive timestamp in epoch milliseconds. If present, returns all the changelog events that are created after the time. - **count** (integer) - Optional - Specifies the number of events to return. Recommended value is 10, with an upper limit of 50. ### Request Example ```json { "example": "GET https://api.linkedin.com/rest/memberChangeLogs?q=memberAndApplication&startTime=1678886400000&count=10" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the activity event. - **capturedAt** (long) - Time the event is captured. - **processedAt** (long) - Time the event is processed. - **configVersion** (string) - The configuration version used to process this event. - **owner** (object) - The member who owns the record. - **actor** (object) - The member who performs the action of the activity. - **resourceName** (string) - Name of resource being acted upon. - **resourceId** (string) - The identifier of the resource. - **resourceUri** (string) - URI of the resource being modified. - **method** (string) - The resource method (CREATE, UPDATE, PARTIAL_UPDATE, DELETE). - **methodName** (string) - The optional string representing the method's name. Only present in ACTION method. - **activity** (object) - The original activity data. - **processedActivity** (object) - The decorated original activity containing relevant contextual information. - **siblingActivities** (array) - The activities on the same resource level. - **parentSiblingActivities** (array) - The previous activities on the parent resource level. - **activityId** (string) - A unique string identifier of a captured activity. - **activityStatus** (string) - The status of the event (SUCCESS, FAILURE, SUCCESSFUL_REPLAY). #### Response Example ```json { "example": "{\"elements\":[{\"id\":\"someId\",\"capturedAt\":1678886400000,\"processedAt\":1678886405000,\"configVersion\":\"v1\",\"owner\":{\"name\":\"John Doe\"},\"actor\":{\"name\":\"Jane Smith\"},\"resourceName\":\"urn:li:member:12345\",\"resourceId\":\"12345\",\"resourceUri\":\"/members/12345\",\"method\":\"UPDATE\",\"activity\":{},\"processedActivity\":{},\"siblingActivities\":[],\"parentSiblingActivities\":[],\"activityId\":\"act123\",\"activityStatus\":\"SUCCESS\"}]}" } ``` ``` -------------------------------- ### Curl Request for Member Snapshot Data Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-snapshot-api This curl command demonstrates how to make a GET request to the Member Snapshot API. Ensure you include the correct Linkedin-Version, Authorization, and Content-Type headers. ```curl curl --location --request GET 'https://api.linkedin.com/rest/memberSnapshotData?q=criteria' \ --header 'Linkedin-Version: 202312' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Check Member Registration for DMA Data Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-authorization-management-api Use this GET request to check if a member is registered for DMA and if their data is being processed and archived. This is useful for debugging when data is not immediately available after consent. ```http GET https://api.linkedin.com/rest/memberAuthorizations?q=memberAndApplication ``` ```curl curl --location --request GET 'https://api.linkedin.com/rest/memberAuthorizations?q=memberAndApplication' \ --header 'Linkedin-Version: {version number in the format YYYYMM}' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' ``` -------------------------------- ### GET /memberAuthorizations Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-authorization-management-api Checks if a member is registered for DMA and if LinkedIn data is being processed and archived for the member. This API is used for debugging purposes when data is not appearing in other API responses. ```APIDOC ## GET /memberAuthorizations ### Description Retrieves the authorization status for a member regarding DMA data processing. This endpoint is useful for debugging if you are not seeing LinkedIn data in the Member Changelog and Member Snapshot API responses after a few minutes of access token generation. ### Method GET ### Endpoint https://api.linkedin.com/rest/memberAuthorizations?q=memberAndApplication ### Parameters #### Query Parameters - **q** (string) - Required - Must be set to `memberAndApplication` to query member authorization status. #### Request Headers - **Linkedin-Version** (string) - Required - Version number in the format YYYYMM. - **Authorization** (string) - Required - Bearer token for authentication. - **Content-Type** (string) - Required - Should be `application/json`. ### Response #### Success Response (200) - **elements** (array) - Contains authorization details for members. - **memberComplianceAuthorizationKey** (object) - Key identifying the authorization. - **developerApplication** (string) - URN String - Developer application the user consented to. - **member** (string) - URN String - User whose compliance events are archived. - **regulatedAt** (long) - Epoch timestamp since which the user's compliance activities are monitored and archived. - **memberComplianceScopes** (array) - Array of ENUM - Compliance products the user has consented to (e.g., `DMA`). ### Response Example ```json { "elements": [ { "memberComplianceAuthorizationKey": { "developerApplication": "urn:li:developerApplication:123456", "member": "urn:li:person:123ABC" }, "regulatedAt": 1698382869085, "memberComplianceScopes": [ "DMA" ] } ] } ``` ``` -------------------------------- ### Error: Unprocessed URN field in processedActivity Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api This example shows an error where a specific field, 'URN', within the `processedActivity` object is marked as unprocessed. It is indicated by a '!' suffix and includes a nested message detailing the failure to process that particular field. ```json { "activity": { "simpleUnionField": { "int": 3 }, "URN": "urn:li:person:sFrA4B1w3F" }, "activityId": "81fafbe1-ea4b-4454-a736-6b8a20d9aa90", "actor": "urn:li:person:sFrA4B1w3F", "capturedAt": 1494367986523, "configVersion": 2, "id": 23260, "method": "UPDATE", "owner": "urn:li:person:sFrA4B1w3F", "processedActivity": { "simpleUnionField": { "int": 3 }, "URN": "urn:li:person:sFrA4B1w3F", "URN!": { "message": "Unable to process this field." } }, "processedAt": 1494368009776, "resourceId": "4", "resourceName": "mockSimpleKeyCollection", "resourceUri": "/mockSimpleKeyCollection/4" } ``` -------------------------------- ### Member Snapshot API Usage Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-snapshot-api This section outlines how to use the Member Snapshot API, including necessary authentication and permissions. It emphasizes the requirement for an access token and specific permissions like 'r_dma_portability_3rd_party' or 'r_dma_portability_member'. ```APIDOC ## Member Snapshot API ### Description Developers can query historical LinkedIn data for a member once they have consented to share their data and an access token has been generated. This API uses versioned LinkedIn APIs. ### Headers - **Linkedin-Version**: `202312` (Required. Requests using a version other than `202312` will fail with a `426 NONEXISTENT_VERSION` error.) ### Authentication - You must use an access token to make an authenticated call on behalf of a user. ### Permissions - `r_dma_portability_3rd_party`: Provides access to LinkedIn member data to developers upon member authorization. - `r_dma_portability_member`: Allows users to download their own LinkedIn data. ``` -------------------------------- ### Enable Member Changelog Events (HTTP) Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api Use this HTTP POST request to manually enable changelog event generation for a user. An empty JSON object must be provided in the request body. ```http POST https://api.linkedin.com/rest/memberAuthorizations Request Body {} ``` -------------------------------- ### Sample Member Authorization Response Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-authorization-management-api This JSON structure shows a successful response when querying member authorizations, indicating the member's registration for DMA compliance. ```json { "elements": [ { "memberComplianceAuthorizationKey": { "developerApplication": "urn:li:developerApplication:123456", "member": "urn:li:person:123ABC" }, "regulatedAt": 1698382869085, "memberComplianceScopes": [ "DMA" ] } ] } ``` -------------------------------- ### Enable DMA Data Generation for a Member Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-authorization-management-api Send a POST request with an empty JSON body to manually enable changelog event generation for a member. This is a debugging step if data is not appearing in API responses after consent. ```http POST https://api.linkedin.com/rest/memberAuthorizations Request Body {} ``` ```curl curl --location --request POST 'https://api.linkedin.com/rest/memberAuthorizations' \ --header 'Linkedin-Version: {version number in the format YYYYMM}' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{}' ``` -------------------------------- ### Enable Member Changelog Events (curl) Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api Use this curl command to manually enable changelog event generation for a user. Include your access token, specify the LinkedIn API version, and provide an empty JSON object in the request body. ```curl curl --location --request POST 'https://api.linkedin.com/rest/memberAuthorizations' \ --header 'Linkedin-Version: {version number in the format YYYYMM}' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data-raw '{}' ``` -------------------------------- ### Query Member Snapshot Data Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-snapshot-api Retrieves snapshot data for a LinkedIn member based on specified criteria. The 'domain' query parameter can be used to filter the data returned. ```APIDOC ## GET /rest/memberSnapshotData ### Description Queries snapshot data for a user. You can specify a particular domain to filter the results. ### Method GET ### Endpoint https://api.linkedin.com/rest/memberSnapshotData ### Query Parameters - **q** (string) - Required - Specifies the query criteria. Currently, only 'criteria' is supported. - **domain** (string) - Optional - Represents the particular domain of data being requested. If not provided, data from all domains is returned. ### Response #### Success Response (200) - **paging** (object) - Contains pagination information. - **start** (integer) - The starting index of the results. - **count** (integer) - The number of elements returned in this response. - **links** (array) - Links for navigating through paginated results. - **type** (string) - The media type of the linked resource. - **rel** (string) - The relationship of the link (e.g., 'next'). - **href** (string) - The URL of the linked resource. - **total** (integer) - The total number of elements available. - **elements** (array) - An array containing the member snapshot data. - **snapshotDomain** (Enum) - The type of LinkedIn data processed for the user. - **snapshotData** (object) - Data processed for the user, structured as key-value pairs. ### Sample Get Response ```json { "paging": { "start": 0, "count": 10, "links": [ { "type": "application/json", "rel": "next", "href": "/rest/memberSnapshotData?count=10&domain=PROFILE&q=criteria&start=1" } ], "total": 2 }, "elements": [ { "snapshotData": [ { "Websites": "", "Address": "", "Maiden Name": "", "Instant Messengers": "", "First Name": "Tom", "Geo Location": "", "Twitter Handles": "", "Industry": "", "Zip Code": "94086", "Headline": "Marketing Manager at Microsoft, Inc.", "Summary": "", "Birth Date": "", "Last Name": "Cruise" } ], "snapshotDomain": "PROFILE" } ] } ``` ``` -------------------------------- ### Error: Unable to process an activity Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api This JSON payload signifies that the entire activity could not be processed. The `processedActivity.message` field explicitly states 'Unable to process this event.' indicating a failure at the activity level. ```json { "activity": { "simpleUnionField": { "int": 3 }, "URN": "urn:li:person:sFrA4B1w3F" }, "activityId": "b77d27f4-b7c9-426c-a43e-204a2735c798", "actor": "urn:li:person:sFrA4B1w3F", "capturedAt": 1494368763168, "configVersion": 2, "id": 23716, "method": "UPDATE", "owner": "urn:li:person:sFrA4B1w3F", "processedActivity": { "message": "Unable to process this event." }, "processedAt": 1494369845019, "resourceId": "4", "resourceName": "mockSimpleKeyCollection", "resourceUri": "/mockSimpleKeyCollection/4" } ``` -------------------------------- ### Check Member Changelog Events (curl) Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api Use this curl command to check if changelog events are being generated for a specific user. Include your access token and specify the LinkedIn API version. ```curl curl --location --request GET 'https://api.linkedin.com/rest/memberAuthorizations?q=memberAndApplication' \ --header 'Linkedin-Version: {version number in the format YYYYMM}' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' ``` -------------------------------- ### Error: Unable to process a field Source: https://learn.microsoft.com/en-us/linkedin/dma/member-data-portability/shared/member-changelog-api This JSON payload indicates that a specific field within the activity could not be processed. The `resourceId` and `resourceName` fields are set to 'Unable_to_process_this_field.' and the `processedActivity` contains a message indicating the failure. ```json { "activity": {}, "activityId": "81fafbe1-ea4b-4454-a736-6b8a20d9aa90", "actor": "urn:li:person:sFrA4B1w3F", "capturedAt": 1494367986523, "configVersion": 2, "id": 23260, "method": "UPDATE", "owner": "urn:li:person:sFrA4B1w3F", "processedActivity": { "message": "Unable to process this event." }, "processedAt": 1494368009776, "resourceId": "Unable_to_process_this_field.", "resourceName": "mockSimpleKeyCollection", "resourceUri": "Unable_to_process_this_field." } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.