# External API changes from v3 to v4

**URL:** <https://discourse.kuvacode.com/t/external-api-changes-from-v3-to-v4/18>\
**Category:** API\
**Created:** [8 July 2019 20:27 UTC](https://discourse.kuvacode.com/t/external-api-changes-from-v3-to-v4/18 "2019-07-08T20:27:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![francis](https://discourse.kuvacode.com/user_avatar/discourse.kuvacode.com/francis/32/13_2.png) [@francis](https://discourse.kuvacode.com/u/francis)\
**Post date:** [8 July 2019 20:27 UTC](https://discourse.kuvacode.com/t/external-api-changes-from-v3-to-v4/18/1 "2019-07-08T20:27:39Z")

</div>

In the transition from v3 to v4 of Smart Shooter, there were a few breaking changes to the message spec used by the External API feature (and note, CaptureGRID 4 is in line with Smart Shooter 4).

Firstly, the API docs in the bitbucket repo was branched.  
So for v3, please refer to this branch:  
[https://bitbucket.org/kuvacode/smartshooter-api/src/v3/](https://bitbucket.org/kuvacode/smartshooter-api/src/v3/)

And for v4, this branch:  
[https://bitbucket.org/kuvacode/smartshooter-api/src/master/](https://bitbucket.org/kuvacode/smartshooter-api/src/master/)

Here is a brief summary of the changes:

- “Msg” suffix dropped from msg\_id name fields  
For example, the “DetectCamerasMsg” is renamed to “DetectCameras”.

- UTF8 BOM (byte order mark) is no longer added to outgoing messages

- “msg\_ref\_num” field renamed to “msg\_seq\_num”

- “Result” field renamed to “msg\_result”

- “GridSequenceNum” field renamed to “PhotoSequenceNum”

- “GridBatchNum” field renamed to “PhotoBatchNum”

For a complete list, please refer to the commits made to the bitbucket repo.

In additional, the bitbucket repo also now contains a reference implementation of a python library, for reading/writing messages and maintaining state about cameras and photos. The code is available here:  
[https://bitbucket.org/kuvacode/smartshooter-api/src/master/smartshooter/](https://bitbucket.org/kuvacode/smartshooter-api/src/master/smartshooter/)

_The app itself has a embedded python interpreter, for running the built-in scripts, and this python library is used there._
