This service is used to synchronize remotely file on the devices. On the device, you can have many applications link to a specific namepsace.

Supported Formats

json

GET /api/v2/services/remote_files
List all visible files

List of visible files for a specific user (token authentication) and namespace

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

curl -X "GET" "http://manager.integration.cloudconnect.io/api/v2/services/remote_files?namespace=ssh:testnamespace" \
      -H "Content-Type: application/json" \
      -H "Authorization: Basic YOURTOKEN" \
      -H "Accept: application/json"

    Response :
    [
      {
        "id": "ssh_4588658e9e7e7745e319e4c2c86a483e",
        "filename": "check.json",
        "md5": "73bf1791e9500f421eb218253fc24e93",
        "upload_date": "2015-02-17T11:35:19+01:00"
      },
      {
        "id": "ssh_4738e8b402e08448714ed350e66f1e25",
        "filename": "dtc.json",
        "md5": "54ed7b08aab9f54a82c324b8223b5032",
        "upload_date": "2015-02-17T11:35:32+01:00"
      },
      {
        "id": "ssh_d21049fd3b45f5172dfa5d787ba9d05a",
        "filename": "geofence.geo",
        "md5": "1837f0fd18804d4d2840193ee5f2e4b6",
        "upload_date": "2015-02-17T11:42:15+01:00"
      }
    ]

Params

Param name Description
_token
required

Validations:

  • Must be a String

namespace
required

The namespace where you want to look for remote files

Validations:

  • Must be a String


GET /api/v2/services/remote_files/allowed_namespaces
List of all available namespace

List of all available namespace for the current user

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

curl -X "GET" "http://manager.integration.cloudconnect.io/api/v2/services/remote_files/allowed_namespaces" \
    -H "Content-Type: application/json" \
    -H "Authorization: Basic YOURTOKEN" \
    -H "Accept: application/json"

    Response :
    [
      {
        "application": "test",
        "namespace": "ssh:test"
      },
      {
        "application": "geofence",
        "namespace": "ssh:geofence"
      }
    ]
    

Params

Param name Description
_token
required

Validations:

  • Must be a String


GET /api/v2/services/remote_files/:id
Request detail for a specific file

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

curl -X "GET" "http://manager.integration.cloudconnect.io/api/v2/services/remote_files/ssh_d21049fd3b45f5172dfa5d787ba9d05a?content=binary" \
    -H "Content-Type: application/json" \
    -H "Authorization: Basic YOURTOKEN" \
    -H "Accept: application/json"

    Response :
    {
      "id": "ssh_d21049fd3b45f5172dfa5d787ba9d05a",
      "filename": "test.json",
      "md5": "1837f0fd18804d4d2840193ee5f2e4b6",
      "upload_date": "2015-02-17T11:42:15+01:00",
      "length": 7,
      "version": "1.0",
      "namespace": "testnamespace",
      "content": "cmVxdWlyZSAiY291Y2hiYXNlIgpkYiA9IENvdWNoYmFzZS5jb25uZWN0KDpub2RlX2xpc3QgPT4gWydiMzAuY2xvdWRjb25uZWN0LmlvOjgwOTEnXSwgOmJ1Y2tldCA9PiAid2ViZGVtbyIsIDpxdWlldCA9PiB0cnVlLCA6dXNlcm5hbWUgPT4gJ3dlYmRlbW8nLCA6cGFzc3dvcmQgPT4gJ3dlYmRlbW9tZGknKQoKY2Jfa2V5ID0gIjM1MTczMjA1MjQ3NjMxNyIKcmVzdWx0ID0gZGIuZ2V0KGNiX2tleSkKcHV0cyByZXN1bHQKCmV4aXQoMCkK"
    }
    

Params

Param name Description
_token
required

Validations:

  • Must be a String

id
required

Unique ID of your file save on the server

Validations:

  • Must be a String

content
optional

[default : ‘none’] optional parameter if you want the content of the file in ‘text’ or ‘binary’ (base64 encoded)

Validations:

  • Must be a String


POST /api/v2/services/remote_files
Push a new file on the server

Content-Type

don’t set content type for this api

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

curl -X "POST" "http://manager.integration.cloudconnect.io/api/v2/services/remote_files" \
      -H "Authorization: Basic YOURTOKEN" \
      -H "Accept: application/json" \
      -F "filename=my_file.json" \
      -F "namespace=APP_NAMESPACE" \
      -F "file=yourfile" \
      -F "description=a little description" \
      -F "version=1.0"

Params

Param name Description
_token
required

Validations:

  • Must be a String

filename
required

name of your file

Validations:

  • Must be a String

file
optional

content of your file

Validations:

  • Must be a String

namespace
required

The namespace where your file is declare

Validations:

  • Must be a String

version
optional

version of your file

Validations:

  • Must be a String

description
optional

description link to your file

Validations:

  • Must be a String


PUT /api/v2/services/remote_files/:id/update_allowed_assets
allowed specific assets for a file

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

curl -X "PUT" "http://manager.integration.cloudconnect.io/api/v2/services/remote_files/ssh_d21049fd3b45f5172dfa5d787ba9d05a/update_allowed_assets" \
      -H "Content-Type: application/json" \
      -H "Authorization: Basic OTgyNmI0ZjhjMTk4MWRhNjU1ZmY4ZDMxNWUxMmVjMzcyODlhZjY5MjpY" \
      -H "Accept: application/json" \
    -d $'{
      "assets": ["XXXXXXXX1" , "XXXXXXXX2"],
      }'

      Response :
      [
        "XXXXXXXX1",
        "XXXXXXXX2"
      ]

Params

Param name Description
_token
required

Validations:

  • Must be a String

id
required

Unique ID of your file save on the server

Validations:

  • Must be a String

assets
required

List of Imei that you allowed to download the file

Validations:

  • Must be an array of any type


PUT /api/v2/services/remote_files/:id/remove_allowed_assets
remove access for a specific file for a list of assets

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

curl -X "PUT" "http://manager.integration.cloudconnect.io/api/v2/services/remote_files/ssh_d21049fd3b45f5172dfa5d787ba9d05a/update_allowed_assets" \
      -H "Content-Type: application/json" \
      -H "Authorization: Basic OTgyNmI0ZjhjMTk4MWRhNjU1ZmY4ZDMxNWUxMmVjMzcyODlhZjY5MjpY" \
      -H "Accept: application/json" \
    -d $'{
      "assets": ["XXXXXXXX1" , "XXXXXXXX2"],
      }'

      Response :
      [
        "XXXXXXXX1",
        "XXXXXXXX2"
      ]

Params

Param name Description
_token
required

Validations:

  • Must be a String

id
required

Unique ID of your file save on the server

Validations:

  • Must be a String

assets
required

List of Imei that you allowed to download the file

Validations:

  • Must be an array of any type


DELETE /api/v2/services/remote_files/:id

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Params

Param name Description
_token
required

Validations:

  • Must be a String