@@ -66,11 +66,11 @@ The JSON Web Token (JWT) is used to get an authorization token for using the API
6666The ` JWT ` object will build the JWT for use with the ` AccessRequest ` object.
6767
6868``` python
69- from adobe_umapi_client .auth import JWT
69+ from umapi_client .auth import JWT
7070
7171jwt = JWT(
7272 org_id, # Organization ID
73- tech_acct, # Techincal Account ID
73+ tech_acct, # Technical Account ID
7474 ims_host, # IMS Host
7575 api_key, # API Key
7676 open (priv_key_filename, ' r' ) # Private certificate is passed as a file-like object
@@ -83,7 +83,7 @@ The `AccessRequest` object uses the JWT to call an IMS endpoint to obtain an acc
8383token is then used in all later UMAPI calls to authenticate and authorize the request.
8484
8585``` python
86- from adobe_umapi_client .auth import AccessRequest
86+ from umapi_client .auth import AccessRequest
8787
8888token = AccessRequest(
8989 " https://" + ims_host + ims_endpoint_jwt, # Access Request Endpoint (IMS Host + JWT Endpoint)
@@ -107,7 +107,7 @@ Once you have an access `token`, you use it to create an Auth object. This Auth
107107is used to build the necessary authentication headers for making an API call.
108108
109109``` python
110- from adobe_umapi_client .auth import Auth
110+ from umapi_client .auth import Auth
111111
112112auth = Auth(api_key, token())
113113```
@@ -118,7 +118,7 @@ Once the `auth` object is built, you use it to construct a UMAPI object. This U
118118object can then be used over and over to make your desired API calls.
119119
120120``` python
121- from adobe_umapi_client import UMAPI
121+ from umapi_client import UMAPI
122122
123123api_endpoint = ' https://usermanagement.adobe.io/v2/usermanagement'
124124api = UMAPI(api_endpoint, auth)
@@ -127,22 +127,23 @@ api = UMAPI(api_endpoint, auth)
127127# Querying for Users and Groups
128128
129129These snippets presume you have constructed a UMAPI object named ` api ` as detailed in the last section.
130- The query APIs return data in paginated form, each page contaning up to 200 results.
131- The ` adobe_umapi_client .helper`
130+ The query APIs return data in paginated form, each page containing up to 200 results.
131+ The ` umapi_client .helper`
132132module has a ` paginate ` utility which can will concatenate and return the results from all pages.
133133
134134## Get a List of Users
135135
136136``` python
137137users = api.users(org_id, page = 0 ) # optional arg page defaults to 0
138138
139- from adobe_umapi_client .helper import paginate
139+ from umapi_client .helper import paginate
140140all_users = paginate(api.users, org_id) # optional args for max_pages and max_records
141141```
142142
143143## Get a List of Groups
144144
145- This list of groups will contain both user groups and product license configuration groups.
145+ This list of groups will contain both user groups and product license
146+ configuration groups.
146147
147148``` python
148149groups = api.groups(org_id, page = 0 )
@@ -162,7 +163,7 @@ To create the action object, we name the user we wish to operate on.
162163(As above, ` api ` here in a UMAPI object.)
163164
164165``` python
165- from adobe_umapi_client import Action
166+ from umapi_client import Action
166167
167168action
= Action(
user = " [email protected] " )
168169```
@@ -447,9 +448,9 @@ The "add" portion of the JSON looks like this:
447448"add" : {"product" : [" product1" ]}
448449```
449450
450- ## adobe_umapi_client .auth
451+ ## umapi_client .auth
451452
452- The submodule ` adobe_umapi_client .auth` contains the components needed to build
453+ The submodule ` umapi_client .auth` contains the components needed to build
453454the authentication headers needed for API communication.
454455
455456### JWT
@@ -470,11 +471,11 @@ The `JWT` object is callable. Calling it returns the encoded JWT.
470471Example:
471472
472473``` python
473- from adobe_umapi_client .auth import JWT
474+ from umapi_client .auth import JWT
474475
475476jwt = JWT(
476477 org_id, # Organization ID
477- tech_acct, # Techincal Account ID
478+ tech_acct, # Technical Account ID
478479 ims_host, # IMS Host
479480 api_key, # API Key
480481 open (priv_key_filename, ' r' ) # Private certificate is passed as a file-like object
@@ -499,7 +500,10 @@ Like the `JWT` object, the `AccessRequest` object is callable. Calling it retur
499500Basic Usage Example:
500501
501502``` python
502- from adobe_umapi_client.auth import AccessRequest
503+ from umapi_client.auth import AccessRequest
504+
505+ ims_host = ' ims-na1.adobelogin.com' # US production host, usable from everywhere
506+ ims_endpoint_jwt = ' /ims/exchange/jwt' # path for all environments
503507
504508token = AccessRequest(
505509 " https://" + ims_host + ims_endpoint_jwt, # Access Request Endpoint (IMS Host + JWT Endpoint)
@@ -533,15 +537,15 @@ It is a subclass of the
533537Example:
534538
535539``` python
536- from adobe_umapi_client .auth import Auth
540+ from umapi_client .auth import Auth
537541
538542token = AccessRequest( ... )
539543auth = Auth(api_key, token())
540544```
541545
542- ## adobe_umapi_client .error
546+ ## umapi_client .error
543547
544- The ` adobe_umapi_client .error` submodule contains all custom Exceptions for the UMAPI library.
548+ The ` umapi_client .error` submodule contains all custom Exceptions for the UMAPI library.
545549
546550### UMAPIError
547551
0 commit comments