Connector Resource
A Connector resource is used to process incoming HTTP calls. A connector has one or more processors that will process the incoming call.Connector Types:
- HTTP
Processor Types:
- HTTP_SQL_PROC: Executes GS SQL to process incoming HTTP Body, Query String, and Method
GET Connector
Returns
a list of Connector resources. |
Resource Information | |
Rate Limited? | Yes | |
session, oauth and org tokens compatible? | Yes | |
api_key token token compatible? | Yes | |
Resource URL
http://grovestreams.com/api/connector
Parameters
none |
Example Requests
/connectorResponse Body
{ "connector": [ { "uid": "40003826-a91f-3655-b556-16e7515112a7", "name": "ACME Electric Meter Model 13", "type": "connector" }, { "uid": "88a0373e-33f0-3f94-a5ed-8a57743026e5", "name": "ACME Electric Meter Model 12", "type": "connector" }, { "uid": "8fae5e29-469c-3e91-ac82-6b64f0674785", "name": "ACME Electric Meter Model 14", "type": "connector" } ], "success": true, "message": "", "totalCount": 3 }
GET Connector/{ConnectorUid}
Returns
a Connector with the specified uid. |
Resource Information | |
Rate Limited? | Yes | |
session, oauth and org tokens compatible? | Yes | |
api_key token compatible? | Yes | |
Resource URL
http://grovestreams.com/api/connector/{connectorUid}
Parameters
none |
Example Requests
/Connector/57b08e18-df08-415e-b663-94db1d53bd20Response Body
{ "connector": { "uid": "88a0373e-33f0-3f94-a5ed-8a57743026e5", "runningUser": { "uid": "bcd5cf73-4268-3db6-a3e7-4d19567639c4", "name": "" }, "procs": [ { "timeZoneId": "UTC", "sql": "INSERT OR REPLACE INTO\n SAMPLE(CID, ID, time, sample)\nSELECT\n\t'comp1',\n 'stream1',\n time,\n value\nFROM\n CSV_TABLE(@HTTP_BODY)\nWITH(1 time LONG, 2 value LONG);" } ], "connType": "HTTP", "name": "ACME Electric Meter Model 12", "id": "model12", "procType": "HTTP_SQL_PROC" }, "success": true, "message": "Inserted Connector with uid '88a0373e-33f0-3f94-a5ed-8a57743026e5'" }
GET Connector/new
Returns
a default Connector with a unique UID. Does not persist the new Connector
in the store. It's the callers responsibility to PUT the new
Connector and register it. |
Resource Information | |
Rate Limited? | Yes | |
session, oauth and org tokens compatible? | Yes | |
api_key token compatible | Yes | |
Resource URL
http://grovestreams.com/api/connector/new
Parameters
none |
Example Requests
/Connector/newResponse Body
{
"connector": {
"uid": "5332ac45-2f72-340a-a3d7-493d0fe30731",
"runningUser": {
"uid": "6092cb2c-5b73-30e0-8425-770a8d50c4fe",
"name": "Fred Flintstone"
},
"procs": [
{
"timeZoneId": "UTC",
"sql": ""
}
],
"connType": "HTTP",
"name": "",
"id": "",
"procType": "HTTP_SQL_PROC"
},
"success": true,
"message": ""
}
PUT Connector
Inserts
a new Connector. The uid of the Connector can be blank. If it is blank a uid will be created on the server and the response body will contain the new uid. |
Resource Information | |
Rate Limited? | Yes | |
session, oauth and org tokens compatible? | Yes | |
api_key token compatible | Yes | |
Resource URL
http://grovestreams.com/api/connector
Parameters
parentFolderUid | optional |
The UID of the tools content repository folder to place this new Connector into.
The new Connector will be placed into the root folder if
this parameter is missing. |
Example Requests
/ConnectorRequest Body
{ "connector": { "uid": "88a0373e-33f0-3f94-a5ed-8a57743026e5", "runningUser": { "uid": "bcd5cf73-4268-3db6-a3e7-4d19567639c4", "name": "" }, "procs": [ { "timeZoneId": "UTC", "sql": "INSERT OR REPLACE INTO\n SAMPLE(CID, ID, time, sample)\nSELECT\n\t'comp1',\n 'stream1',\n time,\n value\nFROM\n CSV_TABLE(@HTTP_BODY)\nWITH(1 time LONG, 2 value LONG);" } ], "connType": "HTTP", "name": "ACME Electric Meter Model 12", "id": "model12", "procType": "HTTP_SQL_PROC" }, "success": true, "message": "Inserted Connector with uid '88a0373e-33f0-3f94-a5ed-8a57743026e5'" }
POST Connector
Used
to update an existing Connector. |
Resource Information | |
Rate Limited? | Yes | |
session, oauth and org tokens compatible? | Yes | |
api_key token compatible | Yes | |
Resource URL
http://grovestreams.com/api/connector
Parameters
none |
Example Requests
/ConnectorRequest Body
{ "connector": { "uid": "88a0373e-33f0-3f94-a5ed-8a57743026e5", "runningUser": { "uid": "bcd5cf73-4268-3db6-a3e7-4d19567639c4", "name": "" }, "procs": [ { "timeZoneId": "UTC", "sql": "INSERT OR REPLACE INTO\n SAMPLE(CID, ID, time, sample)\nSELECT\n\t'comp1',\n 'stream1',\n time,\n value\nFROM\n CSV_TABLE(@HTTP_BODY)\nWITH(1 time LONG, 2 value LONG);" } ], "connType": "HTTP", "name": "ACME Electric Meter Model 12", "id": "model12", "procType": "HTTP_SQL_PROC" }, "success": true, "message": "Inserted Connector with uid '88a0373e-33f0-3f94-a5ed-8a57743026e5'" }
DELETE Connector/{ConnectorUid}
Deletes
a Connector. Anything referencing this Connector will no
longer reference a Connector. |
Resource Information | |
Rate Limited? | Yes | |
session, oauth and org tokens compatible? | Yes | |
api_key token compatible | Yes | |
Resource URL
http://grovestreams.com/api/connector/{connectorUid}
Parameters
none |
Example Requests
/Connector/d251a8f2-f7b9-4df7-886d-b24c7f4929d4Response Body
{
"message" : "Deleted Connector with
uid 'd251a8f2-f7b9-4df7-886d-b24c7f4929d4'",
"success" : true
}