At least with Joplin 2.7.13, it was possible to modify the title only. However, there might be different behaviour due to the latest changes:
# creating a resource like described in https://joplinapp.org/api/references/rest_api/#post-resources -> success
curl -F 'data=@./test/grant_authorization_button.png' -F 'props={"title":"my resource title"}' http://localhost:41184/resources?token=<YOUR_TOKEN>
# omitting the props field -> fails with HTTP 500
curl -F 'data=@./test/grant_authorization_button.png' http://localhost:41184/resources?token=<YOUR_TOKEN>
# modifying the resource title only -> succeeds
curl -X PUT -F 'props={"title":"another title"}' http://localhost:41184/resources/<RESOURCE_ID>?token=<YOUR_TOKEN>
# modifying the resource data only -> fails with HTTP 500
curl -X PUT -F 'data=@./test/another_image.png' http://localhost:41184/resources/<RESOURCE_ID>?token=<YOUR_TOKEN>
# modifying the resource data and title -> succeeds, but doesn't update the resource data
curl -X PUT -F 'data=@./test/another_image.png' -F 'props={"title":"my resource title"}' http://localhost:41184/resources/<RESOURCE_ID>?token=<YOUR_TOKEN>
It would be interesting to see whether the test fails if one of title
or path
is omitted: joplin/packages/lib/services/rest/Api.test.ts at 7e8927398aeb4e834f5bc67aba6fd919531353c6 · laurent22/joplin · GitHub.