Replacing a route map file
Complete the following instructions to replace a route map file previously uploaded to IBM® NS1 Connect®. After making changes to the JSON file, you can upload the file.
Replace a route map using NS1 Connect
- Click Pulsar in the main navigation.
- Click the Route maps tab.
- Click the menu icon next to the route map, and click Replace from the dropdown menu.
- Click Browse under the existing file name, and select the file you want to replace it with.
- Click Upload.
Replace a route map by using the API
If using the API, you must use two API requests to upload a route map file. The first request sets the metadata and generates a pre-signed AWS S3 URL that you will need in the second step to upload the route map file to the NS1 Connect platform. The map ID you use in the first step must match the route map you replace. You can only replace data for a route map that is in the ready state.
First, use the following GET request to obtain the pre-signed Amazon S3 URL that you need to upload the route map file to the NS1 Connect platform. Replace <mapID> with the unique ID (integer) of the existing route map you are replacing.
curl -X GET -H "X-NSONE-Key: $NSONE_API_KEY" https://api.nsone.net/v1/pulsar/routemaps/<mapID>/replace
The response includes the unique URL that you need in the next step.
{
"customer": 0,
"status": "ready",
"name": "West Coast",
"created": 0,
"url": "https://s3.amazonaws.com/pulsar-routemap-uploads/example.json?...",
"mapid": 2992,
"modified": 0
}
Next, use the following PUT request to upload the route map file, specifying the <fileSize> and <filePath> of the route map file, and <aws_url> with the unique URL provided in the response to the first GET request.