Importing Transforms to another tenant

Hi Team,

We’ve created some transforms in our DEV instance. We would like to import all the transforms to our production instance. We’ve successfully exported transforms json file but while importing we are facing error. Even though body is fine, we are facing error. Could anyone please suggest?

Thank you
Mane

Hi @Mane1,

When you export the transform json it comes with an field called id. You must remove the id from each transform json before importing, as a new id will be generated for each transform.

1 Like

Hi @colin_mckibben,

Thank you for your suggestion. We’ve removed the Id’s and tried to import, but we are facing 400 error. Could you please suggest?

Thank you
Mane

Can you please share one of the payloads you used as well as the error message you received?

Hi @colin_mckibben,

Please see the attached screenshot.

Kind regards
Mane

Ah, this looks like you’re using the SP Config API, correct? Can you also reply with the error message you received?

@colin_mckibben,


Please see the attached error screenshot.

Kind regards
Mane

I think the issue here is that you are trying to use the import endpoint with a JSON payload, but what is expected on this endpoint is multipart/form-data. If you have never sent a form-data request before, this can be confusing at first. What you need to do is save the JSON response you receive from /beta/sp-config/export as a file on your computer. Then, configure the /beta/sp-config/import request to use the form-data request body type. The key for the form-data should be data, and the value should be the file you just saved. Here is a sample cURL request that you can import into your postman client to help get you started. You’ll need to change the URL to your tenant and make sure you select your JSON file.

curl --location --request POST 'https://<tenant>.api.identitynow.com/beta/sp-config/import' \
--header 'Authorization: Bearer <token>' \
--form 'data=@"/path/to/sp-export.json"'

Also, here is a screenshot to help you configure this.

Thank you very much. @colin_mckibben! We’ve tested a single transform and we are able to import it.