API Docs : Venue Streams Table

How To Read From Venue Streams

You can use any of the columns listed below when communicating with our database:

Javascript Get Request Example

				
					const axios = require('axios');

axios
    .get('https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/venue-streams?venue=Example&key=recKGDfugvV46BxpH'
)
  .then(res => {
    console.log(res.data.Retrieved);
  })
  .catch(error => {
    console.error(error);
  });
				
			

Get Request ‘curl’ Example

				
					curl https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/venue-streams?venue=Example"&"key=recKgh89gvV7wBxpH
				
			
How To Write To Venue Streams

You can use any of the columns listed below when communicating with our database:

Short description of the stream, what is included to help identify against others and log any important information.
What materials will be collected in this stream? Choose from "Paper", "Card", ""PET", "PP"", "PLA", "Food Waste", "Metal", "Bio", "Paperboard", "rPET", "Aluminium", "Glass" or "PS"
Use this to terminate your stream and stop collections being logged. 'true' means terminated, 'false' means live.

Javascript Post Request Example

				
					const axios = require('axios');

const data = JSON.stringify([
  {
    "fields": {
      "Customer Assigned Name": "Cup Stream",
      "QTY Stream Versions": 1,
      "Materials": [
        "rPET",
        "PLA",
        "PET"
      ],
      "Description": "Dit de stroom van PET bekers",
      "Venue/Event": [
        "rec6WP5bsnjLm5i18"
      ],
      "Products Tracked": [
        "recv2ZmpKPgfG92BZ",
        "recCdrGnSTgQVdqlS",
        "recHHcTrNBlqoj2mv",
        "recP9KXgKPmu1zAk0",
        "recF9CVsQG86hvgoI"
      ],
      "Waste Collection Logbook": [
        "recPbYSPAhpWXr1xZ"
      ],
      "4- Waste Sorting Logbook": [
        "rec9K6bRPLmkBfyr1"
      ],
      "Icon Choice": [
        "recUpnO6jMeIOK8UA"
      ]
    }
  },
  {
    "fields": {
      "Customer Assigned Name": "Cup Stream",
      "QTY Stream Versions": 1,
      "Materials": [
        "rPET"
      ],
      "Description": "Dit de stroom van PET bekers",
      "Venue/Event": [
        "recXW58JYhzyM6Odn"
      ],
      "Products Tracked": [
        "recMLl4CvqdSNfDXR",
        "rec9IpKLoL5iU93OZ"
      ],
      "Waste Collection Logbook": [
        "rec50N67JovtlXPFg"
      ],
      "4- Waste Sorting Logbook": [
        "reckhZQN6GkpaCUQd"
      ],
      "Icon Choice": [
        "recUpnO6jMeIOK8UA"
      ]
    }
  }
]);
const options = {
	headers: {"content-type": "application/json"}
}

axios.post(' https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/venue-streams?venue=Example&key=recKGDlu45gyBxpH', data, options)
.then(function (response) {
	console.log(response);
})
.catch(function (error) {
	console.log(error);
});
				
			

Javascript Post Response Data Example

				
					[ 'recgj7rzZ9SeuZdmZ', 'recpsw3rdaMeHPWJy' ]