This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_migration_api_version(): | |
''' | |
Get the latest migration api version | |
Input: None | |
Output: migration api version | |
''' | |
try: | |
response = requests.get(migration_url,auth=HTTPBasicAuth(uname,password),headers = headers) | |
if response.status_code == 200: | |
version_data = json.loads(response.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_planning_api_version(): | |
''' | |
Get the latest planning api version | |
Input: None | |
Output: planning api version | |
''' | |
try: | |
response = requests.get(planning_url,auth=HTTPBasicAuth(uname,password),headers = headers) | |
if response.status_code == 200: | |
version_data = json.loads(response.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_application_details(): | |
''' | |
Get the Application Name from the instance | |
Input: None | |
Output: application name | |
''' | |
try: | |
response = requests.get(rest_end_point,auth=HTTPBasicAuth(uname,password),headers = headers) | |
if response.status_code == 200: | |
json_data = json.loads(response.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2"> | |
<soapenv:Body> | |
<v2:runReport> | |
<v2:reportRequest> | |
<v2:attributeLocale>en-US</v2:attributeLocale> | |
<v2:flattenXML>false</v2:flattenXML> | |
<v2:reportAbsolutePath>/Custom/Integrations/EPM/HCM/Report/Position Details Report.xdo</v2:reportAbsolutePath> | |
<v2:sizeOfDataChunkDownload>-1</v2:sizeOfDataChunkDownload> | |
</v2:reportRequest> | |
<v2:userID>araj</v2:userID> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[xml]$hcmdata = Get-Content output.xml | |
$sEncodedString = $hcmdata.Envelope.Body.runReportResponse.runReportReturn.reportBytes | |
$sDecodedString=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($sEncodedString)) | |
$sDecodedString | Out-File Positions.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Net.ServicePointManager]::SecurityProtocol = "tls12" | |
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
$headers.Add('SOAPAction','') | |
Invoke-WebRequest https://<url to oracle cloud>.oraclecloud.com/xmlpserver/services/v2/ReportService?wsdl ` | |
-Method Post -ContentType "text/xml;charset=utf-8" -Headers $headers ` | |
-InFile request.xml -OutFile output.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Read user name , password and wsdl endpoint | |
$loginData = Get-Content -Raw -Path 'loginDetails.json' | ConvertFrom-Json | |
#Encrypt the username and password | |
$pair="$($loginData.biuser):$($loginData.bipwd)" | |
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair)) | |
$basicAuthValue = "Basic $encodedCreds" | |
#Create the header for Web Service Request | |
[Net.ServicePointManager]::SecurityProtocol = "tls12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Invoke BI Report | |
Invoke-WebRequest $loginData.wsdl ` | |
-Method Post -ContentType "application/soap+xml;charset=utf-8" ` | |
-Headers $headers -InFile EPM_Account_Hierarchy.xml -OutFile output.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Decode and Generate CSV File | |
[xml]$report = Get-Content output.xml | |
$EncodedString = $report.Envelope.Body.runReportResponse.runReportReturn.reportBytes | |
$DecodedString = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($EncodedString)) | |
$DecodedString | Out-File "temp.txt" | |
Import-CSV "temp.txt" -delimiter "," | Export-CSV EPM_Account_Metadata.csv -NoType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pub="http://xmlns.oracle.com/oxp/service/PublicReportService"> | |
<soap:Header/> | |
<soap:Body> | |
<pub:runReport> | |
<pub:reportRequest> | |
<pub:parameterNameValues> | |
<pub:item> | |
<pub:name>P_VERSION_NAME</pub:name> | |
<pub:values> | |
<pub:item>ACCOUNT_V1</pub:item> |
OlderNewer