npm.io
2.2.5 • Published 2 years ago

@useems/octadesk-api

Licence
ISC
Version
2.2.5
Deps
6
Size
42 kB
Vulns
25
Weekly
0

octadesk-api

Node proxy to Octadesk APIs

npm version

Install

npm install @useems/octadesk-api

Usage

Use your API Token or your Octadesk credentials.

const octadeskAPI = require('octadesk-api')

let octadesk = new octadeskAPI('https://api.octadesk.services')
await octadesk.authenticate({ 'subdomain': 'YOUR_SUBDOMAIN', 'apitoken': 'octa.YOUR_API_TOKEN', 'username': 'A_VALID_USERNAME' })

/* or */

let octadesk = new octadeskAPI('https://api.octadesk.services')
await octadesk.authenticate({ 'subdomain': 'YOUR_SUBDOMAIN', 'username': 'A_VALID_USERNAME', 'password': 'THE_USER_PASSWORD' })

/* then */

octadesk.tags.get("")
    .then(tags => {
        tags.forEach(tag => {
            console.log(tag.name)
        })
    })

Functions

Company (octadesk.company)
Custom Fields (octadesk.customfields)
Forms (octadesk.forms)
Groups (octadesk.groups)
Help Center (octadesk.helpcenter)
Macros (octadesk.macros)
Organizations (octadesk.organizations)
  • organizations.get(id) - GET /{id}
  • organizations.create(organization) - POST /
  • organizations.update(organization) - PUT /{id}
Persons (octadesk.persons)
Products (octadesk.products)
Smart Forms (octadesk.smartforms)
Subjects (octadesk.subjects)
  • subjects.getAll() - GET /
  • subjects.get(id) - GET /{id}
  • subjects.search(keyword, onlyEnabledItems = true, invisibleToClient = true) - GET /search
Tags (octadesk.tags)
Tickets (octadesk.tickets)
Workflow (octadesk.workflow)

Keywords