Source Map Uploads: How big can the folder get? Can we delete them via API?

grasuth

Posted on
Jan 26 2016

Hi Raygun people,

We've full integrated sourcemaps and we're uploading maps and minified Javascript via the API to the Raygun sourcemap centre via API. So it is all working a treat. Cheers.

Now, we're wondering: Each time we make a release, we are uploading six sourcemaps and say 18 minified JS files. That can happen several times a day, so we are going to start accumulating a bunch of file there that might slow stuff down or hit up against some limits.

So: 1. Is there a limit to the number of files or total storage we can upload to the sourcemap centre?
2. Are there performance issues on your side if we've got too many files? 2. Is there a way (via API) that we can get rid of old files we no longer need?

thanks, Graeme


Alex

Posted on
Jan 26 2016

Hi Grasuth,

  1. There is no limit at the moment for the number of files we allow in the center.
  2. We haven't seen any performance issues related to too many files when it comes to mapping however the source map center itself my take longer to load.

  3. There's a few API calls we haven't documented yet to manage the files in the source map center.

To clear all files send a DELETE request to https://app.raygun.io/jssymbols/[applicationidentifier]/all

eg.

curl -X DELETE -u my@email.com:mypassword https://app.raygun.io/jssymbols/[applicationIdentifier]/all

To clear individual files send a DELETE request to https://app.raygun.io/jssymbols/[applicationIdentifier] with either query string values or form fields specifying the URL's of the files you wish to delete.

eg.

curl -X DELETE -u my@email.com:mypassword https://app.raygun.io/jssymbols/[applicationIdentifier] -F "url=https://example.com/js/myjs.min.map"

or

    curl -X DELETE -u my@email.com:mypassword "https://app.raygun.io/jssymbols/[applicationIdentifier]?url=https://example.com/js/myjs.min.map&url=https://example.com/js/vendor.min.map"

To get a list of the files in the source map center you can send a GET request to https://app.raygun.io/jssymbols/[applicationIdentifier]

eg.

curl -X GET -u my@email.com:mypassword https://app.raygun.io/jssymbols/[applicationIdentifier]

This returns a JSON object:

{ 
  "Count": totalNumberOfItems, 
  "Items": [
    {  
       "Url": "https://urlOfItem", 
       "FileName": "fileName.js", 
       "UploadedOn": "2016-01-01..." 
    },
    ...
  ] 
}

All these calls use the same authentication as the upload calls (either Basic Auth or Token auth).

Hope that helps.

Best regards,
Alex


grasuth

Posted on
Jan 26 2016

Excellent. Thanks Alex, exactly what we need to know. kind regards, Graeme


Reply