Mapillary API v4 timeline - what is going on?

I recently built a site for a client that uses the Mapillary API for imagery and object detections (here), which I will need to update for the new API v4. According to the blog post on March 3:

  • v4 of the API would be launched in May
  • v3 would only be guaranteed to run until the end of May (or “several weeks” - it’s unclear)
  • developers should start using “the new v4 sandbox” (not linked) immediately to prepare for the change
  • “In the meantime, keep an eye on our blog, newsletter, and social media for further updates, examples, and details about the new Mapillary API.” (There have not been, afaik, any further updates on any of these channels. There hasn’t even been a newsletter since February, whereas previously there was one every month.)

This is fairly concerning.

First: the cutover timeline is incredibly short. Just “several weeks” to implement a completely new API before switching off the old one? A year or more would be typical.

Second: we are already past the date when the old API was supposedly going to be switched off, and there is still not even any documentation about the new API, no new timeline announced - complete radio silence.

Could we please have an update?

2 Likes

Hi @stevage, I will get these questions answered on the blog ASAP.

To break it down, let me know if these questions are the ones that need addressing:

  1. until when will API v3 continue functioning?
  2. what parts of API v3 will be limited once API v4 releases?
  3. where is the documentation for API v4?
  4. when is API v4 released?

^ the best I can tell you is that API v4 will be available widely any day now, and I’m eager to get you started on it, we can have a live call to go over this too.

1 Like

Is there, or will there ever be a way to use the object tags ?
I did not find it in the API.

Commenting to also receive updates on API rollout

Thanks Chris. My main two questions are:

  • when does the API v4, with documentation, get released?
  • when does the API v3 get turned off?

The API v3 works just fine, so I don’t have any particular urgency. I just want to be able to do some planning for the upgrade so the site doesn’t suddenly break.

Just relaying here that the new API docs are available here: Mapillary

1 Like

Hi

Does anyone have any examples using the v4 API yet?

I am not too familiar with OAuth2, does this require hosting an endpoint to receive a token? Or can this be done through requests only with a username/password?

Thanks

Hi there - I have only managed to work with the graph endpoints. You don’t need to host your own endpoints - just use the client token from the dashboard.

Using request in python it looks something like this

url = 'https://graph.mapillary.com/image_ids?sequence_id=780170ac-64b2-4f12-8b41-06dfd83b39be'
data = dict()
headers = dict(Authorization="OAuth <client_token>")
x = requests.get(url, headers=headers)
data = x.json()['data']
print(data)

url = 'https://graph.mapillary.com/297238201933760?fields=id,computed_geometry,captured_at,thumb_2048_url'
x = requests.get(url, headers=headers)
data = x.json()
print(data)

Note that there is a space between OAuth and your actual token (e.g. OAuth MLY|ASBKGFLKSDGFJSHDGF)

Can’t figure out how to work with https://tiles.mapillary.com though.

I have tiles.mapillary.com set up for QGIS like this:
image

No style URL yet, so everything looks the same. Other stuff (images, points etc) work the same way, just with different URLs. For downloading the data separately you have to calculate the tile numbers (like this) for your area and use those for z,x and y.

Here is a sample Python code for getting one tile as geoJSON:

import requests
from vt2geojson.tools import vt_bytes_to_geojson

import math
def deg2num(lat_deg, lon_deg, zoom):
lat_rad = math.radians(lat_deg)
n = 2.0 ** zoom
xtile = int((lon_deg + 180.0) / 360.0 * n)
ytile = int((1.0 - math.asinh(math.tan(lat_rad)) / math.pi) / 2.0 * n)
return (xtile, ytile)

MAP_ACCESS_TOKEN = “MLY|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

z = 14
lat = 59.4368
lon = 24.7537

x,y = deg2num (lat, lon, z)

#uncomment the one layer you wish to use

#type=“mly1_computed_public”
#type=“mly_map_feature_point”
#type=“mly_map_feature_traffic_sign”
#type=“mly1_computed_public”
type=“mly1_public”

url = f"https://tiles.mapillary.com/maps/vtp/{type}/2/{z}/{x}/{y}?access_token={MAP_ACCESS_TOKEN}"

r = requests.get(url)
assert r.status_code == 200, r.content
vt_content = r.content
features = vt_bytes_to_geojson(vt_content, x, y, z)
print (features)

Sweet! That was very helpful!

There is mapbox_vector_tile that can decode the pbf into dictionary as well.

@filipc this currently is still not supported. I assume your current use case for this is tagging defibrillators in the image? Can you explain the workflow you would want in entirety?

I want to see all emergencies in my AR glasses.

1 Like

Hi, I run into some problems about Detection API detection-api-in-v4
does anyone have similar problems with the Detection API?

Thanks.

Also not supported. But let’s see what the future brings. :slight_smile: