简体   繁体   English

将Dynamics CRM Web API直接消费到Django Web应用程序中的PostgreSQL数据库中

[英]Consume Dynamics CRM Web API directly into PostgreSQL database in Django web app

Microsoft Dynamics 365 CRM has most current client and company data and I need it for the internal database the frequently uses the data. Microsoft Dynamics 365 CRM具有最新的客户和公司数据,对于经常使用该数据的内部数据库,我需要它。 Trying to replace duplicative databases where one is getting updated (CRM) and the other is not. 尝试替换一个正在更新(CRM)而另一个没有更新的重复数据库。

Because it is Office 365 and hosted in the cloud, we don't have access to the database, just are able to use the Web API. 因为它是Office 365并托管在云中,所以我们无权访问数据库,仅能使用Web API。 The Web API is over an HTTPS connection and requires login credentials. Web API通过HTTPS连接,并且需要登录凭据。

One thought was to use a PostgreSQL FDW like www_fdw , which is great except it accepts no options for login credentials. 一种想法是使用像www_fdw这样的PostgreSQL FDW,这很不错,除了它不接受登录凭据的选项。 There does not appear to be alternatives. 似乎没有其他选择。

So I am back to using Django, Python, and/or Javascript to get the JSON, de-serialize it, and import it into the database. 所以我回到使用Django,Python和/或Javascript获取JSON,反序列化并将其导入数据库的过程。

I do not need to display it in a Django template. 我不需要在Django模板中显示它。 Really, it just needs to come from CRM and go directly into the database. 实际上,它只需要来自CRM并直接进入数据库。 I am just not sure the best way to handle it. 我只是不确定最好的处理方式。

For example, would the Django REST Framework make it easier than just using JavaScript and Python to request the Web API and de-serialize? 例如,Django REST框架是否会比仅使用JavaScript和Python来请求Web API并反序列化变得更容易? From there, how is written to the database if it is bypassing Django? 从那里,如果数据库绕过Django,如何将其写入数据库?

I suggest you create a logic app with a Dynamics 365 connector to PostgreSQL. 我建议您创建一个带有到PostgreSQL的Dynamics 365连接器的逻辑应用程序。 There's a sample in the link below : 下面的链接中有一个示例:

https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-crmonline https://docs.microsoft.com/en-us/azure/connectors/connectors-create-api-crmonline

I would create an intermediate web service, with no auth, available only in local domain. 我会创建一个没有身份验证的中间Web服务,仅在本地域中可用。 Postgre would call the WS, and the WS would call CRM using standard SDK techniques. Postgre将调用WS,而WS将使用标准SDK技术调用CRM。 You can use the methods described here: Unable to add a service reference to Dynamics 365 crm in visual studio 2012 您可以使用此处描述的方法: 无法在Visual Studio 2012中向Dynamics 365 crm添加服务引用

The WEB Api is very limited in functionality and very hard to set up (security wise). WEB Api的功能非常有限,而且很难设置(从安全角度而言)。 In my opinion the effort is not worth it, if you can have a workaround. 我认为,如果可以采取解决方法,那么这样做是不值得的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 动态CRM 2016-Web API查询-动态值 - dynamics crm 2016 - Web API query- dynamic values Dynamics CRM web api 8.2“分页 Cookie 中的格式错误的 XML” - Dynamics CRM web api 8.2 'Malformed XML in the Paging Cookie' 我们如何在js中识别Dynamics CRM Web api版本? - How can we identify the Dynamics CRM web api version in js? 来自外部站点的Dynamics CRM Web API(JavaScript) - Dynamics CRM Web API from external site (javascript) CRM Dynamics:将arraybuffer传递给html Web资源 - CRM Dynamics:To pass arraybuffer to html web ressource 是否可以在Dynamics CRM中显示Web资源的导航栏? - Is it possible to show navbar for a web resource in Dynamics CRM? Dynamics CRM 2011网站资源没有在Chrome中显示? - Dynamics CRM 2011 web resource not showing in Chrome? Dynamics CRM web api FetchXml 返回带有“2_x002e_”的链接实体命名,两者之间类似 - Dynamics CRM web api FetchXml returns linked Entities naming with '2_x002e_' and similar in between Dynamics CRM Web API 8.2无法在JavaScript调用中检索页面cookie - Dynamics CRM web api 8.2 does not retrieve page cookie in JavaScript call Microsoft Dynamics CRM 中来自 Web API 的查找字段格式化值未定义(无法获取格式化值) - Lookup field formatted value from Web API in Microsoft Dynamics CRM is undefined (cannot get formatted value)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM