The REST service providing access to doctype information should make it easy to retrieve just the list of doctype IDs.