Get Connections

Below you see an example on how to list all connections. Examples both in JSON and JSONAPI are provided.

NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id.

JSON:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/json" 
  -H "Accept: application/json"
  -X GET
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/connections

The out-put for this example would be:

[
  {
    "id": "1",
    "code": "AX001",
    "description": "AX2009 on MB VM",
    "connection_type": "ms_dynamics_ax",
    "server_connect": "WIN-JQ88P6LD5IE",
    "database": "DynamicsAX1",
    "company":"Cronus",
    "use_windows_authentication": false,
    "user_id": "sa",
    "schema": "",
    "rapidiconnector": {
      "user_id": "AX001_R",
      "password": "xxxxx"
    },
    "comments": [
      {
      "created_at": "2018-06-6T17:04:58Z",
      "created_by": "mibock",
      "comment": "<p>connection for AX</p>"
      }
    ]
  },
  {
    "id": "2",
    "code": "NAV002",
    "description": "NAV 2009 native",
    "connection_type": "ms_dynamics_nav",
    "driver": "nbcnd",
    "network_protocol": "",
    "server_connect": "ABC-00XX",
    "database_path": "",
    "account":"Cronus International Ltd.",
    "use_windows_authentication": true,
    "user_id": "",
    "use_codeunits_permissions": null,
    "installation_path": "C:\\Program Files\\Microsoft Dynamics NAV\\60\\Classic",
    "rapidiconnector": {
      "user_id": "NAV002_R",
      "password": "xxxxx"
    },
    "comments": []
  },
  {
    "id": "3",
    "code": "SFORCE003",
    "description": "SFDC account",
    "connection_type": "salesforce_com",
    "user_id": "xxx",
    "use_ssl": true,
    "sandbox": true,
    "comments": []
  },
  ...
]

JSONAPI:

curl 
  -H "Authorization: Bearer [API SECURITY TOKEN]"
  -H "Content-Type: application/vnd.api+json" 
  -H "Accept: application/vnd.api+json"
  -X GET
  https://api.myrapidi.com/api/v2/service/[SERVICE ID]/connections

The out-put for this example would be:

{
  "data": [
    {
      "id": "1",
      "type": "connections",
      "attributes": {
        "code": "AX001",
        "description": "AX2009 on MB VM",
        "connection_type": "ms_dynamics_ax",
        "server_connect": "WIN_JQ88P6LD5IE",
        "database": "DynamicsAx1",
        "company": "Cronus",
        "use_windows_authentication": false,
        "user_id": "sa",
        "schema": ""
      },
      "relationships": {
        "rapidiconnector": {
          "data": {
            "id":"36",
            "type": "rapidiconnector"
          }
        },
        "comments": {
          "data": [
            {
              "id": "41",
              "type": "comments"
            }
          ]
        }
      },
    },
    {
      "id": "2",
      "type": "connections",
      "attributes": {
        "code": "NAV002",
        "description": "NAV 2009 native",
        "connection_type": "ms_dynamics_nav",
        "driver": "ndbnd",
        "network_protocol": "",
        "server_connect": "LAPL-xxxx",
        "database_path": "",
        "account": "Cronus International Ltd.",
        "use_windows_authentication": true,
        "user_id": "",
        "user_codeunits_permissions": null,
        "installation_path": "C:\\Program Files\\Microsoft Dynamics NAV\\60\\Classic"
      },
      "relationships": 
        {
          "rapidiconnector": 
            {
              "data": {
                "id":"55",
                "type": "rapidiconnector"
              }
            },
            "comments": {
              "data": []
            }
        }
    },
    { 
      "id": "3",
      "type": "connections",
      "attributes": {
        "code": "SFORCE003",
        "description": "SFDC account",
        "connection_type": "salesforce_com",
        "user_id": "",
        "user_ssl": true,
        "sandbox": true
      },
      "relationships": {
        "comments": {
          "data": []
        }
      }
    }
  ],
  "included": [
    {
      "id":"36",
      "type": "rapidiconnector",
      "attributes": {
        "user_id": AX001_R",
        "password": "xxx"
      }
    },
    {
      "id":"41",
      "type": "comments",
      "attributes": {
        "created_at": "2018-06-06T17:04:58Z",
        "created_by": "mibock",
        "comment": "<p>connection for AX</p>"
      }
    },
    {
      "id":"55",
      "type": "rapidiconnector",
      "attributes": {
        "user_id": NAV003_R",
        "password": "xxx"
      }
    },
    ...
  ]
}