This is an Arabian Nights type of compilation (stories within stories) of magic, adventures, caliphas and viziers, etc. (Goodreads)
Wilhelm Hauff, (born Nov. 29, 1802, Stuttgart, Württemberg [Germany]—died Nov. 18, 1827, Stuttgart), German poet and novelist best known for his fairy tales.