This tool provides a SaaS sequential build number generator for use in continuous integration software builds. It is intended to be used from CI servers to produce a sequentially incrementing build revision for use in identifying build versions and their respective build dates and other attributes. You can seed the build number arbitrarily; however, you can not repeat past build numbers without changing the build [id] provided. You can use http POST data to store information with the build for later retrieval.
Seed the current build number
$ curl "https://autonum.app/v1/seed?id=foo&number=110"
Generate a build number
$ curl "https://autonum.app/v1/next?id=foo" > {"id":"foo","number":111}
Get the last used build number
$ curl "https://autonum.app/v1/last?id=foo" > {"id":"foo","number":111}
Generate a build number with attached data
$ curl -X POST -H "Content-Type: text/plain" -d "Hello World!" \ "https://autonum.app/v1/next?id=foo" > {"id":"foo","number":112}
Fetch a previous build
$ curl "https://autonum.app/v1/history?id=foo&number=112" > {"date":"2018-09-13T20:10:13.476Z","value":"Hello World!","id":112}
Most of the above URLs will return JSON data by default. You can format the results into any arbitrary string by appending a [format] query parameter. The format string should specify the field(s) to replace by surrounding the field name in the format string with the percent character '%' (encoded as %25) or an exclamation '!'. Example from above:
$ curl "https://autonum.app/v1/history?id=foo&number=112&format=!value!" > Hello World!
Always replace the [id] parameter in the above URLs with a unique identifier of your own. There is no additional security beyond that of your application [id] parameter. For best results ensure this is randomly generated and contains sufficient entropy to ensure reasonable security.
I do recognize and appreciate that this API is not at all RESTful. For that you have my apologies. If there proves to be sufficient need and use of this tool, I will construct a more logical /v2/ API.
All rights reserved.