Using APIs

All public Nedap Harmony APIs are available to call using the api object. The api object uses the openapi-client-axios library in the background for making the calls. The names of the function equal the names of the API calls in the API Reference.

The api object is already pre-loaded with a limited-validity access token for your workspace, so there is nothing to worry about there.

// retrieve the API client
const client = await api.getClient()

// define the parameters to be used in the API call
const parameters = {
  workspaceId,
  readPointId,
}

// call the API with the given parameters
const result = await client.GetCurrentEpcsForReadPoint(parameters)

// log the current EPCs to the console
console.log(result.data)

Did this page help you?