--- title: "Node-red Worldmap integration guide" slug: "node-red-worldmap-integration-guide" updated: 2023-01-19T21:19:20Z published: 2023-01-19T21:19:20Z canonical: "docs.catchpoint.com/node-red-worldmap-integration-guide" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.catchpoint.com/llms.txt > Use this file to discover all available pages before exploring further. # Node-red Worldmap integration guide This article explains how to configure the Node-red nodes to display the Catchpoint’s test data on the Node-red world map. We suggest first reading the [guide](https://nodered.org/docs/getting-started/installation) to install node-red on your system. The setup consists of three main steps. - Generate the Rest API token and convert it to base64. - Pull the nodes’ information. - Set up an endpoint to which the Catchpoint data will be pushed. Map the test data to the node’s information and send it to the world map. ## Generate the Rest API token and convert it to base64 **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308492-mceclip1.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=W3gHXRlTzkfiJV5veTYEKoP5OZzISDT28Zc4fQqcM98%3D)** The configuration of each node is as shown below **REST API** ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308512-mceclip0.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=P%2FT%2FCgMXqRgIxhgS9ynFRWmhVuN06WBILuu5OahjEzg%3D) **Credentials** (Make sure that you specify your own Key and Secret) **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308532-mceclip1.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=VbRx5sIU%2BvJ2Sr%2Bz9nKeipG3PT3Picpq6Wod21WX97s%3D)** **Headers** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308572-mceclip2.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=wwWnbp%2FkisgizckD8WA6XGVP8wzGIzpcSwedPOK7p8g%3D)** **Body** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308592-mceclip4.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=aPPiWrnuhNTQzE35NAoymwBUh25x4dFIiGW4bG%2B8jtc%3D)** **Token** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308612-mceclip5.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=fEGLuv7ZRUmSKYNmk8toMQlu59PIgox7Y2gyEK8jl80%3D)** **Base64** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007373731-mceclip6.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=kjFEg8HQaWgVqDA8D%2F6EVhdfNzR%2FUqd%2B6deyrEmTP7U%3D)** ## Pull the nodes’ information ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308652-mceclip7.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=o1D0On1HvaxNifJJomXysW%2FVdcrgL8digUKpp92CJ0w%3D) **Timestamp** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308672-mceclip8.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=TJ8U4KX7WIJ5cJKuU2TP1ggpUmvONPnP%2FKsUIbD2Jl4%3D)** **Bearer** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007373771-mceclip9.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=bPIJlELevM%2BN8K%2BCfnKxm3tPM6BLHcMvVuPq%2BsCdUz4%3D)** **Nodes** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308692-mceclip10.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=6Fg%2FLU08Y7YR4RwH%2BMwJwi74mQz9Awu9h9nys6mq2Dc%3D)** **Parse Response** This function node consists the JS code given below to parse the nodes’ JSON, extract the node’s name, latitude, and longitude and then store it as a global variable to use it on the next step ``` var map = []; for (j = 0; j < msg.payload.items.length; j++) { if (msg.payload.items[j].coordinates) { map.push({ 'name' : msg.payload.items[j].name, 'lat' : msg.payload.items[j].coordinates.latitude, 'lon' : msg.payload.items[j].coordinates.longitude }) } } msg.payload = map; global.set("map", map); delete msg.payload.items; return msg; ``` ## Set up Endpoint The last step is to set up an endpoint to which the Catchpoint data will be pushed, map the test data to the node’s information and send it to the world map. By default Node-RED is accessible via port 1880. If you are testing it locally, you’d need a way to generate a valid endpoint to specify in the Catchpoint’s portal since specifying localhost:1880, Catchpoint won’t know to which system the data has to be pushed. We can make use of tools like [ngrok](https://ngrok.com/) to achieve ithis. ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007308712-mceclip11.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=ugm5cfULPbwc0dSFhr4evpqam5JjjVTH3N7fSixmh7Q%3D) **Endpoint** **![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007373791-mceclip12.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=qEneKD4iJJpMgGE0XTeCOkOQzzw%2BMMtGNkzm7Ml2X4A%3D)** Go to the Catchpoint portal and specify the generated endpoint as shown below. ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007444571-mceclip0.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=wyWGG0Ur3xEAnGOo6P6yQmR7E9V57ifXiKe5fpYzJ6I%3D) **Json Parse** The purpose of the function node is to extract the relevant/required information form the test data and map it with the node’s information generated on the previous step and then push it to the world map. Here is a sample code: ``` var map= global.get('map'); var details; for(var i=0;i Clipboard**. - Paste the JSON. ![](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/360007373831-mceclip15.png?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=s5KEf9lOt16BLZHLCOlnBDH%2Br4VuD6v3OER4Bgz8%2FsE%3D) [Node-red.txt](https://cdn.document360.io/cb4af8f9-6751-4fd2-b39c-07aae832badb/Images/Documentation/Node-red.txt?sv=2026-02-06&spr=https&st=2026-11-23T00%3A47%3A29Z&se=2026-11-23T01%3A47%3A29Z&sr=b&sp=r&sig=QUGFRa9ea3jhqOHFFQy%2BPhEPX854skSgg3P9ulGYjIY%3D)