Push values to DCI with API

Started by MarcusH, October 28, 2022, 10:11:48 AM

Previous topic - Next topic

MarcusH

Hi,

Is functionality to push values to push DCI implemented in current API 4.2.395?

Filipp Sudanov

The request should be:

Request type: POST
Request path: API_HOME/pushData

It's possible to use one of two data formats:

1) If you need to send just one DCI:

{
      nodeId : 10,
      dciId : 20,
      value : "Value"
}


2) If you are sending data for multiple DCIs

data :
[
  {
      nodeId : 10,
      dciId : 20,
      value : "Value"
  },
  {
      nodeName : "Node name",
      dciName : "DCI name",
      value : "Value"
  }
]


You can use both names and IDs of objects and DCIs.

If both name and ID are set, ID has priority

MarcusH

i get Internal error error 46, 404 not found when i try to access /pushData

MarcusH


MarcusH

Works great now thanks, happy for ability to use name instead of id makes what i do alot easier.
Just had an issue with name until i got that name is "Metric" now on DCI

Filipp Sudanov

Yes, we are moving toward term "metric" in the UI (and also in NXSL at some point)