Open zaro0508 opened 4 years ago
Hi zaro0508!
It looks like you did get a job id as a response from that call. If the users were not created, then the results of that job will likely contain some additional information to help us track down any possible issues here. Would you be able to query that job id with the following curl example and send the results along? Many thanks!
curl -X GET \\ https://console.jumpcloud.com/api/v2/bulk/users/{XXXX job-id XXXX}/results \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {XXXX api-key XXXX}'
The return error there is no connection available
seems bogus because if I replace api_instance.bulk_users_create with api_instance.groups_user_list in my script it executes without error.
➜ python ./test.py
{'job_id': '5da5f9f85a97504b1a07379c'}
➜ accounts curl -X GET https://console.jumpcloud.com/api/v2/bulk/users/5da5f9f85a97504b1a07379c/results -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'x-api-key: XXXXXXXXXXXXXX'
[{"id":"5da5f9f85a97504b1a07379d","status":"errored","statusMsg":"there is no connection available","meta":{"systemUser":{"email":"sally.hunt@sagebase.org","username":"shunt","firstname":"Sally","lastname":"Hunt","attributes":[]}},"createdAt":"2019-10-15T16:55:20.081Z","updatedAt":"2019-10-15T16:55:20.126Z","persistedFields":null}]%
I have verified that bulk_users_create api seems to be working as expected now. I have no idea who or what fixed this issue though.
Afternoon zaro0508,
Apologies on the bit delay in the response on this issue, but I do have some good news for you! It appears that you example that you provided is exactly correct.
The reason that you were not seeing the users created and getting the There is no connection available.
error was due to a bug on the /api/v2/bulk/users
endpoint that impacted all iterations of it (the SDKs, the API, the Pwsh Module and some GUI pieces as well). As you noted, this bug has now been fixed and the fix pushed to production so you're example should be working as intended now.
Thanks and have a good weekend!
I'm trying to create users with the
bulk_users_create
API in thejcapi2
library. My test script runs without error however the user(s) is not created on our jumpcloud service.Script:
Execution: