REST API: minor revision for attachment upload

Hi.

I want to migrate a lot of articles which have a lot of attachments too. I use the rest api.

Attachments I migrate with:

/wikis/{wikiName}/spaces/{spaceName}[/spaces/{nestedSpaceName}]*/pages/{pageName}/attachments/{attachmentName}

But this bloats revision history of the articles. I sometime do have more then 100 attachments. I like to have version 1.x for all new migrated articles.

I tried to append:

?minorRevision=true

but that’s not working.

Any idea?
Regards, Simpel

Ok to push this article to top once?

Regards, Simpel

So by doing that, basically you perform a new save for each new attachment.
For having what you want, basically you would need to create the page with all the attachments at once. Frankly I’m not sure it’s currently possible, but you could test creating the page with

/wikis/{wikiName}/spaces/{spaceName}[/spaces/{nestedSpaceName}]*/pages/{pageName}

with a PUT with an XML content containing all your attachments, it might be feasible.
Now be aware that until very recently it wasn’t possible to even create a page and add attachments without performing multiple saves in XWiki UI, so I wouldn’t be surprised if it doesn’t work (see: Loading...).

Don’t hesitate to create a ticket on https://jira.xwiki.org if you test it and that doesn’t work.