Skip to content

Commit 406f7a5

Browse files
committed
doc: query and search commands docs
1 parent 7b20953 commit 406f7a5

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

doc/tutorial.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To make commands shorter, you can set those parameters once for all by using the
5050
Server configuration
5151
--------------------
5252

53-
The CLI needs to reach the server configuration to find out which features are available,
53+
Before doing anything, the CLI needs to reach the server configuration to find out which features are available,
5454
which resource schemas are available, and where they are located.
5555

5656
By default the CLI will automatically discover those resources on the server, before each command is run.
@@ -73,3 +73,15 @@ You can store those data locally and reuse them for future command runs thanks t
7373
$ export SCIM_RESOURCE_TYPES=/tmp/resource-types.json
7474
$ export SCIM_SERVICE_PROVIDER_CONFIG=/tmp/service-provider-config.json
7575
$ scim2 query ...
76+
77+
Query and search resources
78+
--------------------------
79+
The :ref:`query` and :ref:`search` commands can be used to look for resources.
80+
:ref:`query` performs ag `GET` request on the resources endpoint, while :ref:`search` performs a `POST` request on the ``/.search`` endpoint.
81+
Both commands take similar options such as :option:`--count <scim-query.--count>` or :option:`--attributes <scim-query.--attributes>`.
82+
An exhaustive list of options can be found on the :doc:`reference`.
83+
:ref:`query` can also take a :option:`RESOURCE_TYPE <scim-query.RESOURCE_TYPE>` and a :option:`ID <scim-query.ID>` parameters.
84+
85+
- If none are set, all the resources of the server are queried.
86+
- If :option:`RESOURCE_TYPE <scim-query.RESOURCE_TYPE>` and :option:`ID <scim-query.ID>` is unset, all the resource of the kind passed in parameter are returned.
87+
- If both options are set, the very resource with the ID are returned.

0 commit comments

Comments
 (0)