Connectors

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

Headers

NameTypeDescription

authorization

string

bearer scoped to an

Application

[
    {
        "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

List configured connectors.

Create Connector

Token should be Application type

Create Connector

POST https://nchain.provide.services/api/v1/connectors

Creates a new

Connector

Headers

NameTypeDescription

authorization

string

bearer scope to an

Application

Request Body

NameTypeDescription

application_id

string

id of

Application

that is being connected

name

string

name of

Connector

network_id

string

id of host network

type

string

type of

Connector

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

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

NameTypeDescription

id

string

id of target

Connector

Headers

NameTypeDescription

authorization

string

bearer scoped to an

Application

{
	"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

ParameterDescription

id

id of the Connector

Delete Connector

Delete a configured connector.

Delete Connector

DELETE https://nchain.provide.services/api/v1/connectors/:id

Deletes a specified

Connector

Path Parameters

NameTypeDescription

id

string

id of target

Connector

Headers

NameTypeDescription

authorization

string

bearer scoped to an

Application

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

ParameterDescription

id

id of the Connector

Last updated