CURT API v3 - Code Freeze
The new version of the CURT API used the GoEngine Boilerplate for being Content-Type agnostic to XML and JSON. Some of the best features are listed below:
- Concurrent MySQL access using Goroutines
- JSON rendering powered by encoding/json
- XML rendering powered by encoding/xml
- MySQL Persistence using mymysql
- ACES Compliant vehicle lookup with product groups
Our API Reference can be found in the Docs folder. Below you can see a summary of our most commonly used APIs.
Note: this application is still in heavy development and all endpoints/objects have the potential to change at any time.
You can view example endpoints for all of the routes in the index_test.go file.
*Get Part by Part #
GET - http://goapi.curtmfg.com/part/110003?key=[public api key]
*Reverse Lookup by Part #
GET - http://goapi.curtmfg.com/part/110003/vehicles?key=[public api key]
POST - http://goapi.curtmfg.com/customer/auth Payload -------------------------- email: email@example.com password: password
The following GET route for the customer user authentication is only useful if in the last 6 hours this user has logged in through the POST directive of the /customer/auth endpoint.
GET - http://goapi.curtmfg.com/customer/auth?key=c8bd5d89-8d16-11e2-801f-00155d47bb0a
POST - http://goapi.curtmfg.com/customer/locations Payload -------------------------- key: CEB28F99-F03A-4568-B004-E4FFA87CBDF1
POST - http://goapi.curtmfg.com/customer/users Payload -------------------------- key: CEB28F99-F03A-4568-B004-E4FFA87CBDF1
The customer users endpoint will only return data if the requesting user is marked as sudo user
This version if the API is meant to focus on data quantity while maintaining, if not improving performance, by leveraging concurrency. We would like the client to have the ability to make fewer requests to the API Server and be provided with a larger amount of data in the response.
Directions for setting up a local development environment can be found in DEVELOPER.md.
The project uses GoConvey as a testing framework. Follow the install directions from the GitHub repo and make sure you have
$GOPATH/bin in your
$PATH. Then go to the directory you want to test and run
~/workspace/gocode/src/github.com/curt-labs/API $ cd models/products/ ~/workspace/gocode/src/github.com/curt-labs/API/models/products $ goconvey
Deployment will be done using the master branch on Github. Once a commit is pushed to Github it will route that commit to Drone.io, which will then running CI testing across the project and then deploy new Docker containers to all CURT servers.
Free-ish software? Open, we'll call it open software. Oh and