Add search option for list query
Change-Id: I3a2f021f5d9e104539fc1550713553f6c86df553
This commit is contained in:
parent
1cc79e1567
commit
cdd34ec059
|
@ -30,6 +30,7 @@ Query Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -39,6 +40,12 @@ Response Parameters
|
||||||
- actions: actions
|
- actions: actions
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/actions-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -222,4 +229,4 @@ Query Parameters
|
||||||
|
|
||||||
- action_id: action_id_path
|
- action_id: action_id_path
|
||||||
|
|
||||||
There is no response for this operation.
|
There is no response for this operation.
|
||||||
|
|
|
@ -28,6 +28,7 @@ Query Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -37,6 +38,12 @@ Response Parameters
|
||||||
- backups: backups
|
- backups: backups
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/backup-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ Query Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -38,6 +39,12 @@ Response Parameters
|
||||||
- clients: clients
|
- clients: clients
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/clients-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ Query Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -38,6 +39,12 @@ Response Parameters
|
||||||
- jobs: jobs
|
- jobs: jobs
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/jobs-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,15 @@ result:
|
||||||
description: |
|
description: |
|
||||||
A string represents if the operation was successful ``success`` or failed.
|
A string represents if the operation was successful ``success`` or failed.
|
||||||
|
|
||||||
|
search_option:
|
||||||
|
type: dict
|
||||||
|
in: body
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
The query option of list. It is a JSON structure. It contains the keywords
|
||||||
|
``match``, ``match_not``, or one of the two. The values about keys
|
||||||
|
``match`` and ``match_not`` are a list of {key, value}.
|
||||||
|
|
||||||
session_description:
|
session_description:
|
||||||
type: string
|
type: string
|
||||||
in: body
|
in: body
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"max_retries": 20
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"backup_name": "test0001_backup"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"storage": "ftps"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"backup_name": "freezer_mysql_backup"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"client_id": "tecs_node1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"user_id":"0cd44caf6db5486b94a04b33256a5ff4"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"schedule_interval": "10 days"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"schedule_interval": "10 days"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"hold_off": 50
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -37,6 +37,7 @@ Query Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -46,6 +47,12 @@ Response Parameters
|
||||||
- sessions: sessions
|
- sessions: sessions
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/sessions-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ Request Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -47,6 +48,12 @@ Response Parameters
|
||||||
- actions: actions
|
- actions: actions
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/actions-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -242,4 +249,4 @@ Query Parameters
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- action_id: action_id_path
|
- action_id: action_id_path
|
||||||
|
|
||||||
There is no response for this operation.
|
There is no response for this operation.
|
||||||
|
|
|
@ -38,6 +38,7 @@ Request Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- marker: marker
|
- marker: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -47,6 +48,12 @@ Response Parameters
|
||||||
- backups: backups
|
- backups: backups
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/backup-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -122,4 +129,4 @@ Query Parameters
|
||||||
- project_id: project_id_path
|
- project_id: project_id_path
|
||||||
- backup_id: backup_id_path
|
- backup_id: backup_id_path
|
||||||
|
|
||||||
There is no response for this operation.
|
There is no response for this operation.
|
||||||
|
|
|
@ -37,6 +37,7 @@ Request Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -46,6 +47,12 @@ Response Parameters
|
||||||
- clients: clients
|
- clients: clients
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/clients-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@ Request Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -46,6 +48,13 @@ Response Parameters
|
||||||
- jobs: jobs
|
- jobs: jobs
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/jobs-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -190,6 +190,15 @@ result:
|
||||||
description: |
|
description: |
|
||||||
A string represents if the operation was successful ``success`` or failed.
|
A string represents if the operation was successful ``success`` or failed.
|
||||||
|
|
||||||
|
search_option:
|
||||||
|
type: dict
|
||||||
|
in: body
|
||||||
|
required: false
|
||||||
|
description: |
|
||||||
|
The query option of list. It is a JSON structure. It contains the keywords
|
||||||
|
``match``, ``match_not``, or one of the two. The values about keys
|
||||||
|
``match`` and ``match_not`` are a list of {key, value}.
|
||||||
|
|
||||||
session_description:
|
session_description:
|
||||||
type: string
|
type: string
|
||||||
in: body
|
in: body
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"max_retries": 20
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"backup_name": "test0001_backup"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"storage": "ftps"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"backup_name": "freezer_mysql_backup"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"client_id": "tecs_node1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"user_id":"0cd44caf6db5486b94a04b33256a5ff4"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"schedule_interval": "10 days"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"client_id": "752d8bd43d654e7a840bbfda77ce41af_szaher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"match_not": [
|
||||||
|
{
|
||||||
|
"schedule_interval": "10 days"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"match": [
|
||||||
|
{
|
||||||
|
"hold_off": 50
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -43,6 +43,7 @@ Request Parameters
|
||||||
|
|
||||||
- limit: limit
|
- limit: limit
|
||||||
- offset: marker
|
- offset: marker
|
||||||
|
- search: search_option
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -52,6 +53,12 @@ Response Parameters
|
||||||
- sessions: sessions
|
- sessions: sessions
|
||||||
|
|
||||||
|
|
||||||
|
Request Example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: samples/sessions-list-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
Response Example
|
Response Example
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -141,12 +141,12 @@ html_theme = 'default'
|
||||||
#html_last_updated_fmt = '%b %d, %Y'
|
#html_last_updated_fmt = '%b %d, %Y'
|
||||||
git_cmd = ["git", "log", "--pretty=format:%ad, commit %h", "--date=local",
|
git_cmd = ["git", "log", "--pretty=format:%ad, commit %h", "--date=local",
|
||||||
"-n1"]
|
"-n1"]
|
||||||
try:
|
#try:
|
||||||
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
|
# html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
|
||||||
except Exception:
|
#except Exception:
|
||||||
warnings.warn('Cannot get last updated time from git repository. '
|
# warnings.warn('Cannot get last updated time from git repository. '
|
||||||
'Not setting "html_last_updated_fmt".')
|
# 'Not setting "html_last_updated_fmt".')
|
||||||
|
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||||
# typographically correct entities.
|
# typographically correct entities.
|
||||||
#html_use_smartypants = True
|
#html_use_smartypants = True
|
||||||
|
|
|
@ -11,8 +11,7 @@ Contents:
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
cli/index
|
cli/index
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
@ -20,3 +19,4 @@ Indices and tables
|
||||||
* :ref:`genindex`
|
* :ref:`genindex`
|
||||||
* :ref:`search`
|
* :ref:`search`
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue