2sxc - WebAPI - Error Accessing ADAM Assets in 2sxc v9.42
问题描述
I am trying to access a content item's ADAM assets (e.g. uploaded files) via the 2sxc WebAPI, but I am getting a "400 The request is invalid" error.
I am able to successfully retrieve the content item properly using the following code:
$2sxc(mod).webApi.get('app/auto/content/Listings/' + listingid);
...but when I append the name of the field to the end of the URL as specified in the GitHub issue at https://github.com/2sic/2sxc/issues/1640 it returns an error:
$2sxc(mod).webApi.get('app/auto/content/Listings/' + listingid + '/Photos');
The field name "Photos" is correct, and I have also set read permissions on the it as mentioned in the GitHub issue.
Beyond that, I am also using a Metadata Content Type on the field, and I will also want to GET/UPDATE the metadata as well.
Hopefully this can all be done in 2SXC's WebAPI!
解决方案
I reread the whole original issue and had missed the point that you must use the Entity GUID rather than the Entity ID to pull up the ADAM assets. This feature is so new that it probably hasn't been documented yet, but it appears to pull up the list of assets properly.
推荐阅读
- html - 如何使用 utf-8 编码在 Qt5 WebEngineView 中加载 HTML 页面?
- c# - ASP.NET Core Web API,如何在启动类中访问 HttpContext
- java - 当我在 SplashScreen 中按下主页时,我不希望应用程序运行 MainActivity,就像 WhatsApp 一样
- python - python 项目交付和执行时是否会创建 pyc 文件?
- php - 文书工作问题 - Swift_TransportException '无法在没有发件人地址的情况下发送消息'
- javascript - 在 SharePoint 中列出关注的组和网站?
- python - Pandas 将多列与数据框中的特定列进行比较
- javascript - 是否可以在此处的地图中使用 javascript 进行导航?
- c# - 演员班
上课 - javascript - 调用异步函数以在 JavaScript 中按顺序执行