A Rest Api Structured Streaming DataSource
spark.readStream
.format("rest")
.option("url", URL)
.load
.writeStream
.format("console")
.trigger(Trigger.ProcessingTime("10 seconds"))
.start()
.awaitTermination()
Here is a full example.