public function get() {
$misc = $this->getModule('misc');
+ $content = $this->Request->contains('content') && $misc->isValidName($this->Request['content']) ? $this->Request['content'] : '';
$limit = $this->Request->contains('limit') && $misc->isValidInteger($this->Request['limit']) ? (int)$this->Request['limit'] : 0;
$offset = $this->Request->contains('offset') && $misc->isValidInteger($this->Request['offset']) ? (int)$this->Request['offset'] : 0;
$result = $this->getModule('bconsole')->bconsoleCommand(
'vals' => $vals
];
+ if (!empty($content)) {
+ $params['FileSet.Content'][] = [
+ 'operator' => 'LIKE',
+ 'vals' => '%' . $content . '%'
+ ];
+ }
+
$filesets = $this->getModule('fileset')->getFileSets($params, $limit, $offset);
$this->output = $filesets;
$this->error = FileSetError::ERROR_NO_ERRORS;
"name": "enabled",
"in": "query",
"required": false,
- "description": "Enabled clients filter. It does not work with 'name' parameter.",
+ "description": "Enabled clients filter. It has meaning only if 'output=json'. It is ignored if 'name' parameter is used.",
"schema": {
"type": "integer"
}
},
{
"$ref": "#/components/parameters/Offset"
+ },
+ {
+ "name": "content",
+ "in": "query",
+ "description": "Content property value. There is possible to provide whole content value or only a part",
+ "required": false,
+ "schema": {
+ "type": "string",
+ "pattern": "[a-zA-Z0-9:.-_ ]+"
+ }
}
]
}