Skip to content

Manage Engine ECMA Script (node.js) API Library/Framework

License

Notifications You must be signed in to change notification settings

m-e-hers/MECMAPI

Repository files navigation

MECMAPI

npm
Manage Engine ECMA Script (node.js) UMD module/Library/Framework to work with REST API of ServiceDesk Plus


INSTALL/IMPORT

CDN

npm
Change version as needed in URL bellow:

https://cdn.jsdelivr.net/npm/[email protected]/index.js

NPM

https://www.npmjs.com/package/mecmapi

npm install mecmapi --save

USAGE EXAMPLE

browser

const mecmapi = new window.mecmapi({});

const scrProcessing = async (requestId, request) => {
    const noteDescription = `В ОБРАБОТКЕ  -//-  PROCESSING  ©`;

    const res = await mecmapi.updateRequest(requestId, {
        "group": {
            "name": "IT"
        },
        "request_type": {
            "name": "Request"
        },
        "level": {
            "name": "Coordinators"
        },
        "status": {
            "name": "Processing"
        },
        "udf_fields": {
            "udf_pick_1205": await vut.getUpdatedCoordinator()
        },
        "technician": null,
        ...request
    });
    await mecmapi.addNote(requestId, {
        "mark_first_response": true,
        "add_to_linked_requests": false,
        "notify_technician": false,
        "show_to_requester": false,
        "description": noteDescription
    })
}

const rid = vut.getRequestId();
scrProcessing(rid).then(() => {
    vut.gotoRequest(rid);
});
// CHANGELOG.md

About

Manage Engine ECMA Script (node.js) API Library/Framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published