Purpose

Updates an OAuth profile. Users can only edit OAuth profiles they own or have created.

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/oauthprofiles/{id}

Method

PUT

URL parameters

<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a non-load balancer deployment, or the machine hosting the load balancer for a load balancer deployment. For a non-load balancer deployment, <port> is the port number specified as the Server Access Port during deployment. For a load balancer deployment, <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} is required.

Parameter Description Valid Values
{id} The ID of the OAuth profile. The automatically generated OAuth profile ID.

Request Definition


{
  "name": "oauth_profile_name",
  "oauthAppId": oauth_application_id,
  "description": "oauth_profile_description",
  "accessToken": "access_token",
  "refreshToken": "refresh_token"
}
Parameter Description Usage Valid Values
"name" The name of the OAuth profile. Required The name can contain only alphanumeric characters and the underscore character.
"oauthAppId" The ID of the OAuth application object. Required The automatically generated OAuth application ID.
"description" A description of the OAuth profile. Optional A description provided by the user.
"accessToken" The access token includes the credential information required to gain access to the data store API. Optional A valid access token.
"refreshToken" The refresh token is used to generate new access tokens. Required A valid refresh token.

Sample Request Payload

{
  "name": "User_1",
  "oauthAppId": 17,
  "description": "OAuth profile 1",
  "accessToken": "111c334445e55",
  "refreshToken": "222d88899966fa"
}

Sample Server Response


  Status code: 200
  Successful response
            
{
  "id": 33,
  "name": "User_1",
  "oauthAppId": 17,
  "description": "OAuth profile 1",
  "accessToken": "111c334445e55",
  "refreshToken": "222d88899966fa"
}

Authentication

Basic Authentication using Login ID and Password.

Authorization

The user must have the MgmtAPI (11) and ModifyDataSource (3) permissions.