Use this API to update attributes and add parameters to an existing app.
Resource URL
https://<subdomain>.onelogin.com/api/2/apps/:idHeader Parameters
Authorization required string | Set to Set The access token must have been generated using an API credential pair created using the scope required to call this API. This API can be called using any one of the following scopes: |
Content-Type required string | Set to application/json. |
Resource Parameter
id required integer | Set to the |
Request Parameters
This API supports patial updates or patching of app configuration. Only the attributes specified in the request payload will be updated.
For a complete list of all possible values for a given app it is recommended to do a Get App request on an app that is based of the same connector.
Also see the App Resource for general app attributes.
Many of the search tools described in our Getting Started documentation can be applied to your parameters, allowing you to fine-tune your results.
For example, the following payload could be used to make the app visible in the user portal.
{
"visible": true
}
```xml
<h3>Adding New Parameters</h3>
<p>If the connector allows it, new parameters can be added with an app update request. To determine if a connector supports custom parameters to be defined check the <b>allows_new_parameters</b> attribute on the <a href="/api-docs/2/connectors/list-connectors">List Connectors endpoint</a>.</p>
```javascript
GET api/2/connectors?name=amazon&auth_method=2
{
"allows_new_parameters": true,
"id": 50534,
"name": "Amazon Web Services (AWS) Multi Role",
"icon_url": "https://cdn-shadow.onlgn.net/images/icons/square/amazonwebservices3multirole/old_original.png?1421095823",
"auth_method": 2
}
```xml
<p>When new parameters are allowed, any parameter that is added to the parameters object in a request payload will be automatically created if it does not match a parameter name that already exists on the connector.</p>
<p>For example, if the <code>employee_number</code> parameter does not exist on the connector and this payload is supplied a new parameter named <code>employee_number</code> would be created.</p>
```json
{
"parameters": {
"employee_number": {
"values": null,
"default_values": null,
"label": "Employee Number"
}
}
}
```html
<h2>Sample Responses</h2>
<p>See the <a href="/api-docs/2/apps/app-resource">App Resource</a> documentation for detail on the app attributes returned via this API.</p>
<div class="tab-group">
<ul class="tab-links">
<li class="t-link status-200 active" data-tab="1">200 Ok</li>
<li class="t-link status-401" data-tab="2">401 Unauthorized</li>
<li class="t-link status-422" data-tab="3">422 Unprocessable Entity</li>
</ul>
<div class="tab-views">
<div class="t-view active" data-tab="1">
On success, the full app configuration is returned.
This is a sample response for an OpenId Connect app.
```json
{
"id": 928549,
"name": "Sample OpenId Connect App",
"visible": true,
"description": "",
"notes": null,
"icon_url": "/images/missing_connector_icon/square/old_original.png",
"auth_method": 8,
"policy_id": 165278,
"provisioning": {
"enabled": false
},
"allow_assumed_signin": false,
"tab_id": null,
"connector_id": 108419,
"sso": {
"client_secret": "3acdcdba4e57bbb4f0454a8729fbc4ec5c4ac327c8e1d6d60c305cc9ea5dbcd3",
"client_id": "b5dee2e0-5cbf-0137-6e19-12c80e5197ec92920"
},
"configuration": {
"redirect_uri": "http://example.com/callback",
"refresh_token_expiration_minutes": 60,
"login_url": "http://example.com/login",
"oidc_encryption_key": "",
"oidc_application_type": 0,
"token_endpoint_auth_method": 0,
"access_token_expiration_minutes": 5
},
"created_at": "2019-05-19T23:56:57Z",
"updated_at": "2019-05-19T23:56:57Z",
"parameters": {
"groups": {
"values": null,
"user_attribute_mappings": null,
"provisioned_entitlements": false,
"skip_if_blank": false,
"id": 237825,
"default_values": null,
"attributes_transformations": null,
"label": "Groups",
"user_attribute_macros": null,
"include_in_saml_assertion": true
}
}
}