# IDN Source Copy existing to new

**URL:** <https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086>\
**Category:** SHF Discussion and Questions\
**Created:** [November 16, 2021, 8:36pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086 "2021-11-16T20:36:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisOlsen](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/chrisolsen/32/9237_2.png) [@ChrisOlsen](https://developer.sailpoint.com/discuss/u/ChrisOlsen)\
**Post date:** [November 16, 2021, 8:36pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/1 "2021-11-16T20:36:05Z")

</div>

Hello,  
Is there a straightforward method to copy a Web Services source to create another one?  
The method I have tried is to create a new source in the IDN UI. Go to Postmand and get the original source and the new source JSON then copy the original source lower body to the new source and perform an update. I have had limited success with this method.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [November 16, 2021, 8:40pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/2 "2021-11-16T20:40:01Z")

</div>

You can try using the [SP-Config API](https://developer.sailpoint.com/idn/api/beta/sp-config). Extended documentation [here](https://developer.sailpoint.com/idn/docs/saas-configuration).

This API has the ability to export certain configuration objects (listed in the extended docs), like sources, and then import those objects into IDN. The primary use case is to export all configuration items from a lower environment into a production environment, but I don’t see why you couldn’t use it to copy a source.

---

<div class="post-metadata">

**Author:** ![ChrisOlsen](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/chrisolsen/32/9237_2.png) [@ChrisOlsen](https://developer.sailpoint.com/discuss/u/ChrisOlsen)\
**Post date:** [November 18, 2021, 9:28pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/3 "2021-11-18T21:28:43Z")

</div>

Thanks Colin,  
This looks promising. Are there any Postman examples of this available?  
I have tried {{api-url}}/beta/sp-config/export and I get back this message:  
{  
“messages”: [  
{  
“locale”: “en-US”,  
“text”: “Content type ‘’ not supported”,  
“localeOrigin”: “DEFAULT”  
}  
],  
“trackingId”: “b6a24c8d51bd4ff3987ac434399af8fc”,  
“detailCode”: “400.0 Bad request syntax”  
}

Not supported and bad request?  
Any ideas, I must be missing something.

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [November 19, 2021, 1:36pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/4 "2021-11-19T13:36:19Z")

</div>

At a bare minimum, you need to supply an empty object in the request payload to export all objects.

```nohighlight
curl --location --request POST 'https://{tenant}.api.identitynow.com/beta/sp-config/export' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{}'

```

The error you are receiving is because you have nothing in your request body.

If you want to export all source objects in your tenant, use this command:

```nohighlight
curl --location --request POST 'https://{tenant}.api.identitynow.com/beta/sp-config/export' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "description": "Test Source Export AD Transforms",
    "excludeTypes": [
    ],
    "includeTypes": [
        "SOURCE"
    ],
    "objectOptions": {
    }
}'

```

Finally, if you only want to export specific sources, use the [list sources endpoint](https://developer.sailpoint.com/idn/api/beta/list-sources) to find the IDs of the sources you want to export and include them in your request.

```nohighlight
curl --location --request POST 'https://{tenant}.api.identitynow.com/beta/sp-config/export' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "description": "Test Source Export AD Transforms",
    "excludeTypes": [
    ],
    "includeTypes": [
        "SOURCE"
    ],
    "objectOptions": {
        "SOURCE": {
            "includedIds": [
                "be9e116d-08e1-49fc-ab7f-fa585e96c9e4"
            ]
        }
    }
}'

```

---

<div class="post-metadata">

**Author:** ![ChrisOlsen](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/chrisolsen/32/9237_2.png) [@ChrisOlsen](https://developer.sailpoint.com/discuss/u/ChrisOlsen)\
**Post date:** [November 19, 2021, 5:38pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/5 "2021-11-19T17:38:10Z")

</div>

Hey Colin,  
Now I understand what I was missing. This is very helpful.

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![ChrisOlsen](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/chrisolsen/32/9237_2.png) [@ChrisOlsen](https://developer.sailpoint.com/discuss/u/ChrisOlsen)\
**Post date:** [November 19, 2021, 9:24pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/6 "2021-11-19T21:24:20Z")

</div>

The import process has a field or two I don’t understand and I am not finding in the docs.  
Example from the doc modified with source:  
–data-raw  
data: “source-config\_export\_34f387b4-9d26-4940-a27e-6a252b7a59e3.json”,  
options:

```auto
{
  "excludeTypes": [],
  "includeTypes": ["SOURCE"],
  "objectOptions": {
    "SOURCE": {
      "includedIds": ["d11a705d-614e-40d2-bdf5-2476d073a6de"],
      "includedNames":[]
    }
  },
  "defaultReferences": [
    {
      "type": "SOURCE",
      "id": "d11a705d-614e-40d2-bdf5-2476d073a6de",
      "name": "Test Copy"
    }
  ]
}

```

What is the “defaultReferences” referring to where does the id come from? Is the type “SOURCE”?

---

<div class="post-metadata">

**Author:** ![cpatel](https://avatars.discourse-cdn.com/v4/letter/c/48db29/32.png) [@cpatel](https://developer.sailpoint.com/discuss/u/cpatel)\
**Post date:** [February 9, 2022, 9:38am UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/7 "2022-02-09T09:38:34Z")

</div>

> [@ChrisOlsen](#):
>
> field or two I don’t u

This is not working because the export json has id of the source. I renamed each reference of source name after exporting json and tried to import it back in same environment. It just renamed the existing source instead of creating new one.

---

<div class="post-metadata">

**Author:** ![ChrisOlsen](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/chrisolsen/32/9237_2.png) [@ChrisOlsen](https://developer.sailpoint.com/discuss/u/ChrisOlsen)\
**Post date:** [March 25, 2022, 6:45pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/8 "2022-03-25T18:45:39Z")

</div>

Hello Collin,  
I have finally gotten back around to working on thi again.  
I have exported the “Source”  
{{api-url}}/beta/sp-config/export  
Body (raw json)

```json
{
    "description": "Test Source Export AuthN Manager SOX",
    "excludeTypes": [
    ],
    "includeTypes": [
        "SOURCE"
    ],
    "objectOptions": {
        "SOURCE": {
            "includeIds": [
                "2c9180887ebb7f2b017ec6e0b2e10b61"
            ],
            "includeNames": ["Authorization Manager - SOX"]
        }
    }
}

```

After the export is complete I go to check the results and I see all of the sources have been exported not just the one source I am trying to capture. I only wish to export one source.  
{{api-url}}/beta/sp-config/export/0f6bebfe-005d-4dc4-b39d-3d70367cda3d/download

What am I missing? Is there a detailed tutorial on this?

Best regards,  
Chris

---

<div class="post-metadata">

**Author:** ![subhash131](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@subhash131](https://developer.sailpoint.com/discuss/u/subhash131)\
**Post date:** [May 18, 2022, 4:09am UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/9 "2022-05-18T04:09:37Z")

</div>

Hey @colin_mckibben is there any api for exporting application configurations??

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [May 24, 2022, 2:30pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/10 "2022-05-24T14:30:18Z")

</div>

Hi Subhash,

Welcome to the community. I’d be glad to help you out. This topic is regarding the copying of IDN sources. Can you please ask your question in a new topic so we can keep our conversations focused?

Thank you,  
Colin

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [June 24, 2022, 7:26pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/11 "2022-06-24T19:26:35Z")

</div>

@ChrisOlsen I had a typo in my example. To limit which sources are exported, you have to use the `includedIds` field, but you have specified `includeIds`, which is missing a ‘d’. Same thing for `includedNames`. You are missing a ‘d’ in that option as well.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:22pm UTC](https://developer.sailpoint.com/discuss/t/idn-source-copy-existing-to-new/2086/12 "2023-07-19T14:22:17Z")

</div>


