API Docs : Material Processing Table

How To Read From Material Processing

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/material-processing?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/material-processing?venue=Example"&"key=recKgh89gvV7wBxpH
				
			
How To Write To Material Processing

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

Javascript Post Request Example

				
					const axios = require('axios');

const data = JSON.stringify([
  {
    "fields": {
      "Waste Processor": [
        "recaolViM5l4tHzyW"
      ],
      "Quantity Processed (Tonnes)": 50,
      "Waste Sorting ID": [
        "rec9K6bRPLmkBfyr1",
        "recmxgVbsGq9jLX5M",
        "reckhZQN6GkpaCUQd",
        "rec31r6Tl9vyhYxGO",
        "reccwZBT9YY9piepT",
        "rec7VaEEUJ0r08MTL",
        "recECIGmo2KXVzsV1"
      ],
      "Manufacture Logbook": [
        "recOu1dgk25fQOYFg"
      ],
      "Facility": [
        "recFCl6TZTPgjhjqo"
      ]
    }
  },
  {
    "fields": {
      "Waste Processor": [
        "recaolViM5l4tHzyW"
      ],
      "Quantity Processed (Tonnes)": 50,
      "Waste Sorting ID": [
        "rec9K6bRPLmkBfyr1",
        "recmxgVbsGq9jLX5M",
        "reckhZQN6GkpaCUQd",
        "rec31r6Tl9vyhYxGO",
        "reccwZBT9YY9piepT",
        "rec7VaEEUJ0r08MTL",
        "recECIGmo2KXVzsV1"
      ],
      "Manufacture Logbook": [
        "recOu1dgk25fQOYFg"
      ],
      "Facility": [
        "recFCl6TZTPgjhjqo"
      ]
    }
  }
]);
const options = {
	headers: {"content-type": "application/json"}
}

axios.post(' https://3f8ni4ce9j.execute-api.eu-central-1.amazonaws.com/rubbish-tracker/api/table/material-processing?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' ]