Import Saved Object API Issue

I am trying to use API - curl -X POST "localhost:5601/api/saved_objects/_import?createNewCopies=true -H "kbn-xsrf: true" --form file=@file.ndjson" -H 'kbn-xsrf: true'
But i am getting error {"statusCode":400,"error":"Bad Request","message":"[request query.createNewCopies]: definition for this key is missing"}. I am using kibana version 7.7.

Unfortunately the createNewCopies flag wasn't added until 7.10 - Import objects API | Kibana Guide [7.7] | Elastic has a list of the available query parameters for 7.7.

Is using that parameter a requirement for you?

I am importing 4 dashboards and they are using multiple indices but in one of dashboard's visualisations one particular index getting overwrite by other index. so ' i thought that using createNewCopies option same issue will get resolved.

Hmm - the most straight forward option is to upgrade to 7.12, but I understand that's not always an option.

If upgrading isn't an option, it may be worth looking into modifying the export.

Issue got resolved by tweaking object ids of exported objects.