A NodeJS API for interoperating with a Digital Hub
The samples folder highlights how the API can be used to automate and report operations with a Digital Hub.
Create an instance of the hub
const Hub = require('@5app/digital-hub-api');
The constructor defines the environment and user credentials
const hub = new Hub({
tenant,
username,
password,
});
This makes a request using node-fetch.
await hub.api({
path: 'query/assets',
qs: {
fields: ['id', 'name'],
filters: {
parent_id: 13123,
},
},
});
Note: Docs on the available HTTP endpoints, methods and parameters are in development.