Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi all,
I have te requirement to get the status (no/sucess/failure) of a specific distribution target by calling a odata service.
There can be more then one.
Does anyone know, how to get the highlighted values above by using odata?
Thanks,
Jürgen
Hi @JD_8606834
The help center can be useful. use a RestAPI
GET Windchill/servlet/odata/ESI/DistributionTargets
DistributionTargetsAssoWithContext
Hope this can help
PetrH
Hi PetrH,
thanks for your reply.
if I understand it correctly, the functions that you are mentioning are kind of general functions, not in the context of a part.
I need a service, to which I can pass a part id/number and it will return the status of the transaction for exactly that particular part.
All the part related odata services that I tried do return a lot of attributes but not the status of the transactions related to every assigned distribution target.
Thanks,
Jürgen
Hi @JD_8606834
If you have gone through others sections in the help you would find this>
example_esi_retrieve_DistributionTargetsAssoWithWCObjects
Hope this can help.
PetrH
Hi PetrH,
thanks, sorry, I missed that service in the help.
I tried the call mentioned in help and it does return a lot of information regarding the assigned distribution targets but I can't find the transaction status (failed, pending, succeeded). Do I miss something again?
Here is the result of calling Windchill/servlet/odata/ESI/GetAssignedDistributionTargets?$expand=DistributionTargets
Thanks,
Jürgen
I executed the call again for a part, which has a different transaction status (pending<->succeeded) and I compared the results.
Only some part specific attributes in the header (like id, last modified etx.) aredifferent.
All the values regarding the distribution targets are exactly the same
Hi @JD_8606834
I don't have experience with the result of the rest api method, but there can be explanation.
DistributionTarget status
1- is connected to the master (the iteration does not matter)
2- is connect to the revision (the revision matters)
3- is connected to the iteration (this is not your result so I guess it is not connected to the iteration)
You need to experiment with the method what kind of results you can get and so on.
I've just found the api you asked for.
PetrH
Hi PetrH,
thanks again, I will try different parameters and see, if there is a valid response.
Thanks,
Jürgen
Hi All,
the solution, that PetrH suggest was close to what I need, but even with trying different IDs, I don't see the transaction status.
Maybe, there is another navigation, that I can expand like "Transactions" or something like this, but I don't see any.
Does anybody know, how I could expand further?
Thanks,
Jürgen