Skip to main content

Elvis 6 REST API - create

Comment

Do you have corrections or additional information about this article? Leave a comment!
Do you have a question about what is described in this article? Please contact Support.


5 comments

  • Maarten van Kleinwee

    Hi Craig, 

    Thanks for adding this additional information. I have used it to update the main article to give this scenario some more attention.

    Best regards,

    Maarten van Kleinwee
    Senior Technical Writer, WoodWing Software 

    1
  • Frits van Dee

    Hi Craig,

    This would require a change to the API. Please post your idea in the Assets Feedback Forum. There more people can join the conversation.

    0
  • Maarten van Kleinwee

    For additional information about controlling the user name that is set as the creator/importer, see the Feedback Forum.

    0
  • Craig Cardillo

    It would be great if the create service supported fileReplacePolicy parameter like the copy service does. As is, if creating a file at a path that already exists you get:

    [errorname] => PathAlreadyExistsException

    0
  • Craig Cardillo

    It was brought to my attention by WoodWing Support that while the create service does not support the FileReplacePolicy, it does allow the autoRename argument (and true seems to be the default).
    In some testing I have found that if you are passing 'name' or 'filename' as metadata to give a custom name to the new file, and this name conflicts with an existing file then you still get the PathAlreadyExistsException. As a work-around you can pass a custom 'name' within the file object in the post fields - if this name conflicts then autoRename kicks in (but not if explicitly passing name as part of the Assets metadata). Took me a while to figure this out so thought I would post here in case someone else is trying something similar.
    TL;DR- create will auto-rename as long as you are not explicitly passing a name as Assets metadata.

    0

Please sign in to leave a comment.