skip to main content
Hybrid Data Pipeline API reference : Management API : OAuth API for Google Analytics connectivity : OAuth applications API : Update an OAuth application object
  

Try Now
Update an OAuth application object

Purpose

Updates an OAuth application object.
Note: An administrator can execute this operation on behalf of a user by appending the user query parameter to the request and specifying a user name. See also Managing resources on behalf of users.

URL

https://<myserver>:<port>/api/mgmt/oauthapps/{id}

Method

PUT

URL Parameters

<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a standalone installation, or the machine hosting the load balancer for a load balancer installation. For a standalone installation, <port> is the port number specified as the Server Access Port during installation. For a load balancer installation, <port> must be either 80 for http or 443 for https. Whenever port 80 or 443 are used, it is not necessary to include the port number in the URL.
The URL parameter {id} described is required.
Parameter
Description
Valid Values
{id}
The ID of the OAuth application object.
The automatically generated OAuth application ID.

Request Payload Parameters

The request takes the following format.
{
"name": "oauth_application_name",
"dataStore": data_store_id,
"tenantId": tenant_id,
"description": "oauth_application_description",
"clientId": "client_id",
"clientSecret": "client_secret"
}
Property
Description
Usage
Valid Values
"name"
The name of the OAuth application object.
Required
The user-specified name of the OAuth application object. The name can contain only alphanumeric characters and the underscore character.
"dataStore"
The ID of the data store for which the OAuth application object is being created.
Required
The only data store which Hybrid Data Pipeline currently supports access to is Google Analytics. Therefore, the only valid value is the Google Analytics data store ID: 54.
"tenantId"
The ID of the tenant to which the OAuth application and data store belong.
When a tenant ID is not specified, the OAuth application is created for the tenant to which the user belongs.
Optional
A valid tenant ID.
"description"
A description of the OAuth application object.
Optional
A description provided by the user.
"clientId"
The OAuth client ID generated by Google when an application is registered with the Analytics API in the Google Developer Console.
Required
A valid client ID.
"clientSecret"
The OAuth client secret generated by Google when an application is registered with the Analytics API in the Google Developer Console.
Required
A valid client secret.

Sample Request Payload

{
"name": "TenantB OAuth app",
"dataStore": 54,
"tenantId": 623,
"description": "TenantB OAuth application object for Google Analytics",
"clientId": "asdfjasdljfasdkjf",
"clientSecret": "1912308409123890"
}

Sample Server Response


Status code: 200
Successful response
{
"id": "93",
"name": "TenantB OAuth app",
"dataStore": 54,
"tenantId": 623,
"description": "TenantB OAuth application object for Google Analytics",
"clientId": "asdfjasdljfasdkjf",
"clientSecret": "1912308409123890"
}

Authentication

Basic Authentication using Login ID and Password.

Authorization

Permissions apply in the following manner.
*With the Administrator (12) permission, a user can modify any OAuth application object across the system.
*With the MgmtAPI (11) and OAuth (28) permissions, a user in the system tenant can modify an OAuth application object in the system tenant and in any tenants for which he or she has administrative access.
*With the MgmtAPI (11) and OAuth (28) permissions, a user in a child tenant can only modify an OAuth application object in the tenant in which he or she resides.