The API docs show the following example for a single file:
curl -F file=@myfile "http://localhost:5001/api/v0/add?recursive=false&quiet=<value>
&quieter=<value>&silent=<value>&progress=<value>&trickle=<value>
&only-hash=<value>&wrap-with-directory=<value>&hidden=<value>
&chunker=<value>&pin=true&raw-leaves=<value>&nocopy=<value>&fscache=<value>"
But consider the following command using the CLI:
ipfs add -w hello.txt world.txt
This outputs the following:
ipfs add -w hello.txt world.txt
7 B / 14 B [...] 50.00% 0seadded QmSkYzY65dGXo8q6kjrsj1erH4bLZmyQoHDd8wwoAKpG8V hello.txt
14 B / 14 B [...] 100.00% 0seadded QmfB6vc6ssMvEaMBbG6XGRGhcZYKSqcy8Wgbrcc9rVyGuV world.txt
added QmTNXVpXcVWz52KpMdfFEMuPSmRMBmEkEEq9y4czko6DEy
It added the files, outputs the hash for each of them and the hash that wraps them both.
How can I achieve the same result using the API?
Or can it be done using multiple requests, if so how?