Disco icon indicating copy to clipboard operation
Disco copied to clipboard

REST API

Open ShadowPeo opened this issue 1 year ago • 5 comments

From what we can see, the current API is limited when integrating with other software. Having a REST API would allow us to better integrate the system within our workflows

ShadowPeo avatar Aug 21 '24 02:08 ShadowPeo

You're correct in identifying that the API Disco ICT exposes is largely suited to support its own UI. Authoring a separate API to cover all of Disco ICT's functionality would be initially prohibitive. Perhaps we can start small, with a specific use-case, and make sure appropriate API's are available to meet those needs. Did you have an idea of a workflow you would like to support? Feel free @ShadowPeo to reach out directly if you'd rather the conversation continue privately.

garysharp avatar Sep 18 '24 07:09 garysharp

Posting this for someone else on the team


In regards to this, my first thoughts for starting small would be providing ways to gather data. For example API endpoints to: Query a user and return all assigned devices and basic data (serial, asset tag, model, profile, batch, assigned date) Query a device and return assigned user, last network login/last seen Query a user and return open jobs, dates created, type, reference and their statuses (Open, Awaiting account payment, awaiting repairs etc) Query a job and return status all required components to be paid for

Including the ability to use an API key for authentication for new and existing endpoints (Such as /api/device/UpdateLocation and /api/device/LastNetworkLogonDate).

The next, more complex steps, would be methods to add data like creating or updating a job for a user.

ShadowPeo avatar Oct 15 '24 21:10 ShadowPeo

To read data from Disco ICT, I'd recommend connecting directly to the SQL database. Read-only permission can be assigned to either a user, or a SQL account. It is true that changes to the SQL schema could change over time (years) although these have proven to be largely additive (which don't break anything sensible). The database is quite logically laid out. But definitely reach out if you need assistance locating some data.

garysharp avatar Oct 16 '24 04:10 garysharp

A reliable API is required to create jobs. This would be a restful API that accepted a json model and returned basic job details or relevant validation errors (in json format).

In the interim, the following PowerShell sample can be used to create a job with automation: JobCreationTemporaryAPI.txt

This method will be immediately obsolete (and unsupported) once the restful API to create jobs is delivered.

garysharp avatar Nov 25 '24 07:11 garysharp

There have been a heap of times I would have loved API integration to Disco.... Most are listed above, but my preferences would be:

  1. For a given Serial Number return assignment details
  2. For a given USERID return device Assignments
  3. Return list of Devices ALA Export Devices functionality...

SHSC-JMS avatar Apr 11 '25 01:04 SHSC-JMS