-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I'm trying to create users with the bulk_users_create API in the jcapi2 library. My test script runs without error however the user(s) is not created on our jumpcloud service.
Script:
from __future__ import print_function
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint
# Configure API key authorization: x-api-key
configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = 'XXXXXXXXXXXXXXXXXX'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'
# create an instance of the API class
api_instance = jcapiv2.BulkJobRequestsApi(jcapiv2.ApiClient(configuration))
content_type = 'application/json' # str | (default to application/json)
accept = 'application/json' # str | (default to application/json)
x_org_id = '' # str | (optional) (default to )
body = [
{
"email": "sally.hunt@sagebase.org",
"username": "shunt",
"firstname": "Sally",
"lastname": "Hunt"
}
]
try:
# Bulk Users Create
api_response = api_instance.bulk_users_create(content_type, accept, body=body, x_org_id=x_org_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BulkJobRequestsApi->bulk_users_create: %s\n" % e)
Execution:
python ./test.py
{'job_id': '5da4cf6113973a47cc6862fa'}
Metadata
Metadata
Assignees
Labels
No labels