How to call MapBox list dataset API and update dataset API

I am trying with mapbox api for update my dataset in the mapbox. I have tried with get a single dataset, update dataset PATCH, and list datasets with GET. It is not working.

here is the code of PATCH not working.

function updateDataset() {
            url : ""+testDatasetID+"?access_token="+accessToken,
            data : JSON.stringify(testData),
            type : 'PATCH',
            contentType : 'application/merge-patch+json',
            processData: false,
            success: function(data, textStatus, jqXHR){
              console.log(textStatus + ": " + jqXHR.status);
              return 0
            error: function(jqXHR, textStatus, errorThrown){
              console.log(textStatus + ": " + jqXHR.status + " " + errorThrown);

I keep getting 404 not found from this code.

Read more here:

Content Attribution

This content was originally published by Wei Hong Chang at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: