Unexplained modified dates on the JamCams


#1

Hi,

I’ve been looking at the JamCams API recently (https://api.tfl.gov.uk/Place/Type/JamCam) which has the locations of Cameras, a 9 second clip and a image. Both these links have a date modified property, however they don’t seem to actually mean anything.

Example:

JSON content for Romford Rd / Tennyson Rd as of 15/01/18 20:50

{
"$type": “Tfl.Api.Presentation.Entities.Place, Tfl.Api.Presentation.Entities”,
“id”: “JamCams_00001.02151”,
“url”: “/Place/JamCams_00001.02151”,
“commonName”: “Romford Rd / Tennyson Rd”,
“placeType”: “JamCam”,
“additionalProperties”: [
{
"$type": “Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities”,
“category”: “payload”,
“key”: “available”,
“sourceSystemKey”: “JamCams”,
“value”: “true”,
“modified”: “2018-01-04T13:54:25.253Z”
},
{
"$type": “Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities”,
“category”: “payload”,
“key”: “imageUrl”,
“sourceSystemKey”: “JamCams”,
“value”: “https://s3-eu-west-1.amazonaws.com/jamcams.tfl.gov.uk/00001.02151.jpg”,
“modified”: “2018-01-04T13:54:25.253Z”
},
{
"$type": “Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities”,
“category”: “payload”,
“key”: “videoUrl”,
“sourceSystemKey”: “JamCams”,
“value”: “https://s3-eu-west-1.amazonaws.com/jamcams.tfl.gov.uk/00001.02151.mp4”,
“modified”: “2018-01-04T13:54:25.253Z”
},
{
"$type": “Tfl.Api.Presentation.Entities.AdditionalProperties, Tfl.Api.Presentation.Entities”,
“category”: “cameraView”,
“key”: “view”,
“sourceSystemKey”: “JamCams”,
“value”: “defaultPresetName”,
“modified”: “2018-01-04T13:54:25.253Z”
}
],
“children”: [],
“childrenUrls”: [],
“lat”: 51.5421,
“lon”: 0.00524
}

Using Romford Rd as an example, the image and clip both seem to have the correct date and time, however the modified values (as in the JSON above) have dates of 04/01/18 at 13:54 and doesn’t seem to change from this value.

Is this is bug or do these modified dates actually mean anything?


#2

Hi wiggydave10,

Thanks for your post.

Just wanted to say, we are currently looking into this for you. There are a few things we need to speak to the data owner about and so I am not too sure exactly when we can get back to you. Hopefully it should not be too long.

Dave


#3

@davidtan, thank you. I look forward to hearing the response.


#4

The modified dates on Place Properties refer to the time those key/value pairs were last updated in the database. Because those don’t change very often i.e. the URL is always the same for a given camera, the modified date will not change unless the database is rebuilt (roughly weekly, sometimes more often) whereas the image on the other end of that URL can, and does, change constantly. But the URL itself doesn’t change, so therefore the modified date doesn’t change.

If you look at the modified date of a property that does change often, e.g. NbBikes on a BikePoint, you’ll see that it does update along with the value in the key/value pair whenever the number of bikes at the docking station changes.

In other words, the modified dates are an artefact of the database’s internal change tracking and can be ignored.

(Disclaimer: I no longer work with TfL but still lurk around in case I can help - this one triggered a memory!)


#5

Hi @Tim,

Thank you for your reply. That makes sense as they didn’t seem to update and I had assumed that the dates were when the video/image were updated. Thanks for your help.


#6

@Tim, you’re always welcome on here! Hope it was a happy JamCams memory :grinning:


#7

It was! One of my favourite APIs :nerd_face: