Articles in this section

Connection API endpoints

download.svg​​ Download Postman collection

Create a connection in integrator.io

Connection API endpoints

Relative URI

Method

Success code

Description

/connections

GET

200

Get all connections.

POST

201

Create a connection.

/connections/<_id>

GET

200

Get a specific connection.

PUT

200

Update a specific connection.

PATCH

204

Update part of a specific connection.

DELETE

204

Delete a specific connection.

/connections/<_id>/ping

GET

200

Test that a specific connection is operational.

/connections/ping

POST

200

Test a virtual connection where all details for the connection are submitted in the POST body but not saved.

/connections/<_id>/debug/<_resourceId>

GET

200

Get debug logs for a given connection by _id. Use optional _resourceId to filter logs by a specific import or export.

/connections/<_id>/export

POST

200

Execute a virtual export using a connection identified by _id by posting the export model to this endpoint.

/connections/<_id>/export/pages

POST

200

Alternative virtual export execution with paging support.

/connections/<_id>/import

POST

200

Execute a virtual import using a connection identified by _id by posting the import model to this endpoint.

/connections/<_id>/import/map

POST

200

Evaluate only the mapping step in a virtual import and return the set of post-mapped records.

/connections/<_id>/audit

GET

200

Get a log for a specific connection.

/connection/<_id>/oauth2

GET

200

Create an OAuth 2.0 connection in Celigo via a third-party portal

/connection/<_id>/dependencies

GET

200

Get all resources using or used by this connection.

The following fields are available to update using PATCH:

Fields

Subfields

Data type

name

string

debugDate

date

rest

cookieAuth.successStatusCode

number

http.ping

successPath

string

successValues

array

failPath

string

failValues

array

http.auth

failStatusCode

number

failPath

string

failValues

array

cookie.successStatusCode

number

http.rateLimit

failPath

string

failStatusCode

number

failValues

array

limit

number

van.contentBasedFlowRouter

function

string

_scriptId

objectId

as2.partnerStationInfo.auth

failValues

array

failStatusCode

number

failPath

string

rateLimit.failPath

string

rateLimit.failStatusCode

number

rateLimit.failValues

array

rateLimit.limit

number

debugUntil

date

Connection API examples

Get a specific connection

GET /v1/connections/554••••••••••••••••••00d HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample response

{
  "_id":"554••••••••••••••••••00d",
  "lastModified":"2015-05-02T05:13:43.736Z",
  "type":"rest",
  "name":"Slack API",
  "rest": {
    "baseURI":"https://slack.com/api",
    "bearerToken":"•••••••",
    "tokenLocation":"url",
    "tokenParam":"token",
    "mediaType":"urlencoded",
    "authType":"token",
    "encryptedFields":[
      ],
    "unencryptedFields":[
      ],
    "scope":[
      ],
    "pingRelativeURI":"api.test"
  },
  "queues":[
    {
      "name":"554••••••••••••••••••00d",
      "size":8
    }
  ]
}

Ping a specific connection

GET /v1/connections/554••••••••••••••••••00d/ping HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample response

{
  "code": 200
}

Export data from an external application using a virtual export, with paging (size 5)

POST /v1/connections/554••••••••••••••••••009/export/pages HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

{
  "export": {
    "asynchronous":true,
    "pageSize":5,
    "netsuite": {
      "type":"search",
      "searches":[
        {
          "recordType":"customRecord",
          "savedSearchId":"131298"
        }
      ],
      "skipGrouping":true
    }
  }
}

Sample response

{
  "data":[
    {
      "recType":"813",
      "Trial Start":"2017-09-15T14:02:00.000-07:00",
      "custrecord_license2_trial_end_date":"2017-10-19T07:00:00.000+00:00",
      "custrecord_usage_diy_phone":"555-555-5555",
      "custrecord_usage_diy_ms":65894782,
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_company":"Acme Products",
      "custrecord_usage_diy_userid":"63fv1h4c7390c457ak1d20v2",
      "custrecord_usage_diy_name":"John Doe",
      "custrecord_usage_diy_hours":18,
      "custrecord_usage_diy_role":"Consultant",
      "custrecord_usage_diy_email":"jdoe@example.com",
      "custrecord_usage_diy_month_s":"November"
    },
    {
      "recType":"813",
      "Trial Start":"2016-11-22T12:26:00.000-08:00",
      "custrecord_license2_trial_end_date":"2017-06-22T07:00:00.000+00:00",
      "custrecord_usage_diy_phone":"7777777777",
      "custrecord_usage_diy_ms":44439899,
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_company":"Widgets Inc.",
      "custrecord_usage_diy_userid":"999abc67k58941275f9910",
      "custrecord_usage_diy_name":"Jane Doe",
      "custrecord_usage_diy_hours":12,
      "custrecord_usage_diy_role":"Technology",
      "custrecord_usage_diy_email":"JDoe2@example.com",
      "custrecord_usage_diy_month_s":"November"
    },
    {
      "recType":"813",
      "Trial Start":"2017-11-13T01:31:00.000-08:00",
      "custrecord_license2_trial_end_date":"2017-12-13T08:00:00.000+00:00",
      "custrecord_usage_diy_phone":"+5555555555",
      "custrecord_usage_diy_ms":33199382,
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_company":"Example Services",
      "custrecord_usage_diy_userid":"999abc67k58941275f991x",
      "custrecord_usage_diy_name":"Joe Smith",
      "custrecord_usage_diy_hours":9,
      "custrecord_usage_diy_role":"Manager",
      "custrecord_usage_diy_email":"Joe.Smith@example.com",
      "custrecord_usage_diy_month_s":"November"
    },
  },
  "dataURIs":{
    null,
    null,
    null,
    null,
    null
  ],
  "pagedExportState": {
    "searchId":"WEBSERVICES_589861_11292017182391545425518660_73666d20757aff",
    "pageIndex":2,
    "pageSize":5,
    "totalPages":165,
    "totalRecords":822,
    "done":false,
    "issuedAt":1512010880,
    "sig":"ac7463cf6160937468e5cc575f541d438763719f5985c0ee85642e0de4d75d0d"
  }
}

Retrieve additional pages

This example builds on the previous one to demonstrate how to get the next page of data for the same virtual export. It includes the exact pagedExportState object that was returned by the first API response. To get the next page after this, you can submit the pagedExportState returned by this API response.

POST /v1/connections/554••••••••••••••••••009/export/pages HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

{
  "pagedExportState":{
    "searchId":"WEBSERVICES_589861_11292017182391545425518660_73666d20757aff",
    "pageIndex":2,
    "pageSize":5,
    "totalPages":165,
    "totalRecords":822,
    "done":false,
    "issuedAt":1512010880,
    "sig":"ac7463cf6160937468e5cc575f541d438763719f5985c0ee85642e0de4d75d0d"
  },
  "export":{
    "asynchronous":true,
    "pageSize":5,
    "netsuite":{
      "type":"search",
      "searches":[
        {
          "recordType":"customRecord",
          "savedSearchId":"131298"
        }
      ],
      "skipGrouping":true
    }
  }
}
Sample response
{
  "data":[
    {
      "recType":"813",
      "Trial Start":"2017-06-14T09:02:00.000-07:00",
      "custrecord_license2_trial_end_date":"2017-09-30T07:00:00.000+00:00",
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_hours":4,
      "custrecord_usage_diy_month_s":"November"
    },
    {
      "recType":"813",
      "Trial Start":"2016-03-09T08:18:00.000-08:00",
      "custrecord_license2_trial_end_date":"2017-09-02T07:00:00.000+00:00",
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_hours":2,
      "custrecord_usage_diy_month_s":"November"
    },
    {
      "recType":"813",
      "Trial Start":"2016-11-17T12:25:00.000-08:00",
      "custrecord_license2_trial_end_date":"2017-12-04T08:00:00.000+00:00",
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_hours":2,
      "custrecord_usage_diy_month_s":"November"
    },
    {
      "recType":"813",
      "Trial Start":"2017-10-31T11:30:00.000-07:00",
      "custrecord_license2_trial_end_date":"2017-12-02T08:00:00.000+00:00",
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_hours":1,
      "custrecord_usage_diy_month_s":"November"
    },
    {
      "recType":"813",
      "Trial Start":"2017-09-16T16:02:00.000-07:00",
      "custrecord_license2_trial_end_date":"2017-12-25T08:00:00.000+00:00",
      "custrecord_usage_diy_year":2017,
      "custrecord_usage_diy_hours":1,
      "custrecord_usage_diy_month_s":"November"
    }
  ],
  "dataURIs":[
    null,
    null,
    null,
    null,
    null
  ],
  "pagedExportState":{
    "searchId":"WEBSERVICES_589861_11292017182391545425518660_73666d20757aff",
    "pageIndex":3,
    "pageSize":5,
    "totalPages":165,
    "totalRecords":822,
    "done":false,
    "issuedAt":1512010952,
    "sig":"de523935aa3831a8d4ab49e788b22ba5c1be021a60db597b7c5a0033a669af9f"
  }
}

Import four records into an external app using a virtual import

The import object in the request defines how integrator.io should import the data, and the data array contains all the records that you want to import.

POST /v1/connections/5a1••••••••••••••••••77b/import HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

{
  "import":{
    "mapping":{
      "fields":[
        {
          "extract":"timestamp",
          "generate":"timestamp"
        },
        {
          "generate":"key",
          "hardCodedValue":"sqs_flow"
        }
      ]
    },
    "rest":{
      "relativeURI":[
        "/system/v1/heartbeat"
      ],
      "method":[
        "PUT"
      ]
    }
  },
  "data":[
    {
      "timestamp":1512012818751
    },
    {
      "timestamp":1512012818751
    },
    {
      "timestamp":1512012818751
    },
    {
      "timestamp":1512012818751
    }
  ]
}
Sample response
[
  {
    "statusCode":200,
    "id":"5a1••••••••••••••••••ab6",
    "_json":{
      "_id":"5a1••••••••••••••••••ab6",
      "lastModified":"2017-11-30T03:33:51.703Z",
      "createdAt":"2017-11-21T21:37:10.497Z",
      "key":"sqs_flow",
      "timestamp":"2017-11-30T03:33:38.751Z",
      "__v":0
    }
  },
  {
    "statusCode":200,
    "id":"5a1••••••••••••••••••ab6",
    "_json":{
      "_id":"5a1••••••••••••••••••ab6",
      "lastModified":"2017-11-30T03:33:51.704Z",
      "createdAt":"2017-11-21T21:37:10.497Z",
      "key":"sqs_flow",
      "timestamp":"2017-11-30T03:33:38.751Z",
      "__v":0
    }
  },
  {
    "statusCode":200,
    "id":"5a1••••••••••••••••••ab6",
    "_json":{
      "_id":"5a1••••••••••••••••••ab6",
      "lastModified":"2017-11-30T03:33:51.700Z",
      "createdAt":"2017-11-21T21:37:10.497Z",
      "key":"sqs_flow",
      "timestamp":"2017-11-30T03:33:38.751Z",
      "__v":0
    }
  },
  {
    "statusCode":200,
    "id":"5a1••••••••••••••••••ab6",
    "_json":{
      "_id":"5a1••••••••••••••••••ab6",
      "lastModified":"2017-11-30T03:33:51.701Z",
      "createdAt":"2017-11-21T21:37:10.497Z",
      "key":"sqs_flow",
      "timestamp":"2017-11-30T03:33:38.751Z",
      "__v":0
    }
  }
]
Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.