| | |
| | | <term><literal>_prettyPrint=true|false</literal></term> |
| | | <listitem> |
| | | <para>Make the JSON resource returned easy for humans to read.</para> |
| | | |
| | | <para> |
| | | This parameter is used though not shown in most examples that follow. |
| | | </para> |
| | | </listitem> |
| | | </varlistentry> |
| | | </variablelist> |
| | |
| | | authenticate.</para> |
| | | |
| | | <screen> |
| | | $ <userinput>curl http://opendj.example.com:8080/users/bjensen?_prettyPrint=true</userinput> |
| | | $ <userinput>curl http://opendj.example.com:8080/users/bjensen</userinput> |
| | | <computeroutput>{ |
| | | "code" : 401, |
| | | "reason" : "Unauthorized", |
| | |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --user bjensen:hifalutin \ |
| | | http://opendj.example.com:8080/users/bjensen?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/bjensen</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "0000000016cbb68c", |
| | | ... |
| | |
| | | <replaceable>username</replaceable>:<replaceable>password</replaceable>@ form |
| | | in the URL, it looks like this.</para> |
| | | |
| | | <screen width="81"> |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | http://bjensen:hifalutin@opendj.example.com:8080/users/bjensen?_prettyPrint=true</userinput> |
| | | http://bjensen:hifalutin@opendj.example.com:8080/users/bjensen</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "0000000016cbb68c", |
| | | ... |
| | |
| | | $ <userinput>curl \ |
| | | --header "X-OpenIDM-Username: bjensen" \ |
| | | --header "X-OpenIDM-Password: hifalutin" \ |
| | | http://opendj.example.com:8080/users/bjensen?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/bjensen</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "0000000016cbb68c", |
| | | ... |
| | |
| | | } |
| | | ] |
| | | }' \ |
| | | http://opendj.example.com:8080/users/newuser?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/newuser</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "000000005b337348", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | $ <userinput>curl \ |
| | | --request GET \ |
| | | --user kvaughan:bribery \ |
| | | http://opendj.example.com:8080/users/newuser?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/newuser</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "000000005b337348", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | } |
| | | ] |
| | | }' \ |
| | | http://opendj.example.com:8080/users/scarter?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/scarter</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000a1923db2", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | } |
| | | ] |
| | | }' \ |
| | | http://opendj.example.com:8080/users/scarter?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/scarter</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000a1ee3da3", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | $ <userinput>curl \ |
| | | --request DELETE \ |
| | | --user kvaughan:bribery \ |
| | | http://opendj.example.com:8080/users/newuser?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/newuser</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "000000003a5f3cb2", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | --request DELETE \ |
| | | --user kvaughan:bribery \ |
| | | --header "If-Match: 000000006d8d7358" \ |
| | | http://opendj.example.com:8080/users/newuser?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/newuser</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000383f3cae", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | $ <userinput>curl \ |
| | | --request DELETE \ |
| | | --user kvaughan:bribery \ |
| | | http://opendj.example.com:8080/users/nbohr?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/nbohr</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "000000003d912113", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | "value": "babs@example.com" |
| | | } |
| | | ]' \ |
| | | http://opendj.example.com:8080/users/bjensen?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/bjensen</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000f3fdd370", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | example, you can include Barbara Jensen in a group by adding her to the set |
| | | of members.</para> |
| | | |
| | | <screen width="83"> |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | --request PATCH \ |
| | |
| | | ] |
| | | } |
| | | ]' \ |
| | | http://opendj.example.com:8080/groups/Directory%20Administrators?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/groups/Directory%20Administrators</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000b70c881a", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | |
| | | <para>Removing her from the group is similar.</para> |
| | | |
| | | <screen width="83"> |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | --request PATCH \ |
| | |
| | | ] |
| | | } |
| | | ]' \ |
| | | http://opendj.example.com:8080/groups/Directory%20Administrators?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/groups/Directory%20Administrators</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000e241797e", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | "http://opendj.example.com:8080/users/bjensen?_prettyPrint=true&_fields=_rev"</userinput> |
| | | http://opendj.example.com:8080/users/bjensen?_fields=_rev</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000c1b6d4c7" |
| | | }</computeroutput> |
| | |
| | | "value": "babs@example.com" |
| | | } |
| | | ]' \ |
| | | http://opendj.example.com:8080/users/bjensen?_prettyPrint=true</userinput> |
| | | http://opendj.example.com:8080/users/bjensen</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "00000000f946d377", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | |
| | | <para>The following example creates a new user entry.</para> |
| | | |
| | | <screen width="82"> |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --request POST \ |
| | | --user kvaughan:bribery \ |
| | |
| | | } |
| | | ] |
| | | }' \ |
| | | "http://opendj.example.com:8080/users?_action=create&_prettyPrint=true"</userinput> |
| | | http://opendj.example.com:8080/users?_action=create</userinput> |
| | | <computeroutput>{ |
| | | "_rev" : "0000000034a23ca7", |
| | | "schemas" : [ "urn:scim:schemas:core:1.0" ], |
| | |
| | | <para>Matches when the pointer equals the value, as in the following |
| | | example.</para> |
| | | |
| | | <screen width="87"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="87"> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName+eq+"bjensen@example.com"'</userinput> |
| | |
| | | <para>Matches when the pointer contains the value, as in the following |
| | | example.</para> |
| | | |
| | | <screen width="91"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="91"> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName+co+"jensen"&_fields=userName'</userinput> |
| | |
| | | <para>Matches when the pointer starts with the value, as in the |
| | | following example.</para> |
| | | |
| | | <screen width="87"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="87"> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName+sw+"ab"&_fields=userName'</userinput> |
| | |
| | | <para>Matches when the pointer is less than the value, as in the |
| | | following example.</para> |
| | | |
| | | <screen width="87"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="87"> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName+lt+"ac"&_fields=userName'</userinput> |
| | |
| | | <para>Matches when the pointer is less than or equal to the value, as |
| | | in the following example.</para> |
| | | |
| | | <screen width="87"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="87"> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName+le+"ad"&_fields=userName'</userinput> |
| | |
| | | <para>Matches when the pointer is greater than the value, as in the |
| | | following example.</para> |
| | | |
| | | <screen width="87"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="87"> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName+gt+"tt"&_fields=userName'</userinput> |
| | |
| | | <para>Matches when the pointer is greater than or equal to the value, |
| | | as in the following example.</para> |
| | | |
| | | <screen width="87"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="87"> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName+ge+"tw"&_fields=userName'</userinput> |
| | |
| | | any resource on which the <replaceable>json-pointer</replaceable> is |
| | | present, as in the following example.</para> |
| | | |
| | | <screen><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=userName%20pr'</userinput> |
| | |
| | | <para>In other words you can list all resources in a collection as in the |
| | | following example.</para> |
| | | |
| | | <screen><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/groups?_queryFilter=true&_fields=displayName'</userinput> |
| | |
| | | nested inside the <literal>name</literal> and <literal>manager</literal> |
| | | objects.</para> |
| | | |
| | | <screen><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen> |
| | | $ <userinput>curl \ |
| | | --user kvaughan:bribery \ |
| | | 'http://opendj.example.com:8080/users?_queryFilter=\ |
| | |
| | | after the last page of results specified by the cookie. |
| | | </para> |
| | | |
| | | <screen width="87"><!-- Dropped _prettyPrint=true param for spacing. --> |
| | | <screen width="87"> |
| | | $ <userinput>curl \ |
| | | --user bjensen:hifalutin \ |
| | | "http://opendj.example.com:8080/users?_queryFilter=true&_fields=userName&_pageSize=5"</userinput> |