|
1 | 1 | # scim2-cli |
2 | 2 |
|
3 | | -A scim utility command line. |
| 3 | +An utility command line to help you perform requests against a SCIM server, while validating input and response payloads. |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +```shell |
| 8 | +pip install scim2-cli |
| 9 | +``` |
| 10 | + |
| 11 | +## Usage |
| 12 | + |
| 13 | +Check the [tutorial](https://scim2-cli.readthedocs.io/en/latest/tutorial.html) and the [reference](https://scim2-cli.readthedocs.io/en/latest/reference.html) for more details. |
| 14 | + |
| 15 | +Here is an example of resource creation: |
| 16 | + |
| 17 | +```shell |
| 18 | +$ echo {"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "userName": "bjensen@example.com"} | scim2 https://auth.example create user |
| 19 | +{ |
| 20 | + "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], |
| 21 | + "id": "2819c223-7f76-453a-919d-413861904646", |
| 22 | + "userName": "bjensen@example.com", |
| 23 | + "meta": { |
| 24 | + "resourceType": "User", |
| 25 | + "created": "2010-01-23T04:56:22Z", |
| 26 | + "lastModified": "2011-05-13T04:42:34Z", |
| 27 | + "version": 'W\\/"3694e05e9dff590"', |
| 28 | + "location": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646", |
| 29 | + }, |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +Here is an example of resource query: |
| 34 | + |
| 35 | +```shell |
| 36 | +$ scim2 https://auth.example query user 2819c223-7f76-453a-919d-413861904646 --count 10 |
| 37 | +{ |
| 38 | + "schemas": [ |
| 39 | + "urn:ietf:params:scim:api:messages:2.0:ListResponse" |
| 40 | + ], |
| 41 | + "totalResults": 100, |
| 42 | + "itemsPerPage": 10, |
| 43 | + "startIndex": 1, |
| 44 | + "Resources": [ |
| 45 | + { |
| 46 | + "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], |
| 47 | + "id": "2819c223-7f76-453a-919d-413861904646", |
| 48 | + "userName": "bjensen@example.com", |
| 49 | + "meta": { |
| 50 | + "resourceType": "User", |
| 51 | + "created": "2010-01-23T04:56:22Z", |
| 52 | + "lastModified": "2011-05-13T04:42:34Z", |
| 53 | + "version": 'W\\/"3694e05e9dff590"', |
| 54 | + "location": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646", |
| 55 | + } |
| 56 | + } |
| 57 | + ] |
| 58 | +} |
| 59 | +``` |
0 commit comments