A Connector
is an adapter that connects external arbitrary infrastructure with Provide.
List Connectors
Token
should be Application
type
List Connectors
GET
https://nchain.provide.services/api/v1/connectors
Returns a list of connectors in the authorized scope
[
{
"id": "84ff5252-f374-4cf9-81e7-0a4efd48dd2e",
"created_at": "2021-08-17T00:56:03.110877Z",
"application_id": "de7efe54-642e-4171-91be-0fe0a7cc0977",
"network_id": "07102258-5e49-480e-86af-6d0c3260827d",
"organization_id": null,
"name": "Sample Connector",
"type": "provide",
"status": "pending",
"description": "Sample connector",
"config": {}
},
{
"id": "ffcbc506-7d15-475d-93d0-e228514d9e8a",
"created_at": "2021-08-17T00:58:21.511723Z",
"application_id": "de7efe54-642e-4171-91be-0fe0a7cc0977",
"network_id": "07102258-5e49-480e-86af-6d0c3260827d",
"organization_id": null,
"name": "Sample Connector",
"type": "provide",
"status": "pending",
"description": "Sample connector",
"config": {}
}
]
curl -i \
-H 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
https://nchain.provide.services/api/v1/connectors
HTTP/2 200
[
{
"id":"e7ceec61-dae7-4697-aa5a-a6868fbb89ca",
"created_at":"2019-09-17T16:03:35.397391-04:00",
"application_id":"a1ed9f4b-0770-44d5-a5e5-c9625fe3480f",
"network_id":"aa51a87f-f142-4341-8e94-b4b0214a009f",
"name":"IPFS us-east-1",
"type":"ipfs",
"status":"init",
"description":null,
"config":{
"api_port":5001,
"container":"providenetwork-node",
"gateway_port":8080,
"provider_id":"docker",
"region":"us-east-1",
"role":"peer",
"security":{
"egress":"*",
"ingress":{
"0.0.0.0/0":{
"tcp":[
5001,
8080
],
"udp":null
}
}
},
"target_id":"aws"
},
"accessed_at":null
}
]
List configured connectors.
Create Connector
Token
should be Application
type
Create Connector
POST
https://nchain.provide.services/api/v1/connectors
Creates a new
Connector
Request Body
curl -i \
-H 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
https://nchain.provide.services/api/v1/connectors --data-binary @- << EOF
{
"name":"demoIPFS",
"network_id":"66d44f30-9092-4182-a3c4-bc02736d6ae5",
"type":"ipfs",
"config":{
"region":"us-east-1",
"target_id":"aws",
"provider_id":"docker",
"role":"peer",
"container":"providenetwork-ipfs",
"rpc_port":5001,
"gateway_port":8080,
"credentials":{
"aws_access_key_id":"AKIAXXXXXXXXXXXXXXXX",
"aws_secret_access_key":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"security":{
"egress":"*",
"ingress":{
"0.0.0.0/0":{
"tcp":[
5001,
8080
],
"udp":[]
}
}
}
}
}
EOF
{
"id":"e7ceec61-dae7-4697-aa5a-a6868fbb89ca",
"created_at":"2019-09-17T16:03:35.397391-04:00",
"application_id":"a1ed9f4b-0770-44d5-a5e5-c9625fe3480f",
"network_id":"66d44f30-9092-4182-a3c4-bc02736d6ae5",
"name":"IPFS us-east-1",
"type":"ipfs",
"status":"init",
"description":null,
"config":{
"api_port":5001,
"container":"providenetwork-node",
"gateway_port":8080,
"provider_id":"docker",
"region":"us-east-1",
"role":"peer",
"security":{
"egress":"*",
"ingress":{
"0.0.0.0/0":{
"tcp":[
5001,
8080
],
"udp":null
}
}
},
"target_id":"aws"
},
"accessed_at":null
}
Create a new connector using the given configuration.
Retrieve Connector Details
Get Connector Details
GET
https://nchain.provide.services/api/v1/connectors/:id
Returns details for a specified
Connector
Path Parameters
{
"id": "ffcbc506-7d15-475d-93d0-e228514d9e8a",
"created_at": "2021-08-17T00:58:21.511723Z",
"application_id": "de7efe54-642e-4171-91be-0fe0a7cc0977",
"network_id": "07102258-5e49-480e-86af-6d0c3260827d",
"organization_id": null,
"name": "Sample Connector",
"type": "provide",
"status": "pending",
"description": "Sample connector",
"config": {}
}
Documentation forthcoming.
URL Parameters
Delete Connector
Delete a configured connector.
Delete Connector
DELETE
https://nchain.provide.services/api/v1/connectors/:id
Deletes a specified
Connector
Path Parameters
curl -i -XDELETE \
-H 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.0LsVj7oTF0KjwbcUhg9a-fQRWB7cGzKJxLIANeX2cWE' \
https://nchain.provide.services/api/v1/connectors/9e5e269a-f074-49e2-8383-ab94a33ae30a
HTTP/2 204
URL Parameters