Integrate Rekor Scout® results with your custom application
WebHooks are a great way to integrate Rekor Scout® data with other systems such as external databases, parking systems, etc. Every time Rekor receives a plate or triggers an alert, the system can forward you the data in JSON format. You'll need an internet-accessible endpoint for Rekor to send the data. If your application will not have access to the internet, you can pull from the local beanstalk queue as an alternative.One quick way to get started is to use a free endpoint on www.beeceptor.com. This will show you the JSON data as it is received. Copy the JSON locally, and use it to develop code that implements your desired logic for handling the results. The JSON formats for the Alert results and Plate results are shown at the bottom of this article.
Once you've tested your solution, you can switch OpenALPR to your own endpoint. This Github gist is a useful starting point that provides a working HTTP server using only built-in Python3 modules. For production use, we recommend upgrading the backend to a more fully-featured web framework such as Django or Flask.
Alert Results
Markup{
"camera_name" : "yourcameraname",
"plate_number" : "ABC123",
"description" : "Test",
"site_name" : "yoursitename",
"data_type" : "alpr_alert",
"alert_list" : "youralertlistname",
"list_type" : "Blacklist",
"camera_number" : 1000,
"epoch_time" : 1548715870757,
"version" : 1,
"agent_uid" : "TESTTESTTESTTESTTESTTESTTESTTESTTESTTEST",
"group" : {
"best_plate" : {
"processing_time_ms" : 252.10795593262,
"plate" : "ABC123",
"region_confidence" : 99,
"region" : "us-ca",
"candidates" : [
{
"confidence" : 94.969917297363,
"matches_template" : 1,
"plate" : "ABC123"
},
{
"plate" : "ZBC123",
"confidence" : 75.969917297363,
"matches_template" : 1
}
],
"plate_index" : 0,
"confidence" : 94.969917297363,
"matches_template" : 1,
"vehicle_region" : {
"height" : 796,
"width" : 796,
"y" : 101,
"x" : 465
},
"requested_topn" : 10,
"coordinates" : [
{
"x" : 783,
"y" : 594
},
{
"y" : 590,
"x" : 944
},
{
"x" : 942,
"y" : 670
},
{
"x" : 781,
"y" : 674
}
]
},
"travel_direction" : 272.82250976562,
"frame_start" : 686,
"agent_type" : "alprd",
"plate_indexes" : [
1,
1,
1,
0,
0,
0,
0,
0
],
"is_parked" : false,
"best_plate_number" : "ABC123",
"candidates" : [
{
"plate" : "ABC123",
"matches_template" : 1,
"confidence" : 94.969917297363
},
{
"plate" : "ZBC123",
"matches_template" : 0,
"confidence" : 73.047538757324
}
],
"agent_version" : "2.5.101",
"data_type" : "alpr_group",
"agent_uid" : "TESTTESTTESTTESTTESTTESTTESTTESTTESTTEST",
"vehicle" : {
"body_type" : [
{
"confidence" : 77.165916442871,
"name" : "suv-standard"
},
{
"name" : "suv-crossover",
"confidence" : 22.672147750854
},
{
"name" : "sedan-compact",
"confidence" : 0.096009664237499
}
],
"color" : [
{
"confidence" : 79.536285400391,
"name" : "gray"
},
{
"confidence" : 15.457083702087,
"name" : "silver"
},
{
"name" : "blue",
"confidence" : 4.4487705230713
}
],
"make_model" : [
{
"confidence" : 36.614269256592,
"name" : "jeep_grand-cherokee"
},
{
"name" : "jeep_cherokee",
"confidence" : 16.472534179688
},
{
"confidence" : 16.10675239563,
"name" : "hyundai_santa-fe"
} ],
"make" : [
{
"name" : "jeep",
"confidence" : 74.869903564453
},
{
"confidence" : 17.465110778809,
"name" : "hyundai"
}
]
},
"uuids" : [
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530858898",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530858792",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530858968",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530859222",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530859363",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530859504",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530859469",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530859572"
],
"country" : "us",
"epoch_start" : 1548715870757,
"best_confidence" : 94.969917297363,
"camera_id" : 1000,
"best_uuid" : "XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-1085180796-1515530859222",
"frame_end" : 708,
"epoch_end" : 1548715873757,
"user_data" : "hello world",
"company_id" : "xxxxxxxx-xxxx-yyyy-yyyy-zzzzzzzzzzzz",
"best_region" : "us-ca",
"version" : 2,
"best_region_confidence" : 99,
"best_image_width" : 1920,
"best_image_height" : 1080
}
}
Group Results:
rekor_agent_4_1_1_ sample_payload.json
{
"data_type": "alpr_group",
"version": 3,
"epoch_start": 1699978462240,
"epoch_end": 1699978465240,
"frame_start": 216,
"frame_end": 236,
"company_id": "7a78d740-733e-44c2-978a-3c3efc5d5560",
"agent_uid": "OKVPD-002",
"agent_version": "4.1.1",
"agent_type": "alprd",
"camera_id": 1,
"gps_latitude": 39.4347,
"gps_longitude": -74.978798,
"country": "us",
"uuids": [
"e0cc6f95-0d79-4d32-9663-a106e541b5c4",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675927553",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675927709",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675927758",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675927807",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675927855",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675927904",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675927952",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928001",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928061",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928109",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928157",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928206",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928255",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928304",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928402",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928461",
"63PHH1MHEXF9U245NFI66RGPUXTQEREKAJI7K44Y-177622-1627675928510"
],
"vehicle_path": [
{
"x": 204,
"y": 130,
"w": 739,
"h": 454,
"t": -48,
"f": -1
},
{
"x": 192,
"y": 117,
"w": 706,
"h": 442,
"t": 49,
"f": 0
},
{
"x": 222,
"y": 83,
"w": 588,
"h": 422,
"t": 205,
"f": 4
},
{
"x": 219,
"y": 86,
"w": 577,
"h": 402,
"t": 254,
"f": 5
},
{
"x": 219,
"y": 81,
"w": 541,
"h": 389,
"t": 303,
"f": 6
},
{
"x": 228,
"y": 66,
"w": 493,
"h": 371,
"t": 448,
"f": 8
},
{
"x": 233,
"y": 68,
"w": 454,
"h": 346,
"t": 497,
"f": 10
},
{
"x": 236,
"y": 63,
"w": 417,
"h": 329,
"t": 605,
"f": 12
},
{
"x": 237,
"y": 48,
"w": 403,
"h": 339,
"t": 653,
"f": 13
},
{
"x": 240,
"y": 44,
"w": 384,
"h": 322,
"t": 751,
"f": 14
},
{
"x": 236,
"y": 42,
"w": 362,
"h": 312,
"t": 800,
"f": 16
},
{
"x": 241,
"y": 39,
"w": 324,
"h": 291,
"t": 957,
"f": 18
},
{
"x": 239,
"y": 47,
"w": 312,
"h": 255,
"t": 1102,
"f": 20
},
{
"x": 265,
"y": 40,
"w": 234,
"h": 221,
"t": 1297,
"f": 26
},
{
"x": 265,
"y": 34,
"w": 220,
"h": 198,
"t": 1502,
"f": 30
},
{
"x": 268,
"y": 37,
"w": 208,
"h": 173,
"t": 1756,
"f": 32
},
{
"x": 276,
"y": 37,
"w": 190,
"h": 147,
"t": 1853,
"f": 37
},
{
"x": 281,
"y": 35,
"w": 173,
"h": 132,
"t": 2155,
"f": 40
},
{
"x": 280,
"y": 32,
"w": 168,
"h": 101,
"t": 2349,
"f": 47
},
{
"x": 263,
"y": 21,
"w": 194,
"h": 89,
"t": 2699,
"f": 53
},
{
"x": 305,
"y": 32,
"w": 148,
"h": 70,
"t": 2905,
"f": 55
}
],
"plate_indexes": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"candidates": [
{
"plate": "HEV1YW",
"confidence": 93.25465393,
"matches_template": 1
}
],
"best_plate": {
"plate": "HEV1YW",
"confidence": 93.25465393,
"matches_template": 1,
"plate_index": 0,
"region": "us-nj",
"region_confidence": 98,
"processing_time_ms": 5.85926723,
"requested_topn": 10,
"coordinates": [
{
"x": 601,
"y": 294
},
{
"x": 656,
"y": 284
},
{
"x": 659,
"y": 313
},
{
"x": 605,
"y": 325
}
],
"plate_crop_jpeg": "Base 64 encoded image redacted for brevity. It will be present only if agent is configured to send it.",
"vehicle_region": {
"x": 222,
"y": 74,
"width": 522,
"height": 386
},
"vehicle_detected": true,
"candidates": [
{
"plate": "HEV1YW",
"confidence": 93.25465393,
"matches_template": 1
}
]
},
"best_confidence": 93.25465393,
"best_plate_number": "HEV1YW",
"best_region": "us-nj",
"best_region_confidence": 84.06666565,
"matches_template": true,
"plate_path": [
{
"x": 796,
"y": 368,
"w": 54,
"h": 11,
"t": 0,
"f": 0
},
{
"x": 775,
"y": 353,
"w": 49,
"h": 21,
"t": 49,
"f": 1
},
{
"x": 672,
"y": 324,
"w": 56,
"h": 14,
"t": 205,
"f": 4
},
{
"x": 658,
"y": 314,
"w": 53,
"h": 16,
"t": 254,
"f": 5
},
{
"x": 617,
"y": 300,
"w": 61,
"h": 19,
"t": 303,
"f": 6
},
{
"x": 601,
"y": 294,
"w": 58,
"h": 19,
"t": 351,
"f": 7
},
{
"x": 569,
"y": 278,
"w": 59,
"h": 20,
"t": 400,
"f": 8
},
{
"x": 552,
"y": 271,
"w": 63,
"h": 21,
"t": 448,
"f": 9
},
{
"x": 528,
"y": 258,
"w": 59,
"h": 24,
"t": 497,
"f": 10
},
{
"x": 515,
"y": 253,
"w": 58,
"h": 20,
"t": 557,
"f": 11
},
{
"x": 493,
"y": 240,
"w": 58,
"h": 20,
"t": 605,
"f": 12
},
{
"x": 480,
"y": 234,
"w": 60,
"h": 22,
"t": 653,
"f": 13
},
{
"x": 459,
"y": 220,
"w": 59,
"h": 23,
"t": 702,
"f": 14
},
{
"x": 454,
"y": 215,
"w": 55,
"h": 23,
"t": 751,
"f": 15
},
{
"x": 438,
"y": 205,
"w": 56,
"h": 22,
"t": 800,
"f": 16
},
{
"x": 419,
"y": 189,
"w": 50,
"h": 21,
"t": 898,
"f": 18
},
{
"x": 409,
"y": 185,
"w": 57,
"h": 21,
"t": 957,
"f": 19
},
{
"x": 400,
"y": 173,
"w": 51,
"h": 22,
"t": 1006,
"f": 20
}
],
"vehicle_crop_jpeg": "Base 64 encoded image redacted for brevity. It will be present only if agent is configured to send it.",
"overview_jpeg": "Base 64 encoded image redacted for brevity. It will be present only if agent is configured to send it.",
"best_uuid_epoch_ms": 1627675927855,
"best_image_width": 1280,
"best_image_height": 720,
"travel_direction": 296.55792236,
"is_parked": false,
"is_preview": false,
"vehicle_signature": "1h_0d72cdbcf723503d9401ec3cbc2d6bbde0b7f9bd10f625bd98f591bcbfe6e53d4e8d163ebf89063eb029c53d67e69b3d312b763d6375c23ccded953c22b9adbdba5d4f3df46d073d7423adbd4631b83d087713bec66f87bd7d83c13b05a9cb3cc113743ca2e301bc9589353d66622c3e48cefa38d43d3a3e58e317bece1165be955c5d3de37b27bd416c5a3d26016dbcb8d25b3d6c98e7bcf981033ceda21c3df9b51fbc109264bd0e76f33d75b81f3d6cd43b3d358fbabc657a013dc9525e3da0e7223d4da8993d9cce063b4a415bbebc1a0abd7a1e273ebd763bbd0dc4bebc0591cd3dd6859abcec75c43c7570cdbdb92f363da52778bcf7139c3bbe7924bead0a4d3d873a5a3de0e7d1bdc4e8c53d35e5973d32ee47bc2828bebdacb63abd0d5a81bc05d74a3e1cf0c23cef08b93c55ba9f3d8d0b15be543c3bbe50d03d3b1c34e83c4a6235bd40b4343b9a3400bd6794a9bd8b30513d620089bd9538be3d35fe08be0bb66a3e541f4c3e246411be7be545bd49a7083e04b3353dea5b043d0a56753df01413befd12ccbdb08bccbd4fa8173e21894d3e862501bec9b7dc3b1f7fea3c512533bd49c5693dd36f8fbca5777abdaec638bd90e5e7bc68c0b1bd38f9d4bd11ed8e3de24526bd3ed100bd58883dbc2c78be3d816121bc17995bbda41f33bdc5b65cbee089f13c9f77cb3bd1b2fa3ceca7513b945fdebc63eb8bbb",
"vehicle": {
"color": [
{
"name": "orange",
"confidence": 99.14266968
},
{
"name": "red",
"confidence": 0.24653569
},
{
"name": "blue",
"confidence": 0.24622858
},
{
"name": "silver-gray",
"confidence": 0.22443284
},
{
"name": "black",
"confidence": 0.0531255
}
],
"make": [
{
"name": "chevrolet",
"confidence": 99.99908447
},
{
"name": "honda",
"confidence": 0.00026897
},
{
"name": "ford",
"confidence": 0.00019697
},
{
"name": "dodge",
"confidence": 0.00009654
},
{
"name": "nissan",
"confidence": 0.00008901
}
],
"make_model": [
{
"name": "s10",
"confidence": 99.60665131
},
{
"name": "bmw_x4",
"confidence": 0.35377735
},
{
"name": "bmw_x5",
"confidence": 0.01494939
},
{
"name": "bmw_x1",
"confidence": 0.0146531
},
{
"name": "bmw_x6",
"confidence": 0.00233917
}
],
"body_type": [
{
"name": "truck-standard",
"confidence": 99.89404297
},
{
"name": "suv-standard",
"confidence": 0.05758071
},
{
"name": "sedan-compact",
"confidence": 0.01957944
},
{
"name": "sedan-standard",
"confidence": 0.01390838
},
{
"name": "motorcycle",
"confidence": 0.00853274
}
],
"year": [
{
"name": "2004",
"confidence": 90.33842468
},
{
"name": "2015-2019",
"confidence": 9.55992126
},
{
"name": "2005-2009",
"confidence": 0.09393937
},
{
"name": "2000-2004",
"confidence": 0.00370357
},
{
"name": "1990-1994",
"confidence": 0.00198262
}
],
"orientation": [
{
"name": "225",
"confidence": 99.82516479
},
{
"name": "180",
"confidence": 0.12798761
},
{
"name": "135",
"confidence": 0.01702297
},
{
"name": "45",
"confidence": 0.01119112
},
{
"name": "0",
"confidence": 0.00814719
}
],
"missing_plate": [
{
"name": "no",
"confidence": 99.99997711
},
{
"name": "yes",
"confidence": 0.00002248
}
],
"is_vehicle": [
{
"name": "yes",
"confidence": 99.99925232
},
{
"name": "no",
"confidence": 0.000748
}
]
}
}
Legacy Group Results:
rekor_agent_2_6_103_ sample_payload.json
{
"agent_version" : "2.6.103",
"agent_uid" : "XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ",
"frame_end" : 5327065,
"plate_indexes" : [
0,
0,
0,
0,
0,
0,
0,
0
],
"vehicle_crop_jpeg" : "[base64_data]",
"best_plate_number" : "HXM4249",
"best_confidence" : 94.6457672119141,
"uuids" : [
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711954705",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955004",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955096",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955271",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955478",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955606",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955813",
"XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955905"
],
"epoch_start" : 1548711954705,
"web_server_config" : {
"agent_label" : "youragentlabel",
"camera_label" : "unnamed"
},
"best_image_height" : 1080,
"best_region" : "us-pa",
"agent_type" : "alprd",
"best_region_confidence" : 99,
"data_type" : "alpr_group",
"best_uuid" : "XXXXXXXXXXXXYYYYYYYYYYYYYZZZZZZZZZZZZZZZ-399580019-1548711955004",
"company_id" : "xxxxxxxx-xxxx-yyyy-yyyy-zzzzzzzzzzzz",
"frame_start" : 5327053,
"epoch_end" : 1548711955905,
"country" : "us",
"travel_direction" : 5.8846435546875,
"candidates" : [
{
"plate" : "HXM4249",
"confidence" : 94.6457672119141,
"matches_template" : 0
},
{
"confidence" : 80.710075378418,
"matches_template" : 0,
"plate" : "XM4249"
},
{
"plate" : "BXM4249",
"confidence" : 79.5550155639648,
"matches_template" : 0
},
{
"plate" : "MXM4249",
"matches_template" : 0,
"confidence" : 74.270866394043
},
{
"plate" : "HXM429",
"matches_template" : 0,
"confidence" : 72.225227355957
}
],
"best_image_width" : 1920,
"is_parked" : false,
"version" : 2,
"camera_id" : 399580019,
"best_plate" : {
"region" : "us-pa",
"region_confidence" : 99,
"processing_time_ms" : 82.7420043945312,
"candidates" : [
{
"matches_template" : 0,
"confidence" : 94.6457672119141,
"plate" : "HXM4249"
},
{
"confidence" : 81.219482421875,
"matches_template" : 0,
"plate" : "XM4249"
},
{
"plate" : "BXM4249",
"matches_template" : 0,
"confidence" : 81.0806350708008
}
],
"requested_topn" : 10,
"plate" : "HXM4249",
"plate_crop_jpeg" : "[base64_data]",
"vehicle_region" : {
"height" : 665,
"x" : 761,
"y" : 198,
"width" : 665
},
"coordinates" : [
{
"x" : 1031,
"y" : 607
},
{
"x" : 1158,
"y" : 608
},
{
"y" : 674,
"x" : 1158
},
{
"x" : 1031,
"y" : 673
}
],
"plate_index" : 0,
"confidence" : 94.6457672119141,
"matches_template" : 0
},
"matches_template" : false,
"vehicle" : {
"body_type" : [
{
"name" : "suv-crossover",
"confidence" : 71.0338439941406
},
{
"confidence" : 16.2392520904541,
"name" : "sedan-standard"
},
{
"name" : "sedan-wagon",
"confidence" : 5.262282371521
},
{
"name" : "van-mini",
"confidence" : 3.85403752326965
}
],
"make" : [
{
"confidence" : 99.8798980712891,
"name" : "audi"
},
{
"confidence" : 0.0299057718366385,
"name" : "volkswagen"
}
],
"color" : [
{
"name" : "silver-gray",
"confidence" : 97.7629928588867
},
{
"confidence" : 1.64892303943634,
"name" : "white"
}
],
"make_model" : [
{
"confidence" : 88.2079544067383,
"name" : "audi_a4"
},
{
"name" : "audi_q3",
"confidence" : 2.30620789527893
},
{
"confidence" : 1.82921254634857,
"name" : "audi_q5"
}
],
"year" : [
{
"confidence" : 51.4213447570801,
"name" : "2015-2019"
},
{
"name" : "2010-2014",
"confidence" : 47.7990036010742
},
{
"name" : "2005-2009",
"confidence" : 0.759456098079681
}
],
"orientation" : [
{
"name" : "180",
"confidence" : 99.1021575927734
},
{
"name" : "225",
"confidence" : 0.487651824951172
}
]
}
}