
MatthewH.10249 (State of Iowa) asked a question.
I'm looking for an API request structure to add a user as APP_ADMIN for specific apps. I found the roles API that looks to be sort of what I'm after as I was able to add a user as an APP_ADMIN for "ALL" apps but I want to only add them to a specific app. These specific apps could be any custom Bookmark, OIDC, SAML, etc apps.
Roles API: https://developer.okta.com/docs/reference/api/roles/
To add a user as admin for all apps I performed a POST using {{url}}/api/v1/users/{{userid}}/roles with a body of { "type": "APP_ADMIN" } and that worked but not what I need. I'm creating a request process via ServiceNow that users will be able to request a new app (Bookmark, SWA, OIDC, SAML) be created automatically and then grant the requestor admin rights to the new app.
My hope is that I can somehow add the client id of a specific new app that I want to use in the body but I'm not seeing how to do this or any other options.

Found what I was looking for as an API already exists.
/api/v1/users/${userId}/roles/${roleId}/targets/catalog/apps/${appName}/${appInstanceId} https://developer.okta.com/docs/reference/api/roles/#add-an-app-instance-target-to-an-app-administrator-role-given-to-a-user
To help others the ${appName} is something like "bookmark", "oidc_client", "amazonaws" and not the custom name you gave the app. I feel ${appType} would have been a better label. The ${appInstanceId} is the key I was looking for and allows you to identify just one specific app.