This service is used to synchronize remotely file on the devices. On the device, you can have many applications link to a specific namepsace.
List of visible files for a specific user (token authentication) and namespace
| 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. |
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"
}
]
| Param name | Description |
|---|---|
|
_token
required |
Validations:
|
|
namespace
required |
The namespace where you want to look for remote files Validations:
|
List of all available namespace for the current user
| 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. |
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"
}
]
| Param name | Description |
|---|---|
|
_token
required |
Validations:
|
| 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. |
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"
}
| Param name | Description |
|---|---|
|
_token
required |
Validations:
|
|
id
required |
Unique ID of your file save on the server Validations:
|
|
content
optional |
[default : ‘none’] optional parameter if you want the content of the file in ‘text’ or ‘binary’ (base64 encoded) Validations:
|
don’t set content type for this api
| 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. |
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"
| Param name | Description |
|---|---|
|
_token
required |
Validations:
|
|
filename
required |
name of your file Validations:
|
|
file
optional |
content of your file Validations:
|
|
namespace
required |
The namespace where your file is declare Validations:
|
|
version
optional |
version of your file Validations:
|
|
description
optional |
description link to your file Validations:
|
| 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. |
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"
]
| Param name | Description |
|---|---|
|
_token
required |
Validations:
|
|
id
required |
Unique ID of your file save on the server Validations:
|
|
assets
required |
List of Imei that you allowed to download the file Validations:
|
| 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. |
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"
]
| Param name | Description |
|---|---|
|
_token
required |
Validations:
|
|
id
required |
Unique ID of your file save on the server Validations:
|
|
assets
required |
List of Imei that you allowed to download the file Validations:
|
| 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. |
| Param name | Description |
|---|---|
|
_token
required |
Validations:
|