REST Api - Importer

Modified on Fri, 15 Aug at 9:51 AM

This article covers the features that are unique to the REST API Importer. For features common to all importers, please see this article.


TABLE OF CONTENTS

Introduction

The REST API importer can be used to connect to compatible 3rd party data sources that don't have an official ManagementStudio connector but does have a standard REST API. 

 


Cross Project Connecting to ManagementStudio

The REST API Importer allows you to connect to the same or other instances of ManagementStudio. Where cross-project sharing has been enabled, this can be used to copy data between a Primary Project and Sub-Projects that isn't shared by default. 


When connecting back to ManagementStudio, refer to the [Endpoint Reports (for PowerBI) ] article for guidance on forming REST queries. 


Tip: Use the keyword [importer-auth-token] as the value for the Auth-Token header when connecting to the same instance of ManagementStudio but targeting a different project or module. 



Common Settings

  • Rest Api Endpoint Url - 
    • The ManagementStudio Url
    • X = ProjectId of the Primary Project
    • https://ServerAddress/X/p/report/Datamining/0/InternalName/json
  • Import Multiple Matched Rows
    • Tick this option to continue importing mutiple rows after the first match is found.
    • This is required for import lists such as Blueprints, Contacts & Dependencies

Examples

Example - Sync Custom Fields from Primary Project to Sub-Project


Headers

HeaderValueNote
Auth-Token[importer-auth-token]Auto-gen a token to connect back to MS
Datamining-Tier1-ModuleApplicationsGet an Applications list
Datamining-Tier1-FieldsAppIdAdd the AppId field
Datamining-Tier1-CustomFieldIds1000, 1001, 1002List of Custom Fields from the Primary Project
DataSource-AllTrueInclude all Apps


Field Mapping

MCHSrc. FieldMS FieldNotes
YesAppIdAppIdUse the App Id from the Primary Project to find a match in the Sub-Project

CustomField_1000APPDSC\MyTab\Intune DevicesCopy data from Primary to Sub-Project

CustomField_1001APPDSC\MyTab\SCCM CollectionsCopy data from Primary to Sub-Project

CustomField_1002APPDSC\MyTab\AD Groups



Example - Sync  App Blueprints  from Primary Project to Sub-Project


Headers

HeaderValueNotes
Auth-Token[importer-auth-token]Auto-gen a token to connect back to MS
Datamining-Tier1-ModuleApplicationsGet an Applications list
Datamining-Tier1-FieldsAppIdGet the AppId field
Blueprint-1-ModuleApplicationsGet Application Blueprints
Blueprint-1-ColumnNameBlueprintsName the column the BPs will be returned in
Blueprint-1-AllOnOneLineFalseIf an App has more than 1 BP, split them across multiple rows
Blueprint-1-FolderIds86, 303The Folder Ids to only include Blueprints from (e.g. Departments, Location)
DataSource-AllTrueInclude all Apps
DataSource-FilterExpressionBlueprint_Blueprints <> ''Filter results to only Apps that have a Blueprint


Field Mapping

MCHSrc. FieldMS FieldNotes
YesAppIdAppIdUse the AppId from the Primary Project to find a match in the Sub-Project

BlueprintsBlueprintPathUse the Blueprints column to import as a BlueprintPath keyword. This will Add Apps to this Blueprint (and create it if not found)

Example - Sync  App Contacts from Primary Project to Sub-Project

In this example, we are targeting the Contacts module and linking them to AppIds

Contacts must be shared from the Primary Project to the sub-project for linking to work


Headers

HeaderValueNote
Auth-Token[importer-auth-token]Auto-gen a token to connect back to MS
Datamining-Tier1-ModuleApplicationsGet an Applications list
Datamining-Tier1-FieldsAppIdAdd the AppId field
Datamining-Tier2-ModuleContactsAdd a Contacts Tier
Datamining-Tier2-FieldsContactIdAdd the Contact Id Field
Datamining-Tier2-OptionsContacts_ContactTypeAdd the Contact Type Field
DataSource-AllTrueInclude all Apps
DataSource-FilterExpressionContacts_ContactId >= 0Filter results to only Apps that have a Contact


Field Mapping

MCHSrc. FieldMS FieldNotes
YesContactIdContactIdUse the Contact Id from the Primary Project to find a match in the Sub-Project

AppIdContactAppIdUse the AppId column to import into the linking field ContactAppId

ContactIdContactLinkIdUse the ContactId column to import into the linking field ContactLinkId

ContactTypeContactLinkTypeUse the ContactId column to import into the linking field ContactLinkType

Example - Sync App Dependencies from Primary Project to Sub-Project


Headers

HeaderValueNote
Auth-Token[importer-auth-token]Auto-gen a token to connect back to MS
Datamining-Tier1-ModuleApplicationsGet an Applications list
Datamining-Tier1-FieldsAppIdAdd the AppId field
Datamining-Tier2-ModuleDependenciesAdd a Dependencies Tier
Datamining-Tier2-FieldsModule,InstanceId,IsTopLevelAdd the Module, InstanceId, IsTopLevel  Fields
DataSource-AllTrueInclude all Apps
DataSource-FilterExpressionDependencies_IsTopLevel = TrueFilter results to Apps with a dependency and only the top-level dependencies


Field Mapping

MCHSrc. FieldMS FieldNotes
YesAppIdAppIdUse the App Id from the Primary Project to find a match in the Sub-Project

InstanceIdDependencyChildIdUse the InstanceId of the Dependency to import as the DependencyChildId 

ModuleDependencyChildModuleWhich Module does the Dependency belong to



Further Support

If you require further support, please visit ManagementStudio's Service Desk to search the knowledge base or create a new support ticket.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article