POST OAuth/UpdateApplication

Updates an existing OAuth application.

UpdateApplication must express the complete configuration as desired. All fields in the structure will be stored when the request is received. If they are not set in the request, they will be defaulted.

A best practice is to get the current configuration using GetApplication, modify that response as desired, and then pass the entire structure into the UpdateApplication request.

Requirements

  • Roles: Admin, Application Owner, or Application Maintainer. See OAuth roles for more information.
  • Token scope:  Admin

Headers

  • Content type: Content-Type:application/json.

  • Token: The bearer access token that you received. For example, Authorization:Bearer 4MyGeneratedBearerTknz==. For more information, see Passing a bearer token in your API calls.

Parameters

Body parameters

Name

Description

Application

object

(Required) The following are required to be passed in the Application object:

  • ID (string): The ID of the application to be updated. It appears as the Client ID on the API Integrations list on the Trust Protection Platform web console, and as ID in the API response.

  • AccessValidity (integer): The number of seconds a token for this application should be valid for.

  • Description (string): A description for the application.

  • GrantValidity (integer): The number of seconds a grant for this application should be valid for.

  • MaximumScope (string): The maximum scope the application knows to use.

  • Name (string): The name of the application.

  • Renewable (boolean): true or false to set default behavior grant renewals.

  • Scope (string): The minimum scope the application requires.

  • Url (string): A URL to learn more about the application.

  • Vendor (string): The name of the vendor that created the application.

Returns

Response description

Name

Description

HTTP 200

See OAuth result codes.

HTTP 400

For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:

  • Error

    • invalid_request: The request is missing a required parameter or is otherwise malformed.

  • Error_description: If available, additional information about how to retry the request.

HTTP 401

For authentication errors, this call returns HTTP 401 Unauthorized and the following data in the message body:

  • Error

    • invalid_token: The access token is missing, or the provided token is expired, revoked, malformed, or invalid for other reasons.

    • insufficient_rights: The underlying user account does not have sufficient permissions for this request.

  • error_description: If available, additional information about how to retry the request.

HTTP 403

If the response is HTTP 403 Forbidden, the requester's token does not include the admin scope. Call POST Authorize/Oauth with the correct scope and restriction. Update the header with the new token and retry.

  • Error

    • insufficient_scope: The request requires a greater scope than provided by the access token.

  • error_description: If available, additional information about how to retry the request.

Example

Request

POST /vedsdk/oauth/UpdateApplication HTTP/1.1
Host: tpp-server-url
Content-Type: application/json
Accept: application/json
Authorization: Bearer 4MyGeneratedBearerTknz==
				
{
  "Application": {
    "ID": "Application-3",
    "AccessValidity": 31536000,
    "Description": "A useful description for Application-3",
    "GrantValidity": 7776000,
    "MaximumScope": "admin:grantrights,viewlogs;configuration;security",
    "Name": "Application 3 Name",
    "Renewable": true,
    "Scope": "admin:grantrights,viewlogs;configuration;security",
    "Url": "https://www.sample-url.net",
    "Vendor": "Sample, Inc."
  }
}

Response

{
  "Result": 0,
  "Success": true
}