Overview
The Apps API can be used to list, create, update and manage apps.
Often this set of APIs is used to backup the configuration of an app so that changes can be restored to a previous state.
It’s also common to use this API in a DevOps scenario where you might update an app configuration on a sandbox account before applying it to a production account.
This API does not yet support provisioning settings. Also, while it is possible to create Forms Based & WS-Fed apps, you may find issues with these app types.
A typical workflow
In order to create an app you need to get an idea of what attributes are required for that type of app. The easiest way to do this is make use of the List Apps and Get App APIs.
First, filter the List Apps API using the name of an existing app to find that apps unique ID.
[
{
"policy_id": null,
"visible": true,
"tab_id": null,
"icon_url": "https://cdn-shadow.onlgn.net/images/icons/square/amazonwebservices3multirole/old_original.png?1421095823",
"updated_at": "2019-05-15T16:09:54Z",
"auth_method": 2,
"notes": null,
"name": "Amazon Web Services (AWS) Multi Role",
"created_at": "2019-05-15T16:09:54Z",
"description": "",
"connector_id": 50534,
"allow_assumed_signin": false,
"id": 928533
},
...
]
Then use the Get App API to return the app’s full configuration.
You can now create a replica app by sending the complete app payload to the Get App API. Alternately you can send a subset of the required fields and let the app defaults take care of the rest.
{
"connector_id": 108419,
"name": "Sample OpenId Connect App",
"description": "",
"visible": true,
"policy_id": 165278,
"configuration": {
"login_url": "http://example.com/login",
"redirect_uri": "http://example.com/callback",
"access_token_expiration_minutes": 5,
"refresh_token_expiration_minutes": 60,
"token_endpoint_auth_method": 0,
"oidc_application_type": 0
}
}
e.g. Create an OpenId Connect app
Keep in mind that your app replica will not carry over provisioning, roles and rules etc as these are not yet covered by the API.
Apps API Reference
Delete a Parameter from an App
Connectors API Reference
What’s Next?
Future iterations of this API will see additional endpoints for connectors and user/app assignment.
We will also focus in on supporting edge cases for OpenId Connect, SAML, and introduce official support for WS-Fed, Form Based Apps, and OneLogin Access.
We’ve worked hard to eliminate as many bugs and inconsistencies as possible with this API but we do anticipate that more issues will be found during the beta. We will keep you updated on enhancements and bug fixes as they are released.
Postman Collection
- Clicking Run in Postman button navigates to the page where you can fork the collection to your workspace. Forking the collection into your workspace will enable you to contribute to the source collection using pull requests. You can also view the collection in a public workspace if you like and even import a copy of the collection using the links present on the screen.
Have a Question?
Found a problem or a bug? Submit a support ticket.
Looking for walkthroughs or how-to guides on OneLogin's user and admin features? Check out the documentation in our Knowledge Base.
Have a product idea or request? Share it with us in our Ideas Portal.