Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
directus-sdk-node
Advanced tools
For Node driven apps, use this SDK to more easily communicate with your Directus managed database through the API.
npm install directus-sdk-node
const client = new DirectusSDK('user-token', {
// the sub-domain in your instance url
instanceKey: 'user--instance'
});
client.getEntries('articles', (err, res) => {
if(err) throw err;
res.forEach((article) => {
console.log(article.title);
});
});
const client = new DirectusSDK('user-token', {
baseUrl: 'http://yoursite.com/api',
apiVersion: 1 // Optional - default 1
});
client.getEntries('articles', (err, res) => {
if(err) throw err;
res.forEach((article) => {
console.log(article.title);
});
});
All methods can be used with either callbacks or promises
For more info on what parameters are supported: check the official Directus API docs
client.getTables([Function callback]);
client.getTable(String table, [Function callback]);
client.getColumns(String table, [Object params, Function callback]);
client.getColumn(String table, String column, [Function callback]);
client.getEntries(String table, [Object params, Function callback]);
client.getEntry(String table, Number id, [Object params, Function callback]);
client.createEntry(String table, Object data, [Function callback]);
client.updateEntry(String table, Number id, Object data, [Function callback]);
client.deleteEntry(String table, Number id, [deleteFromDB: Boolean = false, Function callback]);
client.getUser([Object params, Function callback]);
client.getUser(Number id, [Object params, Function callback]);
client.createUse(Object data, [Function callback]);
client.updateUser(Number id, Object data, [Function callback]);
client.deleteUser(Number id, [deleteFromDB: Boolean = false, Function callback]);
client.getGroup([Object params, Function callback]);
client.getGroup(Number id, [Object params, Function callback]);
client.getGroupPrivileges(Number id, [Function callback]);
client.getFile([Object params, Function callback]);
client.getFile(Number id, Object params, Function callback]);
client.createFile(Object data, [Function callback]);
client.updateFile(Number id, Object data, [Function callback]);
client.deleteFile(Number id, [deleteFromDB: Boolean = false, Function callback]);
client.getSettings([Function callback]);
client.getSettingsByCollection(String collectionName, [Function callback]);
FAQs
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name.
We found that directus-sdk-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.