Acumatica 通过 REST API 运行通用查询 [英] Acumatica run Generic Inquiry via REST API

查看:17
本文介绍了Acumatica 通过 REST API 运行通用查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何运行我通过 Acumatica 的 REST API 创建的通用查询?我之前使用了库存汇总查询,但它没有返回我需要的所有数据,因此我们创建了一个通用查询来返回所有库存项目的可用发货数量.但是我找不到如何通过 API 从该报告中获取数据.

How can I run a generic inquiry that I created via Acumatica's REST API? I was using the Inventory Summary Inquiry before but it was not returning all of the data I needed so we created a Generic Inquiry to return available for shipment quantity for ALL stock items. However I can't find how to get the data from this report via the API.

更新:

我已尝试创建扩展端点服务并为报告添加端点,如 I210 文档中所述,然后通过 REST API(未在 I210 中显示)进行访问.我将所有结果字段添加到需要返回的端点的字段选项卡中.

I've tried creating an extended endpoint service and adding my endpoint for the report as described in I210 Documentation and then hitting via the REST API (which is not shown in I210). I added all of the result fields to the fields tab of the endpoint that I need returned.

以下是我使用的详细信息:

Here are the details I used:

Extended Endpoint Name: MyInventoryAvailable
Endpoint version: 6.00.001
Endpoint: GetAvailableInventory
URL: https://mycompany.acumatica.com/entity/MyInventoryAvailable/6.00.001/GetAvailableInventory?$expand=Results

当我使用上述详细信息执行 PUT 请求时,这是我得到的响应:

When I do a PUT request using the above details, this is the response I get:

{
    "message": "The request is invalid.",
    "modelState": {
        "": [
            "The request body should not be empty."
        ]
    }
}

更新 2

以下是 Acumatica 中扩展端点的设置:

Here is the setup in Acumatica for the extended endpoint:

我尝试设置请求正文但没有成功:

I've tried setting up a request body but with no success:

{
    "InventoryID": {
        "Value": "AB-CL-60"
    },
    "Description": {
        "Value": ""
    },
    "Location": {
        "Value": ""
    },
    "QtyHardAvailable":{
        "Value": 0.0
    },
    "QtyOnHand":{
        "Value": 0.0
    },
    "Warehouse":{
        "Value": 0.0
    }
}

发送任何请求正文时,无论内容如何,​​我都会收到此错误:

When sending any request body, regardless of the content I recieve this error:

"exceptionMessage": "The given key was not present in the dictionary.",
"exceptionType": "System.Collections.Generic.KeyNotFoundException",

更新 3 - 查询结构

这是查询的结构:

以下是 Acumatica 用户界面中的结果:

And here are the results in Acumatica's UI:

更新 4

扩展的 GetAvailableInventory 节点:

Expanded GetAvailableInventory node:

推荐答案

使用 GET 而不是 PUT.您的要求属于 这个.我假设通用查询 <> 查询表.因此,GET 与 PUT 之间的结果不同.

Use GET instead of PUT. Your requirements fall under this. I supposed Generic Inquiry <> Inquiry Form. Hence the different outcome between GET vs PUT.

这篇关于Acumatica 通过 REST API 运行通用查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆