okta-developer-docs
okta-developer-docs copied to clipboard
/devices is missing info on getting users, etc
https://developer.okta.com/docs/reference/api/devices is missing info on getting users (and perhaps other related collections)
to get a device's users:
GET /api/v1/devices/${deviceId}/users
this would be analogous to getting a group's users:
GET /api/v1/groups/${groupId}/users
which is documented here: https://developer.okta.com/docs/reference/api/groups/#list-group-members
Thanks, Gabriel. Will review and get back to you on this one, too.
also missing info on
/api/v1/devices?search=managementStatus eq "MAN"&expand=user
/api/v1/devices?search=managementStatus eq "UNMAN"&expand=user
etc
EDIT: added &expand=user
to clarify
Logged internal ticket to address: https://oktainc.atlassian.net/browse/OKTA-567622
Any news on this?
Assigned it to another writer. Let me check.
Any news?
Hi Gabriel,
Unfortunately, just in the backlog, I think. The monthly release is taking precedence at the moment; hopefully, after that.
Brian
Hi @gabrielsroka ,
I've chatted with the Devices team (some of whom remember you from your Okta days).
They wonder if the following operation handles your use cases: https://developer.okta.com/docs/reference/api/devices/#usage-example-expand-user
If not, please let us know what's missing. We do realize that we should doc the following:
search=managementStatus
eg MAN
I look forward to hearing from you,
Brent
Your link expands users for all devices. My example is for one specific device. I think both of useful.
What's missing
I don't know. I'm reverse engineering the API by using the UI. It seems better to ask the engineers what's in the API so we can document it.
Hi Gabriel,
The new operation is live on the "old" docs site: https://developer.okta.com/docs/reference/api/devices/#list-all-users-for-a-device
And will be live on the new redocly site in a few days (it'll appear at the bottom of the list of operations in the left nav): https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Device/
I know we still need to capture the details of the managementStatus
parameter. I'll do that soon in another PR.
it doesn't seem to paginate, nor accept the limit
or after
parameters
it doesn't seem to paginate, nor accept the
limit
orafter
parameters
Okay... following up. Sorry for the delay.
hi again,
this came up again today. ~you said on May 4 that it was on the old site, now the old site is gone, and it's not on the new site.~ EDIT: nm, i was confused.
i opened this issue in Dec. do u have an ETC?
Hi @gabrielsroka , are we now able to close this issue? Thank you again for your patience.
Waiting on this
https://github.com/okta/okta-developer-docs/issues/3789#issuecomment-1544091899
Hi @gabrielsroka , can you please review this List Devices reference?
We recently updated the expand
query parameter with user info and added pagination content. Please let us know if this addresses your issues. Thanks!
- the doc still doesn't mention
managementStatus
, see https://github.com/okta/okta-developer-docs/issues/3789#issuecomment-1351692951 -
?expand=userSummary
doesn't work (but?expand=user
does)
also need devices for a given user /api/v1/users/${userId}/devices
Sorry @gabrielsroka , I got ahead of myself, the expand=userSummary
option is currently being deployed on Preview. If you have a Production org, you won't see the feature until next week.
For your other questions:
- The following requests aren't supported:
/api/v1/devices?search=managementStatus eq "MAN"
/api/v1/devices?search=managementStatus eq "UNMAN"
managementStatus
property is inside the _embedded.users
array payload, so you can't do a search on that optional payload. You can do a search on a specific device ID, and set expand=user
to pick up the managementStatus
property in the expanded payload. (Also, managementStatus
= MANAGED
| NOT_MANAGED
)
- The
GET /api/v1/devices/{deviceId}/users
endpoint doesn't support thesearch
query parameter.
i confirmed userSummary works in preview. thanks.
- aren't supported
what do you mean "not supported"? i tried it. it works. it's how the UI does it, too. did u try it?
GET /api/v1/devices/{deviceId}/users
i'm not sure what you're referencing here.
i confirmed userSummary works in preview. thanks.
Note that managementStatus
isn't returned for userSummary
yet (it should be added as a payload soon)
- aren't supported
what do you mean "not supported"? i tried it. it works. it's how the UI does it, too. did u try it?
When I try this request, I don't get anything meaningful. But going by the reference docs, managementStatus
is not a first-level property from the Devices payload, so this request isn't officially supported. If you have questions about API behaviour, please contact Okta support.
If you think it's a documentation issue, what do you think needs updating? I can create a doc request and follow up on the doc-gap.
GET /api/v1/devices/{deviceId}/users
i'm not sure what you're referencing here.
I thought one of your questions was about using search on GET /api/v1/devices/{deviceId}/users
. Apologies if this is not the case. I'm getting confused with the long trail.
also need devices for a given user /api/v1/users/${userId}/devices
I can't find documentation on this endpoint (it's probably not supported). Nevertheless, I'll open a doc query into this endpoint to confirm. Thanks for your patience while we migrate to the OpenAPI spec.
this is what the UI does [1] [2]
Okta customers need this functionality via the API, too (not just the UI). since it's undocumented but easily discoverable, i'm asking for it to be documented since it's useful and necessary.
contact Okta support
I'm not a customer. i'm trying to help customers who are asking for this stuff.
/api/v1/users/${userId}/devices
again, the UI does this. customers need it. it's a public (but undocumented) api. i'm asking for it to be documented.
[1] managed MAN
[2] unmanaged UNMAN
note what was said in the above 2 comments by @brentschaus-okta
We do realize that we should doc the following: search=managementStatus eg MAN
https://github.com/okta/okta-developer-docs/issues/3789#issuecomment-1509273052
we still need to capture the details of the managementStatus parameter. I'll do that soon
https://github.com/okta/okta-developer-docs/issues/3789#issuecomment-1535353912
@gabrielsroka Thanks for calling this out and for your patience working through the issue here! I think our best approach from this point is to both work with CSMs and support to engage with internal teams and also log some Okta Ideas to reflect the behavior you need and get support from the larger community. This will provide better justification for this request. Thanks again!
any update on this @brentschaus-okta , et al? it's been 18 months.
yet another Okta customer asked for this.
Hi Gabriel, this was left in the Engineering and PM's court as last I recall. Let me re-engage with the team.
Nevertheless, I'll open a doc query into this endpoint to confirm.
@vanngo-okta Any follow-up on this? I would like to use the /v1/users/{userID}/devices
API rather than returning all devices via the /v1/devices
(with userSummary
embedded objects) and manually filtering by the user I need.
Hi @camscale, thanks for the note. Still working with our engineering/PM team on this. I've pinged the current dev manager and hope to get a resolution for you shortly.