Rest API: Get all subitems with full information of an item
P
Peder Alm
创建话题
约2年 以前
Is it possible to get all subitems of a single item? If we take a look at the image below, if I know the handle of Item A, I would like to get a full list of all subitems. For each subitem I would like the same information as if I did a separate /restapi/items/{handle} call to each of the subitems. If I look at the /restapi/items call I can't find a parameter e.g. parentitem (handle to parent == Item A).
最佳答案
S
SystemWeaver Support
说
约2年 以前
Hi Peder,
In general when we discuss a tree like this in SystemWeaver, we are talking about items and parts. So, I assume that you would like to get all parts and items in a tree with the item you ask for on the top. There is no handle to parent since many parts can point to the same item. Instead, the part knows which item it is pointing to. When you have the whole tree, you automatically know which part is pointing to which item.
If I understand your need correctly, then you would want to do one of the following restAPI calls (x04000000000000CA is just an example) :
The /full version of tree or list was what I needed. Thanks!
SystemWeaver Support
说
约2年 以前
回答
Hi Peder,
In general when we discuss a tree like this in SystemWeaver, we are talking about items and parts. So, I assume that you would like to get all parts and items in a tree with the item you ask for on the top. There is no handle to parent since many parts can point to the same item. Instead, the part knows which item it is pointing to. When you have the whole tree, you automatically know which part is pointing to which item.
If I understand your need correctly, then you would want to do one of the following restAPI calls (x04000000000000CA is just an example) :
Peder Alm
Is it possible to get all subitems of a single item? If we take a look at the image below, if I know the handle of Item A, I would like to get a full list of all subitems. For each subitem I would like the same information as if I did a separate /restapi/items/{handle} call to each of the subitems. If I look at the /restapi/items call I can't find a parameter e.g. parentitem (handle to parent == Item A).
Hi Peder,
In general when we discuss a tree like this in SystemWeaver, we are talking about items and parts. So, I assume that you would like to get all parts and items in a tree with the item you ask for on the top. There is no handle to parent since many parts can point to the same item. Instead, the part knows which item it is pointing to. When you have the whole tree, you automatically know which part is pointing to which item.
If I understand your need correctly, then you would want to do one of the following restAPI calls (x04000000000000CA is just an example) :
http://server:port/restapi/items/x04000000000000CA/tree
OR
http://server:port/restapi/items/x04000000000000CA/tree/full
'full' gives you all information of parts and items, but also needs higher bandwidth since it has more data.
I hope this information is helpful.
SystemWeaver Support
- 最早在前
- 热门
- 最新在前
Sorted by 最新在前Peder Alm
Hi
The /full version of tree or list was what I needed. Thanks!
SystemWeaver Support
Hi Peder,
In general when we discuss a tree like this in SystemWeaver, we are talking about items and parts. So, I assume that you would like to get all parts and items in a tree with the item you ask for on the top. There is no handle to parent since many parts can point to the same item. Instead, the part knows which item it is pointing to. When you have the whole tree, you automatically know which part is pointing to which item.
If I understand your need correctly, then you would want to do one of the following restAPI calls (x04000000000000CA is just an example) :
http://server:port/restapi/items/x04000000000000CA/tree
OR
http://server:port/restapi/items/x04000000000000CA/tree/full
'full' gives you all information of parts and items, but also needs higher bandwidth since it has more data.
I hope this information is helpful.
SystemWeaver Support
-
Support for Autotest of API applications
-
Major version exception in API
-
Part multiplicity exception in API
-
Get enum attribute value description
-
Detecting connection status?
-
Item type name from SID
-
Adding an existing item as part to an item using C# API
-
Last Changed date isn't updating
-
Script filer och API
-
How do I return a DataTable instead of IswItems?
查看所有19话题