2.3.1 • Published 8 years ago

gta-service-desk v2.3.1

Weekly downloads
43
License
-
Repository
github
Last release
8 years ago

GTA Service Desk

Node.js client for GotoAssist Service Desk

Build Status

Getting Started

If you have the node package manager, npm, installed:

npm install --save gta-service-desk

Obtain your API here: https://desk.gotoassist.com/my_api_token

###Show an incident

var ServiceDesk = require('gta-service-desk');

serviceDesk = new ServiceDesk('API_KEY');

// Shows incident 100 and logs title
serviceDesk.getIncident(100, function (err, res) {
    console.log(res.incident.title);
});

###Create an incident

var ServiceDesk = require('gta-service-desk');

serviceDesk = new ServiceDesk('API_KEY');

var incident = {
    title: "This is a test",
    service_id: "0000000000",
    assigned_user_id: "0000000000"
}

serviceDesk.createIncident(incident, function(err, res) {
    console.log( "Successfully created Incident #" + res.incident.id )
});

###Update an incident

var ServiceDesk = require('gta-service-desk');

serviceDesk = new ServiceDesk('API_KEY');

serviceDesk.showIncident(100, function (res) {

    if (res) {
        var incident = res.incident;
        incident.title = "Updating the title";
        serviceDesk.updateIncident(incident.id, incident, function(res) {
            console.log(res.incident.title); // prints "Updating the title"
        });
    }

});

###Create a internal watchlist for an incident

var ServiceDesk = require('gta-service-desk');

serviceDesk = new ServiceDesk('API_KEY');

var watch = {
    watched_by: GTA_USER_ID
}

serviceDesk.createIncidentWatch(100, watch, function (res) {
    console.log( "Successfully created watch #" + res.watch.id )
});

###Create an external watchlist for an incident

var ServiceDesk = require('gta-service-desk');

serviceDesk = new ServiceDesk('API_KEY');

var watch = {
    external_email: EMAIL
}

serviceDesk.createIncidentWatch(100, watch, function (res) {
    console.log( "Successfully created watch #" + res.watch.id )
});

If you want to notify the people in the watchlists (external and internal), you must update the incident with the POST parameter notify_watchlisted set to true after the creation of the said watchlists.

View http://support.citrixonline.com/s/G2ASD/Help/APIDocs for API documentation.

2.3.1

8 years ago

2.3.0

8 years ago

2.2.2

8 years ago

2.2.1

8 years ago

2.1.0

8 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago