7.1.10.2. Modify Yara sources

Request

Value

Method

PUT

URL

/admin/config/yara/sources

Request HTTP header parameters:

name

type

required

value

apikey

string

true

Session id, can be acquired by Login / Create a Session

Request body:

JSON path

Type

Required

Value

http_sources

array

true

containing the new http sources

local_sources

array

true

containing the new local sources

Example:

{
"local_sources": [
{
"source": "/mnt/yara",
"state": "enabled"
}
],
"http_sources": [
{
"source": "http://onlineyarasources.net/source.zip",
"state": "disabled"
}
]
}

The request body contains local sources and http sources as an array;
Each object in the array represents a source:
source: path or the url of the source
state: state of the source ( can be enabled or disabled )

Successful response

HTTP status code: 200

{
"local_sources": [
{
"source": "/mnt/yara",
"state": "enabled"
}
],
"http_sources": [
{
"source": "http://onlineyarasources.net/source.zip",
"state": "disabled"
}
]
}

The response contains the modified data of sources.

Error response

Internal error

HTTP status code: 500

{
"err": "<error message>"
}

Invalid api key or rights

HTTP status code: 403

{
"err": "Access denied"
}

Invalid data

HTTP status code: 500

{
"err": "<error message>"
}

Note: Check Metadefender Core server logs for more information.