Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
rest_api_customers [2016/11/25 13:22] – sweitmann | rest_api_customers [2016/12/08 08:51] – sweitmann |
---|
View all customers in XML format | ====REST API for CUSTOMER data==== |
http://localhost:3000/*databasename*/customers.xml?token=*XXX* | |
| |
View all customers in JSON format | |
http//localhost:3000/*databasename*/customers.json?token=*XXX* | |
| |
View single customer in XML format | |
http://localhost:3000/*databasename*/*customer_id*.xml?token=*XXX* | |
| |
View single customer in JSON format | ^**__GET__** || |
http://localhost:3000/*databasename*/*customer_id*.json?token=*XXX* | |View all **CUSTOMERS** in XML format|[[:api:api_view_all_customers_xml| https://localhost:3000/{databasename}/customers.xml?token=123]]| |
| |View all **CUSTOMERS** in JSON format|[[:api:api_view_all_customers_json| https://localhost:3000/{databasename}/customers.json?token=123]]| |
Adding a customer with XML from command line | |View single **CUSTOMER** in XML format|[[:api:api_view_single_customer_xml| https://localhost:3000/{databasename}/{customer_id}.xml?token=123]]| |
curl -X POST -H "Content-Type: application/xml" -d @customer.xml http://localhost:3000/*databasename*/customers?token=*XXX* | |View single **CUSTOMER** in JSON format|[[:api:api_view_single_customer_json| https://localhost:3000/{databasename}/{customer_id}.json?token=123]]| |
| ^**__UPDATE__** || |
| |Add or update **CUSTOMER** with XML from command line|[[:api:api_update_customer_xml| |
| curl -X POST -H "Content-Type: application/xml" -d @customer.xml https://localhost:3000/{databasename}/customers?token=123]]| |
| |Add or update **CUSTOMER** with JSON from command line|[[:api:api_update_customer_json| |
| curl -X POST -H "Content-Type: application/xml" -d @customer.json https://localhost:3000/{databasename}/customers?token=123]]| |
| ^**__DELETE__** || |
| |Delete **CUSTOMER** from command line|[[:api:api_delete_customer]| |
| curl -X DELETE -H "Content-Type: application/xml" -d @customer.xml https://localhost:3000/{databasename}/{customers_id}?token=123]]| |
| |
Adding a customer with JSON format from command line | |
curl -X POST -H "Content-Type: application/json" -d @customer.xml http://localhost:3000/*databasename*/customers?token=*XXX* | |
| |
Delete a customer with DELETE request | |
curl -X DELETE http://localhost:3000/*databasename*/customers/*customer_id*?token=*XXX* | |
| |
| |
{{:api-first-draf.png?200|}} | {{:api-first-draf.png?200|}} |