Collections
...
Collections API
Collections
Delete Collection
4min
delete collection collections can be deleted by making an http delete request to the /collections/collection id endpoint (where collection id is the id of the collection you wish to delete) a collection can only be deleted when it is not running to check whether a collection is currently running use the get collection https //docs trajectdata com/rainforestapi/collections api/collections/get endpoint example delete delete /collections/collection id in the example below we delete a collections with id=123456 $ curl x delete "https //api rainforestapi com/collections/123456?api key=demo"const axios = require('axios'); const params = { api key 'demo' } axios delete('https //api rainforestapi com/collections/123456', { params }) then(response => { console log('collection deleted '); }) catch(error => { console log(error); });import requests api result = requests delete('https //api rainforestapi com/collections/123456?api key=demo') print ("collection deleted ")\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init(sprintf('%s?%s', 'https //api rainforestapi com/collections/123456', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); curl setopt($ch, curlopt customrequest, "delete"); $json = curl exec($ch); curl close($ch); echo "collection deleted ", php eol; ?> rainforest api responds with a json object confirming that the collection has been deleted, or detailing the error if it has not been possible to delete the collection { "request info" { "success" true, "message" "collection deleted" } } next steps get collections https //docs trajectdata com/rainforestapi/collections api/collections/get list collections https //docs trajectdata com/rainforestapi/collections api/collections/list