Question

Direct recording of measured values ​​using the REST API

  • 29 April 2024
  • 6 replies
  • 49 views

Badge +2

Direct writing of measured values using REST API

When using the standard integration REST Api EquipmentObjectMeasEntity.svc/EquipmentObjectMeasSet, one of the required parameters is RegDate, but it only allows entering a date, which ultimately allows entering a single measurement per day. It is possible to write only one value in one day, which contradicts the logic of measurement for objects. We need to write more values ​​for the measuring point of the object, just as it is possible through the standard window of the application. 

I want to ask if this is a bug, or if the integration API can actually write only one value per day - but that would make this API unusable in practice.

Alternatively, how to deal with recording multiple measured values ​​in measuring points?

thank you.


6 replies

Userlevel 3
Badge +5

@CdcPatrCs I’m not an expert on this specific functional area, but from what I can see, the EquipmentObjectMeasEntity is a Standard Entity type API,, meaning it would allow you to do direct CRUD operations on the EquipmentObjectMeasSet which might be the reason it only allows single update. 
However, in the Web Client in IFS Cloud, it’s likely that there is another API which actually gets called to update multiple object points as you describe. Please check the API being invoked when doing this in the Web Client, you can use the Debug Console to identify this. 

Userlevel 3
Badge +8

Hi.

 

Even that documentation indicates the following:

 

 

Have you tried passing a date and time? Try passing the datetime using the following string format: "2024-04-24T15:01:00Z"

 

Let us know the result.
Best regards.
Gonzalo.
 

Badge +2

@CdcPatrCs I’m not an expert on this specific functional area, but from what I can see, the EquipmentObjectMeasEntity is a Standard Entity type API,, meaning it would allow you to do direct CRUD operations on the EquipmentObjectMeasSet which might be the reason it only allows single update. 
However, in the Web Client in IFS Cloud, it’s likely that there is another API which actually gets called to update multiple object points as you describe. Please check the API being invoked when doing this in the Web Client, you can use the Debug Console to identify this. 

Thanks for the response.

Yes, there are other APIs, but they are not from the Integration category. Is it correct to use APIs that are not from the integration category?

Badge +2

Hi.

 

Even that documentation indicates the following:

 

 

Have you tried passing a date and time? Try passing the datetime using the following string format: "2024-04-24T15:01:00Z"

 

Let us know the result.
Best regards.
Gonzalo.
 

Thanks for the response.
The described API is GET, i.e. reading, in the described case it is about writing values.
Yes, of course I also tried writing "2024-04-24T15:01:00Z", but unfortunately the processing ends with the error "Invalid value for property 'RegDate'."

Best Regards

Patrik

 

Userlevel 3
Badge +8

Hi Patrik.

 

Unfortunately it seems that this integration API could have a bug since the RegDate is not designed to receive datetime. You might fill a ticket to report this situation to Support.

 

On the other hand, it is also possible for your to use a regular API, the one that is being used by IFS Aurena web client. It’s not the best approach if you already have an API already designed for integrations. But in this case, the integration API seems to be problematic so you might follow Ashan tip and use alternative API.

 

Best regards.

Gonzalo.

 

Userlevel 3
Badge +5

@CdcPatrCs To answer your question:
“Yes, there are other APIs, but they are not from the Integration category. Is it correct to use APIs that are not from the integration category?”

The recommendation is to use integration APIs wherever applicable. However in this case it seems as Gonzalo also mentioned above, there seems to be a issue with the integration API. If so, please do report a Support Issue on it and until it is fixed you ay chose to use the Standard API used by Web Client. Later once the issue is fixed, please be sure to revert back to the integration API. 

Reply