Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GET ftp_agents

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a list of FTP Servers configurations data.

Resource URL

http://{host}/api/2.0/ftp_agents/.format

Example Request

GET 

  1. http://44.235.52.211/api/2.0/ftp_agents/.json

Code Block
languagejson
[
    {
        "FtpAgent": {
            "id": 1,
            "title": "aws_test",
            "host": "172.31.4.23",
            "path_on_target": "",
            "username": "ilan",
            "password": "ilan",
            "port": 21,
            "storage_limit": null,
            "bandwidth_limit": 100000,
            "network_id": 0,
            "modified": "1611142282208",
            "created": "1611142282208"
        }
    },
    {
        "FtpAgent": {
            "id": 2,
            "title": "local",
            "host": "127.0.0.1",
            "path_on_target": "",
            "username": "recording",
            "password": "tagvs",
            "port": 21,
            "storage_limit": null,
            "bandwidth_limit": 100000,
            "network_id": 0,
            "modified": "1611142282208",
            "created": "1611142282208"
        }
    }
]


GET ftp_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a single specific FTP Server configuration data.

Resource URL

http://{host}/api/2.0/ftp_agents/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired FTP Server to be viewed.

Example Request

GET 

  1. http://44.235.52.211/api/2.0/ftp_agents/1/.json

Code Block
languagejson
{
    "FtpAgent": {
        "id": 1,
        "title": "aws_test",
        "host": "172.31.4.23",
        "path_on_target": "",
        "username": "ilan",
        "password": "ilan",
        "port": 21,
        "storage_limit": null,
        "bandwidth_limit": 100000,
        "network_id": 0,
        "modified": "1611142282208",
        "created": "1611142282208"
    }
}


POST ftp_agents

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

POST

Adds a new FTP Server configuration.

Resource URL

http://{host}/api/2.0/ftp_agents/.format

Example Request

POST 

  1. http://44.235.52.211/api/2.0/ftp_agents/.json

Body

Code Block
languagejson
{
    "FtpAgent": {
        "bandwidth_limit": "100000",
        "host": "192.168.0.90",
        "network_id": "0",
        "password": "tagvs",
        "path_on_target": "/recordings",
        "port": "21",
        "storage_limit": "",
        "title": "FTP_Server_NEW",
        "username": "tagvs"
    }
}

Response

Code Block
languagejson
{
    "FtpAgent": {
        "id": 3,
        "title": "FTP_Server_NEW",
        "host": "192.168.0.90",
        "path_on_target": "/recordings",
        "username": "tagvs",
        "password": "tagvs",
        "port": 21,
        "storage_limit": null,
        "bandwidth_limit": 100000,
        "network_id": 0,
        "modified": "1619507519437",
        "created": "1619507519437"
    }
}


POST ftp_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

POST

Duplicates a single specific FTP Server configuration, preserving the original configuration data except for the title.

Resource URL

http://{host}/api/2.0/ftp_agents/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired FTP Server to be copied.

Example Request

POST 

  1. http://44.235.52.211/api/2.0/ftp_agents/3/.json

Code Block
languagejson
{
    "FtpAgent": {
        "id": 4,
        "title": "FTP_Server_NEW_2",
        "host": "192.168.0.90",
        "path_on_target": "/recordings",
        "username": "tagvs",
        "password": "tagvs",
        "port": 21,
        "storage_limit": null,
        "bandwidth_limit": 100000,
        "network_id": 0,
        "modified": "1619507576250",
        "created": "1619507576250"
    }
}


PUT ftp_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

PUT

Updates a single specific FTP Server configuration.

Resource URL

http://{host}/api/2.0/ftp_agents/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired FTP Server to be updated.

Example Request

PUT 

  1. http://44.235.52.211/api/2.0/ftp_agents/3/.json

Body

Code Block
languagejson
{
    "FtpAgent": {
        "bandwidth_limit": "100000",
        "host": "192.168.0.100",
        "network_id": "0",
        "password": "tagvs",
        "path_on_target": "/new_recordings",
        "port": "21",
        "storage_limit": "",
        "title": "FTP_Server_EDIT",
        "username": "tagvs"
    }
}

Response

Code Block
languagejson
{
    "FtpAgent": {
        "id": 3,
        "title": "FTP_Server_EDIT",
        "host": "192.168.0.100",
        "path_on_target": "/new_recordings",
        "username": "tagvs",
        "password": "tagvs",
        "port": 21,
        "storage_limit": null,
        "bandwidth_limit": 100000,
        "network_id": 0,
        "modified": "1619507761999",
        "created": "1619507519437"
    }
}


DELETE ftp_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

DELETE

Deletes a single specific FTP Server.

Resource URL

http://{host}/api/2.0/ftp_agents/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired FTP Server to be deleted.

Example Request

DELETE 

  1. http://44.235.52.211/api/2.0/ftp_agents/3/.json

Code Block
languagejson
{
    "success": true
}