When you upload a React Native source map, the upload response contains a unique entity ID (guid) for that source map. You can use this ID to verify or delete the file.
If you don't have a record of a source map's guid, use New Relic's NerdGraph API or NRQL to search for, list, and delete your uploaded source maps, as described below.
Importante
Querying and deleting source maps with NerdGraph requires a User API key. Include it in the Api-Key header of your NerdGraph request.
Find a source map's GUID
To perform management tasks like deletion, you must first obtain the unique identifier (guid) of the source map entity. Search for it using the entitySearch query in NerdGraph.
Sugerencia
When you query source maps in NerdGraph, prefix mapping metadata attributes with tags., with the exception of the name and type fields.
{ actor { entitySearch( query: "type = 'REACT_NATIVE_SOURCEMAP' and tags.applicationId = '<YOUR_APPLICATION_ID>' and tags.appVersion = '12424.0392' and tags.jsBundleId = '87124712' and name = 'app.min.js.map'" ) { results { entities { name guid tags { key values } } } } }}Locate the guid string in the response to use in subsequent management operations:
{ "data": { "actor": { "entitySearch": { "results": { "entities": [ { "guid": "<YOUR_ENTITY_GUID>", "name": "app.min.js.map" } ] } } } }}Delete a source map
Once you have the entity guid, use the entityManagementDelete mutation in NerdGraph to remove the source map:
mutation { entityManagementDelete(id: "<YOUR_ENTITY_GUID>") { id }}The response returns the deleted entity's id:
{ "data": { "entityManagementDelete": { "id": "<YOUR_ENTITY_GUID>" } }}Importante
Changes aren't immediately reflected across all systems. After a deletion or a new upload, it can take a few minutes for the data to sync with entitySearch. During this synchronization window, a deleted source map ID may still temporarily appear in search results.
List source maps
You can audit and view your uploaded source maps using either NerdGraph or NRQL. Filter your files using the following mapping attributes:
jsBundleIdappVersionapplicationIdnametype(orEntityType)accountId
Syntax differences: NerdGraph vs. NRQL
The main functional difference between querying with NerdGraph and NRQL is attribute namespacing:
Interface | Attribute prefix requirement | Scope constraint |
|---|---|---|
NerdGraph | Requires the | Global search across accessible entities unless you include |
NRDB (NRQL) | Uses raw attribute names directly (for example, | Restricted to the targeted account context. |
List with NerdGraph
Include accountId in the filter to scope the search to a specific account:
{ actor { entitySearch( query: "type = 'REACT_NATIVE_SOURCEMAP' and tags.applicationId = '<YOUR_APPLICATION_ID>' and tags.appVersion = '12424.0392' and tags.jsBundleId = '87124712' and name = 'app.min.js.map' and accountId = <YOUR_ACCOUNT_ID>" ) { results { entities { name guid tags { key values } } } } }}List with NRQL
Select the specific account ID context used during the initial file upload, then run the following query against the Entity namespace:
FROM Entity SELECT * WHERE type = 'REACT_NATIVE_SOURCEMAP' AND name = 'app.min.js.map' AND jsBundleId = '87124712' AND appVersion = '12424.0392'