Create an OAuth profile
- Last Updated: April 11, 2025
- 1 minute read
- Hybrid Data Pipeline
- Version 4.6
- Documentation
Purpose
Creates an OAuth profile that can be associated with a data source.
URL
https://<myserver>:<port>/api/mgmt/oauthprofiles
Method
POST
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.
Request Payload Parameters
The request takes the following format.
{
"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 Success Response
Status code: 201
Successful response
{
"id": 33,
"name": "User_1",
"oauthAppId": 17,
"description": "OAuth profile 1",
"accessToken": "111c334445e55",
"refreshToken": "222d88899966fa"
}
Sample Server Failure Response
{
"error": {
"code": "222207710",
"message": {
"lang": "en-US",
"value": "Invalid OAuthProfileId: 1"
}
}
}
Authentication
Basic Authentication using Login ID and Password.
Authorization
The user must have the MgmtAPI (11) and CreateDataSource (1) permissions.