Starting from Pitonyak, I adapted some code that will insert a picture into a Writer/Draw/Impress/Calc document
import uno
from com.sun.star.awt import Point, Size
furl = 'https://upload.wikimedia.org/wikipedia/commons/1/1a/Blank_US_Map_%28states_only%29.svg'
oDoc= XSCRIPTCONTEXT.getDocument()
oShape = oDoc.createInstance("com.sun.star.drawing.GraphicObjectShape")
oShape.GraphicURL = furl
oDoc.getDrawPages().getByIndex(0).add(oShape)
oShape.setSize(oShape.Graphic.Size100thMM)
oShape.setPosition(Point(1*2540, 1*2540))
This is Python code, but I could probably adapt working StarBasic or Java code.
I cannot figure out how to use the API to insert the image as a link. I've poked around with MRI to try to find some methods or properties to try.
I've inspected a manually inserted linked image. It has GraphicsURL.OriginURL and Graphic.OriginURL properties that are set to the right path. I cannot figure out how to set those properties in code.