# My API runVirtual error - Export type

**URL:** <https://connective.celigo.com/t/my-api-runvirtual-error-export-type/1173>\
**Category:** Integrator.io\
**Tags:** myapi, error-handling, export, netsuite\
**Created:** [October 12, 2021, 10:47am UTC](https://connective.celigo.com/t/my-api-runvirtual-error-export-type/1173 "2021-10-12T10:47:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![netsuite01](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@netsuite01](https://connective.celigo.com/u/netsuite01)\
**Post date:** [October 12, 2021, 10:47am UTC](https://connective.celigo.com/t/my-api-runvirtual-error-export-type/1173/1 "2021-10-12T10:47:06Z")

</div>

I received the following error when I run My API :

**The Export which you are trying to create is of type sandbox but it has**

**Connection reference with \_id: 5\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*3 which is not of type sandbox.**

 

I understand the error but where can I specify the export type? I am using this example [Link](https://docs.celigo.com/hc/en-us/articles/360048159772).

 

Find below the definition of the dynamic export : 

```
 NSObject = {
    "_connectionId": "5e9de3074242783b222f56e0",
    "netsuite": {
      "type": "restlet",
      "skipGrouping": true,
      "statsOnly": false,
      "restlet": {
        "recordType": "invoice",
        "searchId": "6763",
        "criteria": [
          {
            "field": "amount",
            "operator": "greaterthan",
            "searchValue": , // Use param received from request
           }
        ]
      },
      "distributed": {
        "disabled": false,
        "forceReload": false,
        "executionContext": [
          "userinterface",
          "webstore"
        ],
        "executionType": [
          "create",
          "edit",
          "xedit"
        ]
      }
    },
    "adaptorType": "NetSuiteExport"
  }
```

---

<div class="post-metadata">

**Author:** ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)\
**Post date:** [October 12, 2021, 4:10pm UTC](https://connective.celigo.com/t/my-api-runvirtual-error-export-type/1173/2 "2021-10-12T16:10:38Z")

</div>

@netsuite01

Are you trying to run the MyAPI on sandbox or production? The error suggests that you try to create an export in Sandbox but the \_ConnectionId points to the one created in non sandbox environment. Could you try to use the id of a connection created in the sandbox?

Thanks

---

<div class="post-metadata">

**Author:** ![netsuite01](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@netsuite01](https://connective.celigo.com/u/netsuite01)\
**Post date:** [October 13, 2021, 6:34am UTC](https://connective.celigo.com/t/my-api-runvirtual-error-export-type/1173/3 "2021-10-13T06:34:06Z")

</div>

Hey Viliandy,

Thanks for the quick response. Indeed that was the issue (I created the MyAPI in sandbox but it shows in production as well, hence this confusion) . Beside, do you have any example of **exports.runVirtualWithPaging**? I cannot find any example in help center. I get an error **paged export is not supported for this export configuration.**

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![viliandyleonardo](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@viliandyleonardo](https://connective.celigo.com/u/viliandyleonardo)\
**Post date:** [October 13, 2021, 3:38pm UTC](https://connective.celigo.com/t/my-api-runvirtual-error-export-type/1173/4 "2021-10-13T15:38:48Z")

</div>

Hi @netsuite01

Pagination is not currently supported for **exports.runVirtualWithPaging**. That enhancement is in our backlog for future development. Would you be able to share your use case/needs/problems that you plan to solve ?

Thank you

---

<div class="post-metadata">

**Author:** ![bhavikshah](https://sea1.discourse-cdn.com/flex001/user_avatar/connective.celigo.com/bhavikshah/32/8230_2.png) [@bhavikshah](https://connective.celigo.com/u/bhavikshah)\
**Post date:** [January 18, 2022, 10:39am UTC](https://connective.celigo.com/t/my-api-runvirtual-error-export-type/1173/5 "2022-01-18T10:39:12Z")

</div>

Hi @netsuite01, the proposed enhancement is planned for our upcoming release v8.2.1.0, Feb. 2022.   
 [exports.runVirtualWithPaging()](https://docs.celigo.com/hc/en-us/articles/360046916872) will support NetSuite restlet exports that needs pagination.

#
