domonodo - WIP node.js library for using new Domo APIs

I'm throwing together a basic node.js library based on your API documentation, as many of our WorkBench jobs are running node scripts to pull data in from our third-party services. I just started on it today so it's very much a work in progress. 

 

You can find it on github: https://github.com/eibbors/domonodo

 

Issues as of this post:

  • I'm currently running all the tests against a live production instance so I haven't been able to test the delete/create user functionality and I get an HTTP 500 error when trying to update a user's information. If anyone can help with these, that would be much appreciated!
  • Still need to setup the dataset APIs. I will try to get something simple out this week.

Thanks for your time!

 

 

Best Answer

  • gwsv-it
    gwsv-it Member
    Answer ✓

    Just got off the phone with Domo Support and everything is working now. There are some required fields for each request not necessarily specified in the documentation. For example, to update users you need at least the email, name, and role fields. 

     

    I was told they'd be updating the docs or modifying the API when they get a chance.

Answers

  • GaryGibb
    GaryGibb Domo Product Manager

    This is awesome. Thanks for sharing. I am in close contact with the API owners so if you have issues let me know.

     

  • I've actually been having issues with all of the requests that use PUT (and maybe POST). I keep getting a JSON object with an HTTP 500 error:

     

    { status: 500,

    statusReason: 'Internal Server Error',
    message: 'Internal Server Error',
    toe: '2MRF9S7TIE-POTN6-VO14T' }

     

    I've triple checked that I'm sending everything according to the API documentation. Is there any way you could get me more information based on the toe? 

  • GaryGibb
    GaryGibb Domo Product Manager

    Here is the code I use (that works) to update a user with a "put" command in .net

     

                try {
    accessToken = Session["oauthtoken"].ToString();
    client = new WebClient();
    client.Headers.Add("Content-Type: application/json");
    client.Headers.Add("Accept: application/json");
    client.Headers.Add("Authorization: bearer "+accessToken);
    myparameters = "{\"title\":\""+UserTitle+"\",\"email\":\""+UserEmail+"\",\"role\":\""+UserRole+"\",\"name\":\""+UserName+"\"}";

    downloadStringUser= client.UploadString(urlinput+"/v1/users/"+userid,"PUT",myparameters);

     

  • gwsv-it
    gwsv-it Member

    I thought I'd update that the issue I was having has been resolved. You need to setup the clientId/clientSecret as a user assigned the Administrator role. The error reporting was improved this week and now notes this as the issue. 

     

    If the API docs haven't been updated as well, that should definitely be noted somewhere on there.

  • gwsv-it
    gwsv-it Member

    Actually still having problems now that I have admin credentials. Will try and update the thread if we're able to iron out what's actually going on. 

  • gwsv-it
    gwsv-it Member
    Answer ✓

    Just got off the phone with Domo Support and everything is working now. There are some required fields for each request not necessarily specified in the documentation. For example, to update users you need at least the email, name, and role fields. 

     

    I was told they'd be updating the docs or modifying the API when they get a chance.

This discussion has been closed.