Share via


Network Data Export API

The Network Data Export API enables Viva Engage Verified Administrators to export all messages (including previous versions), files stored in Yammer, topics, users, and groups from a Viva Engage network. Data is exported as a ZIP file containing CSV files for each model and, if requested, file attachments.

You can perform a one-time export by specifying a date range, or set up recurring exports (daily or weekly) to meet compliance, analytics, or archival requirements.

Important

Daily exports are recommended instead of large, infrequent exports to reduce the risk of errors and improve reliability.

Key Features

  • Comprehensive Export: Export all network data, including messages (and previous versions), files, topics, users, and groups.
  • Flexible Scheduling: Perform one-time or recurring exports based on your busines needs.
  • Granular Control: Specify which models to export and the date range for the export.
  • External Groups and Users: Export all content for external groups and, for external users, only threads in which they participated.

Network Data Exports can also be performed via the Viva Engage admin portal: Yammer Network Admin > Content and Security > Export Data.

How the API Works

The Network Data Export API is synchronous. An HTTP GET request returns a ZIP file containing the requested data.

Example Requests

  • Export all data since February 9, 2020:

    https://www.yammer.com/api/v1/export?since=2020-02-09T00:00:00+00:00
    
  • Export all data between February 9, 2020 and March 10, 2021:

    https://www.yammer.com/api/v1/export?since=2020-02-09T00:00:00+00:00&until=2021-03-10T00:00:00+00:00
    
  • Export all data since February 9, 2020, excluding file attachments:

    https://www.yammer.com/api/v1/export?since=2020-02-09T00:00:00+00:00&include=csv
    
  • Export only message data since February 9, 2020, excluding file attachments:

    https://www.yammer.com/api/v1/export?since=2020-02-09T00:00:00+00:00&model=Message&include=csv
    

Query Parameters

  • model: (Optional) Specify which models to export. If omitted, all available models are exported. Multiple models can be specified by repeating the model parameter. Available models include: User, Group, Message, MessageVersion, Topic, Tags, UploadedFileVersion, AMAs, AnswerVote, Campaigns, Leader, LikedMessageHistory, Sentie, VivaTopic, VivaTopicApplication, VivaTopicCurationStateLog.
  • since: (Required) Start date for the export (ISO-8601 format). All exported changes will have occurred on or after this date.
  • until: (Optional) End date for the export (ISO-8601 format). All exported changes will have occurred on or before this date. If omitted, defaults to the current date.
  • include: (Optional) Specify whether to include file attachments. Use csv to exclude attachments or all to include them.
  • network: (Optional) Specify which network(s) to export. Must be accessible with the provided OAuth bearer token.
  • include_ens: (Optional) If true, includes all external networks associated with the authenticated network.

Ensure all parameters are properly URL-encoded before making the request.

API Response

The response is a ZIP file (application/zip) containing the exported data. The ZIP file includes:

  • CSV files for all or specifically requested models
  • log.txt: Summary of the export
  • request.txt: Parameters used for the export
  • File attachments (if requested and stored in Yammer)

CSV File Contents

Each CSV file contains data for a specific model. Below are some examples:

File Description
log.txt Summary of the export process.
request.txt Parameters used for the export.
Admins.csv List of current admins, their email addresses, and admin status.
The CSV file contains the following columns:
  • id
  • name
  • email
  • verified
AMAs.csv Details of Ask Me Anything sessions.
The CSV file contains the following columns:
  • id
  • title
  • description
  • created_at
  • updated_at
  • meeting_state
  • tenant_id
  • added_by
  • partner_id
  • start_time
  • end_time
  • meeting_state
  • admission_type
  • qna_app_enabled
  • replies_enabled
  • moderation_enabled
  • is_thread_upvote_enabled
  • access_category
  • cs_subscription_status
  • presenter_option
  • join_link
  • artifact_service_enabled
  • qna_app_enabled
  • is_anonymous_posting_enabled
  • auto_admitted_policy
  • created_by_type
  • calendar_id
  • participants_data
AnswerVotes.csv Votes on answers.
The CSV file contains the following columns:
  • id
  • network_id
  • voter_id
  • message_id
  • thread_id
  • created_at
  • updated_at
Campaigns.csv Campaign details.
The CSV file contains the following columns:
  • id
  • name
  • api_url
  • description
  • hashtags
  • state
  • official
  • created_at
  • creator_id
  • default_cover_image_url_template
  • cover_image_url_template
  • permalink
Files.csv Metadata for files added or modified during the export period.
Files.csv does not contain the actual files. Files stored in Yammer are exported in their native format to the Files folder of the zip file. Files stored in SharePoint are not exported.
Files.csv contains the following columns:
  • id
  • file_id
  • name
  • description
  • uploader_id
  • uploader_type
  • group_id
  • group_name
  • reverted_to_id
  • deleted_by_user_id
  • in_private_group
  • in_private_conversation
  • file_api_url
  • download_url
  • path
  • uploaded_at
  • deleted_at
  • original_network
  • storage_type
  • scope_id
  • scope_type
Groups.csv Group details, including privacy status and creation information.
The CSV file contains the following columns:
  • id
  • name
  • description
  • private
  • moderated
  • api_url
  • created_by_id
  • created_by_type
  • created_at
  • updated_at
  • deleted
  • external
  • office_group_id
  • group_tags
  • group_custom_cover_image
LikedMessageHistory.csv History of reactions to messages.
Properties included for reactions activity including history:
  • reaction (e.g., like, love, etc.)
  • reaction_action (add or remove)
  • reaction_timestamp
  • reacted_by
Messages.csv Messages sent or modified during the export period.
The CSV file contains the following columns:
  • id
  • replied_to_id
  • parent_id
  • thread_id
  • conversation_id
  • group_id
  • group_name
  • participants
  • in_private_group
  • in_private_conversation
  • sender_id
  • sender_type
  • sender_name
  • sender_email
  • body
  • delegate_id
  • api_url
  • attachments*
  • deleted_by_id
  • deleted_by_type
  • created_at: The timestamp indicating when a message was created. If edited, it shows the last edit time.
  • deleted_at
  • title
  • html_body
  • message_type
  • gdpr_delete_url
  • scope_id
  • scope_type
  • is_supplemental_reply
  • is_draft: boolean value to indicate if the message is a draft (not yet published for other users to see)
  • intelligent_importer_extraction_id: Extraction id associated with messages which were generated via Intelligent Importer. This id does not correspond to any other exported model, but can be used to correlate messages that were generated together.
  • is_ai_generated: boolean value to indicate if a message was generated by AI. If a message was generated as a draft, such as with Intelligent Importer, it is only considered AI generated until it is published. Once an AI-generated message is posted, this flag is reset and the message in export appears like any other message posted by a user.
  • intelligent_importer_file_id: Id of the file used by Intelligent Importer to extract a message.
* Within attachments this OGO information is exported: id, url, title, description.
MessageThreadExtension.csv Messages marked as best reply or verified reply.
Properties include:
- Message ID
- Thread ID
- Group ID
- Network ID
- Operation
- Operation performed by
- Operation performed at.
MessageThreads.csv Thread details for messages with external participants
The CSV file contains the following columns:
  • id
  • files
  • external_participants
  • updated_at
  • original_network
  • is_announcement
  • is_reply_disabled
MessageThreadOutbound.csv Outbound message thread details, including external participants.
The CSV file contains the following columns:
  • id
  • files
  • external_participants
  • updated_at
  • is_announcement
  • is_reply_disabled
MessageVersions.csv All versions of messages within the export period.
The CSV file contains the following columns:
  • id
  • replied_to_id
  • parent_id
  • thread_id
  • conversation_id
  • group_id
  • group_name
  • participants
  • in_private_group
  • in_private_conversation
  • sender_id
  • sender_type
  • sender_name
  • sender_email
  • body
  • delegate_id
  • api_url
  • attachments
  • deleted_by_id
  • deleted_by_type
  • created_at: The timestamp indicating when a message version was created. If edited, it shows the edit time of specific message version.
  • deleted_at
  • title
  • html_body
  • message_type
  • gdpr_delete_url
  • scope_id
  • scope_type
  • is_supplemental_reply
  • is_draft: boolean value to indicate if the message is a draft (not yet published for other users to see)
  • intelligent_importer_extraction_id: Extraction id associated with messages which were generated via Intelligent Importer. This id does not correspond to any other exported model, but can be used to correlate messages that were generated together.
  • is_ai_generated: boolean value to indicate if a message was generated by AI. If a message was generated as a draft, such as with Intelligent Importer, it is only considered AI generated until it is published. Once an AI-generated message is posted, this flag is reset and the message in export appears like any other message posted by a user.
  • intelligent_importer_file_id: Id of the file used by Intelligent Importer to extract a message.
MutedThreads.csv Threads that are muted for all users in the network.
Properties include: network ID, thread ID, updated by user ID, is muted, created at, updated at.
Networks.csv Details of home and external networks included in the export.
The CSV file contains the following columns:
  • id
  • permalink
  • name
  • url
  • paid
  • created_at
  • moderated
  • usage_policy
  • number_of_users
  • secure_browser_token
Sentie.csv Sentiment analysis data.
The CSV file contains the following columns:
  • user_id
  • sentiment_score
  • sentiment_opinions
  • text_sentiment
  • leaders
  • creator_id
  • thread_id
Topics.csv Topic creation and metadata.
The CSV file contains the following columns:
  • id
  • name
  • created_by
  • created_at
  • api_url
  • description
UserGroupRecommendationActions.csv User group recommendation actions.
The CSV file contains the following columns:
  • id
  • user_prompt_view_times
  • group_recommendation_dismiss_times
Users.csv User data for all users who joined, were deleted, or suspended during the export period.
The CSV file contains the following columns:
  • id
  • name
  • email
  • job_title
  • location
  • department
  • api_url
  • deleted_by_id
  • deleted_by_type
  • joined_at
  • created_at
  • updated_at
  • deleted_at
  • suspended_by_id
  • suspended_by_type
  • suspended_at
  • guid
  • state
  • office_user_id
  • user_cover_image_url
  • sash_campaign_id
VivaEngageLeaders.csv Viva Engage leader and audience information.
The CSV file contains the following columns:
  • leader_id
  • leader_created_at
  • audience_name
  • audience_created_at
  • audience_created_by
  • audience_updated_at
  • audience_updated_by
  • size
  • audience_group_ids
  • entire_org
VivaTopicApplications.csv Topic application details.
The CSV file contains the following columns:
  • cortex_topic_id
  • applicant_id
  • target_id
  • group_id
  • target_type
  • deleted
  • is_topic_curated
  • created_at
  • updated_at
  • topic_name
VivaTopicCurationStateLogs.csv Curation state logs for featured topics.
The CSV file contains the following columns:
  • cortex_topic_id
  • topic_curation_state_update
  • acting_user_id
  • committed_to_km_at
  • created_at
  • updated_at
VivaTopics.csv Viva Topics created or updated during the export period.
The id refers to the Viva Topic identifier. The api_url is the URL used to obtain the topic metadata. The CSV file contains the following columns:
  • id
  • name
  • created_by
  • created_at
  • api_url
  • description
  • legacy_id
  • merged_ids
  • short_description
  • topic_curation_state

For a detailed description of each CSV file and its columns, see the documentation above or within each file in the export.

Message Export Details

  • Only message versions within the specified time range are exported.
  • If a message's latest version is within the time range, it appears in both Messages.csv and MessageVersions.csv. Older versions within the range appear only in MessageVersions.csv.

Error Handling

If any data fails to export, the export will be partial. Details of any failures are recorded in log.txt. To minimize the risk of partial exports, use smaller timeframes for each export.

Sample Code

Sample scripts for using the Network Data Export API with Unix and Windows PowerShell are available here. These samples are for illustration purposes only and are not intended for production use.