Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

GET file_notification_agents/meta

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns some meta data information used for the File Agent configuration.

Resource URL

http://{host}/api/2.0/file_notification_agents/meta/.format

Example Request

GET 

  1. http://44.235.52.211/api/2.0/file_notification_agents/meta/.json

{
    "FileAgentTargetTypes": {
        "1": "FTP"
    }
}


GET file_notification_agents

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a list of File Agents configuration data.

Resource URL

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

Example Request

GET 

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

[
    {
        "FileNotificationAgent": {
            "id": 1,
            "title": "aws_test",
            "target_type_id": 1,
            "target_id": 1,
            "is_pid_filtering_enabled": 0,
            "rec_before_trigger": 5,
            "rec_after_trigger": 5,
            "max_file_size": null,
            "max_recording_time": 120,
            "modified": "1611142282208",
            "created": "1611142282208"
        }
    },
    {
        "FileNotificationAgent": {
            "id": 2,
            "title": "local",
            "target_type_id": 1,
            "target_id": 2,
            "is_pid_filtering_enabled": 0,
            "rec_before_trigger": 5,
            "rec_after_trigger": 5,
            "max_file_size": null,
            "max_recording_time": 120,
            "modified": "1611142282208",
            "created": "1611142282208"
        }
    }
]


GET file_notification_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Returns a single File AGent configuration data.

Resource URL

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

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired File Agent to be viewed.

Example Request

GET 

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

{
    "FileNotificationAgent": {
        "id": 1,
        "title": "aws_test",
        "target_type_id": 1,
        "target_id": 1,
        "is_pid_filtering_enabled": 0,
        "rec_before_trigger": 5,
        "rec_after_trigger": 5,
        "max_file_size": null,
        "max_recording_time": 120,
        "modified": "1611142282208",
        "created": "1611142282208"
    }
}


POST file_notification_agents

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

POST

Adds a new File Agent.

Resource URL

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

Example Request

POST 

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

Body

{
    "FileNotificationAgent": {
        "is_pid_filtering_enabled": "1",
        "max_file_size": "",
        "max_recording_time": "120",
        "rec_after_trigger": "15",
        "rec_before_trigger": "15",
        "target_id": "1",
        "target_type_id": "1",
        "title": "ftpAgent_NEW"
    }
}

Response

{
    "FileNotificationAgent": {
        "id": 3,
        "title": "ftpAgent_NEW",
        "target_type_id": 1,
        "target_id": 1,
        "is_pid_filtering_enabled": 1,
        "rec_before_trigger": 15,
        "rec_after_trigger": 15,
        "max_file_size": null,
        "max_recording_time": 120,
        "modified": "1619505749998",
        "created": "1619505749998"
    }
}


POST file_notification_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

POST

Duplicates a single specific File Agent into a new one, preserving all original agent's data except for the title.

Resource URL

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

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired File Agent to be copied.

Example Request

POST 

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

{
    "FileNotificationAgent": {
        "id": 4,
        "title": "ftpAgent_NEW_2",
        "target_type_id": 1,
        "target_id": 1,
        "is_pid_filtering_enabled": 1,
        "rec_before_trigger": 15,
        "rec_after_trigger": 15,
        "max_file_size": null,
        "max_recording_time": 120,
        "modified": "1619505793908",
        "created": "1619505793908"
    }
}


PUT file_notification_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

PUT

Updates a specific File Agent configuration data.

Resource URL

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

Parameters

Parameter

Data Type

Description

1
(required)

integer

The ID of the desired File Agent to be updated.

Example Request

PUT 

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

Body

{
    "FileNotificationAgent": {
        "is_pid_filtering_enabled": "1",
        "max_file_size": "",
        "max_recording_time": "120",
        "rec_after_trigger": "15",
        "rec_before_trigger": "15",
        "target_id": "1",
        "target_type_id": "1",
        "title": "ftpAgent_EDIT"
    }
}

Response

{
    "FileNotificationAgent": {
        "id": 3,
        "title": "ftpAgent_EDIT",
        "target_type_id": 1,
        "target_id": 1,
        "is_pid_filtering_enabled": 1,
        "rec_before_trigger": 15,
        "rec_after_trigger": 15,
        "max_file_size": null,
        "max_recording_time": 120,
        "modified": "1619505879061",
        "created": "1619505749998"
    }
}


DELETE file_notification_agents/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

DELETE

Deletes a single specific File Agent.

Resource URL

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

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired File Agent to be deleted.

Example Request

DELETE 

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

{
    "success": true
}



GET file_notification_agents/command/test/{id}

Resource Information

Requires Authentication?

Yes

Response Formats

json

HTTP Methods

GET

Creates a demo text file on the configured server for an existing agent.

Resource URL

http://{host}/api/2.0/file_notification_agents/command/test/{id}/.format

Parameters

Parameter

Data Type

Description

id
(required)

integer

The ID of the desired agent to send email notification.

Example Request

GET

  1. http://44.235.52.211/api/2.0/file_notification_agents/command/test/1/.json

{
    "Task": {
        "id": 572836,
        "device_id": 9011,
        "type": "Agent Test",
        "type_id": 12,
        "mode": "Starting",
        "mode_id": 1,
        "status": null,
        "description": null,
        "total": 0,
        "completed": 0,
        "time_remained": 0,
        "modified": "1619505090620"
    }
}
  • No labels