Epm Rest API
Epm Rest API
E96323-97
Oracle Fusion Cloud EPM REST APIs for Oracle Fusion Cloud EPM,
E96323-97
This software and related documentation are provided under a license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or
allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit,
perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation
of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find
any errors, please report them to us in writing.
If this is software, software documentation, data (as defined in the Federal Acquisition Regulation), or related
documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then
the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any
programs embedded, installed, or activated on delivered hardware, and modifications of such programs) and Oracle
computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial
computer software," "commercial computer software documentation," or "limited rights data" pursuant to the applicable
Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction,
duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle
programs (including any operating system, integrated software, any programs embedded, installed, or activated on
delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle
data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms
governing the U.S. Government's use of Oracle cloud services are defined by the applicable contract for such services.
No other rights are granted to the U.S. Government.
This software or hardware is developed for general use in a variety of information management applications. It is not
developed or intended for use in any inherently dangerous applications, including applications that may create a risk of
personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all
appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its
affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle®, Java, MySQL, and NetSuite are registered trademarks of Oracle and/or its affiliates. Other names may be
trademarks of their respective owners.
Intel and Intel Inside are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used
under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Epyc, and the AMD logo
are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open
Group.
This software or hardware and documentation may provide access to or information about content, products, and
services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an
applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss,
costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth
in an applicable agreement between you and Oracle.
Contents
Documentation Accessibility
Documentation Feedback
iii
Scenario 7: Cloning an Instance 5-6
Scenario 8: Sample Starter Kit for Consultants - Business Intelligence Cloud Integration 5-6
Scenario 9: Using Groovy Business Rules to Call REST APIs from Oracle and Other
Companies 5-7
iv
Export Audit 8-48
Export Job Console 8-52
Sort Members 8-59
Import Exchange Rates 8-61
Auto Predict 8-62
Import Cell-Level Security 8-64
Export Cell-Level Security 8-67
Import Valid Intersections 8-69
Export Valid Intersections 8-72
Execute a Report Bursting Definition 8-74
Export Library Documents 8-75
Delete Library Documents 8-81
Configure the Oracle Guided Learning (OGL) Server 8-84
Execute Job Code Samples 8-85
Retrieve Job Status 8-87
Retrieve Job Status Details 8-89
Retrieve Child Job Status Details 8-92
List Library Documents 8-94
Working with Members 8-98
Add Member 8-98
Get Member 8-100
Get Applications 8-101
Manage Planning Units 8-104
List All Planning Units 8-105
Get Planning Unit History and Annotations 8-108
Get a Planning Unit Owner Photo 8-111
Get Planning Unit Promotional Path 8-112
Get Available Planning Unit Actions 8-113
Get Filters with All Possible Values 8-115
Change Planning Unit Status 8-117
Get User Preferences 8-118
Working with Data Slices 8-120
Import Data Slices 8-120
Export Data Slices 8-127
Clear Data Slices 8-137
Getting and Setting Substitution Variables 8-141
Get All Substitution Variables Defined for the Application 8-142
Get a Substitution Variable Defined for the Application 8-144
Create or Update All Substitution Variables Defined for the Application 8-145
Get Substitution Variables Defined at the Plan Type Level 8-146
Get Derived Substitution Variables at the Plan Type Level 8-147
Get a Substitution Variable Defined at the Plan Type Level 8-149
v
Get a Derived Substitution Variable Defined at the Plan Type Level 8-150
Create and Update Substitution Variables at the Plan Type Level 8-151
Deleting Substitution Variables 8-152
Delete a Substitution Variable at the Plan Type Level 8-153
Delete a Substitution Variable for the Application 8-154
Delete Substitution Variables at the Plan Type Level 8-155
Delete Substitution Variables for the Application 8-156
Getting and Setting User Variable Values 8-158
Get User Variable Values Defined for the Application 8-158
Get User Variable Values Defined in the Application by the User Variable Name 8-160
Get User Variable Values Defined in the Application by Value 8-162
Get User Variable Values Defined for the Application by the User Name 8-163
Get User Variable Values Defined in the Appplication by the User Name and Value 8-165
Set the User Variable Values for the Application 8-167
Working with Connections 8-168
View a Connection 8-169
View All Connections 8-170
Update a Connection 8-173
vi
Get Idle Session Timeout 9-57
Set Idle Session Timeout 9-59
Restart the Service Instance (v1) 9-60
Restart the Service Instance (v2) 9-64
Run Recreate on a Service (11.1.2.3.600) 9-78
Run Recreate on a Service (v2) 9-83
Manage Application Snapshots 9-99
Get Information About All Application Snapshots 9-100
Get Information About a Specific Application Snapshot 9-101
Upload Application Snapshot (v1) 9-106
Upload Application Snapshot (v2) 9-109
Download Application Snapshot (v1) 9-113
Download Application Snapshot (v2) 9-124
Copy Application Snapshot (v1) 9-128
Copy Application Snapshot (v2) 9-133
Rename Application Snapshot (v1) 9-136
Rename Application Snapshot (v2) 9-137
Copy to and from the Object Store 9-139
Copy from Object Store (v1) 9-140
Copy from Object Store (v2) 9-142
Copy to Object Store (v1) 9-146
Copy to Object Store (v2) 9-150
Copy to and from SFTP 9-154
Copy to SFTP 9-154
Copy from SFTP 9-157
Working with Essbase 9-159
Export Essbase Data (v2) 9-160
Essbase Block Analysis Report 9-162
Get Essbase Query Governor Execution Time 9-164
Set Essbase Query Governor Execution Time 9-166
Copy a File Between Instances (v1) 9-167
Copy a File Between Instances (v2) 9-169
Clone an Environment 9-172
Provide Feedback (v11.1.2.3.600) 9-178
Provide Feedback (v2) 9-181
Send Email (v1) 9-182
Send Email (v2) 9-185
Skip Updates (v1) 9-188
Skip Updates (v2) 9-190
List or Restore Backups 9-192
List Backups 9-192
vii
Restore Backups 9-194
viii
List Users 12-64
Update Users 12-69
Add a User to a Batch of Groups 12-73
Remove a User from a Batch of Groups 12-79
Add Groups (v1) 12-84
Add Groups (v2) 12-88
List Groups 12-91
Remove Groups (v1) 12-97
Remove Groups (v2) 12-102
User Group Report (v1) 12-105
User Group Report (v2) 12-109
User Access Report (v1) 12-116
User Access Report (v2) 12-120
User Audit Report (v1) 12-123
User Audit Report (v2) 12-127
User Login Report 12-130
Role Assignment Report (v1) 12-133
Role Assignment Report for Users (v2) 12-138
Role Assignment Report for Groups (v2) 12-145
Get Available Roles 12-151
Role Assignment Audit Report 12-155
Invalid Login Report 12-160
Group Assignment Audit Report 12-165
Adding Users to a Team for Account Reconciliation 12-170
Adding Users to a Team for Financial Consolidation and Close and Tax Reporting 12-172
Removing Users from a Team for Account Reconciliation 12-175
Removing Users from a Team for Financial Consolidation and Close and Tax Reporting 12-178
ix
15 Data Integration REST APIs
URL Structure for Data Integration 15-1
Getting API Versions for Data Integration APIs 15-1
Get API Versions for Data Integration APIs 15-2
Get Information about a Specific API Version for Data Integration APIs 15-3
Lock and Unlock POV 15-4
Running Integrations 15-10
Running a Pipeline 15-22
Import Data Mapping 15-25
Export Data Mapping 15-28
Export Data Integration 15-30
Import Data Integration 15-32
Retrieve Job Status 15-34
x
Import Attribute Values 17-23
Monitor Reconciliations (Reconciliation Compliance) 17-25
Import Reconciliation Attributes (Reconciliation Compliance) 17-27
Run Auto Match (Transaction Matching) 17-30
Run Auto Alert (Transaction Matching) 17-31
Purge Transactions (Transaction Matching) 17-33
Retrieve Job Status (Reconciliation Compliance) 17-36
Retrieve Job Status (Transaction Matching) 17-37
Export Application Properties 17-40
Import Application Properties 17-43
Export Background Image 17-44
Import Background Image 17-46
Export Logo Image 17-48
Import Logo Image 17-49
Working with Connections in Account Reconciliation 17-51
Create a Connection 17-51
View All Connections 17-53
Update a Connection 17-54
Delete a Connection 17-56
Set Application Access Level 17-57
Retrieve Application Access Level 17-58
View Reconciliation Comments 17-59
Archive Matched Transactions (Transaction Matching) 17-61
Purge Archived Transactions (Transaction Matching) 17-62
Unmatch Matched Transactions (Transaction Matching) 17-64
Unmatch Transactions Matched by Auto Match (Transaction Matching) 17-66
Update Unmatched Transactions (Transaction Matching) 17-67
xi
Export Configurable Consolidation Rulesets 18-22
Import Configurable Consolidation Rulesets 18-23
Generate an Intercompany Matching Report 18-25
xii
Clear Data 22-4
xiii
26 Enterprise Data Management Cloud REST APIs
xiv
Groovy Sample – PBCSBICSIntegration.groovy H-10
Groovy Sample – PbcsRestClient.groovy H-13
Groovy Sample – PbcsRestClient.groovy H-23
Groovy Sample – BicsRestClient.groovy H-34
Groovy Sample – ApexRestClient.groovy H-46
Troubleshooting the Integration H-56
xv
Documentation Accessibility
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility
Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers that have purchased support have access to electronic support through My
Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
xvi
Documentation Feedback
To provide feedback on this documentation, click the feedback button at the bottom of the page
in any Oracle Help Center topic. You can also send email to epmdoc_ww@oracle.com.
xvii
1
Creating and Running an EPM Center of
Excellence
A best practice for EPM is to create a CoE (Center of Excellence).
An EPM CoE is a unified effort to ensure adoption and best practices. It drives transformation
in business processes related to performance management and the use of technology-enabled
solutions.
Cloud adoption can empower your organization to improve business agility and promote
innovative solutions. An EPM CoE oversees your cloud initiative, and it can help protect and
maintain your investment and promote effective use.
The EPM CoE team:
• Ensures cloud adoption, helping your organization get the most out of your Oracle Fusion
Cloud EPM investment
• Serves as a steering committee for best practices
• Leads EPM-related change management initiatives and drives transformation
All customers can benefit from an EPM CoE, including customers who have already
implemented EPM.
Learn More
• Watch the Cloud Customer Connect webinar: Creating and Running a Center of
Excellence (CoE) for Cloud EPM
• Watch the videos: Overview: EPM Center of Excellence and Creating a Center of
Excellence.
• See the business benefits and value proposition of an EPM CoE in Creating and Running
an EPM Center of Excellence.
1-1
Chapter 1
1-2
2
Implementation Best Practices for Cloud EPM
REST APIs
Use the implementation best practices listed in this topic when working with the REST APIs.
Best practices:
• Before using the REST APIs, complete the prerequisites.
• Use the correct authentication, as described in OAuth 2 and Basic Authentication for Cloud
EPM REST APIs.
• Understand the URL structure.
• Know how to get the current REST API version.
• Review the sample scenarios to get started quickly.
• Be aware of REST API compatibility.
• Use the Quick Reference to find all of the Oracle Fusion Cloud Enterprise Performance
Management REST APIs at a glance.
Troubleshooting
For help with troubleshooting REST API issues, see Diagnosing REST API Issues.
2-1
3
About the REST APIs for Cloud EPM
Review these topics to learn about the REST APIs and understand important prerequisites and
authentication.
Overview of the REST APIs:
• About REST APIs
• Implementation Best Practices for Cloud EPM REST APIs
• Cloud EPM REST API Compatibility
• About the Samples
• Audience
• Prerequisites
• OAuth 2 and Basic Authentication for Cloud EPM REST APIs
3-1
Chapter 3
Cloud EPM REST API Compatibility
EPM Platform
3-2
Chapter 3
Cloud EPM REST API Compatibility
Table 3-2 Planning, FreeForm, Strategic Workforce Planning, and Sales Planning
3-3
Chapter 3
Cloud EPM REST API Compatibility
Table 3-2 (Cont.) Planning, FreeForm, Strategic Workforce Planning, and Sales
Planning
Migration
3-4
Chapter 3
Cloud EPM REST API Compatibility
3-5
Chapter 3
Cloud EPM REST API Compatibility
Security
3-6
Chapter 3
Cloud EPM REST API Compatibility
3-7
Chapter 3
Cloud EPM REST API Compatibility
Usage Simulation
Reporting
3-8
Chapter 3
Cloud EPM REST API Compatibility
Data Integration
Data Management
3-9
Chapter 3
Cloud EPM REST API Compatibility
Account Reconciliation
3-10
Chapter 3
Cloud EPM REST API Compatibility
3-11
Chapter 3
Cloud EPM REST API Compatibility
Task Manager
3-12
Chapter 3
Cloud EPM REST API Compatibility
Enterprise Journals
Tax Reporting
3-13
Chapter 3
Cloud EPM REST API Compatibility
3-14
Chapter 3
About the Samples
Audience
This guide is intended primarily as a tool for infrastructure consultants and administrators of
Oracle Fusion Cloud EPM.
Infrastructure consultants can use the documentation to build custom integration to provide
basic and innovative services on top of these cloud services, including Planning, Planning
Modules, Account Reconciliation, and Profitability and Cost Management.
Service administrators use this documentation to perform selected administrative tasks using
REST APIs and EPM Automate. Completing administrative tasks using EPM Automate and
REST APIs as an alternative to using the user interface requires considerable technical and
functional expertise. Only technically competent administrators should use this guide to
perform these administrative tasks.
Prerequisites
Prerequisites to using the REST APIs and the EPM Automate Utility include the following:
• Access as a valid user to the cloud service with prerequisites set up for the service. See
Getting Started for Administrators and Getting Started for Users.
• Technical and functional knowledge to understand and execute the EPM Automate Utility
and REST APIs, and to administer the product.
• Knowledge of Java, cURL, Groovy, and REST programming.
• Jobs are required for many EPM Automate utility commands and REST APIs. Jobs are
actions, such as importing or exporting data that can be started immediately or scheduled
for a later time; for example, importing or exporting data. Be sure that you understand how
to use jobs as described in Managing Jobs.
• Data load rules define how Data Management loads data from a file. You must have
predefined data load rules to load data using REST APIs and EPM Automate Utility. You
can also load data using batches defined in Data Management. Using a batch, Service
Administrators can combine many load rules in a batch and execute them in serial or
parallel mode.
3-15
Chapter 3
URL Structure
• Business rules are required for some jobs. For example for Planning, you use Calculation
Manager to create business rules, which are then deployed into a Planning application.
Learn about business rules in Designing with Calculation Manager
URL Structure
This topic summarizes the URL structures to use for the REST APIs.
For the URL structure to use, see the topic for the REST API:
• Planning and Budgeting REST API URL
• Migration REST API URL
• URL Structure for Security
• URL Structure for Daily Maintenance
• URL Structure for Users, Groups, and Roles
• Data Management REST API URL
• Account Reconciliation REST API URL
• Enterprise Profitability and Cost Management REST API URL
• URL Structure for Financial Consolidation and Close
• Profitability and Cost Management REST API URL
• URL Structure for Tax Reporting
In the description and examples of all REST APIs, this guide uses <BASE-URL>. The <BASE-
URL> is the first part of your service URL, before the context. For example, if your service URL
is https://epm-acme.epm.us-phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is
https://epm-acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is
https://epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
For details on the URL structure, see Getting Started for Administrators.
3-16
4
OAuth 2 and Basic Authentication for Cloud
EPM REST APIs
All HTTP requests to the REST APIs require authentication. Review these topics to understand
OAuth 2 and basic authentication for Cloud EPM REST APIs.
The REST APIs for Cloud EPM support authentication with OAuth 2 and basic authentication:
• Authentication with OAuth 2
• Basic Authentication
Oracle Fusion Cloud EPM REST APIs can connect to Cloud EPM through API Gateways, such
as Google APIGEE, IBM Data Power, and other reverse proxy servers.
For this to work, configure the gateway or reverse proxy by setting the target as the URL of
your Cloud EPM environment without any context such as /epmcloud. Example: https://epm-
idDomain.epm.dataCenterRegion.oraclecloud.com. Then, use the reverse proxy URL instead
of the Cloud EPM URL in the REST API. For configuration information, see the documentation
of your gateway or proxy server.
While configuring the proxy settings, be sure to pass the response code from Cloud EPM to
Cloud EPM REST API without modifying it in any manner to allow REST API processing code
to correctly process response codes such as 200, 206, 400, 404, 500, 501, and so on. For
example, for IBM Datapower, set proxy HTTP Response to ON. Additionally, the API gateway
should allow HTTP methods (GET, POST, PUT, PATCH, and DELETE).
Note that REST APIs cannot be run by users who are set up for basic authentication with multi-
factor authentication (MFA).
4-1
Chapter 4
Authentication with OAuth 2
Do not copy code samples from the PDF version of this document. To avoid line breaks and
footer information that will render code unusable, Oracle recommends that you copy code
samples from the HTML version of the examples in this guide.
The following sections provide detailed information about each step.
Detailed Information for Using Oracle Cloud Console to Register an OAuth 2 Client
1. Log in to your account at https://cloud.oracle.com/
2. Click the hamburger menu on the top left and choose Identity and Security and then click
Domains on the dialog box.
4-2
Chapter 4
Authentication with OAuth 2
13. Note the Client ID value in the General Information section of the OAuth Configuration.
The IDCS Administrator provides the IDCS URL and client ID to the Cloud EPM Service
Administrator.
Windows Powershell
4-3
Chapter 4
Authentication with OAuth 2
Here, the value of tenant-base-url is the IDCS URL provided by the Domain
Administrator or the Domain URL from the IAM console. It is of the form idcs-
<alphanumericvalue>.identity.oraclecloud.com. Similarly, the value for the CLIENT ID
OF THE OAUTH2 APPLICATION is also provided by the Domain Administrator or retrieved
from the Application's General Information section in IAM. It is an alphanumeric value.
A valid response contains a device code, user code, and verification URI:
{
"expires_in": 300,
"device_code": "4d03f7bc-f7a5-4795-819a-5748c4801d35",
"user_code": "SDFGHJKL",
"verification_uri": "https://tenant-base-url/ui/v1/device"
}
The user_code from the response is needed in the second step below, while device_code
from the response is needed in the third step below.
Note: Steps 2 and 3 are time-sensitive because the user code and device code expire 300
seconds (5 minutes) after creation. If the codes expire before these steps can be
completed, redo the first step of this section to issue an unauthenticated request to the
IDCS URL to receive a new pair of user and device codes.
2. Open the verification_uri in a supported web browser.
At this stage, it is important to know that if a user already has an active browser session,
the user will not be prompted for re-authentication. If the token is to be generated in
context of the currently signed-in user, then proceed with 2b. However, if the token is to be
generated in the context of a different user, please sign-out of the current session and
navigate to the verification_uri and continue with 2a.
a. When prompted for credentials, authenticate the user who will be invoking the REST
API. These credentials could be credentials for a SAML 2.0 compliant Identity Provider
or a native IDCS credential.
b. When prompted for a code in the browser session, enter the user_code from the
response payload.
c. When the Successful message is displayed, it is recommended to log out of the
browser session and close the browser window.
3. Within 5 minutes of executing the first step of this section and after executing the second
step, issue the following request to the Identity Cloud Service URL:
Linux
4-4
Chapter 4
Authentication with OAuth 2
FIRST STEP>' \
--data-urlencode 'client_id=<CLIENT ID OF THE OAUTH2 APPLICATION>'
Windows Powershell
Here the value of tenant-base-url is the IDCS URL provided by the Domain
Administrator, the device_code value is obtained from the response in Step 1, and
client_id is the same client_id used in the first step of this section.
The response contains the first refresh token:
{
"access_token": "eyJ4NXQjUzI.........evRJChXTRfzn6WlCw",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "AQIDBAWF1.....RVkxNCB7djF9NCA="
}
For EPM Automate, use the encrypt command to create an epw file for OAuth 2.
4-5
Chapter 4
Authentication with OAuth 2
The REST client uses the Refresh Token Grant type to get a new access token and a new
refresh token. As mentioned above, this step can be automated. Once automated, it does not
require user interaction.
To obtain a valid access token with this Grant Type, the REST client issues the following
request to the IDCS URL:
Linux
Windows Powershell
Here, the value of tenant-base-url is the IDCS URL provided by the Domain Administrator,
and the refresh_token and client_id are obtained from the secure store where there were
previously stored.
Note: While the client_id and refresh_token are stored securely, it is important that both
refresh_token and client_id are decrypted to use in any request. All requests to Oracle IDCS
and Cloud EPM are securely transmitted using the https protocol.
Example response:
{
"access_token": "eyJj5M4QjUkI.........abSjZaa86PlseS4lrt7R2",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "AAyyilYBAWD4....FVkxefd8kjoJr6HJPA="
}
The REST client saves the new refresh token for future use (see Secure and Protect the Token
and Client ID) and uses the access token as authorization while invoking the REST API (see
Use the Access Token).
4-6
Chapter 4
Authentication with OAuth 2
For example, to get the Automated Maintenance Window start time, the client application
submits a GET request to this Cloud EPM endpoint /interop/rest/v1/services/
dailymaintenance using the access token in the authorization header.
Linux
Windows Powershell
4-7
Chapter 4
Authentication with OAuth 2
For EPM Automate, create a new epw file using the updated instructions in EPM Automate
Commands, and then save the new refresh token and client id and use it to authorize
access.
How can the expiry time of an access token be modified?
The default expiry time for an access token is 3600 seconds (1 hour).
To request a different expiry time for the access token, you can add
urn:opc:resource:expiry=<seconds> to the value of the scope parameter while requesting
the refresh token.
For example, the following cURL command requests an access token with the default expiry
time of 3600 seconds (1 hour). Note the value of the scope parameter,
urn:opc:idm:__myscopes__ offline_access.
To request an access token with an expiry time of 2 hours (that is, 2 hours x 60 mins/hour x 60
seconds/min = 7200 seconds), use the following value for the scope parameter:
urn:opc:idm:__myscopes__ urn:opc:resource:expiry=7200 offline_access
{ "error": "invalid_grant",
"error_description": "Token is expired for client : <CLIENT_ID>",
"ecid": "UsbMB0KCV00000000"
}
{ "error": "invalid_grant",
"error_description": "The given token in the request is invalid",
4-8
Chapter 4
Authentication with OAuth 2
"ecid": "UsbMB0KCV00000000"
}
{
"error": "invalid_request",
"error_description": "The request contains invalid parameters or values"
}
Invalid grant (for example, using a token that has already been used) :
{
"error": "invalid_grant",
"error_description": "The token has already been consumed"
}
{
"error": "invalid_scope",
"error_description": "Invalid scope"
}
<html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr>
</body>
</html>
{
"error": "invalid_scope",
"error_description": "Invalid scope"
}
4-9
Chapter 4
Basic Authentication
Can a valid token received for one Cloud EPM environment be used to access all Cloud
EPM environments in the same IDCS domain?
The Cloud EPM Service Administrator for an environment provisions each user with predefined
and application roles and specific access for that environment. The same user may be
provisioned with different privileges on different environments in the same IDCS domain. The
functionality that a user is able to perform on any Cloud EPM environment is dependent on the
roles and access the user has on that environment. Thus, a valid, unexpired bearer token
received for one Cloud EPM environment can be used across all Cloud EPM environments in
the same IDCS domain for authentication purposes. However, the authorization of what a
particular user can do on a particular Cloud EPM environment is dependent on the roles the
user has on that environment.
What information is logged in the access log with OAuth?
The access log shows the user name, just as it does with basic authorization. The client ID and
access token are not logged.
When using multiple scripts to run EPM REST APIs, the refresh token grant type seems
to fail randomly with a message that the token is already consumed. What is the
resolution?
Each refresh token is a single use token. After first use, the same token cannot be reused.
Trying to use a particular token after it has already been used results in the message, The
token is already consumed.
The right way is to set up each script with its own refresh token. To do that, execute the
procedure to obtain and save the first refresh token once for each script requiring a refresh
token, and then set up each script to use its own refresh token. All scripts can still use the
same clientID.
Basic Authentication
You can use basic authentication by supplying a username in the format of
identitydomain.username or only username (without identity domain).
HTTP requests to Oracle Fusion Cloud EPM should supply HTTP Basic Authentication
credentials through the Authorization header.
4-10
Chapter 4
Basic Authentication
When using PowerShell to call EPMCloud REST API, ensure that the Authorization header is
always specified. For example:
$headers = @{
"Authorization" = "Basic " +
[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($userNa
me+":"+$userPassword))
}
Invoke-RestMethod -Method 'Get' -Uri $url -Headers $headers
4-11
5
Sample Integration Scenarios
This section provides selected sample scenarios for the REST APIs to help you get started.
Related Topics
• Scenario 1: Import Metadata into Applications
This scenario shows how to use the REST APIs to import metadata into applications.
• Scenario 2: Import Data, Run a Calculation Script, and Copy Data from a Block Storage
Database to an Aggregate Storage Database
This scenario shows how to use the REST APIs to import data, run a calculation script,
and copy data from a block storage database to an aggregate storage database.
• Scenario 3: Export and Download Metadata and Data
This scenario shows how to use the REST APIs to export and download metadata and
data.
• Scenario 4: Remove Unnecessary Files from a Service Instance
This scenario shows how to use the Cloud EPM REST APIs to remove unnecessary files
from a service instance.
• Scenario 5: Archive Backups from the Service to Onpremise
This scenario shows how to use the REST APIs to archive backups from the service to
onpremise.
• Scenario 6: Refreshing the Application
This scenario shows how to use the REST APIs to refresh the application.
• Scenario 7: Cloning an Instance
This scenario shows how to use the REST APIs to clone an instance.
• Scenario 8: Sample Starter Kit for Consultants - Business Intelligence Cloud Integration
This scenario provides a sample starter kit for consultants to integrate with Oracle
Business Intelligence Cloud.
• Scenario 9: Using Groovy Business Rules to Call REST APIs from Oracle and Other
Companies
The scenario shows how to use the Oracle Fusion Cloud Enterprise Performance
Management Groovy object model to call Oracle REST APIs and REST APIs developed by
other companies.
5-1
Chapter 5
Scenario 2: Import Data, Run a Calculation Script, and Copy Data from a Block Storage Database to an Aggregate Storage Database
funcIntegrationScenarioImportMetadataIntoApplication() {
funcUploadFile "DemoApplication_HSS_Vision.zip"
funcExecuteJob "IMPORT_METADATA" "accountMetadata"
"{importZipFileName=accounts.zip}"
funcExecuteJob "CUBE_REFRESH" "cubeRefresh"
}
def integrationScenarioImportMetadataIntoApplication() {
uploadFile("DemoApplication_HSS_Vision.zip")
executeJob("IMPORT_METADATA", "accountMetadata",
"importZipFileName=accounts.zip");
executeJob("CUBE_REFRESH", "cubeRefresh", null);
}
5-2
Chapter 5
Scenario 3: Export and Download Metadata and Data
funcIntegrationScenarioImportDataRunCalcCopyToAso() {
funcUploadFile "data.csv"
funcExecuteJob "IMPORT_DATA" "loadingq1data" "{importFileName=data.csv}"
funcExecuteJob "CUBE_REFRESH","cubeRefresh"
funcExecuteJob "PLAN_TYPE_MAP" "CampaignToReporting" "{clearData=false}"
}
def integrationScenarioImportDataRunCalcCopyToAso() {
uploadFile("data.csv");
executeJob("IMPORT_DATA", "loadingq1data", "importFileName=data.csv");
executeJob("CUBE_REFRESH", "cubeRefresh", null);
executeJob("PLAN_TYPE_MAP", "CampaignToReporting", "clearData=false");
}
funcIntegrationScenarioExportMetadataAndDataAndDownloadFiles() {
funcExecuteJob "EXPORT_METADATA" "exportentitymetadata"
"{exportZipFileName=entitydata.zip}"
funcExecuteJob "EXPORT_DATA" "Forecastdata"
"{exportFileName=forecastdata.zip}"
funcListFiles
funcDownloadFile "entitydata.zip"
funcDownloadFile "forecastdata.zip"
}
5-3
Chapter 5
Scenario 4: Remove Unnecessary Files from a Service Instance
def integrationScenarioExportMetadataAndDataAndDownloadFiles() {
executeJob("EXPORT_METADATA", "exportentitymetadata",
"exportZipFileName=entitydata.zip");
executeJob("EXPORT_DATA", "Forecastdata",
"exportFileName=forecastdata.zip");
listFiles();
downloadFile("entitydata.zip");
downloadFile("forecastdata.zip");
}
funcIntegrationScenarioRemoveUnnecessaryFiles() {
funcListFiles
funcDeleteFile "entitymetadata.csv"
funcDeleteFile "forecastdata.csv"
}
def integrationScenarioRemoveUnnecessaryFiles() {
listFiles();
deleteFile("entitymetadata.csv");
deleteFile("forecastdata.csv");
}
5-4
Chapter 5
Scenario 6: Refreshing the Application
funcIntegrationScenarioExportDataAndDownloadFiles() {
funcExecuteJob "EXPORT_DATA" "entitydata"
"{exportFileName:entitydata.zip}"
funcExecuteJob "EXPORT_DATA" "forecastdata"
"{exportFileName:forecastdata.zip}"
funcListFiles
funcDownloadFile "entitydata.zip"
funcDownloadFile "forecastdata.zip"
}
def integrationScenarioExportDataAndDownloadFiles() {
executeJob("EXPORT_DATA", "entitydata", "exportFileName:entitydata.zip");
executeJob("EXPORT_DATA", "forecastdata",
"exportFileName:forecastdata.zip");
listFiles();
downloadFile("entitydata.zip");
downloadFile("forecastdata.zip");
}
5-5
Chapter 5
Scenario 7: Cloning an Instance
Dependent APIs: See Java Sample — ExecuteJob.java and Java Sample — UploadFile.java
in Upload and Download Files.
Example 5-17 cURL
funcIntegrationScenarioRefreshTheApplication() {
funcUploadFile "accounts.zip"
funcExecuteJob "IMPORT_METADATA" "accountMetadata"
"{importZipFileName:accounts.zip}"
funcExecuteJob "CUBE_REFRESH" "cubeRefresh"
}
def integrationScenarioRefreshTheApplication() {
uploadFile("accounts.zip");
executeJob("IMPORT_METADATA", "accountMetadata",
"importZipFileName:accounts.zip");
executeJob("CUBE_REFRESH", "cubeRefresh", null);
}
Prerequisites
• You have accounts for Business Intelligence Cloud, Planning, and Oracle Application
Express.
• You have considerable technical and functional expertise with Business Intelligence Cloud,
Planning, Oracle Application Express, REST, Groovy, and scripting.
For detailed information, see Sample Starter Kit for Consultants - Integration with Business
Intelligence Cloud Service.
5-6
Chapter 5
Scenario 9: Using Groovy Business Rules to Call REST APIs from Oracle and Other Companies
5-7
6
Quick Reference Table – REST API Resource
View
The REST resources provide powerful APIs that you can use to manage Oracle Fusion Cloud
EPM as an alternative to using the web-based user interface.
These tables summarize the REST resource paths.
• EPM Platform
• Planning, FreeForm, Strategic Workforce Planning, and Sales Planning
• Migration
• Security
• Daily Maintenance Window Time
• Managing Users, Groups, and Roles
• Usage Simulation REST APIs
• Reporting REST APIs
• Data Integration REST APIs
• Data Management REST APIs
• Account Reconciliation
• Financial Consolidation and Close
• Task Manager
• Supplemental Data Manager
• Enterprise Journals
• Tax Reporting
• Enterprise Profitability and Cost Management
• Profitability and Cost Management
EPM Platform
6-1
Chapter 6
Table 6-2 Planning, FreeForm, Strategic Workforce Planning, and Sales Planning
6-2
Chapter 6
Table 6-2 (Cont.) Planning, FreeForm, Strategic Workforce Planning, and Sales
Planning
6-3
Chapter 6
Table 6-2 (Cont.) Planning, FreeForm, Strategic Workforce Planning, and Sales
Planning
Migration
6-4
Chapter 6
6-5
Chapter 6
6-6
Chapter 6
Security
6-7
Chapter 6
6-8
Chapter 6
6-9
Chapter 6
Usage Simulation
Reporting
6-10
Chapter 6
Account Reconciliation
6-11
Chapter 6
6-12
Chapter 6
6-13
Chapter 6
Task Manager
6-14
Chapter 6
Enterprise Journals
Tax Reporting
6-15
Chapter 6
6-16
Chapter 6
6-17
7
REST Resources and Methods
This section describes the REST APIs for Oracle Fusion Cloud EPM.
Completing administrative tasks using REST APIs as an alternative to using the user interface
requires considerable technical and functional expertise. Only technically competent Oracle
Fusion Cloud Enterprise Performance Management Administrators should use this guide to
perform Cloud EPM administrative tasks. For prerequisites to using these REST APIs, see
Prerequisites.
The predefined and application roles assigned to the user of the REST API determine which
APIs can be executed.
Encoding Required for Space Character in the Value of Path or Query Parameter
If there is a space in the value of a parameter that is specified in the URL itself (that is, it is a
path or query parameter), this space must be encoded with %20.
Examples:
GET /interop/rest/security/v2/report/roleassignmentreport/user?
userlogin=admin1&rolename=Service%20Administrator
GET /interop/rest/security/v2/report/roleassignmentreport/group?
groupname=Planning%20Analysts&rolename=Service%20Administrator
7-1
Chapter 7
REST API Methods
REST describes any simple interface that transmits data over a standardized interface (such
as HTTP) without an additional messaging layer, such as SOAP. REST provides a set of
design rules for creating stateless services that are viewed as resources, or sources of specific
information, and can be identified by their unique URIs. RESTful web services are services that
are built according to REST principles and, as such, are designed to work well on the web.
Typically, RESTful web services are built on the HTTP protocol and implement operations that
map to the common HTTP methods, such as GET, POST, PUT, and DELETE to retrieve,
create, update, and delete resources, respectively.
Method Description
GET Retrieve information about the REST API resource
POST Create a REST API resource
PUT Update a REST API resource
DELETE Delete a REST API resource or related component
Error Handling
All REST APIs return JSON output appropriate for the API invoked. HTTP Status codes other
than 200 are used as appropriate to indicate various failures, along with JSON for detailed
error messages.
Versioning
The REST API web services are versioned at the API level and expect the version to be
included in the URL as shown here. An error will occur if the API version is missing or the
provided version is not supported by the API.
For each service's API, you can get version and details for a specific REST API version. For
details, see the service's API topics or Current REST API Version.
Important: The version number is case-sensitive. For example, if the version number is listed
as v1 with a lowercase v, you cannot enter the version number with a capital V as in this
incorrect example, V1, which would result in an error. Instead, you must enter the version
number with a lowercase v as in this correct example: v1.
Examples:
https://https://<BASE-URL>/HyperionPlanning/rest/{api_version}/applications/
{applicationName}/jobs
https://https://<BASE-URL>/interop/rest/{api_version}/applicationsnapshots
7-2
Chapter 7
Current REST API Version
where {api_version} is the current REST API version for the product, for example, v3 for
Planning.
Status Codes
When you call any of the REST APIs, one of the following standard HTTP status codes is
returned in the response header.
7-3
Chapter 7
Status Codes
7-4
8
Planning REST APIs
Use the Planning REST APIs to get the REST API version, manage and execute jobs, and
work with members, applications, planning units, user preferences, data slices, substitution
variables, and user variables.
Note:
You can also use these APIs with FreeForm.
These REST APIs are available for Planning. They are also available for FreeForm, as shown
in Cloud EPM REST API Compatibility.
• URL Structure for Planning
• Resources and Available Actions
• Getting API Versions for Planning
• Manage Jobs
• List Library Documents
• Working with Members
• Get Applications
• Manage Planning Units
• Get User Preferences
• Working with Data Slices
• Getting and Setting Substitution Variables
• Deleting Substitution Variables
• Getting and Setting User Variable Values
• Working with Connections
Before you work with the REST APIs, be sure you are familiar with the Implementation Best
Practices for Cloud EPM REST APIs.
Note: We have removed the following fields from the exception response in REST APIs for
Planning and Planning Modules:
• message
• localizedMessage
8-1
Chapter 8
URL Structure for Planning
https://<BASE-URL>/HyperionPlanning/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for
Planning is v3.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
Name Description
links Describes links to other resources and actions applicable on the
current resource
rel Relationship type; the relationship between the current state and the
state to which the client will transition
href The target resource's URI. If the value of rel is "self", this URI is how
the resource is accessed currently
action The HTTP method. For POST, data indicates the parameters and
values with which it was invoked
8-2
Chapter 8
Getting API Versions for Planning
Before using the REST resources, you must understand how to access the REST resources
and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs.
Using this REST API requires prerequisites. See Prerequisites.
Note:
An API version is always supported even when deprecated.
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
GET /HyperionPlanning/rest/
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
8-3
Chapter 8
Getting API Versions for Planning
Name Description
items Version of the API you are developing with
version The version, such as v3
lifecycle Possible values: active, deprecated
isLatest Whether this resource is the latest, true or false
{
"items": [{
"version": "v1",
"lifecycle": "deprecated",
"isLatest": false,
"links": [{
"rel": "canonical",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v1"
}, {
"rel": "successor-version",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v2"
}]
}, {
"version": "v2",
"lifecycle": "deprecated",
"isLatest": false,
"links": [{
"rel": "canonical",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v2"
}, {
"rel": "predecessor-version",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v1"
}, {
"rel": "successor-version",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3"
}]
}, {
"version": "v3",
"lifecycle": "active",
"isLatest": true,
"links": [{
"rel": "canonical",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3"
}, {
"rel": "predecessor-version",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v2"
}]
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/"
8-4
Chapter 8
Getting API Versions for Planning
}, {
"rel": "canonical",
"href": "https://<BASE-URL>/HyperionPlanning/rest/"
}, {
"rel": "current",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3"
}]
}
REST Resource
GET /HyperionPlanning/rest/{api_version}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Response Body
Supported Media Types: application/json
Parameters
The following table summarizes the response parameters.
Attribute Description
version The version, such as v3
lifecycle Lifecycle of the resource, active or deprecated
isLatest Whether this resource is the latest, true or false
8-5
Chapter 8
Manage Jobs
{
"version": "v3",
"lifecycle": "active",
"isLatest": true,
"links": [{
"rel": "canonical",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3"
}, {
"rel": "predecessor-version",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v2"
}]
}
Manage Jobs
You can manage jobs using a set of REST resources, as summarized here.
Before using the REST resources, you must understand how to access the REST resources
and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
For additional details, see Job Types.
Jobs:
• Get Job Definitions
• Execute a Job
• Retrieve Job Status
• Retrieve Job Status Details
• Rules
• Ruleset
• Plan Type Map
• Import Data
• Export Data
• Export Metadata
• Import Metadata
• Cube Refresh
• Clear Cube
• Administration Mode
• Compact Cube
• Restructure Cube
• Merge Data Slices
8-6
Chapter 8
Manage Jobs
• Optimize Aggregation
• Import Security
• Export Security
• Export Audit
• Export Job Console
• Sort Members
• Import Exchange Rates
• Auto Predict
• Import Cell-Level Security
• Export Cell-Level Security
• Import Valid Intersections
• Export Valid Intersections
• Execute a Report Bursting Definition
• Export Library Documents
• Import Library Documents
• Delete Library Documents
• Configure the Oracle Guided Learning (OGL) Server
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
jobdefinitions
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
8-7
Chapter 8
Manage Jobs
Example URLs
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/jobdefinitions
Response
Supported Media Types: application/json
Parameters
8-8
Chapter 8
Manage Jobs
Name Description
items Collection of job definitions
jobType Job type, such as RULESET.
For a list of supported jobs, see the list of jobs in the previous
table.
jobName The exact name of the job, such as Financial Statements -
Forecast.
type Application type
{
"items": [{
"jobType": "RULESET",
"jobName": "Financial Statements - Forecast",
"links": null
}, {
"jobType": "RULESET",
"jobName": "Financial Statements - Plan",
"links": null
}, {
"jobType": "RULESET",
"jobName": "Revenue Forecast",
"links": null
}, {
"jobType": "RULESET",
"jobName": "Revenue Plan",
"links": null
}, {
"jobType": "RULESET",
"jobName": "RS 60 RTP vars test2",
"links": null
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
vision/jobdefinitions?q=%7BjobType:RULESET%7D",
"action": "GET"
}],
}
Execute a Job
Use this resource to execute several jobs simultaneously by providing the job name and type.
The job is expected to be defined in Planning with all the required parameters saved with the
8-9
Chapter 8
Manage Jobs
job definition. For some job types, the parameters can be either provided or overwritten at
runtime.
This topic describes general information for executing a job. Details for each job type are
described in separate topics for individual jobs.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
For additional details, see Job Types.
Before using the REST resources, you must understand how to access the REST resources
and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs.
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Request
Supported Media Types: application/json
Parameters
This table summarizes the request parameters that are generic to all jobs. The following tables
describe parameters specific to individual jobs.
Note that all parameter names and values are case sensitive.
Response
Supported Media Types: application/json
Parameters
This table summarizes the response parameters that are generic to all jobs. The following
topics describe parameters specific to individual jobs:
• Rules
• Ruleset
• Plan Type Map
• Import Data
• Export Data
8-10
Chapter 8
Manage Jobs
• Export Metadata
• Import Metadata
• Cube Refresh
• Clear Cube
• Administration Mode
• Compact Cube
• Restructure Cube
• Merge Data Slices
• Optimize Aggregation
• Import Security
• Export Security
• Export Audit
• Export Job Console
• Sort Members
• Import Exchange Rates
• Auto Predict
• Import Cell-Level Security
• Export Cell-Level Security
• Import Valid Intersections
• Export Valid Intersections
• Execute a Report Bursting Definition
• Export Library Documents
• Import Library Documents
• Delete Library Documents
• Configure the Oracle Guided Learning (OGL) Server
Name Description
status Status of the job: -1 = in progress; 0 = success; 1 =
error; 2 = cancel pending; 3 = cancelled; 4 = invalid
parameter; Integer.MAX_VALUE = unknown
details Details about the job status, such as "Metadata
import was successful" for metadata import
jobID The ID of the job, such as 145
jobName The name of the job, such as Refresh Database.
descriptiveStatus The status of the job, such as Completed or Error
8-11
Chapter 8
Manage Jobs
Rules
Use this REST API to launch a business rule.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator, Power User (if Rule Launch access is granted)
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For
parameters that are common to all jobs, see Execute a Job.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
{
"jobType":"Rules",
"jobName":"Operating Expense Adj Plan",
"parameters":
{
"MyScenario1":"Current",
"MyVersion1":"BU Version_1",
8-12
Chapter 8
Manage Jobs
"ToEntity":"CA",
"Rule_Level_Var":"AZ",
"planType":"Plan1"
}
}
Ruleset
Launches a business ruleset.
Supports rulesets with no runtime prompts or runtime prompts with default values. You can add
parameters to rulesets for greater flexibility. Use the sample rulesets and POST requests below
to help you quickly understand different scenarios when running this job. For details about
rulesets, see Designing Business Rulesets.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
For information about creating rulesets, see Designing with Calculation Manager.
Required Roles
Service Administrator, Power User (if Rule Launch access is granted)
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
{
"jobType":"Ruleset",
"jobName":"Calculate Plan Operating Expenses"
}
8-13
Chapter 8
Manage Jobs
{
"jobType":"Ruleset",
"jobName":"Revenue Plan",
"parameters":
{
"Version":"Worst Case",
"Department":"No Entity"
}
}
Example 2: Ruleset "Revenue Plan" when variables are not merged and not hidden
Sample Ruleset in Calculation Manager
8-14
Chapter 8
Manage Jobs
{
"jobType":"Ruleset",
"jobName":"Revenue Plan",
"parameters":
{
"Copy Channel.Department":"No Entity",
"Copy Channel.Version":"Worst Case",
Example 3: Ruleset "Calculate Plan Operating Expenses" with nested ruleset ("Revenue
Plan") and variables are merged and not hidden
Sample Ruleset in Calculation Manager
8-15
Chapter 8
Manage Jobs
{
"jobType":"Ruleset",
"jobName":"Calulate Plan Operating Expenses",
"parameters":
{
"Department":"Unspecified Entity",
"Version":"Most Likely"
}
}
Example 4: Ruleset "Calculate Plan Operating Expenses" with a nested ruleset ("Revenue
Plan") and variables that are not merged and not hidden
Sample Ruleset in Calculation Manager
8-16
Chapter 8
Manage Jobs
{
"jobType":"Ruleset",
"jobName":"Calculate Plan Operating Expenses",
"parameters":
{
"Operating Expenses Plan.Version":"Most Likely",
"Operating Expense Adj Plan.Version":"What If",
Optionally, you can provide the sequence indexes in the paths, as shown below.
{
"jobType":"Ruleset",
8-17
Chapter 8
Manage Jobs
Example 5: Ruleset "Revenue Plan" with variables that are merged and not hidden
This example shows two Revenue Plan rules within a ruleset. This demonstrates how to
differentiate the variables when there are multiple variables with the same paths within the
same parent in the ruleset.
Sample Ruleset in Calculation Manager
{
"jobType":"Ruleset",
"jobName":"Revenue Plan",
"parameters":
{
"Version":"Worst Case",
"Department":"New Entity"
}
}
Example 6: Ruleset "Revenue Plan" with variables that are not merged and not hidden
8-18
Chapter 8
Manage Jobs
This example shows two Revenue Plan rules within a ruleset. This demonstrates how to
differentiate the variables when there are multiple variables with the same paths within the
same parent in the ruleset.
Sample Ruleset in Calculation Manager
{
"jobType":"Ruleset",
"jobName":"Revenue Plan",
"parameters":
{
"(1)Copy Channel.Department":"No Entity",
"(1)Copy Channel.Version":"Worst Case",
8-19
Chapter 8
Manage Jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
{
"jobType": "PLAN_TYPE_MAP",
"jobName": "MapReporting",
8-20
Chapter 8
Manage Jobs
"parameters": {
"cubeLinkName": "name",
"clearData": true
}
}
{
"jobType": "PLAN_TYPE_MAP",
"jobName": " MapReporting",
"parameters": {
"cubeLinkName": "MapChannels",
"clearData": true,
"overrideMembersMap": {
"Period": "ILvl0Descendants(Q1)"
},
"overrideExclusionMembersMap": {
"Period": "Jan"
}
}
}
"overrideMembersMap": {
"Period": "ILvl0Descendants(Q1)"
}
"overrideMembersMap": {
"Period": "ILvl0Descendants(Q1)",
"Account": "Sales"
}
"overrideExclusionMembersMap": {
"Period": "Jan"
}
"overrideExclusionMembersMap": {
"Period": "Jan, Feb, &CurrMonth, ILvl0Descendants(Q1), YearTotal, Red"
}
Import Data
Use this REST API to import data from a file in the repository into the application using the
import data settings specified in a job of type Import Data.
You can override some of the parameters of the job definition while executing this job from a
REST API.
You can also import data using the parameter values provided, without an explicit predefined
Import Data job definition.
8-21
Chapter 8
Manage Jobs
For Planning, Financial Consolidation and Close, and Tax Reporting, you can review the
rejected data records that have errors. To do this, specify an error file that captures the data
records that are not imported for each dimension. If an errop file is specified, the ZIP file is
stored in the Outbox where you can download the file using Inbox/Outbox Explorer or tools like
EPM Automate or REST APIs, for example, with the Download API.
Required Roles
Service Administrator
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-22
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payloads
Example 1: Executes the import data job ImportJob and overrides the importFileName
parameter.
{"jobType":"IMPORT_DATA","jobName":"ImportJob",
"parameters":{
"importFileName":"myImportfile123.zip"
}
}
Example 2: Executes the import data job ImportJob and overrides the delimiter, dateFormat,
and includeMetaData parameters.
{"jobType":"IMPORT_DATA","jobName":"ImportJob",
"parameters":{
"delimiter":"comma",
"dateFormat":"MM-DD-YYYY",
"includeMetaData":"false"
}
}
8-23
Chapter 8
Manage Jobs
Example 3: Executes the import data job ImportJob defined with sourceType as Essbase and
overrides the sourceType and cube parameters.
{"jobType":"IMPORT_DATA","jobName":"ImportJob",
"parameters":{
"sourceType":"Essbase",
"cube":"Plan1"
}
}
Example 4: Executes the ImportData job ImportDataJob and overrides the errorFile
parameter with a value ImportDataErrorFile.zip. If error records are found during the Import
Data operation, a ZIP file called ImportDataErrorFile.zip is created in the Planning repository.
The generated error file can be downloaded from the Outbox from the job status page or using
the Download REST API or EPM Automate downloadfile command.
{"jobType": "IMPORT_DATA",
"jobName": "ImportDataJob",
"parameters": {
"errorFile":"ImportDataErrorFile.zip"
}
}
{
"jobType": "IMPORT_DATA",
"jobName": "ImportDataJob_Sample",
"parameters": {
"importFileName":"importDataFile_Essabse.txt",
"cube":"Plan1",
"stopOnError":"true"
}
}
Example 6: Executes the import data job with all the mandatory parameters.
{
"jobType": "IMPORT_DATA",
"jobName": "ImportDataJob",
"parameters":{
"sourceType": "Planning",
"importFileName": "myImportfile123.zip",
"delimiter": "comma"
}
}
8-24
Chapter 8
Manage Jobs
Example 7: Executes the import data job with all the mandatory parameters. The sourceType
parameter is specified as Essbase, and cube provides the cube name. Default values are
assumed for other non-mandatory parameters.
{
"jobType": "Import Data",
"jobName": "ImportDataJob",
"parameters":{
"sourceType": "Essbase",
"cube": "Plan1",
"importFileName": "EssbasePlan1_data.zip"
}
}
Example 8: Executes the import data job with all the mandatory parameters. The
customMissingValue parameter is specified as #MyNoData, which should match the
customMissingValue label present in the exported file. Default values are assumed for other
non-mandatory parameters.
{
"jobType":"IMPORT_DATA",
"jobName":"Import Plan1 Data",
"parameters":{
"customMissingValue" : "#MyNoData"
}
}
Export Data
Use this REST API to export application data into a file using the export data settings, including
file name, specified in a job of type export data. The file containing the exported data is stored
in the repository.
You can override some of the parameters of the job definition while executing this job with a
REST API.
You can also export application data into a file using the parameter values provided, without an
explicit predefined Export Data job definition.
Exporting data supports substitution variables. You can use substitution variables while
providing the rowMembers, columnMembers, and povMembers definitions. See Exporting Data and
Creating and Assigning Values to Substitution Variables in Administering Planning.
Required Roles
Service Administrator
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Request
Supported Media Types: application/json
Parameters
8-25
Chapter 8
Manage Jobs
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
8-26
Chapter 8
Manage Jobs
Sample Payloads
Example 1: Executes the export data job ExportJobDaily and overrides the exportFileName
parameter.
{
"jobType":"EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"exportFileName":"myExportfile.zip"
}
}
Example 2: Executes the export data job ExportJobDaily and overrides the delimiter,
exportSmartListAs, and includeDynamicMembers parameters.
{
"jobType":"EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"delimiter":"tab",
"exportSmartListAs":"name",
"includeDynamicMembers":"true"
}
}
Example 3: Executes the export data job ExportJobDaily and overrides the cube parameter
only. This job will now execute for the cube Vis1ASO.
{
"jobType":"EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"cube":"Vis1ASO
}
}
Example 4: Executes the export data job ExportJobDaily and overrides the cube name along
with the rowMembers, columnMembers, and povMembers parameters. This job will now execute
for the cube Vis1ASO.
{
"jobType":"EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"cube":"Vis1ASO",
"rowMembers":"Current,Variance,Actual,Scenario",
"columnMembers":"Statistics,Account",
"povMembers":"Period,Year,Version,Entity,Product,Channel"
}
}
8-27
Chapter 8
Manage Jobs
Example 5: Executes the export data job ExportJobDaily and overrides the cube name along
with the parameters rowMembers, columnMembers, and povMembers. We use substitution
variables while overriding the rowMembers, columnMembers, and povMembers definition. This job
executes for the cube Vis1ASO.
{
"jobType":"EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"cube":"Vis1ASO",
"rowMembers":"ILvl0Descendants(&Param1)",
"columnMembers":"ILvl0Descendants(&Param2)",
"povMembers":"Period,Year,Version,&Param3,Product,Channel"
}
}
Example 6: Executes the export data job ExportJobDaily and overrides the cube name along
with the parameters exportDataDecimalScale, rowMembers, and columnMembers. We use
substitution variables while overriding the rowMembers, columnMembers, and povMembers
definition. This job executes for the cube Vis1ASO.
{
"jobType":"EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"cube":"Vis1ASO",
"rowMembers":"ILvl0Descendants(&Param1)",
"columnMembers":"ILvl0Descendants(&Param2)",
"povMembers":"Period,Year,Version,&Param3,Product,Channel",
"exportDataDecimalScale":"2"
}
}
Example 7: Executes the export data job ExportJobDaily with all the mandatory parameters,
cube, rowMembers, columnMembers, and povMembers. Default values are assumed for other non-
mandatory parameters.
{
"jobType": "EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters": {
"cube": "Vis1ASO",
"rowMembers": "ILvl0Descendants(&Param1)",
"columnMembers": "ILvl0Descendants(&Param2)",
"povMembers": "Period,Year,Version,&Param3,Product,Channel"
}
}
8-28
Chapter 8
Manage Jobs
Example 8: Executes the export data job ExportJobDaily with all the mandatory parameters,
cube, rowMembers, columnMembers, and povMembers. Decimal precision is set to 3. Default
values are assumed for other non-mandatory parameters.
{
"jobType": "EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"cube": "Plan1",
"rowMembers": "ILvl0Descendants(&Param1)",
"columnMembers": "ILvl0Descendants(&Param2)",
"povMembers": "Period,Year,Version,&Param3,Product,Channel",
"exportDataDecimalScale": 3
}
}
Example 9: Executes the export data job ExportJobDaily with all the mandatory parameters,
cube, rowMembers, columnMembers, and povMembers. Decimal precision is set to 3. Dynamic
members are not exported. Default values are assumed for all other non-mandatory
parameters.
{
"jobType": "EXPORT_DATA",
"jobName":"ExportJobDaily",
"parameters":{
"cube": "Plan1",
"rowMembers": "ILvl0Descendants(&Param1)",
"columnMembers": "ILvl0Descendants(&Param2)",
"povMembers": "Period,Year,Version,&Param3,Product,Channel",
"exportDataDecimalScale": 3,
"includeDynamicMembers": false
}
}
Example 10: Executes the export data job with all the mandatory parameters.
customMissingValue is set to #MyNoData. Default values are assumed for all other non-
mandatory parameters.
{
"jobType":"EXPORT_DATA",
"jobName":"ExportPlan1Data",
"parameters":{
"customMissingValue" : #MyNoData"
}
}
Example 11: Executes the export data job with all the mandatory parameters. The parameter
exportImpliedShareEnabled is set to false. Default values are assumed for all other non-
mandatory parameters.
{
"jobType":"EXPORT_DATA",
"jobName":"Test_Data_Export_Job",
"parameters":{
8-29
Chapter 8
Manage Jobs
"exportImpliedShareEnabled": false
}
}
Import Metadata
Imports metadata from a file in the Planning repository into the application using the import
metadata settings specified in a Planning job of type import metadata.
You can also override some of the parameters of the job definition while executing this job from
a REST API.
For Planning, Financial Consolidation and Close, and Tax Reporting, you can specify an error
file that captures the metadata records that are not imported for each dimension. If an error file
is specified, a separate error file is created for each dimension. The error files are then zipped
together and the zip file is stored in the Outbox where you can download the file using Inbox/
Outbox Explorer or tools like EPM Automate or REST APIs, for example, with the Download
API.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-30
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example: Executes the job ImportMetaDataJob and overrides only the importZipFileName
parameter.
{
"jobType": "IMPORT_METADATA",
"jobName": "ImportMetaDataJob",
"parameters": {
"importZipFileName": "myMetaDataDailyJob.zip"
}
}
Example: Executes the job ImportMetaDataJob and overrides the errorFile parameter with a
value ImportMetaDataErrorFile.zip. If there are error records found during the Import
Metadata operation for one or more dimensions, a ZIP file called
ImportMetaDataErrorFile.zip is created in the repository that contains one error CSV file for
each failed dimension. The generated error file can be downloaded from the Outbox from the
job status page or using the Download REST API or EPM Automate downloadfile command.
{
"jobType": "IMPORT_METADATA",
8-31
Chapter 8
Manage Jobs
"jobName": "ImportMetaDataJob",
"parameters": {
"errorFile":"ImportMetaDataErrorFile.zip"
}
}
Export Metadata
Use this REST API to export metadata into a file using the settings specified in a Planning job
of type export metadata. The file containing the exported metadata is stored in the Planning
repository.
You can also override some of the parameters of the job definition while executing this job from
a REST API.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
Example Payload
Example: Executes the export metadata job "ExportMetadataDaily" and overrides the
exportZipFileName parameter.
{
"jobType": "EXPORT_METADATA",
"jobName": "ExportMetadataDaily",
"parameters": {
8-32
Chapter 8
Manage Jobs
"exportZipFileName": "dailyMetaData.zip"
}
}
Cube Refresh
Use this REST API to refresh the Planning application cube. Typically, you refresh the cube
after importing metadata into the application.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
{"jobType":"CUBE_REFRESH","jobName":"CubeRefresh"}
8-33
Chapter 8
Manage Jobs
{"jobType":"CUBE_REFRESH","jobName":"MyRefreshCube","parameters":
{"allowedUsersDuringCubeRefresh":" All Users",
"terminateActiveRequestsBeforeCubeRefresh":"false","logOffAllUsersBeforeCubeRe
fresh":"true","allowedUsersAfterCubeRefresh":"Administrators"}}
Clear Cube
Use this REST API to clear specific data within input and reporting cubes.
You can clear the data using member selection or a valid MDX query. Using member selection,
you can also optionally clear related supporting details, comments, and attachments. You can
also elect to do a physical or logical clear of data. This gives you more flexibility and granularity
when clearing the cube.
NOTE: The Clear Cube job deletes the data you specify within input and reporting cubes, but it
does not delete the application definition in the application's relational tables.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-34
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
8-35
Chapter 8
Manage Jobs
Sample Payload
{"jobType":"CLEAR_CUBE", "jobName":"ClearPlan1"}
Example: Executes the clear job Clear_Partial_Basic, which is defined with member
selection, and overrides the cube and members parameters.
{
"jobType": "Clear Cube",
"jobName": "Clear_Partial_Basic",
"parameters": {
"cube": "HP1_ASO",
"members": "ILvl0Descendants(Exchange Rates),Siblings(Total Expense)"
}
}
Example: Executes the clear job Clear_Partial_Basic, which is defined with member
selection, and overrides the cube, clearSupportingDetails, clearComments, and other
parameters.
{
"jobType": "Clear Cube",
"jobName": "Clear_Partial_Basic",
"parameters": {
"cube":"HP1_ASO",
"members":"ILvl0Descendants(Exchange Rates),Siblings(Total Expense)",
"clearSupportingDetails":"false",
"clearComments":false,
"clearAttachments":false,
"clearPhysicalOnEssbase":false
}
}
Example: Executes the clear job Clear_Partial_Advanced, which is defined with the MDX
query, and overrides the mdxQuery parameter.
{
"jobType": "Clear Cube",
"jobName": "Clear_Partial_Advanced",
"parameters": {
"mdxQuery":"Crossjoin({[Apr],[May],[Jun]},{[Expense1]})"
}
}
Example: Executes the clear job Clear_Partial_Advanced, which is defined with the MDX
query, and overrides the cube, mdxQuery, and clearPhysicalOnEssbase parameters.
{
"jobType": "Clear Cube",
"jobName": "Clear_Partial_Advanced",
"parameters": {
"cube":"HP1_ASO",
"mdxQuery":"Crossjoin({[Apr],[May],[Jun]},{[Expense1]})",
"clearPhysicalOnEssbase":false
8-36
Chapter 8
Manage Jobs
}
}
Administration Mode
Changes the login level for a Planning application. If you set login level to Administrators, all
Interactive Users and Planners will be logged off of the application upon completion of the job.
For details on administration mode, see Scheduling Jobs.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example: This request will change the login level of the application to "Administrators" level.
{
"jobType": "Administration Mode",
"jobName": "AppAdminJob",
"parameters": {
"loginLevel": "Administrators"
}
}
8-37
Chapter 8
Manage Jobs
Compact Cube
Use this REST API to compact the outline file of an ASO cube.
Compaction helps keep the outline file at an optimal size. Compacting the outline does not
clear the data. For more information, see Scheduling Jobs.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example: This request will compact the outline of Vis1ASO ASO cube.
{
"jobType": "Compact Cube",
"jobName": "CompactCube",
"parameters": {
"cubeName": "Vis1Aso"
}
}
Restructure Cube
This REST API performs a full restructure of a BSO cube to eliminate or reduce fragmentation.
For more information, see Scheduling Jobs.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
8-38
Chapter 8
Manage Jobs
Required Roles
Service Administrator
REST Resource
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example: This request will restructure Plan1 BSO
{
"jobType": "Restructure Cube",
"jobName": "RestructureCube",
"parameters": {
"cubeName": "Plan1"
}
}
8-39
Chapter 8
Manage Jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example: This request will merge all incremental data slices in the main data slice and keep
zero value cells.
{
"jobType": "Merge Data Slices",
"jobName": "MergeDataSlice",
"parameters": {
"cubeName": "VisASO",
"mergeSliceType": "allIncrementalSlicesInMain",
"keepZeroCells": "true"
}
}
Optimize Aggregation
Use this REST API to improves the performance of ASO cubes.
This job has two actions: Enable query tracking and Execute aggregation process. It performs
an aggregation, optionally specifying the maximum disk space for the resulting files, and
8-40
Chapter 8
Manage Jobs
optionally basing the view selection on user querying patterns. This API is only applicable to
aggregate storage databases. For information about scheduling jobs, see Scheduling Jobs.
Before using this API, you must first enable query tracking to capture tracking statistics on the
aggregate storage cube. Then, after you enable query tracking, you must allow sufficient time
to collect user data-retrieval patterns before you execute the aggregation process based on
query data. The execute aggregation process deletes existing aggregated views and
generates optimized views based on the collected query tracking data.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs/
{jobId}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-41
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: This request will enable query tracking on the Vis1ASO cube.
{
"jobType": "Optimize Aggregation",
"jobName": "CubeOptimizeAggr",
"parameters": {
"cubeName": "Vis1ASO",
"type": "enableQueryTracking"
8-42
Chapter 8
Manage Jobs
}
}
Example 2: This request will execute the aggregation process on the Vis1ASO cube.
{
"jobType": "Optimize Aggregation",
"jobName": "CubeOptimizeAggr",
"parameters": {
"cubeName": "Vis1ASO",
"type": "executeAggregationProcess"
}
}
Example 3: This request will execute aggregation process on the Vis1ASO cube. Aggregation
process will use the query tracking data, will not include alternate roll ups, and use growth size
ratio as 1.01.
{
"jobType": "Optimize Aggregation",
"jobName": "CubeOptimizeAggr",
"parameters": {
"cubeName": "Vis1ASO",
"type": "executeAggregationProcess",
"useQueryData": "true",
"includeAlternateRollups": "disable",
"growthSizeRatio": "1.01"
}
}
Import Security
Use this REst API to import the security records or access control list (ACL) records from a
Comma Separated Values (CSV) file.
For information about access permissions to application artifacts, see Setting Up Access
Permissions.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Excel File Format
• Object Name: The name of the object for which the ACL is defined
• Name: The name of the user or group for which the ACL is defined
• Parent: The name of the parent of the object
• Is User: The flag (Y or N) that determines if the ACL is defined for a user or for a group
• Object Type: The type of object, for example, Forms folder
• Access Type: The type of privilege, such as READ or READWRITE
• Access Mode: Additional information, such as if the ACL is applicable on the descendants
• Remove: To remove a particular ACL, set this to Y
8-43
Chapter 8
Manage Jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
8-44
Chapter 8
Manage Jobs
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: Imports security records from the input file ImportSecurityRecordsFile.csv.
Existing security records are retained.
{
"jobType": "Import Security",
"jobName": "ImportSecurity",
"parameters": {
"fileName": "ImportSecurityRecordsFile.csv"
}
}
8-45
Chapter 8
Manage Jobs
{
"jobType": "Import Security",
"jobName": "ImportSecurity",
"parameters": {
"fileName": "ImportSecurityRecordsFile.csv"
"clearAll": "true"
}
}
Example 3: Imports security records from the input file ImportSecurityRecordsFile.csv and
exports the error messages to the file SecurityImportErrors.txt. Existing security records
are retained.
{
"jobType": "Import Security",
"jobName": "ImportSecurity",
"parameters": {
"fileName": "ImportSecurityRecordsFile.csv"
"clearAll": "true"
"errorFile": "SecurityImportErrors.txt"
}
}
Export Security
Exports the security records or access control list (ACL) records for specified users or groups
to a Comma Separated Values (CSV) file.
For information about access permissions to application artifacts, see Setting Up Access
Permissions.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-46
Chapter 8
Manage Jobs
Notes:
• This job can take only exportGroups or exportUsers at one time. If you need to export
groups and users, you must run the job twice, once with each parameter.
• If a user name or group name contains a comma, escape the comma in the request. For
example, if a user name is test,User, the request should contain test\\,User.
• For the file format, see the definition in Import Security Records.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: Exports all security records to the ExportSecurityRecordsFile.csv file.
{
"jobType": "Export Security",
"jobName": "ExportSecurity",
"parameters": {
"fileName": "ExportSecurityRecordsFile.csv"
}
}
8-47
Chapter 8
Manage Jobs
Example 2: Exports security records of two groups, group1 and group2, to the
ExportSecurityRecordsFile.cv file.
{
"jobType": "Export Security",
"jobName": "ExportSecurity",
"parameters": {
"exportGroups": "group1,group2"
"fileName": "ExportSecurityRecordsFile.csv"
}
}
Example 3: Exports security records of two users, test1 and test,User2 to the
ExportSecurityRecordsFile.csv file. Note that one user name contains a comma in it.
{
"jobType": "Export Security",
"jobName": "ExportSecurity",
"parameters": {
"exportUsers": "test1,test\\,User2"
"fileName": "ExportSecurityRecordsFile.csv"
}
}
Export Audit
This REST API exports the audit records for a range of days or a number of days, such as a
month.
The audit records are exported to a Comma Separated Values (CSV) file. The output CSV file
contains the first character as a Byte Order Mark (BOM) character \ufeff. The API writes an
encrypted application identifier following the BOM character. This application identifier is
written between double-quotes. Headers for the CSV file follow the application identifier. For
more information, see Auditing Tasks and Data.
You can use an optional excludeApplicationId parameter to not write the application identifier
in the export file. Exported audit reports without the application identifier cannot be imported
back into the application.
The generated CSV file is compressed and the output is a ZIP file. The file can be downloaded
using the Download REST API.
Required Roles
Service Administrator
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-48
Chapter 8
Manage Jobs
8-49
Chapter 8
Manage Jobs
8-50
Chapter 8
Manage Jobs
Notes:
• This job does not export records based on group names.
• If a user name contains a comma, escape the comma in the request. For example, if a
user name is test,User then add test\\,User to the request.
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: Exports the last 180 days of audit records to the ExportAuditLast180Days.zip file.
{
"jobType": "Export Audit",
"jobName": "Export180DaysAudit",
"parameters": {
"fileName": "ExportAuditLast180Days.zip",
"ndays": "180"
}
}
Example 2: Exports the last seven days of audit records created by planner1 and planner2.
Records are exported to a zip file with an auto-generated file name.
{
"jobType": "Export Audit",
"jobName": "AllAuditRecordsOfPlanners",
"parameters": {
8-51
Chapter 8
Manage Jobs
Example 3: Exports the last 180 days of audit records to the ExportAuditLast180Days.zip file.
The application identifier will be not written in the generated file. This export file cannot be used
to import into a Cloud EPM environment.
{
"jobType": "Export Audit",
"jobName": "Export180DaysAudit",
"parameters": {
"fileName": "ExportAuditLast180Days.zip",
"ndays": "180",
"excludeApplicationId": "true"
}
}
{
"jobType": "Export Audit",
"jobName": "ExportLast3MonthsAudit",
"parameters": {
"fileName": "Last3MonthsAudit.zip",
"startDate" : "2024-05-01",
"endDate" : "2024-08-31"
}
}
8-52
Chapter 8
Manage Jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-53
Chapter 8
Manage Jobs
8-54
Chapter 8
Manage Jobs
8-55
Chapter 8
Manage Jobs
8-56
Chapter 8
Manage Jobs
"topCountDuration
":"10"
8-57
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: Exports the job console records for all default parameters into the NewFile.csv file.
Exports status of all Rule jobs completed in the last seven days.
{
"jobType":"JOBCONSOLE_EXPORT",
"jobName":"AllJobConsoleExports",
"parameters":{"fileName":"NewFile.csv"}
}
Example 2: Exports the job console records for Rule and Export Data jobs that completed
normally or with an error status over the last month into the exportFile.csv file. Job details of
the failed jobs are exported in separate files in the final compressed file.
{
"jobType":"JOBCONSOLE_EXPORT",
"parameters":{"fileName":"exportFile.csv", "jobTypes": "Rules,
EXPORT_DATA", "jobStatusCodes": "2,3", "ndays":"30"}
}
Example 3: Exports the job console records for the jobs named Daily Consolidation and Smart
Push to a Reporting Cube. Includes jobs that completed normally or with an error status over
the last month into the exportFile.csv file. Job details of the failed jobs are not exported in
separate files because exportErrorDetails is false.
{
"jobType":"JOBCONSOLE_EXPORT",
"parameters":{"fileName":"exportFile.csv", "jobNames":"Daily
Consolidation, Smart Push to Reporting Cube", "jobStatusCodes": "2,3",
"ndays":"30", "exportErrorDetails":"false"}
}
{
"jobType":"JOBCONSOLE_EXPORT",
"parameters":{"fileName":"exportFile.csv", "jobStatusCodes": "all",
"ndays":"all", "jobTypes":"all", "exportErrorDetails":"false",
"topCountDuration":"10"}
}
Example 5: Exports the job console records for all default parameters into to the NewFile.csv
file. This exports status of all Rule jobs completed in the last seven days. The application
identifier will be not written in the generated file. This export file cannot be used to import into a
Cloud EPM environment.
{
"jobType":"JOBCONSOLE_EXPORT",
"jobName":"AllJobConsoleExports",
"parameters":{
"fileName":"NewFile.csv",
8-58
Chapter 8
Manage Jobs
"excludeApplicationId": "true"
}
Sort Members
This REST API sorts the dimension members of a business process.
You can sort Entity, Account, Scenario, Version, and user-defined custom dimension members.
You cannot sort Period, Years, or Currency dimension members. This feature is only supported
for the Planning, Module, and Free Form business processes. For more information, see
Sorting Members.
For Planning Module applications, you cannot sort these dimensions:
• Any dense dimension
• The "Plan Element" dimension, even if it is renamed, from Financials
• The "Project Element" dimension, even if it is renamed, from Projects
After sorting members, administrators must perform a cube refresh.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-59
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: Sorts the child members of the Account dimension in ascending order.
{
"jobType": "Sort Members",
"jobName": "SortAccount",
"parameters":
{
"member":"Account"
}
}
Example 2: Sorts the child members of the Account dimension in descending order.
{
"jobType": "Sort Members",
"jobName": "SortAccountDesc",
"parameters":
{
"member":"Account", "order":"descending"
}
}
{
"jobType": "Sort Members",
"jobName": "SortAccount200Desc",
"parameters":
8-60
Chapter 8
Manage Jobs
{
"member":"account200", "order":"descending", "type":"descendants"
}
}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-61
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: Executes the import exchange rates job MyExchangeRates and overrides the
importFileName parameter.
Example 2: Executes the import exchange rates job MyExchangeRates and overrides the
importFileName and includeMetaData parameters.
Auto Predict
You can use this REST API to schedule predictions using the Auto Predict job.
With Auto Predict, administrators can define a prediction to predict future performance based
on historical data and schedule a job to run that prediction definition, automating the prediction
process. For details about Auto Predict, see Setting Up Predictions to Run Automatically in
Administering Planning.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Job Types.
Required Roles
8-62
Chapter 8
Manage Jobs
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-63
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload
Example 1: Executes the Auto Predict job ASO->BSO.
{
"jobType": "Auto Predict",
"jobName": "ASO->BSO",
"parameters": {
"forceRun": true,
"paginatedDim": "Entity"
}
}
• Name
• Position
8-64
Chapter 8
Manage Jobs
• Description
• Enabled
• Valid Cubes - This column can contain either All or a list of comma-separate names of
cubes, such as Plan1, Plan2
• Anchor Dim Name
• Anchor Dimension Apply to Unselected Members
• Dim1
• Dim1 Required
• Dim2
• Dim2 Required
• DimX
• DimX Required
The Sub Rules worksheet has the following column headings:
• Name - This column must contain the name of the Rules from the first worksheet
• Users
• User Groups
• Restriction - This column can contain Deny Read or Deny Write
• Anchor Members
• Anchor Exclusion
• Dim1 Members
• Dim1 Exclusion
• Dim2 Members
• Dim2 Exclusion
• DimX Members
• DimX Exclusion
Required Roles
Service Administrator
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For
parameters that are common to all jobs, see Execute a Job.
8-65
Chapter 8
Manage Jobs
For a sample URL, see the sample URL and payload in Execute a Job
Example 1: Imports cell-level security records from the input file ImportCLSRecordsFile.zip.
{
"jobType": "Import Cell-Level Security",
"jobName": "ImportCLSJob",
"parameters": {
"fileName": "ImportCLSRecordsFile.zip"
}
}
Example 2: Imports cell-level security records from the input file ImportCLSRecordsFile.zip
and exports the error messages to the file ImportCLSFileLog.txt.
{
"jobType": "Import Cell-Level Security",
"jobName": "ImportCLSJob",
"parameters": {
"fileName": "ImportCLSRecordsFile.zip",
"errorFile": "ImportCLSRecordsFileLog.txt"
}
}
8-66
Chapter 8
Manage Jobs
• Name
• Position
• Description
• Enabled
• Valid Cubes - This column contains either All or a list of comma-separate names of
cubes, such as Plan1, Plan2
• Anchor Dim Name
• Anchor Dimension Apply to Unselected Members
• Dim1
• Dim1 Required
• Dim2
• Dim2 Required
• DimX Members
• DimX Required
The Sub Rules worksheet has the following column headings:
• Name - This column contains the names of the Rules from the first sheet
• Users
• User Groups
• Restriction - This column can contain Deny Read or Deny Write
• Anchor Members
• Anchor Exclusion
• Dim1 Members
• Dim1 Exclusion
• Dim2 Members
8-67
Chapter 8
Manage Jobs
• Dim2 Exclusion
• DimX Members
• DimX Exclusion
Required Roles
Service Administrator
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see the sample URL and payload in Execute a Job
Example 1: Exports all cell-level security records to the file ExportCLSDRecordsFile.zip.
8-68
Chapter 8
Manage Jobs
Sample Payload
{
"jobType": "Export Cell-Level Security",
"jobName": "ExportCellLevelSecurityJob",
"parameters": {
"fileName": "ExportCLSDRecordsFile.zip"
}
}
{
"jobType": "Export Cell-Level Security",
"jobName": "ExportCellLevelSecurityJob",
"parameters": {
"fileName": "Export3CLSDRecordsFile.zip",
"names": "CLSDAccountPeriod,CLSDEntityPeriod,CLSDProductPeriod"
}
}
• Name
• Position
• Description
• Enabled
• Valid Cubes - This column can contain either All or a list of comma-separate names of
cubes, such as Plan1, Plan2
• Anchor Dim Name
• Anchor Dimension Apply to Unselected Members
• Dim1
• Dim1 Required
• Dim2
8-69
Chapter 8
Manage Jobs
• Dim2 Required
• DimX
• DimX Required
The Sub Rules worksheet must have the following column headings:
• Name - This column must contain the name of the Rule from the first worksheet
• Users
• User Groups
• Restriction - This column can contain Deny Read or Deny Write
• Anchor Members
• Anchor Exclusion
• Dim1 Members
• Dim1 Exclusion
• Dim2 Members
• Dim2 Exclusion
• DimX Exclusion
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For
parameters that are common to all jobs, see Execute a Job.
8-70
Chapter 8
Manage Jobs
For a sample URL, see the sample URL and payload in Execute a Job
Example 1: Imports valid intersections records from the input file ImportVIRecordsFile.zip.
{
"jobType": "Import Valid Intersections",
"jobName": "ImportVIJob",
"parameters": {
"fileName": "ImportVIRecordsFile.zip"
}
}
Example 2: Imports valid intersections records from the input file ImportVIRecordsFile.zip
and exports the error messages to the file ImportVIRecordsFileLog.txt.
{
"jobType": "Import Valid Intersections",
"jobName": "ImportVIJob",
"parameters": {
"fileName": "ImportVIRecordsFile.zip",
"errorFile": "ImportVIRecordsFileLog.txt"
}
}
8-71
Chapter 8
Manage Jobs
• Name
• Position
• Description
• Enabled
• Anchor Dim Name
• Anchor Dimension Apply to Unselected Members
• Dim1
• Dim1 Required
• Dim2
• Dim2 Required
• DimX
• DimX Required
The Sub Rules worksheet has the following column headings:
• Name - This column contains the names of the Rules from the first worksheet
• Anchor Members
• Anchor Exclusion
• Dim1 Members
• Dim1 Exclusion
• Dim2 Members
• Dim2 Exclusion
• DimX Members
• DimX Exclusion
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
8-72
Chapter 8
Manage Jobs
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For
parameters that are common to all jobs, see Execute a Job.
For a sample URL, see the sample URL and payload in Execute a Job
Sample Payload
Example 1: Exports all valid intersections records to the file ExportVIRecordsFile.zip.
{
"jobType": "Export Valid Intersections",
"jobName": "ExportVIJob",
"parameters": {
"fileName": "ExportVIRecordsFile.zip"
}
}
8-73
Chapter 8
Manage Jobs
{
"jobType": "Export Valid Intersections",
"jobName": "ExportVIJob",
"parameters": {
"fileName": "Export3VIRecordsFile.zip",
"names": "VIAccountPeriod,VIEntityPeriod,VIProductPeriod"
}
}
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For
parameters that are common to all jobs, see Execute a Job.
8-74
Chapter 8
Manage Jobs
For a sample URL, see the sample URL and payload in Execute a Job
Sample Payload
Example 1: Executes the bursting definition named MonthlySalesBurstDev that is present in
the Library folder.
{
"jobType":"Execute Bursting Definition",
"jobName":"Execute MonthlySalesBurstDef",
"parameters": {
"burstingDefinitionName":"Library/MonthlySalesBurstDef"
}
}
{
"jobType":"Execute Bursting Definition",
"jobName":"Execute MonthlySalesBurstDef",
"parameters": {
"burstingDefinitionName":"Library/Reports/MonthlySalesBurstDef"
}
Request
Supported Media Types: application/json
Parameters
8-75
Chapter 8
Manage Jobs
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-76
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload Example: Exporting one document to a ZIP file
Copies a document called WeeklySales.txt, identified with the complete path of the
document, to the default download location and compresses it. The output file name will be
WeeklySales.zip. If a file with the same name exists in the Inbox/Outbox, the existing file will
be overwritten. An error file with the name WeeklySalesErrorLog.log will be created with the
details of the activity.
{
"jobType": "COPY_ARTIFACT_FROM_LIBRARY",
"jobName": "Copy Invalid SKU Q1 List",
8-77
Chapter 8
Manage Jobs
"parameters":
{
"artifactName": "Library/folder1/WeeklySales.txt",
"saveAsFile": "WeeklySales.zip",
"overwrite": "true",
"errorFile": "WeeklySalesErrorLog.log",
"exportFormat": "zip"
}
}
{
"jobType": "COPY_ARTIFACT_FROM_LIBRARY",
"jobName": "BatchExportDocuments",
"parameters": {
"idOrFullyQualifiedName": "Library/FinancialReport2023.xlsx, Library/
FinancialReport2022.xlsx, Library/FinancialReport2021.xlsx",
"exportFormat": "zip",
"overwrite": true,
"saveAsFile": "BatchExport.zip",
"errorFile": "BatchExportLog.log"
}
}}
Usage Guidelines
Notes on the overwrite flag
• The overwrite flag is especially critical when dealing with multiple documents.
• A single overwrite value applies uniformly across all documents in the batch:
– If set to true, any existing files matching the exported documents' names will be
overwritten without prompt.
– If set to false, the system will not overwrite existing files and will skip those
documents.
Caveats for using the saveAsFile parameter
• The saveAsFile parameter influences the naming of exported files but has specific
behaviors depending on the number of documents and the selected export format.
• Single Document: If only one document ID is provided, the file will be saved with the
name specified in saveAsFile, assuming the file extension matches the document’s
format.
• Multiple Documents:
– If the exportFormat is set to zip, regardless of the number of documents, saveAsFile
determines the name of the resulting ZIP file. Ensure that the .zip extension is used.
– If exportFormat is not set to zip, the saveAsFile parameter will be ignored, and each
document will be exported under its original name.
8-78
Chapter 8
Manage Jobs
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-79
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Sample Payload Example
Imports a document called FinancialReport2022.xlsx into a folder called Insights with a
description. If a file with the same name exists, it will be overwritten. An error file named
FinancialReport2022ImportLog.log will be created with details of the activity.
{
"jobType": "IMPORT_DOCUMENT_TO_LIBRARY",
"jobName": "ImportSingleDocument",
"parameters": {
"name": "FinancialReport2022.xlsx",
"description": "Annual Financial Report for 2022",
8-80
Chapter 8
Manage Jobs
"idOrFullyQualifiedDestinationPath": "Library/Insights",
"overwrite": true,
"deleteAfterImport": false,
"errorFile": "FinancialReport2022ImportLog.log"
}
}
{
"jobType": "IMPORT_DOCUMENT_TO_LIBRARY",
"jobName": "ImportMultipleDocuments",
"parameters": {
"name": "Reports2022.zip",
"description": "Collection of Financial Reports for 2022",
"idOrFullyQualifiedDestinationPath": "Library/Reports",
"overwrite": true,
"deleteAfterImport": false,
"errorFile": "Reports2022ImportLog.log"
}
}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
8-81
Chapter 8
Manage Jobs
For a sample URL, see Sample URL and Payload in Execute a Job.
Example payloads
8-82
Chapter 8
Manage Jobs
{
"jobType": "DELETE_ARTIFACTS_FROM_LIBRARY",
"jobName": "Delete Monthly Report",
"parameters": {
"idsOrFullyQualifiedNames": ["Library/Reports/MonthlySales.xlsx"]
}
}
{
"jobType": "DELETE_ARTIFACTS_FROM_LIBRARY",
"jobName": "BatchDeleteDocuments",
"parameters": {
"idsOrFullyQualifiedNames": [
"Library/Reports/QuarterlySales.xlsx",
"Library/Reports/AnnualBudget.xlsx"
],
"errorFile": "BatchDeleteLog.log"
}
}
{
"jobType": "DELETE_ARTIFACTS_FROM_LIBRARY",
"jobName": "Delete Single Document",
"parameters": {
"idsOrFullyQualifiedNames": ["a9e8e37c-85ea-4c99-0000-c72160e3335f"],
"errorFile": "DeleteSingle.log"
}
}
Example #4: Deleting documents using mixed identifiers (UUID and path)
{
"jobType": "DELETE_ARTIFACTS_FROM_LIBRARY",
"jobName": "Delete Mixed Identifiers",
"parameters": {
"idsOrFullyQualifiedNames": [
"a9e8e37c-85ea-4c99-0000-c72160e3335f",
"Library/Reports/FinancialSummary.xlsx"
],
"errorFile": "DeleteMixed.log"
}
}
{
"jobType": "DELETE_ARTIFACTS_FROM_LIBRARY",
8-83
Chapter 8
Manage Jobs
"jobName": "CleanupDocumentsAndFolders",
"parameters": {
"idsOrFullyQualifiedNames": [
"Library/Forecast Reports/SampleFolder1/LastDocument.xlsx",
"Library/Plan Reports/SampleFolder2/LastDocument.xlsx"
],
"removeEmptyParentFolders": true,
"errorFile": "CleanupLog.log"
}
}
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request parameters specific to this job. For
parameters that are common to all jobs, see Execute a Job.
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
8-84
Chapter 8
Manage Jobs
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/jobs
Payload Example: Sets the OGL application ID and server URL in application settings.
{
"jobType": "OGL Server Settings",
"jobName": "Set OGL Parameters",
"parameters":
{
"oglAppId": "vcQ6fAsJRySX_SSGc581Vg",
"oglServerUrl": "https://guidedlearning.oracle.com"
}
}
//
// BEGIN - Execute a Job (EXPORT_DATA, EXPORT_METADATA, IMPORT_DATA,
8-85
Chapter 8
Manage Jobs
funcExecuteJob() {
url="$SERVER_URL/HyperionPlanning/rest/$API_VERSION/
applications/$APP_NAME/jobs"
encodedJobName=$(echo $2 | sed -f urlencode.sed)
if [ ! -z "$3" ]; then
param="{\"jobType\":\"$1\",\"jobName\":\"$encodedJobName\",\"parameters\":$3}"
else
param="{\"jobType\":\"$1\",\"jobName\":\"$encodedJobName\"}"
fi
funcExecuteRequest "POST" $url $param
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started executing job successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
8-86
Chapter 8
Manage Jobs
JSONObject
params = new JSONObject();
def args =
parameters.split(';');
for (int i
= 0; i < args.length; i++) {
if
(args[i].indexOf("=") != -1) {
String[] param = args[i].split("=");
if
(param[0].equalsIgnoreCase("clearData")) {
params.put("clearData",Boolean.valueOf(param[1]));
}
else {
params.put(param[0],param[1]);
}
}
}
payload.put("jobName",jobName);
payload.put("jobType",jobType);
payload.put("parameters",params);
}
else {
payload.put("jobName",jobName);
payload.put("jobType",jobType);
}
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", payload);
if (response != null) {
getJobStatus(fetchPingUrlFromResponse(response, "self"), "GET");
}
}
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/jobs/
{jobIdentifier}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
8-87
Chapter 8
Manage Jobs
Response
Parameters
The following table summarizes the response parameters.
Name Description
status Status of the job: -1 = in progress; 0 = success; 1 = error; 2 = cancel
pending; 3 = cancelled; 4 = invalid parameter; Integer.MAX_VALUE =
unknown
details Details about the job status, such as "Metadata import was successful"
for metadata import
jobID The ID of the job, such as 224
jobName The name of the job, such as Refresh Database
descriptiveStatus The status of the job, such as Completed or Error
{
"status": 0,
"details": "Metadata import was successful",
"jobId": 224,
"jobName": "Import Account Metadata",
"descriptiveStatus": "Completed",
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/224",
"action": "GET"
}, {
"rel": "job-details",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/224/details",
"action": "GET"
}]
}
The following shows an example of the response body when an error occurs
during cube refresh:
{
"status": 1,
8-88
Chapter 8
Manage Jobs
The following shows an example of the response body when an error occurs during cube
refresh:
{
"status": 1,
"details": "An error occurred while updating the relational database.",
"jobStatus": "Error",
"jobId": 145,
"jobName": "Refresh Database",
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/jobs/145",
"action": "GET"
}}, {
"rel": "job-details",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/145/details",
"action": "GET"
}]
}
Using this REST API requires prerequisites, such as understanding how to use jobs. See
Prerequisites. Be sure that you understand how to use jobs as described in Managing Jobs.
Required Roles
Service Administrator
8-89
Chapter 8
Manage Jobs
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/jobs/
{jobIdentifier}/details
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Example Requests
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/jobs/145/details
Optionally specifying paging for jobs of type IMPORT_DATA and EXPORT_DATA with the
offset and limit:
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/jobs/145/
details?q={"messageType":"ERROR"}&offset=0&limit=5}
Response
The following table summarizes the response parameters.
Name Description
items Version of the API you are developing with
recordsRead The name of the application
recordsRejected The ID of the job for records rejected
recordsProcessed The ID of the job for records processed
8-90
Chapter 8
Manage Jobs
Name Description
dimensionName For paging of jobs. Indicates the actual index from which the records are
returned. It is 0 based.
loadType For paging for jobs. Controls how many items to return. Defaults to 25 if
not specified.
{
"items": [{
"links": [{
"rel": "child-job-details",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/224/childjobs/12/details?
limit=10&q=%7BmessageType:ERROR%7D&offset=10",
"action": "GET"
}],
"recordsRead": 8,
"recordsRejected": 0,
"recordsProcessed": 8,
"dimensionName": "Entity",
"loadType": "Metadata Import"
}, {
"links": [{
"rel": "child-job-details",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/224/childjobs/13/details?
limit=10&q=%7BmessageType:ERROR%7D&offset=10",
"action": "GET"
}],
"recordsRead": 2,
"recordsRejected": 0,
"recordsProcessed": 2,
"dimensionName": "Job",
"loadType": "Metadata Import"
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/224/details?limit=10&q=%7BmessageType:ERROR%7D&offset=10",
"action": "GET"
}],
}
8-91
Chapter 8
Manage Jobs
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/jobs/
{jobIdentifier}/childjobs/{childJobIdentifier}/details
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Example Requests
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/jobs/145/
childjobs/123/details
8-92
Chapter 8
Manage Jobs
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/jobs/145/
childjobs/123/details?q={"messageType":"ERROR"}
Response
The following table summarizes the response parameters.
Name Description
items The number of records read, such as 8
msgType Message type, such as INFO
msgCategory Message category, such as Argument parsing
msgText Message text
{
"items": [{
"msgType": "INFO",
"msgCategory": "Argument parsing",
"msgText": "The column alias mapping list specified with the /C2A
switch did not match a key in the Command Properties file \"null\" so it will
be used as the mapping directly: \"(<ignoreUndefined>,@Plan*)\"."
}, {
"msgType": "INFO",
"msgCategory": "Unclassified",
"msgText": "Header record fields: Entity, Parent, Alias: Default,
Alias: SLAliases, Valid For Consolidations, Data Storage, Two Pass
Calculation, Description, Formula, UDA, Smart List, Data Type, Hierarchy
Type, Enable for Dynamic Children, Number of Possible Dyn..."
}, {
"msgType": "INFO",
"msgCategory": "Dimension, member, or cube retrieval",
"msgText": "Located and using \"Entity\" dimension for loading data
in \"Test2\" application."
}, {
"msgType": "INFO",
"msgCategory": "Unclassified",
"msgText": "HspOutlineLoad::dateFormatSpecified is true,
SessionHalDateFormat stored on session: M/d/yy, sessionId: 759992870"
}, {
"msgType": "INFO",
"msgCategory": "Dimension, member, or cube retrieval",
"msgText": "Load dimension \"Entity\" has been unlocked successfully."
8-93
Chapter 8
List Library Documents
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/224/childjobs/12/details?limit=5&offset=5",
"action": "GET"
}, {
"rel": "prev",
"href": "https:<BASE-URL>/HyperionPlanning/rest/v3/applications/test2/
jobs/224/childjobs/12/details?offset=0&limit=5",
"action": "GET"
}, {
"rel": "next",
"href": "https:/<BASE-URL>/HyperionPlanning/rest/v3/applications/
test2/jobs/224/childjobs/12/details?offset=10&limit=5",
"action": "GET"
}],
}
8-94
Chapter 8
List Library Documents
REST Resource
GET HyperionPlanning/rest/v3/applications/{application}/documents
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/{application}/documents?
q={"path":"/Library/sample.doc"}
Example queries:
Example 1: Retrieve all documents
GET /HyperionPlanning/rest/v3/applications/{application}/documents
8-95
Chapter 8
List Library Documents
GET /HyperionPlanning/rest/v3/applications/{application}/documents?
q={"path":"/Library/sample.doc"}
GET /HyperionPlanning/rest/v3/applications/{application}/documents?
q={"id":"3bbd16df-4da0-4e04-0000-c3c3f3c5ca96"}
GET /HyperionPlanning/rest/v3/applications/{application}/documents?q={"id":
{"$in": ["3bbd16df-4da0-4e04-0000-c3c3f3c5ca96",
"a4a788e5-97cd-44fc-0000-0009642a266b"]}}
GET /HyperionPlanning/rest/v3/applications/{application}/documents?
q={"id":"a4a788e5-97cd-44fc-0000-0009642a266b"}&fields=id,name
GET /HyperionPlanning/rest/v3/applications/{application}/documents?
offset=10&limit=5
GET /HyperionPlanning/rest/v3/applications/{application}/documents?
orderBy=name:asc
GET /HyperionPlanning/rest/v3/applications/{application}/documents?
orderBy=name:desc
Response
Supported Media Types: application/json
{
"totalResults": 2,
"items": [
{
"name": "page1.doc",
"displayName": "page1.doc",
"description": "Pagination test 1",
"objectType": "Document",
8-96
Chapter 8
List Library Documents
"path": "/Library/page1.doc",
"displayPath": "/Library/page1.doc",
"parentId": "0c000b50-25f1-48f9-0000-c385c846b761",
"created": "26/02/25 12:33 PM",
"modified": "26/02/25 12:33 PM",
"modifiedBy": "epm_default_cloud_admin",
"access": [
"Read",
"Manage"
],
"operations": [
"Rename",
"Update",
"Move",
"Delete",
"AssignAccess"
],
"id": "0c000b50-25f1-48f9-0000-0016c4e2a558",
"mimeType": "application/msword"
},
{
"name": "page10.doc",
"displayName": "page10.doc",
"description": "Pagination test 10",
"objectType": "Document",
"path": "/Library/page10.doc",
"displayPath": "/Library/page10.doc",
"parentId": "da2f51ec-d322-48a7-0000-c386676eba9d",
"created": "26/02/25 12:33 PM",
"modified": "26/02/25 12:33 PM",
"modifiedBy": "epm_default_cloud_admin",
"access": [
"Read",
"Manage"
],
"operations": [
"Rename",
"Update",
"Move",
"Delete",
"AssignAccess"
],
"id": "0c000b50-25f1-48f9-0000-c3c4cfc98fb2",
"mimeType": "application/msword"
}
],
"hasMore": false,
"links": [
{
"href": "{{protocol}}://{{hostname}}:{{port}}/HyperionPlanning/
rest/v3/applications/{{application}}/documents",
"rel": "self",
"method": "GET"
}
]
}
8-97
Chapter 8
Working with Members
Add Member
Use this REST API to add a new member to the application outline in the specified dimension
and plan type and under the specified parent member.
Note:
Prerequisite: The parent member must be enabled for dynamic children and a cube
refresh must have happened after the parent was enabled.
Required Roles
Service Administrator
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/dimensions/
{dimname}/members
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
8-98
Chapter 8
Working with Members
Response
Payload Parameters:
The following table summarizes the payload parameters.
Name Description
name Name of the member, such as North America
children Whether the member has children
description Description of the member
parentName Name of the parent, such as Enterprise Global
dataType Data type, if available
objectType Type of object
dataStorage Storage attribute for the member, such as STOREDATA
dimName Dimension name
twoPass Boolean value to indicate whether the member has the Two-Pass
Calculation associated attribute
instance Information about the instance
type Type of member
detail Detailed information in case of error
status Request status, such as 400
errorPath Path of the error, if available
title Error title, if available
errorCode Error code, if available
errorDetails Error details, if available
message Message text
localizedMessage Localized message, if available
{
"name": "North America",
"children": null,
"description": null,
"parentName": "Enterprise Global",
"dataType": "UNSPECIFIED",
"objectType": 33,
"dataStorage": "STOREDATA",
"dimName": "Entity",
"twoPass": false,
"links": [{
"rel": "self",
8-99
Chapter 8
Working with Members
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
Vision/dimensions/Entity/members/North%20America",
"action": "GET"
}]
}
{
"detail": "Error occurred adding member. Unable to find parent
<Enterprise GlobalX> defined for a dynamic member.",
"status": 400,
"message": "com.hyperion.planning.HspRuntimeException: Error occurred
adding member. Unable to find parent <Enterprise GlobalX> defined for a
dynamic member.",
"localizedMessage": "com.hyperion.planning.HspRuntimeException: Error
occurred adding member. Unable to find parent <Enterprise GlobalX> defined
for a dynamic member."
}
Get Member
Use this REST API to get the specified member’s properties.
Required Roles
Service Administrator
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/dimensions/
{dimname}/members/{member}
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Request Payload:
The following table summarizes the payload parameters.
8-100
Chapter 8
Get Applications
Name Description
name Name of the member, such as North America
children Whether the member has children
description Description of the member
parentName Name of the parent, such as Enterprise Global
dataType Data type, if available
objectType Type of object
dataStorage Storage attribute for the member, such as
STOREDATA
dimName Dimension name
twoPass Boolean value to indicate whether the member has
the Two-Pass Calculation associated attribute
{
"name": "North America",
"children": null,
"description": null,
"parentName": "Enterprise Global",
"dataType": "UNSPECIFIED",
"objectType": 33,
"dataStorage": "STOREDATA",
"dimName": "Entity",
"twoPass": false,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
Vision/dimensions/Entity/members/North%20America",
"action": "GET"
}]
}
Get Applications
This REST API returns a list of applications to which the specified user is assigned. It also
provides certain key information about the application.
Required Roles
Service Administrator
8-101
Chapter 8
Get Applications
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Response
Supported Media Types: application/json
Parameters:
Name Description
Items A list of applications
name Application name
type Product type. Possible values: HFM, HP
adminMode Indicates if the application's login level is set to
Administrators. Returns a Boolean value where
true indicates that the login level for the
application is set to Administrators and false
indicates that the login level is set to All Users.
theme Current theme of the application.
Possible values:
• REDWOOD_ORACLE_R13
• REDWOOD_LIGHT_R13
• REDWOOD_DARK_R13
webBotDetails Web bot details of the application
webBotAppId Web bot application ID register for the application
dpEnabled Indicates if decision package is enabled in the
application. Returns a Boolean value true when
enabled.
unicode Indicates if the application is Unicode enabled.
Returns a Boolean value where true indicates that
the application is Unicode enabled.
appStorage Returns the storage type of the application, such as
Default, Multidim, or ASO.
appType Business process type. Possible values are PBCS,
EPBCS, and so on.
8-102
Chapter 8
Get Applications
Name Description
hybrid Indicates if the hybrid configuration is enabled in
the application. Returns a Boolean value true
when enabled.
oglServerUrl The value of the Oracle Guided Learning (OGL)
Server URL in the application settings. For more
information, see Integrating EPM Cloud with Oracle
Guided Learning in Oracle Guided Learning User
Guide.
Note that you can use a REST API to configure the
OGL Server URL. See Configure the Oracle
Guided Learning (OGL) Server.
oglAppId The value of the Oracle Guided Learning (OGL)
Application ID in the application settings. For more
information, see Integrating EPM Cloud with Oracle
Guided Learning in Oracle Guided Learning User
Guide.
Note that you can use a REST API to configure the
OGL Application ID. See Configure the Oracle
Guided Learning (OGL) Server.
{
"type": "HP",
"items": [
{
"appType": "PBCS",
"webBotDetails": "null",
"helpServerUrl": "https://www.oracle.com",
"workpaceServerUrl": "https://<BASE-URL>",
"appStorage": "Multidim",
"unicode": true,
"name": "Vision",
"type": "HP",
"adminMode": "true",
"theme": "REDWOOD_LIGHT_R13",
"hybrid": "true"
"oglServerUrl":"https://guidedlearning.oracle.com",
"oglAppId":"vcQ6fAsJRySX_SSGc581Vg"
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>",
"action": "GET"
}
]
}
8-103
Chapter 8
Manage Planning Units
8-104
Chapter 8
Manage Planning Units
REST Resource
POST
/HyperionPlanning/rest/{version}/applications/{application}/planningunits?
q={"scenario":"scenarioName","version":"versionName"}&offset=10&limit=10
Request
Supported Media Types: application/x-www-form-urlencoded
Parameters:
The following table summarizes the client request.
Request Payload:
The following table summarizes the payload parameters.
8-105
Chapter 8
Manage Planning Units
https://<BASE-URL>/HyperionPlanning/rest/{version}/applications/{application}/
planningunits?
q={"scenario":"scenarioName","version":"versionName"}&offset=10&limit=10
Payload:
filter={name:"Status",type:4,values:
[2,5]}&filter={name:"SubStatus",type:3,values:[0,4]}
Response
Supported Media Types: application/json
Parameters:
Name Description
name Planning unit name, such as Marketing
value Planning unit value
owner Planning unit owner, such as Admin
version Planning unit version, such as BU Version_1
entity Planning unit entity, such as Marketing
status Planning unit status, such as Under Review
scenario Planning unit scenario, such as Forecast
Formatted value Formatted value, if any
puName Planning unit name, such as Marketing
subStatus Planning unit substatus
secMember Secondary dimension member, if any
puAlias Planning unit alias, such as Marketing
versionAlias Version alias, if any
{
"items": [{
"name": null,
"value": -1.0,
"owner": "admin",
"version": "BU Version_1",
"entity": "Marketing",
"status": "Under Review",
"scenario": "Forecast",
8-106
Chapter 8
Manage Planning Units
"formattedValue": "",
"puName": "Marketing",
"subStatus": "",
"secMember": null,
"puAlias": "Marketing",
"scenarioAlias": null,
"versionAlias": null,
"puId": 50410,
"links": [{
"rel": "promotion-path",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/
%22Forecast%22::%22BU%20Version_1%22::%22Marketing%22::%22%22/promotionpath",
"action": "GET"
}, {
"rel": "annotations-and-history",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/
%22Forecast%22::%22BU%20Version_1%22::%22Marketing%22::%22%22/
historyandannotations?q=%7B%22annotSeq%22:-1,%22logSeq%22:-1%7D",
"action": "GET"
}, {
"rel": "actions",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/%22Forecast%22::%22BU%20Version_1%22/actions",
"action": "POST",
"data": {
"pmMembers": "Marketing"
}
}, {
"rel": "change-status",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/
%22Forecast%22::%22BU%20Version_1%22::%22Marketing%22::%22%22/actions/6",
"action": "POST",
"data": {
"pmMembers": "Marketing",
"comments": "comments"
}
}]
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits?
q=%7Bscenario:%22Forecast%22,version:%22BU+Version_1%22%7D",
"action": "POST",
"data": {
"filter": [{
"name": "Status",
"type": 4,
"values": [2, 5],
"defIndex": 0
}, {
"name": "SubStatus",
"type": 3,
8-107
Chapter 8
Manage Planning Units
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
planningunits/{puIdentifier}/historyandannotations?
q={annotSeq=-1,logSeq=-1}&offset=10&limit=10
Request
Supported Media Types: application/x-www-form-urlencoded
Parameters:
The following table summarizes the client request.
8-108
Chapter 8
Manage Planning Units
Filter can include name, type, and values to filter on. For example:
filter={name:"SubStatus",type:3,values:[0,4]}
Response
Supported Media Types: application/x-www-form-urlencoded
Parameters:
Name Description
comment Comment entered by the planning unit owner when
performing an action
hasHistory True if the planning unit has history
logSeq Sequence of the action performed on the planning
unit
staticImage Whether a static image exists for this note
authorImagePath The path to the user image for the user who
performed the action
commentTitle The author name and the action the author
performed
commentDate The date when the action was performed or the
annotation was added
commentSubTitle Processing state of the planning unit when the
action was performed
parentAnntSeq Sequence of the annotation or the parent
annotation added to the planning unit
isChildNode true if this is a reply to an annotation
{
"items": [{
"comment": "Enough justification provided, Approving it.<p></p>",
"hasHistory": false,
"logSeq": -1,
"staticImage": true,
"authorImagePath": "/Images/GhostUser.png",
"commentTitle": "admin",
"commentDate": "8/22/14 3:41 PM",
"commentSubTitle": "",
"parentAnntSeq": 1,
"isChildNode": false,
"links": [{
"rel": "annotation-replies",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/%22Forecast%22::%22BU%20Version_1%22::%22Marketing%22::/
historyandannotations?q=%7B%22annotSeq%22:1,%22logSeq%22:-1%7D",
"action": "GET"
}]
}, {
"comment": "",
8-109
Chapter 8
Manage Planning Units
"hasHistory": true,
"logSeq": 2,
"staticImage": true,
"authorImagePath": "/Images/GhostUser.png",
"commentTitle": "Originate by admin",
"commentDate": "4/22/14 12:26 PM",
"commentSubTitle": "Under Review",
"parentAnntSeq": -1,
"isChildNode": false,
"type": "HP",
"links": [{
"rel": "annotation-replies",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/%22Forecast%22::%22BU%20Version_1%22::%22Marketing%22::/
historyandannotations?q=%7B%22annotSeq%22:-1,%22logSeq%22:2%7D",
"action": "GET"
}]
}, {
"comment": "",
"hasHistory": true,
"logSeq": 1,
"staticImage": true,
"authorImagePath": "/Images/GhostUser.png",
"commentTitle": "Originate by admin",
"commentDate": "4/22/14 12:26 PM",
"commentSubTitle": "Under Review",
"parentAnntSeq": -1,
"isChildNode": false,
"type": "HP",
"links": [{
"rel": "annotation-replies",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/%22Forecast%22::%22BU%20Version_1%22::%22Marketing%22::/
historyandannotations?q=%7B%22annotSeq%22:-1,%22logSeq%22:1%7D",
"action": "GET"
}]
}],
"type": "HP",
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/
%22Forecast%22::%22BU%20Version_1%22::%22Marketing%22::%22%22/
historyandannotations?q=%7B%22annotSeq%22:-1,%22logSeq%22:-1%7D",
"action": "GET"
}],
"type": "HP",
8-110
Chapter 8
Manage Planning Units
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/users/
{userId}/photo
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/users/5000100/
photo
Response
Supported Media Types: In case of success, returns application/octet-stream. In case of
error, returns application/json.
Error Response:
Name Description
detail Detail about the status of the planning unit photo for this user. For
example: PU photo not available, make sure that a valid
user identifier is provided.
status HTTP status, such as 400.
message Informational message about the status of the photo for this user.
localizedMessage A localized informational message about the status.
8-111
Chapter 8
Manage Planning Units
{
"detail": "PU photo not available, make sure the a valid user identifier
is provided.",
"status": 400,
"message": "java.lang.RuntimeException: PU photo not available, make sure
the a valid user identifier is provided.",
"localizedMessage": "java.lang.RuntimeException: PU photo not available,
make sure the a valid user identifier is provided."
}
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
planningunits{puIdentifier}/promotionpath
Request
Parameters:
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/planningunits/
Forecast::"BU Version_1"::Dev/promotionpath
Response
Supported Media Types: application/json
Parameters:
8-112
Chapter 8
Manage Planning Units
Name Description
Items Planning unit promotional path information
name Name of the planning unit
ownerType Planning unit owner type
group Returns whether the owner is a group of users or
an individual users, true or false
staticImage Returns whether the image is a static manage, true
or false
nodeImagePath Path to the planning unit owner photo
ownerName Name of the planning unit owner
currentLoc Returns if this is the current location of the planning
unit, true or false
{
"items": [{
"name": "ent_111: Regular Coke",
"ownerType": 0,
"group": false,
"staticImage": true,
"nodeImagePath": "../ui_themes/tadpole/images_product/pm/75X89/
PUOwner.png",
"ownerName": "Planner1",
"currentLoc": true
}, {
"name": "Total Entity",
"ownerType": 0,
"group": false,
"staticImage": false,
"nodeImagePath": "v3/applications/PS4app1/puphoto?appOwner=50001",
"ownerName": "admin",
"currentLoc": false
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/Forecast::%22BU%20Version_1%22::Dev/promotionpath",
"action": "GET"
}],
}
8-113
Chapter 8
Manage Planning Units
Service Administrator
REST Resource
POST
/HyperionPlanning/rest/{api_version}/applications/{application}/
planningunits{puhIdentifier}/availableactions
Request
Parameters:
The following table summarizes the client request.
Payload examples:
pmMembers=pmMemberNames
pmMembers=Dev,Marketing
Response
Supported Media Types: application/json
Parameters:
Name Description
Items Planning unit available actions
actionId ID of the action
Name Name of the action
8-114
Chapter 8
Manage Planning Units
{
"items": [{
"actionId": 6,
"name": "Promote"
}, {
"actionId": 3,
"name": "Sign Off"
}, {
"actionId": 1,
"name": "Reject"
}, {
"actionId": 7,
"name": "Delegate"
}, {
"actionId": 8,
"name": "Take Ownership"
}, {
"actionId": 9,
"name": "Originate"
}, {
"actionId": 10,
"name": "Freeze"
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4_HP2/planningunits/Current::%22BU%20Version_1%22/availableactions?
q=%7Boptions:1%7D",
"action": "GET",
"data": {
"pmMembers": "ent_111: Regular Coke"
}
}],
}
Required Roles
Service Administrator
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/pufilters
8-115
Chapter 8
Manage Planning Units
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Example URL
https://<BASE-URL>-/HyperionPlanning/rest/v3/applications/PS4app1/pufilters?
q={"options":"0"}
Response
Supported Media Types: application/json
Parameters:
Name Description
Names Planning unit available actions
aliases Aliases for values to be displayed instead of labels
if user preference is defined as such
name Name for the filter
type Type of the filter
values Integer values; usually the client will submit this
value to indicate the selected filter
labels Labels for values to be displayed in the client for
the filter
defIndex Index of the value to be displayed as the default
value
{
"items": [{
"aliases": ["Forecast"],
"name": "Scenarios",
"type": 1,
8-116
Chapter 8
Manage Planning Units
"values": [50218],
"labels": ["Forecast"],
"defIndex": 0
}, {
"aliases": ["BU Version_1"],
"name": "Versions",
"type": 2,
"values": [1500],
"labels": ["BU Version_1"],
"defIndex": 0
}, {
"aliases": null,
"name": "SubStatus",
"type": 3,
"values": [0, 1, 2, 3, 4, 10008, 10009, 10000],
"labels": ["", "Processing", "Aborted", "Validating", "No Additional
Approval Required", "Invalid Data", "Additional Approval Required", "Failed"],
"defIndex": 0
}, {
"aliases": null,
"name": "Status",
"type": 4,
"values": [2, 3, 4, 5, 6],
"labels": ["Under Review", "Approved", "Signed Off", "Not Signed
Off", "Frozen"],
"defIndex": 0
}],
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/pufilters?q=%7Boptions:%220%22%7D",
"action": "GET"
}],
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
planningunits/{puhIdentifier}/actions
8-117
Chapter 8
Get User Preferences
Request
Supported Media Types: application/x-www-form-urlencoded
Parameters:
The following table summarizes the client request.
Payload
actionId=actionId&pmMembers=pmMemberNames&comments=comments
Response
Supported Media Types: application/json
{
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/planningunits/Forecast::%22BU%20Version_1%22/actions",
"action": "POST",
"data": {
"pmMembers": "\"Dev\"",
"action": "PROMOTE",
"comments": "\"Promoting the PU\""
}
}]
}
8-118
Chapter 8
Get User Preferences
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
userpreferences
Request
Parameters:
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/PS4app1/userpreferences
Response
Supported Media Types: application/json
Name Description
decimal separator Preference for decimal separator
scale Preference for scale
thousandsSeparator Preference for the thousands separator
thousandsSeparator Preference for the style of negative numbers
negativeStyle Preference for the minimum precision
minPrecision Preference for the minimum precision
maxPrecision Preference for the maximum precision
showPUAlias Preference for showing the planning unit alias
currSymbol Preference for the currency symbol
type The type of application, such as HP
{
"decimalSeparator": "",
"scale": 0,
"thousandsSeparator": "",
"negativeStyle": 255,
"minPrecision": 0,
"maxPrecision": 0,
8-119
Chapter 8
Working with Data Slices
"showPUAlias": false,
"currSymbol": "",
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
PS4app1/userpreferences",
"action": "GET"
}]
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/plantypes/
{plantype}/importdataslice
Request
Supported Media Types: application/json
Parameters:
8-120
Chapter 8
Working with Data Slices
Name Description
dataGrid JSON data grid
aggregateEssbaseData True or false.
If true, the values being saved will be added to the existing values.
Only numeric values can be aggregated. Cells with Smart list, Text and
Date data types will be rejected.
If false, the data values will be overwritten. A value of "#missing" will
clear the cell value as shown in the example. The default is false.
Note: Values provided in the "data" section of the JSON payload will
be used even for cells with supporting details provided. For cells with
supporting details, make sure the total calculated for the incoming
supporting details matches the value provided in the row "data"
section.
See the following table for examples.
cellNotesOption Possible values are: "Overwrite", "Append", and "Skip".
• "Overwrite": The existing cell notes will be overwritten. An empty
array for cell notes [] will indicate deletion of existing cell notes. A
value of "null" will leave the existing cell notes intact.
• "Append": New cell notes will be appended to existing cell notes.
• "Skip": Cell notes will not be processed.
dateFormat Date format used in the input data grid. Valid formats are: "MM-DD-
YYYY", "DD-MM-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/
YYYY", "YYYY/MM/DD"
strictDateValidation Optionally, influence how Date cell values are validated. When set to
true, date values are validated against the dateFormat specified in
the payload and are rejected if the format for the value does not
conform to the dateFormat. If set to false, date values are
interpreted more leniently. Default is true.
customParams
PostDataImportRuleNames Optionally, provide the post data import rule names. This is primarily
used by Data Management for planners. Default is false.
8-121
Chapter 8
Working with Data Slices
Name Description
includeRejectedCells Optionally, indicate if the response should include the first 100 rejected
cells. Default is true.
includeRejectedCellsWith Optionally, indicate if the response should include the reasons why
Details cells are rejected. Default is false.
Sample payload:
{
"aggregateEssbaseData": true,
"cellNotesOption": "Overwrite",
"dateFormat": "DD/MM/YYYY",
"strictDateValidation": true,
"dryRun": true,
"customParams": {
"PostDataImportRuleNames": "Post data rule 1, \"post, data rule 2\"",
"IncludeRejectedCells": true,
"IncludeRejectedCellsWithDetails": true
},
"dataGrid": {…}
}
Response
Supported Media Types: application/json
JSON Output
The response provides detailed information on how much Essbase data was actually updated
compared to the amount of data that was imported, as well as which cells were rejected and
why.
• numAcceptedCells shows the total number of cells that were accepted for save without
errors.
• numUpdateCells indicates how many cells out of numAcceptedCells were updated in
Essbase. Only cells where the input values are different from the values in Essbase are
updated.
• numRejectedCells indicates the number of cells that the user does not have read-write
access to; cells where row or column member names are invalid and do not exist; cells
8-122
Chapter 8
Working with Data Slices
where the data is invalid (for example, an invalid Smart List value); and cells that are non-
numeric (Smart List, Text, or Date type) with data when aggregateEssbaseData is set to
true.
• rejectedCells shows the cells that were rejected if IncludeRejectedCells is true.
• rejectedCellsWithDetails shows the reasons why the cells were rejected if
IncludeRejectedCellsWithDetails is true.
Example: Importing a data slice (Project Assumptions) with one dimension on the row and
column and with cells of Text/Date and SL data types.
Sample Payload:
{
"dateFormat": "MM/DD/YYYY",
"customParams": {
"IncludeRejectedCells": true,
"IncludeRejectedCellsWithDetails": true
},
"dataGrid": {
"pov": [
"BaseData",
"FY24",
"No Product",
"Plan",
"Working",
"Computer Resources"
],
"columns": [
[
"BegBalance"
]
],
"rows": [
{
"headers": [
"Project Number"
],
"data": [
"1"
]
},
{
"headers": [
"Request Date"
],
"data": [
"1/1/24"
]
},
{
"headers": [
"Project Type"
],
"data": [
"IT"
8-123
Chapter 8
Working with Data Slices
]
},
{
"headers": [
"Project Investment"
],
"data": [
10000
]
}
]
}
}
JSON Output:
{
"numAcceptedCells": 4,
"numUpdateCells": 4,
"numRejectedCells": 0,
"rejectedCells": [],
"rejectedCellsWithDetails": []
}
Example: Importing a data slice (Sales Driver Assumptions) with multiple dimensions on rows
and columns. Here you see a few cells being rejected due to Invalid Intersection rules.
{
"dateFormat": "MM/DD/YYYY",
"customParams": {
"includeRejectedCells": true,
"IncludeRejectedCellsWithDetails": true
},
"dataGrid": {
"pov": [
"BaseData",
"FY24",
"BegBalance"
],
"columns": [
[
"Mexico",
"Mexico",
"Canada",
"Canada"
],
[
"Plan",
"Forecast",
"Plan",
"Forecast"
]
],
"rows": [
{
8-124
Chapter 8
Working with Data Slices
"headers": [
"Units",
"P_100",
"Working"
],
"data": [
"100",
"150",
"1500",
"1500"
]
},
{
"headers": [
"Avg Order Size",
"P_000",
"Best Case"
],
"data": [
"1000",
"2000",
"10000",
"15000"
]
},
{
"headers": [
"Close Rate",
"P_000",
"Best Case"
],
"data": [
"70%",
"90%",
"85%",
"95%"
]
}
]
}
}
JSON Output:
The following shows an example of the response body with a few cells rejected due to Invalid
Intersection rules.
{
"numAcceptedCells": 8,
"numUpdateCells": 8,
"numRejectedCells": 4,
"rejectedCells": [
"[BaseData, FY24, BegBalance, Mexico, Plan, Avg Order Size, P_000,
Best Case]",
"[BaseData, FY24, BegBalance, Canada, Plan, Avg Order Size, P_000,
Best Case]",
8-125
Chapter 8
Working with Data Slices
8-126
Chapter 8
Working with Data Slices
"BaseData",
"FY24",
"BegBalance",
"Canada",
"Plan",
"Close Rate",
"P_000",
"Best Case"
],
"readOnlyReasons": [
"Invalid Intersection"
],
"otherReasons": []
}
]
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/plantypes/
{plantype}/exportdataslice
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
8-127
Chapter 8
Working with Data Slices
Name Description
gridDefinition JSON grid definition to define the region
exportPlanningData True or false. Optionally, you can provide the parameter
exportPlanningData, which, when set to true, will export
supporting details and cell notes along with Essbase numeric data.
Default is false.
suppressMissingBlocks True or false. Optionally, you can set suppressMissingBlocks to
true to suppress blocks with missing data.
suppressMissingRows True or false. Optionally, you can set suppressMissingRows to true
to suppress rows with missing data.
suppressMissingColumns True or false. Optionally, you can set suppressMissingColumns to
true to suppress rows with missing data.
{
"exportPlanningData": false,
"gridDefinition": {
"suppressMissingBlocks": true,
"pov": {
"dimensions": [
"HSP_View",
"Year",
"Scenario",
"Version",
"Entity",
"Product"
],
"members": [
[
"BaseData"
],
[
"FY15"
],
[
"Plan"
],
[
"Working"
],
[
"410"
],
[
8-128
Chapter 8
Working with Data Slices
"P_160"
]
]
},
"columns": [
{
"dimensions": [
"Period"
],
"members": [
[
"IDescendants(Q1)"
]
]
},
{
"dimensions": [
"Period"
],
"members": [
[
"IDescendants(Q2)"
]
]
}
],
"rows": [
{
"dimensions": [
"Account"
],
"members": [
[
"Project Number",
"Request Date",
"Project Type",
"Project Investment"
]
]
}
]
}
}
OR
No dimension names provided is less efficient:
{
"exportPlanningData": true,
"gridDefinition": {
"suppressMissingBlocks": true,
"pov": {
8-129
Chapter 8
Working with Data Slices
"members": [
[ "BaseData" ], [ "FY15" ], [ "Plan"],[ "Working" ],["410" ],
["P_160" ]
]
},
"columns": [
{
"members": [
[
"IDescendants(Q1)"
]
]
},
{
"members": [
[ "IDescendants(Q2)" ]
]
}
],
"rows": [
{
"members": [
[
"Project Number",
"Request Date",
"Project Type",
"Project Investment"
]
]
}
]
}
}
JSON Output
The following shows an example of the response body with exportPlanningData : true.
{
"pov": [
"BaseData",
"FY15",
"Plan",
"Working",
"410",
"P_160"
],
"columns": [
[
"Jan",
"Feb",
"Mar",
"Q1",
8-130
Chapter 8
Working with Data Slices
"Apr",
"May",
"Jun",
"Q2"
]
],
"rows": [
{
"headers": [
"Project Number"
],
"data": [
"1",
"2",
"3",
" ",
" ",
" ",
" ",
" "
],
"cellNotes": [
[
{
"contents": "Internal Project<br/>"
},
{
"contents": "Project delayed<br/>"
}
],
[],
[],
[],
[],
[],
[],
[]
]
},
{
"headers": [
"Request Date"
],
"data": [
"",
"",
"",
"",
"",
"",
"",
""
]
},
{
"headers": [
8-131
Chapter 8
Working with Data Slices
"Project Type"
],
"data": [
"Other",
"IT",
"Construction",
"",
"",
"",
"",
""
]
},
{
"headers": [
"Project Investment"
],
"data": [
"100000",
"110000",
"200000",
"410000",
"",
"",
"",
""
],
"cellNotes": [
[],
[
{
"contents": "Internal + External investments made
here.<br/>"
}
],
[],
[],
[],
[],
[],
[]
],
" supportingDetail": [
null,
{
"items": [
{
"value": "60000",
"position": 0,
"label": "Internal",
"generation": 0,
"operator": "+"
},
{
"value": "50000",
"position": 1,
8-132
Chapter 8
Working with Data Slices
"label": "External",
"generation": 0,
"operator": "+"
}
]
},
null,
null,
null,
null,
null,
null
]
}
]
}
Example 2: Suppress missing blocks, rows, and columns when exporting a data slice:
{
"exportPlanningData": false,
"gridDefinition": {
"suppressMissingBlocks": true,
"suppressMissingRows": true,
"suppressMissingColumns": true,
"pov": {
"dimensions": [
"HSP_View",
"Year",
"Scenario",
"Version",
"Entity",
"Product"
],
"members": [
[
"BaseData"
],
[
"FY15"
],
[
"Plan"
],
[
"Working"
],
[
"410"
],
[
"P_160"
8-133
Chapter 8
Working with Data Slices
]
]
},
"columns": [
{
"dimensions": [
"Period"
],
"members": [
[
"IDescendants(Q1)"
]
]
},
{
"dimensions": [
"Period"
],
"members": [
[
"IDescendants(Q2)"
]
]
}
],
"rows": [
{
"dimensions": [
"Account"
],
"members": [
[
"Project Number",
"Request Date",
"Project Type",
"Project Investment"
]
]
}
]
}
}
JSON Output:
{
"pov": [
"BaseData",
"FY15",
"Plan",
"Working",
"410",
8-134
Chapter 8
Working with Data Slices
"P_160"
],
"columns": [
[
"Jan",
"Feb",
"Mar",
"Q1",
"Apr",
"May",
"Jun",
"Q2"
]
],
"rows": [
{
"headers": [
"Project Number"
],
"data": [
"1",
"2",
"3",
" "
]
},
{
"headers": [
"Project Type"
],
"data": [
"Other",
"IT",
"Construction",
""
]
},
{
"headers": [
"Project Investment"
],
"data": [
"100000",
"110000",
"200000",
"410000"
]
}
]
}
8-135
Chapter 8
Working with Data Slices
{
"exportPlanningData": false,
"gridDefinition": {
"suppressMissingBlocks": true,
"pov": {
"dimensions": [
"HSP_View",
"Scenario",
"Version",
"Product"
],
"members": [
[
"BaseData"
],
[
"Plan"
],
[
"Working"
],
[
"P_160"
]
]
},
"columns": [
{
"dimensions": [
"Year", "Period"
],
"members": [
[
"FY19"
],
[
"IDescendants(Q1)"
]
]
},
{
"dimensions": [
"Year", "Period"
],
"members": [
[
"FY20"
],
[
"IDescendants(Q1)"
]
]
}
],
8-136
Chapter 8
Working with Data Slices
"rows": [
{
"dimensions": [
"Entity", "Account"
],
"members": [
[
"410",
"420"
],
[
"Project Number",
"Request Date",
"Project Type",
"Project Investment"
]
]
},
{
"dimensions": [
"Entity", "Account"
],
"members": [
[
"430"
],
[
"Project Investment"
]
]
}
]
}
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/plantypes/
{plantype}/cleardataslice
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
8-137
Chapter 8
Working with Data Slices
Name Description
gridDefinition JSON grid definition to define the region
clearEssbaseData True or false. If true, will clear Essbase numeric
data. Default is true.
clearPlanningData True or false. If true, will delete the cell notes,
attachments, and supporting details. Default is
false.
Sample Payload
Providing dimension names as follows in the gridDefinition is recommended and is more
efficient.
{
"clearEssbaseData": true,
"clearPlanningData": false,
"gridDefinition": {
"suppressMissingBlocks": true,
"pov": {
"dimensions": [
"HSP_View",
"Year",
"Scenario",
"Version",
"Entity",
"Product"
],
"members": [
[
"BaseData"
],
[
"FY15"
],
[
8-138
Chapter 8
Working with Data Slices
"Plan"
],
[
"Working"
],
[
"410"
],
[
"P_160"
]
]
},
"columns": [
{
"dimensions": [
"Period"
],
"members": [
[
"IDescendants(Q1)"
]
]
},
{
"dimensions": [
"Period"
],
"members": [
[
"IDescendants(Q2)"
]
]
}
],
"rows": [
{
"dimensions": [
"Account"
],
"members": [
[
"Project Number",
"Request Date",
"Project Type",
"Project Investment"
]
]
}
]
}
}
OR
8-139
Chapter 8
Working with Data Slices
{
"clearEssbaseData": true,
"clearPlanningData": false,
"gridDefinition": {
"suppressMissingBlocks": true,
"pov": {
"members": [
[
"BaseData"
],
[
"FY15"
],
[
"Plan"
],
[
"Working"
],
[
"410"
],
[
"P_160"
]
]
},
"columns": [
{
"members": [
[
"IDescendants(Q1)"
]
]
},
{
"members": [
[
"IDescendants(Q2)"
]
]
}
],
"rows": [
{
"members": [
[
"Project Number",
"Request Date",
"Project Type",
"Project Investment"
]
]
}
8-140
Chapter 8
Getting and Setting Substitution Variables
]
}
}
Response
Supported Media Types: application/json
JSON Output
The following shows an example of the response body with clearEssbaseData true and
clearPlanningData false. There is one rejected cell due to the presence of supporting details
because clearPlanningData is false:
{
"numClearedCells": 31,
"numRejectedCells": 1,
"rejectedCells": [
"Project Investment,Feb,BaseData,FY15,Plan,Working,410,P_160"
]
}
8-141
Chapter 8
Getting and Setting Substitution Variables
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
substitutionvariables
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
8-142
Chapter 8
Getting and Setting Substitution Variables
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
substitutionvariables
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information about the resource
name Name of the substitution variable, such as CurrYear
value Value of the substitution variable, such as FY16
planType Plan type, such as Plan1, or ALL for all plan types
{
"items": [{
"name": "CurrYear",
"value": "FY16",
"planType": "ALL"
}, {
"name": "CurrYear",
"value": "FY17",
"planType": "Plan2"
},{
"name": "CurrPeriod",
"value": "Jan",
"planType": "Plan1"
}, {
"name": "CurrPeriod",
"value": "Feb",
"planType": "ALL"
}]
}
8-143
Chapter 8
Getting and Setting Substitution Variables
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
substitutionvariables/CurrPeriod
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
substitutionvariables/CurrPeriod
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
name Name of the substitution variable, such as CurrPeriod
value Value of the substitution variable, such as Jan
planType Plan type, such as Plan1, or ALL for all plan types
{
"name": "CurrPeriod",
"value": "Jan",
8-144
Chapter 8
Getting and Setting Substitution Variables
"planType": "ALL",
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
vision/substitutionvariables/CurrPeriod",
"action": "GET"
}]
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
substitutionvariables
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
substitutionvariables
Example Payload
With the following payload, CurrYear at the application level will be updated, and CurrPeriod
will be created at the Plan3 level.
{
"items": [{
"name": "CurrYear",
"value": "FY18",
"planType": "ALL"
}, {
"name": "CurrPeriod",
8-145
Chapter 8
Getting and Setting Substitution Variables
"value": "Dec",
"planType": "Plan3"
}]
}
Response
Supported Media Types: application/json
To confirm the results, you can go to the application to see the updates.
Rest Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
plantypes/{plantype}/substitutionvariables
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/plantypes/Plan1/
substitutionvariables
8-146
Chapter 8
Getting and Setting Substitution Variables
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information for the resource
name Name of the substitution variable, such as CurrPeriod
value Value of the substitution variable, such as Jan
planType Name of the plan type, such as Plan1
{
"items": [{
"name": "CurrPeriod",
"value": "Jan",
"planType": "Plan1"
}]
}
Rest Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
plantypes/{plan}/substitutionvariables?q={"derivedValues":true}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
8-147
Chapter 8
Getting and Setting Substitution Variables
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/plantypes/Plan1/
substitutionvariables?q={"derivedValues":true}
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information about the resource
name Name of the substitution variable, such as CurrYear
value Value of the substitution variable, such as FY16
planType Name of the plan type, such as Plan1, or ALL for all plan types
{
"items": [{
"name": "CurrYear",
"value": "FY16",
"planType": "ALL"
}, {
"name": "CurrPeriod",
"value": "Jan",
"planType": "Plan1"
}]
}
8-148
Chapter 8
Getting and Setting Substitution Variables
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
plantypes/{plantype}/substitutionvariables/CurrYear
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/vision/plantypes/plan1/
substitutionvariables/CurrYear
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
name Name of the substitution variable, such as CurrYear
value Value of the substitution variable, such as FY16
planType Name of the plan type, such as Plan1
{
"name": "CurrYear",
"value": "FY17",
8-149
Chapter 8
Getting and Setting Substitution Variables
"planType": "Plan1",
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
vision/plantypes/plan1/substitutionvariables/CurrYear",
"action": "GET"
}]
}
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
plantypes/{plan}/substitutionvariables/CurrPeriod?q={"derivedValues":true}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/plantypes/Plan1/
substitutionvariables?q={"derivedValues"=true}
8-150
Chapter 8
Getting and Setting Substitution Variables
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information about the resource
name Name of the substitution variable, such as CurrYear
value Value of the substitution variable, such as FY16
planType Name of the plan type, such as Plan1, or ALL for all plan types
{
"name": "CurrPeriod",
"value": "Jan",
"planType": "ALL",
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
vision/plantypes/plan1/substitutionvariables/CurrPeriod?
q=%7B%22derivedValues%22:true%7D",
"action": "GET"
}]
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
plantypes/{plantype}/substitutionvariables
Request
Supported Media Types: application/json
Parameters
8-151
Chapter 8
Deleting Substitution Variables
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/plantypes/Plan1/
substitutionvariables
Response
Supported Media Types: application/json
To confirm the results, you can go to the application to see the updates.
8-152
Chapter 8
Deleting Substitution Variables
REST Resource
Delete /HyperionPlanning/rest/{api_version}/applications/{application}/
plantypes/{plantype}/substitutionvariables/subvarname
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
The following URL will delete CurrPeriod at Plan1.
8-153
Chapter 8
Deleting Substitution Variables
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/plantypes/Plan1/
substitutionvariables/CurrPeriod
Response
Supported Media Types: application/json
REST Resource
DELETE /HyperionPlanning/rest/{api_version}/applications/{application}/
substitutionvariables/subvarname
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
The following URL will delete CurrPeriod at the application level.
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
substitutionvariables/CurrPeriod
Response
Supported Media Types: application/json
8-154
Chapter 8
Deleting Substitution Variables
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
plantypes/{plantype}/substitutionvariables:delete
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/plantypes/Plan1/
substitutionvariables:delete
Example Payload
The following payload will delete CurrYear and CurrPeriod at the Plan1 level.
{
"items": [{
"name": "CurrYear",
"value": "FY23",
"planType": "Plan1"
8-155
Chapter 8
Deleting Substitution Variables
}, {
"name": "CurrPeriod",
"value": "Jan",
"planType": "Plan1"
}]
}
Response
Supported Media Types: application/json
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
substitutionvariables:delete
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
substitutionvariables:delete
8-156
Chapter 8
Deleting Substitution Variables
Example Payload
The following payload will delete CurrPeriod at the application level and CurrYear at Plan1.
{
"items": [{
"name": "CurrPeriod",
"value": "Jan",
"planType": "ALL"
}, {
"name": "CurrYear",
"value": "FY23",
"planType": "Plan1"
}]
}
Response
Supported Media Types: application/json
{
"items": [{
"name": "CurrYear",
"value": "FY16",
"planType": "ALL"
}, {
"name": "CurrYear",
"value": "FY17",
"planType": "Plan2"
},{
"name": "CurrPeriod",
"value": "Jan",
"planType": "Plan1"
}, {
"name": "CurrPeriod",
"value": "Feb",
"planType": "ALL"
}]
}
8-157
Chapter 8
Getting and Setting User Variable Values
8-158
Chapter 8
Getting and Setting User Variable Values
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
uservariablevalues
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
uservariablevalues
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information about the resource
userName Name of the user for whom the user variable is set
name Name of the user variable, such as Account View
dimension Name of the dimension to which the member belongs, such as
Account
member Name of the member that is set for the user variable value, such
as Units
{
"items": [
{
"userName": "testuser1",
"name": "Period",
"dimension": "Period",
"member": "Apr"
8-159
Chapter 8
Getting and Setting User Variable Values
},
{
"userName": "testuser1",
"name": "uservar2",
"dimension": "Period",
"member": "Jun"
},
{
"userName": "testuser2",
"name": "uservar3",
"dimension": "Period",
"member": "Jan"
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
Vision/uservariablevalues",
"action": "GET",
"data": null
}
]
}
Get User Variable Values Defined in the Application by the User Variable
Name
Administrators can use this REST API to retrieve user variable values set for all users for a
user variable with a specific name. Other users can use this REST API to retrieve user variable
value set for themselves for a user variable with a specific name.
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
uservariablevalues/{variableName}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
8-160
Chapter 8
Getting and Setting User Variable Values
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
uservariablevalues/uservar2
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information about the resource
userName Name of the user for which the user variable is set
name Name of the user variable, such as Account View
dimension Name of the dimension to which the member belongs, such as
Account
member Name of the member that is set for the user variable value, such
as Units
{
"items": [
{
"userName": "testuser1",
"name": "uservar2",
"dimension": "Period",
"member": "May"
},
{
"userName": "viewuser",
"name": "uservar2",
"dimension": "Period",
"member": "May"
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
Vision/uservariablevalues/uservar2",
8-161
Chapter 8
Getting and Setting User Variable Values
"action": "GET",
"data": null
}
]
}
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
uservariablesvalues?q={"member":"member_name"}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
uservariablevalues?q={"member":"Apr"}
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
8-162
Chapter 8
Getting and Setting User Variable Values
Name Description
items Collection of information about the resource
userName Name of the user for whom the user variable value is set
name Name of the user variable, such as Account View
dimension Name of the dimension to which the member belongs, such as
Account
member_name Name of the member that is set for the user variable value, such
as Units
{
"items": [
{
"userName": "testuser1",
"name": "Period",
"dimension": "Period",
"member": "Apr"
},
{
"userName": "testuser2",
"name": "uservar2",
"dimension": "Period",
"member": "Apr"
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
Vision/uservariablevalues",
"action": "GET",
"data": null
}
]
}
Get User Variable Values Defined for the Application by the User Name
Administrators can use this REST API to retrieve user variable values for a specific user. Other
users can use this REST API to retrieve user variable values for themselves.
Required Roles
Service Administrator, Power User, User, Viewer
8-163
Chapter 8
Getting and Setting User Variable Values
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
uservariablevalues?q={"userName":"user_name"}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
uservariablevalues?q={"userName":"testuser1"}
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information about the resource
userName Name of the user for whom the user variable values are returned
name Name of the user variable, such as Account View
dimension Name of the dimension to which the member belongs, such as
Account
member Name of the member that is set for the user variable value, such
as Units
{
"items": [
{
8-164
Chapter 8
Getting and Setting User Variable Values
"userName": "testuser1",
"name": "Period",
"dimension": "Period",
"member": "Apr"
},
{
"userName": "testuser1",
"name": "uservar2",
"dimension": "Period",
"member": "Jun"
},
{
"userName": "testuser1",
"name": "uservar3",
"dimension": "Period",
"member": "Jan"
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
Vision/uservariablevalues?q=%7B%22username%22%3A%22testuser1%22%7D",
"action": "GET",
"data": null
}
]
}
Get User Variable Values Defined in the Appplication by the User Name and
Value
Administrators can use this REST API to retrieve user variable values for a specific user and
with a value set to a specific member name. Other users can use this REST API to retrieve
user variable values for themselves and with a value set to a specific member name.
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
uservariablevalues?q={"userName":"user_name", "member":"member_name"}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
8-165
Chapter 8
Getting and Setting User Variable Values
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/
uservariablevalues?q={"userName":"testuser1", "member":"Apr"}
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Collection of information about the resource
userName Name of the user for whom the user variable values are returned
name Name of the user variable, such as Account View
dimension Name of the dimension to which the member belongs, such as
Account
member Name of the member that is set for the user variable value, such
as Units
{
"items": [
{
"userName": "testuser1",
"name": "PeriodVar",
"dimension": "Period",
"member": "Apr"
},
{
"userName": "testuser1",
"name": "uservar2",
"dimension": "Period",
"member": "Apr"
8-166
Chapter 8
Getting and Setting User Variable Values
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
Vision/uservariablevalues?
q=%7B%22username%22%3A%22testuser1%22%2C%22member%22%3A%22Apr%22%7D",
"action": "GET",
"data": null
}
]
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
uservariablevalues
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/Vision/uservariables
Example Payload
With the following payload, the user variable values will be set for the user viewuser and
testuser1 as per the payload
{
"items": [
{
"userName": "viewuser",
"name": "uservar2",
8-167
Chapter 8
Working with Connections
"dimension": "Period",
"member": "May"
},
{
"userName": "testuser1",
"name": "uservar2",
"dimension": "Period",
"member": "Apr"
}
]
}
Response
Supported Media Types: application/json
To confirm the results, you can go to the application to see the updates. In case of any error, a
detailed error message will be a part of the response body.
Parameters Description
items Collection of error messages with the details.
id Name of the erroneous parameter.
details In case of errors, details are published with the
error string.
8-168
Chapter 8
Working with Connections
View a Connection
Use this REST API to view details for a connection that is saved in an application.
Required Roles
Service Administrator
This API is v1.
REST Resource
GET /HyperionPlanning/rest/epm/{api_version}/applications/{application}/
connections/{connectionRef}
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Response
Supported Media Types: application/json
Payload Parameters:
The following table summarizes the parameters.
8-169
Chapter 8
Working with Connections
Parameters Description
items Collection of information about the resource
id Unique identifier for the connection, such as 1c89922d-92ba-46c1-850f-
e2a8a416ddf2
name Name of the connection, such as Connection29
description Description of the connection, such as Planning
url The URL of the connection, such as https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/
HyperionPlanning
username The username for the connection, such as admin
domain The domain name for the connection
modified The time stamp of the last modification to the connection details, such as
2021-01-18 12:23:49.0
modifiedBy The last service administrator to modify the connection details, such as
admin
Example Response
The identity domain information as shown as part of the response.
{
"id": "f83b3da2-9505-415e-b7f7-3cf113cc94e4",
"name": "Connection1",
"description": "Test Connection",
"url": "https://<BASE-URL>m/HyperionPlanning",
"username": "admin",
"domain": "<DOMAIN_NAME>",
"modified": "2021-02-02 09:16:02.0",
"modifiedBy": "admin",
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/epm/v1/
applications/epbcs1/connections/f83b3da2-9505-415e-b7f7-3cf113cc94e4",
"action": "GET",
"rel": "self",
"data": null
}
]
}
8-170
Chapter 8
Working with Connections
REST Resource
GET /HyperionPlanning/rest/epm/{api_version}/applications/{application}/
connections
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Example URL
https://<BASE-URL>/HyperionPlanning/rest/epm/v1/applications/epbcs1/connections?
offset=2&limit=2
Response
The following table summarizes the parameters.
Parameters Description
items Collection of information about the resource
id Unique identifier for the connection, such as 1c89922d-92ba-46c1-850f-
e2a8a416ddf2
name Name of the connection, such as Connection29
description Description of the connection, such as Planning
url The URL of the connection, such as https://<BASE-URL>/
HyperionPlanning
username The username for the connection, such as admin
domain The domain name for the connection
modified The time stamp of the last modification to the connection details, such as
2021-01-18 12:23:49.0
modifiedBy The last service administrator to modify the connection details, such as
admin
Example Response
8-171
Chapter 8
Working with Connections
{
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/epm/v1/
applications/epbcs1/connections?offset=2&limit=2",
"action": "GET",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/epm/v1/
applications/epbcs1/connections?offset=0&limit=2",
"action": "GET",
"rel": "prev",
"data": null
},
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/epm/v1/
applications/epbcs1/connections?offset=4&limit=2",
"action": "GET",
"rel": "next",
"data": null
}
],
"items": [
{
"id": "1c89922d-92ba-46c1-850f-e2a8a416ddf2",
"name": "Connection20",
"url": "https://<BASE-URL>/HyperionPlanning",
"username": "admin",
"modified": "2021-01-18 12:23:49.0",
"modifiedBy": "admin",
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/epm/v1/
applications/epbcs1/connections/1c89922d-92ba-46c1-850f-e2a8a416ddf2",
"action": "GET",
"rel": "Self",
"data": null
}
]
},
{
"id": "ec94a10e-717b-449a-89ce-0c16b1688caa",
"name": "Connection29",
"url": "https://<BASE-URL>/HyperionPlanning",
"username": "admin",
"domain": "<DOMAIN_NAME>",
"modified": "2021-01-18 12:23:49.0",
"modifiedBy": "admin",
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/epm/v1/
applications/epbcs1/connections/ec94a10e-717b-449a-89ce-0c16b1688caa",
8-172
Chapter 8
Working with Connections
"action": "GET",
"rel": "Self",
"data": null
}
]
}
],
"type": null
}
Update a Connection
Use this REST API to update a specific connection that is saved in an application.
You can update the values using either a plain text password or encrypted password. The
response returns the updated connection details.
Required Roles
Service Administrator
This API is v1.
REST Resource
POST /HyperionPlanning/rest/epm/{api_version}/applications/{application}/
connections/{connectionRef}
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
Name Description
name Name of the connection, such as Connection29
description Description of the connection, such as Planning
url The URL of the connection, such as https://<BASE-URL>/HyperionPlanning
username The username for the connection, such as admin
password The password of the connection
8-173
Chapter 8
Working with Connections
Table 8-118 (Cont.) Parameters for Connection Information that Can Be Modified
Name Description
encryptedPassword The password of the connection in the encrypted format using the EPM Automate
encrypt command. The encrypt command generates an epw file with an encrypted
password. Provide the content of the epw file to this parameter as the payload. For
more details see encrypt.
Example Body
Example 1:
{
"name": "<NEW_CONNECTION_NAME>",
"description": "<NEW_DESCRIPTION>",
"url": "https://<BASE-URL>/HyperionPlanning",
"username": "<NEW_USERNAME>",
"password": "<NEW_PASSWORD>"
}
Example 2:
{
"name": "<NEW_CONNECTION_NAME>",
"description": "<NEW_DESCRIPTION>",
"url": "https://<BASE-URL>/HyperionPlanning",
"username": "<NEW_USERNAME>",
"encryptedPassword": "<ENCRYPTED_PASSWORD>"
}
Response
Supported Media Type: application/json
Parameters Description
items Collection of information about the resource
id Unique identifier for the connection, such as 1c89922d-92ba-46c1-850f-
e2a8a416ddf2
name Name of the connection, such as Connection29
description Description of the connection, such as Planning
url The URL of the connection, such as https://<BASE-URL>/
HyperionPlanning
domain The domain name for the connection
username The username for the connection, such as admin
modified The time stamp of the last modification to the connection details, such as
2021-01-18 12:23:49.0
modifiedBy The last service administrator to modify the connection details, such as
admin
8-174
Chapter 8
Working with Connections
Example Response
The identity domain information as shown as part of the response.
{
"id": "<ID>",
"name": "<NEW_CONNECTION_NAME>",
"description": "<NEW_DESCRIPTION>",
"url": "https://<BASE-URL>/HyperionPlanning",
"domain": "<DOMAIN_NAME>",
"username": "<NEW_USERNAME>",
"modified": "2021-02-02 09:16:02.0",
"modifiedBy": "admin",
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/epm/v1/
applications/epbcs1/connections/f83b3da2-9505-415e-b7f7-3cf113cc94e4",
"action": "POST",
"rel": "self",
"data": null
}
]
}
8-175
9
Migration REST APIs
Use the Migration REST APIs to get API versions, work with files, manage services and
application snapshots, work with users, and skip updates.
Some Migration REST APIs are version 11.1.2.3.600 and others are version v1 or v2. Passing
the incorrect version will result in 404 errors when the API is invoked. Be sure to use the
correct version for the API. Be sure to use the correct version for the API. Migration REST API
versions are as follows.
These Migration APIs are version 11.1.2.3.600:
• Delete Files (v11.1.2.3.600)
• Download
• Get Information About All Application Snapshots
• Get Information About All Services
• Get Information About a Specific Application Snapshot
• List Files (v11.1.2.3.600)
• Provide Feedback (v11.1.2.3.600)
• Run Recreate on a Service (11.1.2.3.600)
• Upload
These Migration APIs are version v1:
• Clone an Environment
• Copy a File Between Instances (v1)
• Copy Application Snapshot (v1)
• Copy from Object Store (v1)
• Copy to Object Store (v1)
• Download Application Snapshot (v1)
• Get Essbase Query Governor Execution Time
• Get the Build Version and Daily Maintenance Window Time (v1)
• LCM Import (v1)
• LCM Export (v1)
• Manage Permission for Manual Access to Database (v1)
• Rename Application Snapshot (v1)
• Restart the Service Instance (v1)
• Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v1)
• Send Email (v1)
• Set Encryption Key (v1)
9-1
Chapter 9
9-2
Chapter 9
URL Structure for Migration
https://<BASE-URL>/interop/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• {api_version}: API version you are developing with.
• {path}: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
Note:
Some Migration REST APIs are version 11.1.2.3.600 and others are version v1 or v2.
Be sure to use the correct version for the API. Passing the incorrect version will result
in 404 errors when the API is invoked.
You can find an API version using REST APIs as described here: Getting API
Versions for Migration APIs. For a list of all of the Migration APIs and their version
numbers, see Migration REST APIs.
9-3
Chapter 9
Getting API Versions for Migration APIs
Before using the REST resources, you must understand how to access the REST resources
and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs.
Using this REST API requires prerequisites. See Prerequisites.
REST Resource
GET /interop/rest/
Request
Supported Media Types: application/json
Name Description
Details In case of errors, details are published with the error string
Status See Migration Status Codes
Items Detailed information about the API
Version The version
9-4
Chapter 9
Getting API Versions for Migration APIs
Name Description
Lifecycle Possible values: active, deprecated
Latest Whether this version is the latest
Links Detailed information about the link
Href Links to API call
Action The HTTP call type
Rel Possible values: self
Data Parameters as key value pairs passed in the request
lifecycle The stage in the lifecycle, such as active
version The version, such as 11.1.2.3.600, v1, and v2, for example,
"version": "11.1.2.3.600", "v1", v2"
serviceType The service type, such as PCMCS
serverVersion The server version, such as 21.05.70
buildVersion The build version, such as 21.05.52
{
"links": [
{
"href": "href":"https://<BASE-URL>/interop/rest/11.1.2.3.600",
"rel": "self",
"data": null,
"action": "GET"
}
],
"details": null,
"status": 0,
"items": [
{
"latest": true,
"links": [
{
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600",
"rel": "version",
"data": null,
"action": "GET"
}
],
"lifecycle": "active",
"version": "11.1.2.3.600",
"serviceType": "PCMCS",
"serverVersion": "21.05.70",
"buildVersion": "21.05.52"
}
],
}
9-5
Chapter 9
Getting API Versions for Migration APIs
//
//
// BEGIN - List all the versions in PBCS
//
public void getLCMVersions() throws Exception {
String urlString = String.format("%s/interop/rest", serverUrl);
String response = executeRequest(urlString, "GET", null);
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0) {
JSONArray fileList = json.getJSONArray("items");
System.out.println("List of files are :");
JSONObject jObj = null;
for(int i=0; i<fileList.length();i++){
System.out.println("Version :" + jObj.getString("version"));
System.out.println("Lifecycle :" + jObj.getString("lifecycle"));
System.out.println("Latest :" + jObj.getString("latest"));
System.out.println("Link :" + ((JSONObject) ((JSONArray)
jObj.getJSONArray("links")).get(0)).getString("href") + "\n");
}
}
}
//
// END - List all the versions in PBCS
//
funcGetLCMVersions() {
url=$SERVER_URL/interop/rest
funcExecuteRequest "GET" $url
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "List of versions :"
count=`echo $output | jq '.items | length'`
i=0
while [ $i -lt $count ]; do
echo "Version : " `echo $output | jq '.items['$i'].version'`
echo "Lifecycle :" `echo $output | jq '.items['$i'].lifecycle'`
echo "Latest :" `echo $output | jq '.items['$i'].latest'`
echo "Link :" `echo $output | jq '.items['$i'].links[0].href'`
echo ""
9-6
Chapter 9
Getting API Versions for Migration APIs
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def getLCMVersions() {
def url;
try {
url = new URL(serverUrl + "/interop/rest/")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "GET", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 ) {
def items = object.items
println "List of versions :"
items.each{
println "Version : " + it.version
println "Lifecycle : " + it.lifecycle
println "Latest : " + it.latest
println "Link : " + it.links[0].href + "\n"
}
} else {
println "Error occurred while listing versions"
if (object.details != null)
println "Error details: " + object.details
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-7
Chapter 9
Getting API Versions for Migration APIs
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
GET /interop/rest/{api_version}
Request
Parameters:
The following table summarizes the client request.
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values: self, recreate service
data Parameters as key value pairs passed in the request
{
"status":0,
"details":null,
"links":[{
"data":null,
"action":"GET",
"href":"https://<BASE-URL/interop/rest/11.1.2.3.600",
"rel":"self"
},{
"data":null,
"action":"GET",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/services",
"rel":"recreate service"
},{
"data":null,
"action":"GET",
9-8
Chapter 9
Getting API Versions for Migration APIs
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applications",
"rel":"application service"
},{
"data":null,
"action":"GET", "href":"https://<BASE-URL>/interop/rest/
11.1.2.3.600/applicationsnapshots "rel":"application snapshot service"
},{
"data":null,
"action":"POST",
"rel":"feedback services",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/feedback"
}]
}
//
// BEGIN - List version details
//
public void getLCMVersionDetails() throws Exception {
String urlString = String.format("%s/interop/rest/%s", serverUrl,
apiVersion);
String response = executeRequest(urlString, "GET", null);
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0) {
JSONArray linksArray = json.getJSONArray("links");
System.out.println("Version " + apiVersion + " details :");
JSONObject jObj = null;
for(int i=0; i < linksArray.length(); i++){
jObj = (JSONObject)linksArray.get(i);
System.out.println("Service :" + jObj.getString("rel"));
System.out.println("URL :" + jObj.getString("href"));
System.out.println("Action :" + jObj.getString("action") + "\n");
}
}
}
//
// END - List version details
//
funcGetLCMVersionDetails() {
url=$SERVER_URL/interop/rest/$API_VERSION
funcExecuteRequest "GET" $url
9-9
Chapter 9
Getting API Versions for Migration APIs
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Version $API_VERSION details :"
count=`echo $output | jq '.links | length'`
i=0
while [ $i -lt $count ]; do
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def getLCMVersionDetails() {
def url;
try {
url = new URL(serverUrl + "/interop/rest/" + apiVersion)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "GET", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 ) {
def links = object.links
println "Version " + apiVersion + " details :"
links.each{
println "Service : " + it.rel
println "URL : " + it.href
println "Action : " + it.action + "\n"
}
} else {
println "Error occurred while fetching version details"
if (object.details != null)
println "Error details: " + object.details
}
}
Common Functions
• See Common Helper Functions for Java
9-10
Chapter 9
Import and Export Files
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
Identity Domain Administrator role is required to import users and predefined roles
REST Resource
POST /interop/rest/{api_version}/applicationsnapshots/{applicationSnapshotName}/
migration?q={type:"import"}
9-11
Chapter 9
Import and Export Files
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
9-12
Chapter 9
Import and Export Files
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
items Details about the resource
source From where the navigation is being performed
destination To where the navigation is being performed
name Name of the task, usually "Task Information"
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"details":null,
"status":-1,
"links":[{
"data":null,
"action":"POST",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migrationq={type:"import"}"
},{
"data":null,
"action":"POST",
"rel":"Job Status",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/2"
}]
}
{"status":1,
"items":[{
"source":"/Nasdaq/HSS-Shared Services",
"name":"Task Information",
"destination":"Shared Services",
"links":[{
"data":null,
"action":"GET",
9-13
Chapter 9
Import and Export Files
"rel":"Job Details",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=25&offset=0&msgtype=error"}]
},
{"source":"/Artifact Snapshot/HP-SS2",
"name":"Task Information",
"destination":"",
"links":[{
"data":null,
"action":"GET",
"rel":"Job Details",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/1/details?
limit=25&offset=0&msgtype=error"}]
}],
"details":null,
"links":[{
"data":null,
"action":"POST",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1"}
]}
}
{"status":0,
"items":[{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children import.
User user0026 not found. Please ensure that a user exists in the system.",
"msgCategory":"14000: Error reported.",
"msgCategory":"14000: Error reported."
},{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children import.
User user0025 not found. Please ensure that a user exists in the system.",
"msgCategory":"14000: Error reported." }
],
"details":null,
"links":[{
"data":null,
"action":"GET",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=2&msgtype=error&offset=25"},
{"data":null,
"action":"GET",
"rel":"next",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
9-14
Chapter 9
Import and Export Files
applicationsnapshots/ss2/migration/1/0/details?
limit=2&offset=27&msgType=error"},
{"data":null,
"action":"GET",
"rel":"prev",
"href":https://<BASE-URL>/rest/11.1.2.3.600/applicationsnapshots/ss2/
migration/1/0/details?limit=2&offset=23&msgType=error
}]
}
{"status":0,
"items":[{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children import.
User user0026 not found. Please ensure that a user exists in the system.",
"msgCategory":"14000: Error reported.",
"msgCategory":"14000: Error reported."
},{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children import.
User user0025 not found. Please ensure that a user exists in the system.",
"msgCategory":"14000: Error reported." }
],
"details":null,
"links":[{
"data":null,
"action":"GET",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=2&msgtype=error&offset=25"},
{"data":null,
"action":"GET",
"rel":"next",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=2&offset=27&msgType=error"},
{"data":null,
"action":"GET",
"rel":"prev",
"href":https://<BASE-URL>/rest/11.1.2.3.600/applicationsnapshots/ss2/
migration/1/0/details?limit=2&offset=23&msgType=error
}]
}
9-15
Chapter 9
Import and Export Files
{"status":0,
"items":[{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children import.
User user0026 not found. Please ensure that a user exists in the system.",
"msgCategory":"14000: Error reported.",
"msgCategory":"14000: Error reported."
},{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children import.
User user0025 not found. Please ensure that a user exists in the system.",
"msgCategory":"14000: Error reported." }
],
"details":null,
"links":[{
"data":null,
"action":"GET",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=2&msgtype=error&offset=25"},
{"data":null,
"action":"GET",
"rel":"next",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=2&offset=27&msgType=error"},
{"data":null,
"action":"GET",
"rel":"prev",
"href":https://<BASE-URL>/rest/11.1.2.3.600/applicationsnapshots/ss2/
migration/1/0/details?limit=2&offset=23&msgType=error
}]
}
{"status":0,
"items":[{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children import.
User user0026 not found. Please ensure that a user exists in the system.",
"msgCategory":"14000: Error reported.",
"msgCategory":"14000: Error reported."
},{
"msgType":"error",
"artifact":"/Native Directory/Groups",
9-16
Chapter 9
Import and Export Files
9-17
Chapter 9
Import and Export Files
particular task can be fetched in the manner of pagination. Acceptable values for msgtype are:
error/warn/info; limit represents the number of issues requested per request, and offset
marks the beginning number to fetch the issues.
This API is version v2.
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
Identity Domain Administrator role is required to import users and predefined roles.
REST Resource
POST /interop/rest/v2/snapshots/import
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Support Media Types: application/json
9-18
Chapter 9
Import and Export Files
https://<BASE-URL>/interop/rest/v2/snapshots/import
{
"snapshotName": "Artifact Snapshot",
"parameters": {
"importUsers": true,
"userPassword": "epm_cloud",
"resetPassword": false
}
}
Response
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href
to get the status of the import operation
data Parameters as key value pairs passed in the request
items Details about the resource
source From where the navigation is being performed
destination To where the navigation is being performed
name Name of the task, usually "Task Information"
links Details of the first URL to be requested to get the job details; rel is "Job
Details"
{
"details": null,
"status": -1,
"links": [
9-19
Chapter 9
Import and Export Files
{
"href": "https://<BASE-URL>/interop/rest/v2/snapshots/import",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/v2/status/migration/24",
"action": "POST",
"rel": "Job Status",
"data": null
}
]
}
{
"details": null,
"status": 0,
"items": [
{
"name": "Task Information",
"source": "/Artifact Snapshot/HSS-Shared Services",
"destination": "Shared Services",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/24/0/details?limit=25&offset=0&msgtype=warning",
"action": "GET",
"rel": "Job Details",
"data": null
}
]
},
{
"name": "Task Information",
"source": "/Artifact Snapshot/HP-Vision",
"destination": "Vision",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/24/1/details?limit=25&offset=0&msgtype=warning",
"action": "GET",
"rel": "Job Details",
"data": null
}
]
},
{
"name": "Task Information",
"source": "/Artifact Snapshot/DOCREP-Document Repository",
"destination": "Document Repository",
"links": [
{
9-20
Chapter 9
Import and Export Files
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/24/2/details?limit=25&offset=0&msgtype=warning",
"action": "GET",
"rel": "Job Details",
"data": null
}
]
},
{
"name": "Task Information",
"source": "/Artifact Snapshot/CALC-Calculation Manager",
"destination": "Calculation Manager",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/24/3/details?limit=25&offset=0&msgtype=warning",
"action": "GET",
"rel": "Job Details",
"data": null
}
]
},
{
"name": "Task Information",
"source": "/Artifact Snapshot/FDMEE-FDM Enterprise Edition",
"destination": "FDM Enterprise Edition",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/24/4/details?limit=25&offset=0&msgtype=warning",
"action": "GET",
"rel": "Job Details",
"data": null
}
]
}
],
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/migration/24",
"action": "GET",
"rel": "self",
"data": null
}
]
}
9-21
Chapter 9
Import and Export Files
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
REST Resource
POST /interop/rest/{api_version}/applicationsnapshots/{applicationSnapshotName}/
migration?q={type:"export}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
9-22
Chapter 9
Import and Export Files
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Attribute Description
details In case of errors, details are published with the error string
status See Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values. Can be self and/or Job Status. If set to Job Status, you can
use the href to get the status of the re-export operation
data Parameters as key value pairs passed in the request
items Details about the resource
source From where the navigation is being performed
destination To where the navigation is being performed
name Name of the task, usually "Task Information"
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"status":-1,
9-23
Chapter 9
Import and Export Files
"links":[{
"data":null,
"action":"POST",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migrationq={type:"export"}"
},{
"data":null,
"action":"POST",
"rel":"Job Status",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/8"
}],
"details":null
}
{"status":1,
"items":[{
"source":"/Nasdaq/HSS-Shared Services",
"name":"Task Information",
"destination":"Shared Services",
"links":[{
"data":null,
"action":"GET",
"rel":"Job Details",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=25&offset=0&msgtype=error"}]
},
{"source":"/Artifact Snapshot/HP-NASDAQ",
"name":"Task Information",
"destination":"",
"links":[{
"data":null,
"action":"GET",
"rel":"Job Details",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/1/details?
limit=25&offse=0&msgtype=error"}]
}],
"details":null,
"links":[{
"data":null,
"action":"POST",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1"}
]}
{"status":0,
"items":[{
9-24
Chapter 9
Import and Export Files
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children
import. User user0026 not found. Please ensure that a user exists in the
system.",
"msgCategory":"14000: Error reported.",
"msgCategory":"14000: Error reported."
},{
"msgType":"error",
"artifact":"/Native Directory/Groups",
"msgText":"EPMIE-00069: Failed to find user during group children
import. User user0025 not found. Please ensure that a user exists in the
system.",
"msgCategory":"14000: Error reported." }
],
"details":null,
"links":[{
"data":null,
"action":"GET",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=2&msgType=error&offset=25"},
{"data":null,
"action":"GET",
"rel":"next",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?
limit=2&offset=27&msgType=error"},
{"data":null,
"action":"GET",
"rel":"prev",
"href":https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2/migration/1/0/details?limit=2&offset=23&msgType=error
}]
}
//
// BEGIN - Export an application snapshot
//
public void exportSnapshot(String applicationSnapshotName) throws Exception
{
JSONObject params = new JSONObject();
params.put("type","export");
String urlString = String.format("%s/interop/rest/%s/
applicationsnapshots/%s/migration?q=%s", serverUrl, apiVersion,
URLEncoder.encode(applicationSnapshotName, "UTF-8"), params.toString());
String response = executeRequest(urlString, "POST", null);
System.out.println("Export started successfully");
getMigrationJobStatus(fetchPingUrlFromResponse(response, "Job Status"),
9-25
Chapter 9
Import and Export Files
"POST");
}
//
// END - Export an application snapshot
//
funcExportSnapshot() {
param=$(echo "{type:export}" | sed -f urlencode.sed)
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/migration?q=$param
funcExecuteRequest "POST" $url
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started exporting successfully"
funcGetMigrationStatus "POST"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def exportSnapshot(applicationSnapshotName) {
def url;
try {
String snapshotName = URLEncoder.encode(applicationSnapshotName,
"UTF-8");
JSONObject params = new JSONObject();
params.put("type","export");
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/
applicationsnapshots/" + snapshotName + "/migration?q=" + params.toString());
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", null, "application/x-www-form-
urlencoded");
if (response != null) {
getMigrationJobStatus(fetchPingUrlFromResponse(response, "Job
Status"), "POST");
9-26
Chapter 9
Import and Export Files
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
REST Resource
POST /interop/rest/v2/snapshots/export
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-27
Chapter 9
Import and Export Files
https://<BASE-URL>/interop/rest/v2/snapshots/export
{
"snapshotName": "Artifact Snapshot"
}
Response
Supported Media Types: application/json
Attribute Description
details In case of errors, details are published with the error string
status See Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values. Can be self and/or Job Status. If set to Job Status, you
can use the href to get the status of the re-export operation
data Parameters as key value pairs passed in the request
items Details about the resource
source From where the navigation is being performed
destination To where the navigation is being performed
name Name of the task, usually "Task Information"
links Details of the first URL to be requested to get the job details; rel is "Job
Details"
{
"details": null,
"status": -1,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/snapshots/export",
"action": "POST",
9-28
Chapter 9
Import and Export Files
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/v2/status/migration/28",
"action": "POST",
"rel": "Job Status",
"data": null
}
]
}
{
"details": null,
"status": 0,
"items": [
{
"name": "Task Information",
"source": "Shared Services",
"destination": "/Artifact Snapshot1/HSS-Shared Services",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/28/0/details?limit=25&offset=0&msgtype=info",
"action": "GET",
"rel": "Job Details",
"data": null
}
]
},
{
"name": "Task Information",
"source": "Vision",
"destination": "/Artifact Snapshot1/HP-Vision",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/28/1/details?limit=25&offset=0&msgtype=info",
"action": "GET",
"rel": "Job Details",
"data": null
}
]
},
{
"name": "Task Information",
"source": "Document Repository",
"destination": "/Artifact Snapshot1/DOCREP-Document Repository",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/
migration/28/2/details?limit=25&offset=0&msgtype=info",
"action": "GET",
9-29
Chapter 9
Import and Export Files
9-30
Chapter 9
Upload and Download Files
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Upload
Uploads a file from the current directory on the local machine to the repository. Files on the
repository cannot be accessed directly.
If a file already exists, the API gives an error and does not overwrite it. Use this command to
upload data, metadata, and back up snapshots to a service instance. See About EPM
Automate in Working with EPM Automate.
If a -1 status is returned and it is the last chunk to be uploaded, this means that an LCM artifact
snapshot has been uploaded and zip extraction is in progress. The client pings the URL until
the status is a positive integer. This job is done asynchronously.
Note: The entire path to the file must be encoded, for example, changing / to %2F and spaces
to %20.
For example, change this path to an .HTML file in the apr directory:
apr/2020-03-04 23_07_20/2020-03-04 23_07_20.html
to this:
apr%2F2020-03-04%2023_07_20%2F2020-03-04%2023_07_20.html
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
9-31
Chapter 9
Upload and Download Files
REST Resource
POST /interop/rest/11.1.2.3.600/applicationsnapshots/{applicationSnapshotName}/
contents
Note:
For Data Management uploads, use the following JSON format for the query
parameter:
/interop/rest/11.1.2.3.600/applicationsnapshots/
{applicationSnapshotName}/contents?extDirPath=inbox
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/octet-stream
9-32
Chapter 9
Upload and Download Files
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values: self, recreate service
data Parameters as key value pairs passed in the request
9-33
Chapter 9
Upload and Download Files
{
"status":0,
"details":null,
"links":[{
"data":null,
"action":"POST",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/
{applicationSnapshotName}/contents
/**
*
* Simple Implementation class to execute Upload functionality for API
version 11.1.2.3.600
*/
public class UploadFile
{
try {
status = sendFileContents(filePath, extDirPath);
if(status)
System.out.println("Uploaded contents to " + new
File(filePath).getName());
else
System.err.println(details);
} catch (Exception e) {
e.printStackTrace();
}
}
9-34
Chapter 9
Upload and Download Files
try {
String restURL = String.format(
"%s/interop/rest/11.1.2.3.600/applicationsnapshots/%s/
contents",
serverUrl, URLEncoder.encode(file.getName(), "UTF-8"));
if(null != extDirPath)
restURL = restURL + "?extDirPath="+extDirPath;
URL url = new URL(restURL);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setInstanceFollowRedirects(false);
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setRequestProperty("Authorization",
"Basic " + new
sun.misc.BASE64Encoder().encode(creds.getBytes()));
connection.setRequestProperty("Content-Type", "application/octet-
stream");
String responseBody =
getStringFromInputStream(connection.getInputStream());
if (statusCode == 200 && responseBody != null) {
int commandStatus = getCommandStatus(responseBody);
if (commandStatus == -1) {
9-35
Chapter 9
Upload and Download Files
getJobStatus(fetchPingUrlFromResponse(responseBody, "Job
Status"), "GET");
}
if (commandStatus == 0) {
return true;
}
else{
details = getDetails(responseBody);
}
}
return false;
} finally {
if(null != content)
content.close();
if (connection != null)
connection.disconnect();
}
}
/**
* Method to retrieve the error message
* @param response
* @return String details
* @throws Exception
*/
private String getDetails(String response) throws Exception {
JSONObject json = new JSONObject(response);
if (!JSONObject.NULL.equals(json.get("details")))
return json.getString("details");
else
return "NA";
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-36
Chapter 9
Upload and Download Files
Download
Downloads a file from the repository to the current directory in the local environment.
If the content type of the response is application/JSON, then an error with details is displayed
on the server. Otherwise, the content of the file is streamed through the response.
Note: The entire path to the file must be encoded, for example, changing / to %2F and spaces
to %20. This API can be used to download files up to 1GB in a single request.
For example, change this path to an .HTML file in the apr directory:
apr/2020-03-04 23_07_20/2020-03-04 23_07_20.html
to this:
apr%2F2020-03-04%2023_07_20%2F2020-03-04%2023_07_20.html
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
GET /interop/rest/{api_version}/applicationsnapshots/{applicationSnapshotName}/
contents
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
The following table summarizes the GET request parameters.
9-37
Chapter 9
Upload and Download Files
Example of Request
https://<BASE-URL>/interop/rest/11.1.2.3.600/applicationsnapshots/Vision.zip/
contents
Name Description
Details In case of errors, details are published with the error string
Status See Migration Status Codes
Links Detailed information about the link
Href Links to API call
Action The HTTP call type
Rel Possibly value: self
Data Parameters as key value pairs passed in the request
Response
Supported Media Types: application/json or application/octet-stream
{
"details": "Invalid file : Vision.zip",
9-38
Chapter 9
Upload and Download Files
"status":1,
"links":[{
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/Vision.zip/contents",
"action":"GET",
"rel":"self",
"data":null
}]
}
try {
fileName = fileName.replaceAll("/", "\\\\");
URL url = new URL(String.format("%s/interop/rest/%s/
applicationsnapshots/%s/contents", serverUrl,
apiVersion, URLEncoder.encode(fileName, "UTF-8")));
9-39
Chapter 9
Upload and Download Files
9-40
Chapter 9
View and Delete Files
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
9-41
Chapter 9
View and Delete Files
REST Resource
GET /interop/rest/{api_version}/applicationsnapshots
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Response
Name Description
Details Will be published in case of error with the error string
Status See Migration Status Codes
Items
Name Name of the application snapshot
Type Can be LCM or EXTERNAL
Type signifies if this snapshot is for LCM or EXTERNAL. LCM indicates that the file
is an LCM snapshot. EXTERNAL indicates that files are not LCM, such as
Planning files.
Size Size of the application snapshot in bytes. Available only for type EXTERNAL
Lastmodifiedtim Time in Long value as per the last modified time of the file.
e
Links Detailed information about the link
Href Link to API call/ status API
Action The HTTP call type
Rel Will be self
Data Parameters as key value pairs passed in the request
{
"status":0,
"items":[{
"name":"sample.csv",
"type":"EXTERNAL",
"size":"18",
"lastmodifiedtime":"1422534438000"
},{
"name":"snapshot1",
"type":"LCM",
"size":null,
9-42
Chapter 9
View and Delete Files
"lastmodifiedtime":null
}],
"details":null,
"links":[{
"data":null,
"action":"GET",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots",
"rel":"self"
}]
}
//
// BEGIN - List all the files in PBCS
//
public void listFiles() throws Exception {
String urlString = String.format("%s/interop/rest/%s/
applicationsnapshots", serverUrl, apiVersion);
String response = executeRequest(urlString, "GET", null);
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0) {
if (json.get("items").equals(JSONObject.NULL))
System.out.println("No files found");
else {
System.out.println("List of files :");
JSONArray itemsArray = json.getJSONArray("items");
JSONObject jObj = null;
for (int i=0; i < itemsArray.length(); i++){
jObj = (JSONObject)itemsArray.get(i);
System.out.println(jObj.getString("name"));
}
}
}
}
//
// END - List all the files in PBCS
//
funcListFiles() {
url=$SERVER_URL/interop/rest/$API_VERSION/applicationsnapshots
funcExecuteRequest "GET" $url
9-43
Chapter 9
View and Delete Files
def listFiles() {
def url;
try {
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/
applicationsnapshots")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "GET", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 ) {
def items = object.items
if (items == null) {
println "No files found"
}
else {
println "List of files :"
items.each{
println it.name
}
}
} else {
println "Error occurred while listing files"
if (object.details != null)
println "Error details: " + object.details
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-44
Chapter 9
View and Delete Files
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
GET /interop/rest/v2/files/list
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Example URL
https://<BASE-URL>/interop/rest/v2/files/list
Response
Name Description
Details Will be published in case of error with the error string
Status See Migration Status Codes
Items
Name Name of the file or application snapshot
Type Can be LCM or EXTERNAL
Type signifies if this is an LCM snapshot or not. LCM indicates that the file is an
LCM snapshot. EXTERNAL indicates that the file is not an LCM snapshot, such as
a Planning file.
Size Size of the file in bytes. Available only for type EXTERNAL
9-45
Chapter 9
View and Delete Files
Name Description
Lastmodifiedtim Last modified time of the file in milliseconds since 1970-01-01.
e
Links Detailed information about the link
Href Link to API call/ status API
Action The HTTP call type
Rel Will be self
Data null
{
"status":0,
"items":[{
"name":"sample.csv",
"type":"EXTERNAL",
"size":"18",
"lastmodifiedtime":"1422534438000"
},{
"name":"Artifact Snapshot",
"type":"LCM",
"size":null,
"lastmodifiedtime":null
}],
"details":null,
"links":[{
"data":null,
"action":"GET",
"href": "https://<BASE-URL>/interop/rest/v2/files/list",
"rel":"self"
}]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-46
Chapter 9
View and Delete Files
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
DELETE /interop/rest/{api_version}/applicationsnapshots/
{applicationSnapshotName
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
9-47
Chapter 9
View and Delete Files
Parameters Description
Details Published if there is an error with the error string
Status See Migration Status Codes
Links Detailed information about the link
Href Links to the API call
Action The HTTP call type
Rel Possible value: self
Data Parameters as key value pair passed in the request
{
"status":0,
"links":[{
"data":null,
"action":"DELETE",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss2"
}],
"details":null
}
//
// BEGIN - Delete a file in PBCS
//
public void deleteFile(String fileName) throws Exception {
String urlString = String.format("%s/interop/rest/%s/applicationsnapshots/
%s", serverUrl, apiVersion, fileName);
String response = executeRequest(urlString, "DELETE", null);
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0)
System.out.println("File deleted successfully");
else
System.out.println("Error deleting file : " +
json.getString("details"));
}
//
// END - Delete a file in PBCS
//
9-48
Chapter 9
View and Delete Files
funcDeleteFile() {
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName
funcExecuteRequest "DELETE" $url
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Deleted successfully"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def deleteFile(filename) {
def url;
try {
String encodedFileName = URLEncoder.encode(filename, "UTF-8");
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/
applicationsnapshots/" + encodedFileName)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "DELETE", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 )
println "File deleted successfully"
else {
println "Error occurred while deleting file"
if (object.details != null)
println "Error details: " + object.details
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-49
Chapter 9
View and Delete Files
For more information on deleting files, see EPM Automate Commands in Working with EPM
Automate.
Note: To delete files using EPM Groovy rules, use the v11.2.3.600 version of the same API
instead of the v2 version.
This REST API is v2.
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
DELETE /interop/rest/v2/files/delete
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-50
Chapter 9
View and Delete Files
https://<BASE-URL>/interop/rest/v2/files/delete
{
"fileName": "inbox/file1.csv",
}
Response
Supported Media Types: application/json
Parameters Description
Details Published if there is an error with the error string
Status See Migration Status Codes
Links Detailed information about the link
Href Links to the API call
Action The HTTP call type
Rel Possible value: self
Data Parameters as key value pair passed in the request
{
"status":0,
"links":[{
"data":null,
"action":"DELETE",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/v2/files/delete"
}],
"details":null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-51
Chapter 9
View and Delete Files
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
POST /interop/rest/v3/files/delete
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/v3/files/delete
{
"fileName": "inbox/file1.csv",
}
9-52
Chapter 9
Manage Services
Response
Supported Media Types: application/json
Parameters Description
Details Published if there is an error with the error string
Status See Migration Status Codes
Links Detailed information about the link
Href Links to the API call
Action The HTTP call type
Rel Possible value: self
Data Parameters as key value pair passed in the request
{
"status":0,
"links":[{
"data":null,
"action": "POST",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/v3/files/delete"
}],
"details":null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Manage Services
You can manage all available services using the following REST resources.
9-53
Chapter 9
Manage Services
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Required Roles
Service Administrator
REST Resource
GET /interop/rest/{api_version}/services
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Response
Supported Media Types: application/json
9-54
Chapter 9
Manage Services
Name Description
api_version Specific API version
details In case of errors, details are published with the error string
status See Migration Status Codes
details In case of error, details are published with the error string
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self, PBCS recreate service, PBCS reset service -
details are for PBCS recreate service
data Parameters as key value pair passed in the request
{
"details":null,
"status":0,
"links":[{
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/services",
"rel":"self",
"data":null,
"action":"GET"
},{
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/services/PBCS/
recreate",
"rel":"PBCS recreate service",
"data":null,
"action":"POST"
},{
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/services/PBCS/
resetservice",
"rel":"PBCS reset service",
"data":null,
"action":"POST"
}]
}
//
// BEGIN - Get services
//
public void getServices() throws Exception {
9-55
Chapter 9
Manage Services
funcGetServices() {
url=$SERVER_URL/interop/rest/$API_VERSION/services
funcExecuteRequest "GET" $url
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Services list :"
count=`echo $output | jq '.links | length'`
i=0
while [ $i -lt $count ]; do
rel=`echo $output | jq '.links['$i'].rel'`
rel=`echo "$rel" | tr -d "\""`
if [ "$rel" != "self" ]; then
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
fi
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
9-56
Chapter 9
Manage Services
Prerequisites: json.jar
Common Functions: See CSS Common Helper Functions for Groovy
def getServices() {
def url;
try {
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/services")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "GET", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 ) {
def links = object.links
println "Services list :"
links.each{
if(!it.rel.equals("self")) {
println "Service : " + it.rel
println "URL : " + it.href
println "Action : " + it.action + "\n"
}
}
} else {
println "Error occurred while fetching services list"
if (object.details != null)
println "Error details: " + object.details
}
}
Required Roles
Service Administrator
REST Resource
GET /interop/rest/{api_version}/config/services/idlesessiontimeout
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
9-57
Chapter 9
Manage Services
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string
status • 0 - Operation success
• +ve - Operation failed, with the status signifying an error
timeout Session Timeout value in minutes
href Link to API call
action HTTP call type
rel Possible value: self
data null
{
"details": null,
"links": [{
"rel": "self",
"href": "<uri>/interop/rest/v2/config/services/
idlesessiontimeout",
"data": "null",
"action": "GET"
}],
"status": "0",
"items": [{
"timeout": "30"
}]
}
9-58
Chapter 9
Manage Services
Required Roles
Service Administrator
REST Resource
PUT /interop/rest/{api_version}/config/services/idlesessiontimeout
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
{
"timeout": "30"
}
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string
9-59
Chapter 9
Manage Services
Name Description
status • 0 - Operation success
• +ve - Operation failed, with the status signifying an error
href Link to API call
action HTTP call type
rel Possible value: self
data null
{
"links": [{
"rel": "self",
"href": "<uri>/interop/rest/v2/config/services/
idlesessiontimeout",
"data": null,
"action": "PUT"
}],
"details": "null",
"status": 0,
"items": null
}
Required Roles
Service Administrator
9-60
Chapter 9
Manage Services
REST Resource
POST /interop/rest/{api_version}/services/{service_type}/resetservice
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Payload: JSON
{
"comment": "Reset requested by Administrator",
"autotune": "true"
}
Response
Name Description
Details In case of errors, details are published with the error string
Status See Migration Status Codes
Links Detailed information about the link
9-61
Chapter 9
Manage Services
Name Description
Href Links to API call or status API
Action The HTTP call type
Rel Possible values: self and/or Job Status.
If the value is set to Job Status, you can use the href to get the status of the reset
service
Data Parameters as key value pairs passed in the request
{
"details":null,
"status":0,
"links":[{
"href":"https://<BASE-URL>/interop/rest/v1/services/PBCS/
resetservice",
"rel":"self",
"data":null,
"action":"POST"
},{
"href":"https://<BASE-URL>/interop/rest/v1/services/PBCS/resetservice/
777",
"rel":"Job Status",
"data":null,
"action":"GET"
}]
}
//
// BEGIN - Reset services
//
public void hardReset(String comment) throws Exception {
Scanner in = new Scanner(System.in);
System.out.println("Are you sure you want to restart the service instance
(yes/no): no ?[Press Enter]");
String s = in.nextLine();
if (!s.equals("yes")) {
System.out.println("User cancelled the reset command");
System.exit(0);
}
9-62
Chapter 9
Manage Services
params.put("comment",java.net.URLEncoder.encode(comment));
params.put("autotune","true");
String urlString = String.format("%s/interop/rest/%s/services/PBCS/
resetservice", serverUrl, lcmVersion);
String response = executeRequest(urlString, "POST", params.toString(),
"application/json");
getJobStatus(fetchPingUrlFromResponse(response, "Job Status"),"GET");
}
//
// END - Reset services
//
funcHardReset() {
echo "Are you sure you want to restart the service instance (yes/no): no ?
[Press Enter] "
read toCreate
if [ $toCreate != "yes" ]; then
echo "User cancelled the reset command"
exit 0
fi
url=$SERVER_URL/interop/rest/$LCM_VERSION/services/PBCS/resetservice
comment=$(echo $1 | sed -f urlencode.sed)
param="{\"comment\":\"$comment\",\"autotune\":\"true\"}"
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started hard reset succesfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def hardReset(comment) {
def userInput = System.console().readLine 'Are you sure you want to
restart the service instance (yes/no): no ?[Press Enter] '
if (userInput.equals("yes")) {
def url;
JSONObject params = new JSONObject();
9-63
Chapter 9
Manage Services
try {
params.put("comment",comment);
params.put("autotune","true");
url = new URL(serverUrl + "/interop/rest/" + lcmVersion + "/
services/PBCS/resetservice");
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params.toString(),
"application/json");
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/config/services/reset
9-64
Chapter 9
Manage Services
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Payload: JSON
{
"comment": "Reset requested by Administrator",
"parameters": {
"autotune": "false"
}
}
Response
Name Description
Details In case of errors, details are published with the error string
Status See Migration Status Codes
Links Detailed information about the link
Href Links to API call or status API
Action The HTTP call type
Rel Possible values: self and/or Job Status.
If the value is set to Job Status, you can use the href to get the status of the reset
service
Data Parameters as key value pairs passed in the request
9-65
Chapter 9
Manage Services
{
"details": null,
"status": 0,
"links": [{
"href": "https://<BASE-URL>/interop/rest/v2/config/services/reset",
"rel": "self",
"data": null,
"action": "POST"
},
{
"href": "https://<BASE-URL>/interop/rest/v2/config/status/service/
hardreset/1",
"rel": "Job Status",
"data": null,
"action": "GET"
}]
}
#!/bin/sh
USERNAME="<USERNAME>"
PASSWORD="<PASSWORD>"
SERVER_URL="<SERVICE_URL>"
APP_NAME="Vision"
API_VERSION="v2"
funcRemoveTempFiles() {
for var in "$@"
do
if [ -f $var ]; then
rm $var
fi
done
}
funcPrintErrorDetails() {
contentType=`echo $(grep 'Content-Type:' respHeader.txt) | tr -d
[:space:]`
if [ ! -z $contentType ] && [[ $contentType = *"application/json"* ]];
then
output=`cat $1`
error=`echo $output | jq '.details'`
echo "Error details: " $error
9-66
Chapter 9
Manage Services
fi
}
funcExecuteRequest() {
if [ ! -z "$4" ]; then
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $4" -d "$3" $2`
else
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $3" $2`
fi
funcGetStatus() {
output=`cat response.txt`
count=`echo $output | jq '.links | length'`
i=0
pingUrl=""
echo $pingUrl
completed="false"
9-67
Chapter 9
Manage Services
sleep 20
fi
funcRemoveTempFiles "pingResponse.txt"
done
}
funcHardReset() {
echo "Are you sure you want to restart the service instance (yes/no): no?
[Press Enter] "
read toReset
if [ $toReset != "yes" ]; then
echo "User cancelled the reset command"
exit 0
fi
url=$SERVER_URL/interop/rest/$API_VERSION/config/services/reset
comment=$(echo $1)
param="{\"comment\":\"${comment}\",\"parameters\":
{\"autotune\":\"false\"}}"
funcExecuteRequest "POST" "$url" "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ "${status}" == -1 ]; then
echo "Started hard reset succesfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRecreateService() {
removeAll=$1
essbaseChange=$2
tempServiceType=$3
echo "Are you sure you want to recreate the EPM environment (yes/no): no?
[Press Enter] "
read toCreate
url=$SERVER_URL/interop/rest/$API_VERSION/config/services/recreate
param="{\"parameters\":{\"removeAll\":\"${removeAll}
\",\"essbaseChange\":\"${essbaseChange}\", \"tempServiceType\":\"$
{tempServiceType}\"}}"
9-68
Chapter 9
Manage Services
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started recreating the environment successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
package com.oracle.test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
import java.util.Base64;
import org.json.JSONArray;
import org.json.JSONObject;
/*
* EPM Rest Samples.
* The userName variable uses the format <domain>.<username>.
*/
public class EPMRestSamples {
9-69
Chapter 9
Manage Services
try {
9-70
Chapter 9
Manage Services
if (payload != null) {
OutputStreamWriter writer = new
OutputStreamWriter(connection.getOutputStream());
writer.write(payload);
writer.flush();
}
9-71
Chapter 9
Manage Services
while (!completed) {
if (status == -1) {
try {
System.out.println("Processing. Please wait...");
Thread.sleep(20000);
}
catch (InterruptedException ie) {
completed = true;
throw ie;
}
}
else {
if (status > 0) {
System.out.println("Error occurred: " +
json.getString("details"));
}
else {
System.out.println("Execution completed successfully");
}
completed = true;
}
}
}
if (resStatus == -1) {
JSONArray lArray = jsonObj.getJSONArray("links");
for (int i = 0; i < lArray.length(); i++) {
JSONObject arr = lArray.getJSONObject(i);
9-72
Chapter 9
Manage Services
if (arr.get("rel").equals(retValue))
pingUrlString = (String) arr.get("href");
}
}
return pingUrlString;
}
if (!s.equals("yes")) {
System.out.println("User cancelled the recreate command");
System.exit(0);
}
if (!s.equals("yes")) {
System.out.println("User cancelled the recreate command");
System.exit(0);
}
innerParams.put("tempServiceType", tempServiceType);
innerParams.put("essbaseChange", essbaseChange);
innerParams.put("removeAll", removeAll);
params.put("parameters", innerParams);
9-73
Chapter 9
Manage Services
startTime=System.currentTimeMillis();
endTime = startTime+maxLoopTime;
String response = executeRequest(urlString, "POST",
params.toString(), "application/json");
getJobStatus(fetchPingUrlFromResponse(response, "Job Status"), "GET");
}
}
package com.groovy
import org.json.JSONObject
import groovy.json.JsonSlurper
endTime=0
maxLoopTime=(60 * 60 * 1000)
apiVersion = "v2"
userCredentials = username + ":" + password
basicAuth = "Basic " + userCredentials.bytes.encodeBase64().toString()
def getResponse(is) {
BufferedReader br = new BufferedReader(new InputStreamReader(is))
StringBuilder sb = new StringBuilder()
String line
br.close()
return sb.toString()
}
while (!completed) {
try {
pingResponse = executeRequest(pingUrl, methodType, null,
"application/json")
}
catch(exp) {
if(exp instanceof java.net.ConnectException || exp instanceof
java.net.SocketException) {
if(System.currentTimeMillis()<endTime) {
println("Processing. Please wait...")
Thread.sleep(60000)
9-74
Chapter 9
Manage Services
continue
}
throw new Exception("Command timeout..")
}
}
status = getJobStatusFromResponse(pingResponse)
if (status == "Processing") {
try {
println "Processing. Please wait..."
Thread.sleep(5000)
}
catch (InterruptedException e) {
completed = true
}
}
else {
println "Execution completed successfully"
completed = true
}
}
}
def getJobStatusFromResponse(response) {
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == -1) { return "Processing" }
else if (status == 0) { return "Completed" }
else { return object.details }
}
if (payload != null) {
OutputStreamWriter writer = new
OutputStreamWriter(connection.getOutputStream())
writer.write(payload)
writer.flush()
}
int statusCode
try { statusCode = connection.responseCode }
catch (all) { throw all }
def response
if (statusCode == 200 || statusCode == 201) {
if (connection.getContentType() != null && !
connection.getContentType().startsWith("application/json")) {
println "Error occurred in server"
9-75
Chapter 9
Manage Services
System.exit(0)
}
InputStream is = connection.getInputStream()
if (is != null) { response = getResponse(is) }
}
else {
if (statusCode == 503) {
throw new Exception("Service Unavailable")
}
InputStream is = connection.getErrorStream()
if (is != null && connection.getContentType() != null &&
connection.getContentType().startsWith("application/json")) {
println getJobStatusFromResponse(getResponse(is))
}
}
connection.disconnect()
return response
}
def hardReset(comment) {
if (!toReset.equals("yes")) {
println "User cancelled the resetService command"
System.exit(0)
}
def url
JSONObject params = new JSONObject()
JSONObject innerParams = new JSONObject()
9-76
Chapter 9
Manage Services
try {
params.put("comment", comment)
innerParams.put("autotune","true")
params.put("parameters",innerParams)
url = new URL(serverUrl+"/interop/rest/" + apiVersion + "/config/
services/reset")
}
catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0)
}
endTime=System.currentTimeMillis() +maxLoopTime
response = executeRequest(url, "POST", params.toString(), "application/
json")
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job
Status"),"GET")
}
}
def recreateService(removeall,essabaseoption,tempServiceType) {
def scenario="Recreate"
def toCreate = System.console().readLine 'Are you sure you want to
recreate the EPM environment (yes/no): no? [Press Enter] '
if (!toCreate.equals("yes")) {
println "User cancelled the recreate command"
System.exit(0)
}
def url
JSONObject params = new JSONObject()
JSONObject innerParams = new JSONObject()
try {
innerParams.put("tempServiceType", tempServiceType)
innerParams.put("essbaseChange", essabaseoption)
innerParams.put("removeAll", removeall)
params.put("parameters", innerParams)
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/config/
services/recreate")
}
catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0)
}
endTime=System.currentTimeMillis() +maxLoopTime
response = executeRequest(url, "POST", params.toString(), "application/
json")
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job
Status"),"GET")
9-77
Chapter 9
Manage Services
}
}
if("-reset".equalsIgnoreCase(option)) {
hardReset("POC Exit Criteria Check - Groovy");
}
else if("-recreate".equalsIgnoreCase(option)) {
recreateService("false", "default", "");
}
else {
println "Incorrect usage"
println "Usage: EPMRestSamples <option>"
println " where <option> is -recreate or -reset"
System.exit(1)
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-78
Chapter 9
Manage Services
• Before using this API, perform a complete backup of the environment. You can
create a backup snapshot by executing runDailyMaintenance.
This API is version 11.1.2.3.600.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/{api_version}/services/{servicename}/recreate
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
9-79
Chapter 9
Manage Services
9-80
Chapter 9
Manage Services
Response
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self and/or Job Status.
If the value is set to Job Status, you can use the href to get the status of the
recreate service
data Parameters as key value pairs passed in the request
{
"details":null,
"status":0,
"links":[{
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/services/PBCS/
recreate",
"rel":"self",
"data":null,
"action":"POST"
},{
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/services/PBCS/
recreate/777",
"rel":"Job Status",
"data":null,
"action":"GET"
}]
}
//
// BEGIN - Recreate services
//
public void recreateService(String serviceName, String serviceType, String
removeAll) throws Exception {
Scanner in = new Scanner(System.in);
System.out.println("Are you sure you want to recreate the EPM environment
(yes/no): no ?[Press Enter]");
9-81
Chapter 9
Manage Services
String s = in.nextLine();
if (!s.equals("yes")) {
System.out.println("User cancelled the recreate command");
System.exit(0);
}
//
// END - Recreate services
//
funcRecreateService() {
echo "Are you sure you want to recreate the EPM environment (yes/no):
no ?[Press Enter]"
read toCreate
if [ $toCreate != "yes" ]; then
echo "User cancelled the recreate command"
exit 0
fi
url=$SERVER_URL/interop/rest/$API_VERSION/services/EPM/recreate
json=$(echo "{\"removeAll\":\"true\"}" | sed -f urlencode.sed)
param="parameters=$json"
funcExecuteRequest "POST" $url $param "application/x-www-form-
urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started recreating the environment successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
9-82
Chapter 9
Manage Services
def recreateService(serviceName) {
def toCreate = System.console().readLine 'Are you sure you want to
recreate the EPM environment (yes/no): no ?[Press Enter]'
if (!toCreate.equals("yes")) {
println "User cancelled the recreate command"
System.exit(0)
}
def url;
JSONObject params = new JSONObject();
try {
params.put("removeAll", "true");
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/
services/" + serviceName + "/recreate");
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", "parameters="+param.toString(),
"application/x-www-form-urlencoded");
if (response != null) {
getJobStatus(response,"GET");
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-83
Chapter 9
Manage Services
• This API deletes the existing application and, optionally, all user defined artifacts
from the environment. Additionally, it re-creates the database and removes all
existing data. After recreating the service, you can create a new business process or
import one using REST APIs, Migration, or EPM Automate.
• This API deletes migration history. As a result, the Migration Status Report available
in Migration will not contain historic information.
• Before using this API, perform a complete backup of the environment. You can
create a backup snapshot by executing runDailyMaintenance.
This API is version v2.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/config/services/recreate
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Payload: JSON
9-84
Chapter 9
Manage Services
{
"parameters": {
"removeAll": "true",
"tempServiceType": "ARCS"
9-85
Chapter 9
Manage Services
}
}
Response
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self and/or Job Status.
If the value is set to Job Status, you can use the href to get the status of the
recreate service
data Parameters as key value pairs passed in the request
{
"details": null,
"status": 0,
"links": [{
"href": "https://<BASE-URL>/interop/rest/v2/config/services/recreate",
"rel": "self",
"data": null,
"action": "POST"
},
{
"href": "https://<BASE-URL>/interop/rest/v2/config/status/service/
recreate/1",
"rel": "Job Status",
"data": null,
"action": "GET"
}]
}
9-86
Chapter 9
Manage Services
#!/bin/sh
USERNAME="<USERNAME>"
PASSWORD="<PASSWORD>"
SERVER_URL="<SERVICE_URL>"
APP_NAME="Vision"
API_VERSION="v2"
funcRemoveTempFiles() {
for var in "$@"
do
if [ -f $var ]; then
rm $var
fi
done
}
funcPrintErrorDetails() {
contentType=`echo $(grep 'Content-Type:' respHeader.txt) | tr -d
[:space:]`
if [ ! -z $contentType ] && [[ $contentType = *"application/json"* ]];
then
output=`cat $1`
error=`echo $output | jq '.details'`
echo "Error details: " $error
fi
}
funcExecuteRequest() {
if [ ! -z "$4" ]; then
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $4" -d "$3" $2`
else
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $3" $2`
fi
funcGetStatus() {
output=`cat response.txt`
count=`echo $output | jq '.links | length'`
i=0
pingUrl=""
9-87
Chapter 9
Manage Services
echo $pingUrl
completed="false"
funcHardReset() {
echo "Are you sure you want to restart the service instance (yes/no): no?
[Press Enter] "
read toReset
if [ $toReset != "yes" ]; then
echo "User cancelled the reset command"
exit 0
fi
url=$SERVER_URL/interop/rest/$API_VERSION/config/services/reset
comment=$(echo $1)
param="{\"comment\":\"${comment}\",\"parameters\":
{\"autotune\":\"false\"}}"
funcExecuteRequest "POST" "$url" "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ "${status}" == -1 ]; then
echo "Started hard reset succesfully"
funcGetStatus "GET"
else
9-88
Chapter 9
Manage Services
funcRecreateService() {
removeAll=$1
tempServiceType=$2
echo "Are you sure you want to recreate the EPM environment (yes/no): no?
[Press Enter] "
read toCreate
url=$SERVER_URL/interop/rest/$API_VERSION/config/services/recreate
param="{\"parameters\":{\"removeAll\":\"${removeAll}
\":\"tempServiceType\":\"${tempServiceType}\"}}"
if [ $status == -1 ]; then
echo "Started recreating the environment successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
9-89
Chapter 9
Manage Services
exit 1
fi
package com.oracle.test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
import java.util.Base64;
import org.json.JSONArray;
import org.json.JSONObject;
/*
* EPM Rest Samples.
* The userName variable uses the format <domain>.<username>.
*/
public class EPMRestSamples {
9-90
Chapter 9
Manage Services
try {
br = new BufferedReader(new InputStreamReader(is));
while ((line = br.readLine()) != null) {
sb.append(line);
}
}
catch (IOException e) {
e.printStackTrace();
}
finally {
if (br != null) {
try { br.close(); }
catch (IOException e) { e.printStackTrace(); }
}
}
return sb.toString();
}
9-91
Chapter 9
Manage Services
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setRequestProperty("Authorization", "Basic " +
encoder.encodeToString((userName + ":" + password).getBytes()));
connection.setRequestProperty("Content-Type", contentType);
if (payload != null) {
OutputStreamWriter writer = new
OutputStreamWriter(connection.getOutputStream());
writer.write(payload);
writer.flush();
}
while (!completed) {
if (status == -1) {
try {
System.out.println("Processing. Please wait...");
9-92
Chapter 9
Manage Services
Thread.sleep(20000);
}
catch (InterruptedException ie) {
completed = true;
throw ie;
}
}
else {
if (status > 0) {
System.out.println("Error occurred: " +
json.getString("details"));
}
else {
System.out.println("Execution completed successfully");
}
completed = true;
}
}
}
if (resStatus == -1) {
JSONArray lArray = jsonObj.getJSONArray("links");
for (int i = 0; i < lArray.length(); i++) {
JSONObject arr = lArray.getJSONObject(i);
if (arr.get("rel").equals(retValue))
pingUrlString = (String) arr.get("href");
}
}
return pingUrlString;
}
if (!s.equals("yes")) {
System.out.println("User cancelled the recreate command");
System.exit(0);
}
9-93
Chapter 9
Manage Services
if (!s.equals("yes")) {
System.out.println("User cancelled the recreate command");
System.exit(0);
}
innerParams.put("tempServiceType", tempServiceType);
innerParams.put("removeAll", removeAll);
params.put("parameters", innerParams);
package com.groovy
import org.json.JSONObject
import groovy.json.JsonSlurper
endTime=0
maxLoopTime=(60 * 60 * 1000)
9-94
Chapter 9
Manage Services
apiVersion = "v2"
userCredentials = username + ":" + password
basicAuth = "Basic " + userCredentials.bytes.encodeBase64().toString()
def getResponse(is) {
BufferedReader br = new BufferedReader(new InputStreamReader(is))
StringBuilder sb = new StringBuilder()
String line
br.close()
return sb.toString()
}
while (!completed) {
try {
pingResponse = executeRequest(pingUrl, methodType, null,
"application/json")
}
catch(exp) {
if(exp instanceof java.net.ConnectException || exp instanceof
java.net.SocketException) {
if(System.currentTimeMillis()<endTime) {
println("Processing. Please wait...")
Thread.sleep(60000)
continue
}
throw new Exception("Command timeout..")
}
}
status = getJobStatusFromResponse(pingResponse)
if (status == "Processing") {
try {
println "Processing. Please wait..."
Thread.sleep(5000)
}
catch (InterruptedException e) {
completed = true
}
}
else {
println "Execution completed successfully"
completed = true
}
}
}
def getJobStatusFromResponse(response) {
9-95
Chapter 9
Manage Services
if (payload != null) {
OutputStreamWriter writer = new
OutputStreamWriter(connection.getOutputStream())
writer.write(payload)
writer.flush()
}
int statusCode
try { statusCode = connection.responseCode }
catch (all) { throw all }
def response
if (statusCode == 200 || statusCode == 201) {
if (connection.getContentType() != null && !
connection.getContentType().startsWith("application/json")) {
println "Error occurred in server"
System.exit(0)
}
InputStream is = connection.getInputStream()
if (is != null) { response = getResponse(is) }
}
else {
if (statusCode == 503) {
throw new Exception("Service Unavailable")
}
InputStream is = connection.getErrorStream()
if (is != null && connection.getContentType() != null &&
connection.getContentType().startsWith("application/json")) {
println getJobStatusFromResponse(getResponse(is))
}
}
connection.disconnect()
return response
}
9-96
Chapter 9
Manage Services
def pingUrlStr
if (object.status == -1) {
println "Started - " + scenario
def links = object.links
links.each{
if (it.rel.equals(relValue)) {
pingUrlStr=it.href
}
}
}
else {
println "Error details: " + object.details
System.exit(0)
}
return pingUrlStr
}
def hardReset(comment) {
if (!toReset.equals("yes")) {
println "User cancelled the resetService command"
System.exit(0)
}
def url
JSONObject params = new JSONObject()
JSONObject innerParams = new JSONObject()
try {
params.put("comment", comment)
innerParams.put("autotune","true")
params.put("parameters",innerParams)
url = new URL(serverUrl+"/interop/rest/" + apiVersion + "/config/
services/reset")
}
catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0)
}
endTime=System.currentTimeMillis() +maxLoopTime
response = executeRequest(url, "POST", params.toString(), "application/
json")
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job
Status"),"GET")
}
}
def recreateService(removeall,tempServiceType) {
9-97
Chapter 9
Manage Services
def scenario="Recreate"
def toCreate = System.console().readLine 'Are you sure you want to
recreate the EPM environment (yes/no): no? [Press Enter] '
if (!toCreate.equals("yes")) {
println "User cancelled the recreate command"
System.exit(0)
}
def url
JSONObject params = new JSONObject()
JSONObject innerParams = new JSONObject()
try {
innerParams.put("tempServiceType", tempServiceType)
innerParams.put("removeAll", removeall)
params.put("parameters", innerParams)
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/config/
services/recreate")
}
catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0)
}
endTime=System.currentTimeMillis() +maxLoopTime
response = executeRequest(url, "POST", params.toString(), "application/
json")
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job
Status"),"GET")
}
}
if("-reset".equalsIgnoreCase(option)) {
hardReset("POC Exit Criteria Check - Groovy");
}
else if("-recreate".equalsIgnoreCase(option)) {
recreateService("false", "");
}
else {
println "Incorrect usage"
println "Usage: EPMRestSamples <option>"
println " where <option> is -recreate or -reset"
System.exit(1)
}
9-98
Chapter 9
Manage Application Snapshots
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
9-99
Chapter 9
Manage Application Snapshots
Required Roles
Service Administrator
REST Resource
GET /interop/rest/{api_version}/applicationsnapshots
Response
Supported Media Types: application/json
Name Description
api_version Specific API version
details In case of errors, details are published with the error string
status See Migration Status Codes
items Detailed information about the API
name Name of the application snapshot
type Possible values: LCM, EXTERNAL
size Size of the application snapshot in bytes. Available only for type EXTERNAL
lastmodifiedtim Time in Long value as per the last modified time of the file. Will be available only for
e type EXTERNAL
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
9-100
Chapter 9
Manage Application Snapshots
{
"status":0,
"items":[{
"name":"sample.csv",
"type":"EXTERNAL",
"size":"18",
"lastmodifiedtime":"1422534438000"
},{
"name":"snapshot1",
"type":"LCM",
"size":null,
"lastmodifiedtime":null
}],
"details":null,
"links":[{
"data":null,
"action":"GET",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots",
"rel":"self"
}]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
REST Resource
GET /interop/rest/{api_version}/applicationsnapshots/{applicationSnapshotName}
Request
The following table summarizes the GET request parameters.
9-101
Chapter 9
Manage Application Snapshots
Response
Supported Media Types: application/json
Name Description
details In the case of an error, details are published with the error string
status See Migration Status Codes
items Detailed information about the API
name Name of the application snapshot
type Possible values: LCM, EXTERNAL
canexport Identifies whether this application snapshot can be exported using Migration.
Applicable only to Migration application artifacts
canimport Identifies whether this application snapshot can be imported using Migration.
Applicable only to Migration application artifacts
canupload Identifies whether the application snapshot can be uploaded
candownload Identifies whether the application snapshot can be downloaded
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values: self, import, export, upload, download, or delete
depending on the operation permitted on an application snapshot
data Parameters as key value pairs passed in the request
{
"status":0,
"items":[{
"name":"snapshot1",
"type":"LCM",
"canexport":true,
"canimport":true,
"canupload":true,
"candownload":true
}],
"details":null,
"links":[{
"data":null,
"action":"GET",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/snapshot1",
9-102
Chapter 9
Manage Application Snapshots
"rel":"self"
},{
"data":null,
"action":"GET",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/snapshot1/contents",
"rel":"download"
},{
"data":null,
"action":"POST",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/snapshot1/contents?
isLast=true&chunkSize=52428800&isFirst=true",
"rel":"upload"
},{
"data":null,
"action":"POST",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/snapshot1/migrationq={type:"export}"
"rel":"export"
},{
"data":null,
"action":"POST",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/snapshot1/migrationq={type:"import}",
"rel":"import"
},{
"data":null,
"action":"DELETE",
"href":"https://<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/ss1",
"rel":"delete"
}]
}
//
// BEGIN - Get application snapshot details
//
public void getApplicationSnapshotDetails(String snapshotName) throws
Exception {
String urlString = String.format("%s/interop/rest/%s/applicationsnapshots/
%s", serverUrl, apiVersion, snapshotName);
String response = executeRequest(urlString, "GET", null);
JSONObject json = new JSONObject(response);
9-103
Chapter 9
Manage Application Snapshots
funcGetApplicationSnapshotDetails() {
url=$SERVER_URL/interop/rest/$API_VERSION/applicationsnapshots/$1
funcExecuteRequest "GET" $url
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Application details :"
echo "Application snapshot name : " `echo $output | jq
'.items[0].name'`
echo "Application snapshot type : " `echo $output | jq
'.items[0].type'`
echo "Can be exported flag : " `echo $output | jq
'.items[0].canExport'`
echo "Can be imported flag : " `echo $output | jq
'.items[0].canImport'`
echo "Can be uploaded flag : " `echo $output | jq
'.items[0].canUpload'`
echo "Can be downloaded flag : " `echo $output | jq
'.items[0].canDownload'`
count=`echo $output | jq '.links | length'`
i=0
9-104
Chapter 9
Manage Application Snapshots
def getApplicationSnapshotDetails(applicationSnapshotName) {
def url;
try {
String snapshotName = URLEncoder.encode(applicationSnapshotName,
"UTF-8");
url = new URL(serverUrl + "/interop/rest/" + apiVersion + "/
applicationsnapshots/" + snapshotName)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "GET", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 ) {
println "Application details :"
println "Application snapshot name : " + object.items[0].name
println "Application snapshot type : " + object.items[0].type
println "Can be exported flag : " + object.items[0].canExport
println "Can be imported flag : " + object.items[0].canImport
println "Can be uploaded flag : " + object.items[0].canUpload
println "Can be downloaded flag : " + object.items[0].canDownload
def links = object.links
println "Services details :"
links.each{
println "Service : " + it.rel
println "URL : " + it.href
println "Action : " + it.action + "\n"
}
} else {
println "Error occurred while fetching application snapshot details"
if (object.details != null)
println "Error details: " + object.details
}
9-105
Chapter 9
Manage Application Snapshots
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
POST /interop/rest/{api_version}/applicationsnapshots
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
9-106
Chapter 9
Manage Application Snapshots
Name Description
action The HTTP call type
rel Is self, which denotes the URL of this REST API.
data Parameters as key value pairs passed in the request
{
"status":0,
"details":null,
"links":[{
"data":null,
"action":"POST",
"href":"https://<BASE-URL>/interop/rest/v1/applicationsnapshots/
ss2.zip/contents,
"rel":"self"
}]
}
https://<BASE URL>/interop/rest/v1/applicationsnapshots/snapshot.zip/contents?
q=%7B%22isFirst%22%3Atrue%2C%22chunkSize%22%3A14%2C%22fileSize%22%3A%223318004
%22%2C%22isLast%22%3Afalse%7D
{
"links": [
{
"rel": "self",{
"href": "https://<BASE-URL>/interop/rest/v1/applicationsnapshots/
snapshot.zip/contents?
q=%7B%22isFirst%22:true,%22chunkSize%22:14,%22fileSize%22:%223318004%22,%22isL
ast%22:false%7D",
"data": null,
"action": "POST"
9-107
Chapter 9
Manage Application Snapshots
}
],
"details": null,
"status": 0
}
https://<BASE URL>/interop/rest/v1/applicationsnapshots/snapshot.zip/contents?
q=%7B%22startRange%22%3A%220%22%2C%22isFirst%22%3Afalse%2C%22chunkSize%22%3A12
606%2C%22isLast%3A%22false%22%7D
{
"links": [
{
"rel": "self",{
"href": "https://<BASE-URL>/interop/rest/v1/applicationsnapshots/
snapshot.zip/contents?
q=%7B%22startRange%22:%220%22,%22isFirst%22:false,%22chunkSize%22:12606,%22isL
ast%22:false,%22fileSize%22:%2212606%22,%22endRange%22:%2212605%22,%22chunkNo%
22:1%7D",
"data": null,
"action": "POST"
}
],
"details": null,
"status": 0
}
To select the file, select tab Body, radio button Binary, and select File, Send.
9-108
Chapter 9
Manage Application Snapshots
https://<BASE URL>/interop/rest/v1/applicationsnapshots/snapshot.zip/contents?
q=%7B%22isFirst%22%3Afalse%2C%22chunkSize%22%3A14%2C%22fileSize%22%3A%2212606%
22%2C%22isLast%22%3Atrue%7D
{
"links": [
{
"rel": "self",{
"href": "https://<BASE-URL>/interop/rest/v1/applicationsnapshots/
snapshot.zip/contents?
q=%7B%22isFirst%22:false,%22chunkSize%22:14,%22fileSize%22:%223318004%22,%22is
Last%22:true%7D",
"data": null,
"action": "POST"
}
],
"details": null,
"status": 0
}
To select the file:, select tab Body, radio button Binary, select File, Send.
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
POST /interop/rest/v2/files/upload
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
9-109
Chapter 9
Manage Application Snapshots
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Is self, which denotes the URL of this REST API.
data Parameters as key value pairs passed in the request
9-110
Chapter 9
Manage Application Snapshots
https://<BASE-URL>/interop/rest/v2/files/upload
{
"fileName": "snapshot.zip",
"fileSize": "2468889"
}
Example Response 1
{
"status":0,
"details":null,
"links":[{
"data":null,
"action":"POST",
"href":"https://<BASE-URL>/interop/rest/v2/interop/rest/v2/files/
upload,
"rel":"self"
}]
}
Note:
Ensure the value of the fileSize is equivalent to the total size of the file and end
Range is set to fileSize -1.
https://<BASE-URL>/interop/rest/v2/files/upload/7224986735511603
To select the file: Select tab Body, radio button Binary, and choose File to upload.
9-111
Chapter 9
Manage Application Snapshots
Example Response 2
{
"details": null,
"status": 0,
"links": [
{
"href": " https://<BASE-URL>/interop/rest/v2/files/upload/
7224986735511603",
"action": "PATCH",
"rel": "self",
"data": null
}
]
}
Example URL and Payload to Extract the Content Out of the Zip File
Request method: POST
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/v2/files/upload/7224986735511603/complete
Example Response 3
{
"details": null,
"status": -1,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/files/upload/
7224986735511603/complete",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
7293659723083015",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
9-112
Chapter 9
Manage Application Snapshots
This API request needs to be requested when the status code received in the example 3
response is -1.
https://<BASE-URL>/interop/rest/v2/status/jobs/7293659723083015
Example Response 4
{
"details": null,
"status": 0,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
7293659723083015",
"action": "GET",
"rel": "self",
"data": null
}
]
}
9-113
Chapter 9
Manage Application Snapshots
Note:
The entire path to the file must be encoded; for example, changing / to %2F.
For example, change this path to an .HTML file in the apr directory:
apr/2020-03-04 23_07_20/2020-03-04 23_07_20.html
to this:
apr%2F2020-03-04%2023_07_20%2F2020-03-04%2023_07_20.html
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
GET /interop/rest/{api_version}/applicationsnapshots/{applicationSnapshotName}/
contents
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
The following table summarizes the GET request parameters.
9-114
Chapter 9
Manage Application Snapshots
pr%2F2020-03-04%0A23_07_20%2F2020-03-04%0A23_
07_20.html
apr%2F%0A2020-03-04%2023_07_20%2F%0Aaccess_lo
g.zip
apr%2F%0A2020-03-04%2023_07_20%2F%0Aactivityr
eport.json.
Example of Request
https://<BASE-URL>/interop/rest/v1/applicationsnapshots/Vision.zip/contents
Response
Supported Media Types: application/json
Response Header
fileExtension: This will have the file extension that can be used to create a file locally. Can
contain values such as zip or csv.
Attribute Description
details Published in case of errors with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
9-115
Chapter 9
Manage Application Snapshots
{
"details":"Not a valid file.",
"status":8,
"links":[{
"href":"https://<BASE-URL>/interop/rest/v1/applicationsnapshots/
s112.csv/contents",
"action":"GET",
"rel":"self",
"data":null
}]
}
try {
fileName = fileName.replaceAll("/", "\\\\");
URL url = new URL(
String.format(
"%s/interop/rest/%s/applicationsnapshots/%s/
contents",
serverUrl, apiVersion,
URLEncoder.encode(fileName, "UTF-8")));
9-116
Chapter 9
Manage Application Snapshots
"Authorization",
"Basic "
+ new sun.misc.BASE64Encoder().encode((userName
+ ":" + password).getBytes()));
int status = connection.getResponseCode();
if (status == 200) {
if (connection.getContentType() != null
&& connection.getContentType().equals(
"application/json")) {
JSONObject json = new JSONObject(
getStringFromInputStream(connection
.getInputStream()));
System.out.println("Error downloading file : "
+ json.getString("details"));
} else {
String response = getStringFromInputStream(connection
.getInputStream());
String pingURL = fetchPingUrlFromResponse(response,
"Job Status");
getJobStatusDownload(pingURL, "GET");
}
} else {
throw new Exception("Http status code: " + status);
}
} finally {
if (connection != null)
connection.disconnect();
if (outputStream != null)
outputStream.close();
if (inputStream != null)
inputStream.close();
}
}
try {
URL url = new URL(downloadURL);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setInstanceFollowRedirects(false);
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setRequestProperty(
"Authorization",
"Basic "
+ new sun.misc.BASE64Encoder().encode((userName
+ ":" + password).getBytes()));
connection.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
9-117
Chapter 9
Manage Application Snapshots
if (status == 200) {
if (connection.getContentType() != null
&& connection.getContentType().equals(
"application/json")) {
JSONObject json = new JSONObject(
getStringFromInputStream(connection
.getInputStream()));
System.out.println("Error downloading file : "
+ json.getString("details"));
} else {
inputStream = connection.getInputStream();
String downloadedFileName = fileName;
if (fileName.lastIndexOf("/") != -1) {
downloadedFileName = fileName.substring(fileName
.lastIndexOf("/") + 1);
}
}
} else {
throw new Exception("Http status code: " + status);
}
} finally {
if (connection != null)
connection.disconnect();
if (outputStream != null)
outputStream.close();
if (inputStream != null)
inputStream.close();
}
}
9-118
Chapter 9
Manage Application Snapshots
#!/bin/sh
SERVER_URL=""
USERNAME=""
PASSWORD="1"
API_VERSION="v1"
FILENAME=$1
funcDownloadContent(){
output=`cat pingResponse.txt`
count=`echo $output | jq '.links | length'`
i=0
pingUrlC=""
while [ $i -lt $count ]; do
rel=`echo $output | jq '.links['$i'].rel'`
rel=`echo "$rel" | tr -d "\""`
9-119
Chapter 9
Manage Application Snapshots
if [ ! -z $fileExtension ]; then
if [[ ! $filepath =~ \.$fileExtension$ ]]; then
mv "$1" "$1".$fileExtension
fi
fi
echo "Downloade file successfully"
fi
fi
funcRemoveTempFiles "response.txt" "respHeader.txt"
}
funcDownloadFile() {
filepath="/u01/$FILENAME"
encodedFileName=$(echo $FILENAME | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/contents
9-120
Chapter 9
Manage Application Snapshots
fi
else
echo "Error executing request"
if [ $statusCode != 000 ]; then
echo "Response error code : " $statusCode
funcPrintErrorDetails "response.txt"
funcRemoveTempFiles "respHeader.txt"
"response.txt"
fi
exit 0
fi
}
funcDownloadFile $FILENAME
class DownloadV1 {
try {
fileName = fileName.replaceAll("/", "\\\\");
URL url = new URL(String.format("%s/interop/rest/%s/
applicationsnapshots/%s/contents", serverUrl,
apiVersion, URLEncoder.encode(fileName, "UTF-8")));
9-121
Chapter 9
Manage Application Snapshots
connection.setRequestMethod("GET");
connection.setInstanceFollowRedirects(false);
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setRequestProperty("Authorization",
"Basic " + new sun.misc.BASE64Encoder().encode((userName
+ ":" + password).getBytes()));
connection.setRequestProperty("Content-Type", "application/x-www-
form-urlencoded");
int status = connection.getResponseCode();
if (status == 200) {
if (connection.getContentType() != null &&
connection.getContentType().equals("application/json")) {
JSONObject json = new
JSONObject(getStringFromInputStream(connection.getInputStream()));
println "Error downloading file : " +
json.getString("details")
} else {
def response =
getStringFromInputStream(connection.getInputStream());
def pingURL = fetchPingUrlFromResponse(response, "Job
Status");
getJobStatusDownload(pingURL, "GET");
}
} else {
throw new Exception("Http status code: " + status);
}
} finally {
if (connection != null)
connection.disconnect();
if (outputStream != null)
outputStream.close();
if (inputStream != null)
inputStream.close();
}
}
try {
URL url = new URL(downloadURL);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setInstanceFollowRedirects(false);
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setRequestProperty("Authorization",
9-122
Chapter 9
Manage Application Snapshots
}
} else {
throw new Exception("Http status code: " + status);
}
} finally {
if (connection != null)
connection.disconnect();
if (outputStream != null)
outputStream.close();
if (inputStream != null)
inputStream.close();
}
}
9-123
Chapter 9
Manage Application Snapshots
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
POST /interop/rest/v2/files/download
9-124
Chapter 9
Manage Application Snapshots
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Response Header
fileExtension:This will have the file extension that can be used to create a file locally. Can
contain values such as zip or csv.
Attribute Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
9-125
Chapter 9
Manage Application Snapshots
Attribute Description
data Parameters as key value pairs passed in the request
https://<BASE URL>/interop/rest/v2/files/download
{
"fileName": "snapshot.zip"
}
Example Response 1
{
"details": null,
"status": -1,
"links": [
{
"href": " https://<BASE-URL>/interop/rest/v2/files/download",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": " https://<BASE-URL>/interop/rest/v2/status/download/
7236073834203988",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
9-126
Chapter 9
Manage Application Snapshots
https://<BASE-URL>/interop/rest/v2/status/download/7236073834203988
Example Response 2
{
"details": null,
"status": 0,
"items": null,
"links": [
{
"href": " https://<BASE URL>/v2/status/download/7236073834203988",
"action": "GET",
"rel": "self",
"data": null
},
{
"href": "https://<BASE URL>/v2/files/download/7236073834203988",
"action": "GET",
"rel": "Download link",
"data": null
}
]
}
https://<BASE-URL>/interop/rest/v2/files/download/7236073834203988
Example Response 3
After receiving the response, if the content type is application/json, then there would be an
error on the server and refer to details. Otherwise, if it’s application/octet-stream, then the
content to be downloaded is part of the response and can read from the response body.
Sample cURL command
9-127
Chapter 9
Manage Application Snapshots
https://<BASE URL>/interop/rest/v2/files/download/7236073834203988
Example Response 4
{
"details": null,
"status": 0,
"links": [
{
"href": " https://<BASE-URL>/interop/rest/v2/files/download/
7236073834203988",
"action": "DELETE",
"rel": "self",
"data": null
}
]
}
9-128
Chapter 9
Manage Application Snapshots
REST Resource
POST /interop/rest/v1/services/{servicename}/copysnapshot
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/x-www-form-urlencoded
9-129
Chapter 9
Manage Application Snapshots
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status of the copy snapshot
data Parameters as key value pairs passed in the request
//
// BEGIN - copysnapshotfrominstance
//
public void copysnapshot() throws Exception {
if (null == srcDomain) {
params = "snapshotName=" + snapshotName + "&userName=" + srcUserName +
"&fpwd=" + fpwd + "&sourceURL="
+ targetURL;
} else {
params = "snapshotName=" + snapshotName + "&userName=" + srcUserName +
"&fpwd=" + fpwd + "&sourceURL="
+ targetURL + "&dom=" + srcDomain;
}
9-130
Chapter 9
Manage Application Snapshots
try {
br = new BufferedReader(new FileReader(filePath));
String line = null;
String pwdString = null;
while ((line = br.readLine()) != null) {
pwdString = line;
}
return pwdString;
} catch (Exception e) {
} finally {
if (null != br)
try {
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
//
// END - copysnapshotfrominstance
//
funcCopySnapshot() {
url=$SERVER_URL/interop/rest/v1/services/PBCS/copysnapshot
snapshotName="SNAPSHOT NAME"
srcUserName="USER NAME"
targetURL="https://<BASE-URL>";
srcEPWfilePath="pwd.epw"
srcDomain=""
fpwd=`cat $ srcEPWfilePath`
9-131
Chapter 9
Manage Application Snapshots
urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Copysnapshot"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def copy() {
def url;
def params;
try {
snapshotName = "test";
srcUserName = "epm_default_cloud_admin";
sourceURL = "https://<BASE-URL>";
srcEPWfilePath = "pwd.epw";
fpwd = fetchPwdFromFile(srcEPWfilePath);
srcDomain = null;
//println fpwd
if (null == srcDomain) {
params = "snapshotName=" + snapshotName + "&userName=" +
srcUserName + "&fpwd=" + fpwd + "&targetURL=" + targetURL;
} else {
params = "snapshotName=" + snapshotName + "&userName=" +
srcUserName + "&fpwd=" + fpwd + "&targetURL=" + targetURL + "&dom=" +
srcDomain;
}
//println params
url = new URL(serverUrl + "/interop/rest/v1/services/PBCS/copysnapshot");
} catch (MalformedURLException e) {
println "Incorrect URL. Please a pass valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(fetchPingUrlFromResponse(response, "Job Status"), "GET");
}
def fetchPwdFromFile(filePath) {
BufferedReader br = null;
9-132
Chapter 9
Manage Application Snapshots
try {
br = new BufferedReader(new FileReader(filePath));
String line = null;
String pwdString = null;
while ((line = br.readLine()) != null) {
pwdString = line;
}
return pwdString;
} catch (Exception e) {
} finally {
if (null != br)
try {
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
POST /interop/rest/v2/snapshots/copyfrominstance
9-133
Chapter 9
Manage Application Snapshots
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/snapshots/copyfrominstance
{
"snapshotName": "<NAME>",
"userName": "<USERNAME>",
"fpwd": "e0VQTUFUfWtWV3czam8xdDJlcFZJbUVhSVQ3VWc9PS5lcHcyMDE1LmFkbW",
"sourceURL": "https://<BASE-URL>"
}
Response
Supported Media Types: application/json
9-134
Chapter 9
Manage Application Snapshots
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status of the copy snapshot
data null
{
"status": -1,
"items": null,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v2/snapshots/
copyfrominstance",
"data": null,
"action": "POST"
}, {
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
1502357937045",
"data": null,
"action": "GET"
}],
"details": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-135
Chapter 9
Manage Application Snapshots
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
PUT /interop/rest/{api_version}/renamesnapshot
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
9-136
Chapter 9
Manage Application Snapshots
Name Description
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
{
"links":[{
"https://<BASE-URL>/interop/rest/v1/renamesnapshot",
"rel":"self",
"data":null,
"action":"PUT"
}
],
"details":null,
"status":0
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
PUT /interop/rest/v2/snapshots/rename
9-137
Chapter 9
Manage Application Snapshots
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/v2/snapshots/rename
{
"snapshotName": "Artifact Snapshot",
"newSnapshotName": "Backup_snapshot"
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you
can use the href to get the status
data null
9-138
Chapter 9
Copy to and from the Object Store
{
"details": null,
"status": 0,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/snapshots/rename",
"action": "PUT",
"rel": "self",
"data": null
}
]
}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
9-139
Chapter 9
Copy to and from the Object Store
Note:
The Object Storage requires an Other Web Services Provider type. Ensure that you
have access to the Web service you are connecting. You must also have URLs for
the Web service and an login details if required. For information see, Connecting to
External Web Services in Administering Planning.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v1/services/copyfromobjectstore
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-140
Chapter 9
Copy to and from the Object Store
Response
Supported Media Types: application/json
9-141
Chapter 9
Copy to and from the Object Store
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
The Object Storage requires an Other Web Services Provider type. Ensure that you
have access to the Web service you are connecting. You must also have URLs for
the Web service and an login details if required. For information see, Connecting to
External Web Services in Administering Planning.
9-142
Chapter 9
Copy to and from the Object Store
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/objectstorage/copyfrom
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-143
Chapter 9
Copy to and from the Object Store
9-144
Chapter 9
Copy to and from the Object Store
https://<BASE-URL>/interop/rest/v2/objectstorage/copyfrom
{
"url":"https://swiftobjectstorage.<region_identifier>.oraclecloud.com/v1/
namespace/bucket_name/object_name",
"userName": "epm_user",
"password": "epm_password",
"targetFile": "Artifact snapshot"
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
{
"details": null,
"status": -1,
"items": null,
"links": [
{
"href": " https://<BASE-URL>/interop/rest/v2/objectstorage/
copyfrom",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": " https://<BASE-URL>/interop/rest/v2/status/jobs/
4003051833546274",
"action": "GET",
"rel": "Job Status",
"data": null
}
9-145
Chapter 9
Copy to and from the Object Store
]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
The Object Storage requires an Other Web Services Provider type. Ensure that you
have access to the Web service you are connecting. You must also have URLs for
the Web service and an login details if required. For information see, Connecting to
External Web Services in Administering Planning.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v1/services/copytoobjectstore
9-146
Chapter 9
Copy to and from the Object Store
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
9-147
Chapter 9
Copy to and from the Object Store
9-148
Chapter 9
Copy to and from the Object Store
url: https://swiftobjectstorage.<region_identifier>.oraclecloud.com/v1/
epmclouddev/epm_artifact_snapshot
username: <username>
password: <password>
filepath: Artifact Snapshot
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status,
you can use the href to get the status
data Parameters as key value pairs passed in the request
{
"status": -1,
"items": null,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v1/services/
copytoobjectstore",
"data": null,
"action": "POST"
}, {
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v1/services/jobs/
1502357937045",
"data": null,
"action": "GET"
}],
"details": null
}
9-149
Chapter 9
Copy to and from the Object Store
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
The Object Storage requires an Other Web Services Provider type. Ensure that you
have access to the Web service you are connecting. You must also have URLs for
the Web service and an login details if required. For information see, Connecting to
External Web Services in Administering Planning.
Required Roles
Service Administrator
9-150
Chapter 9
Copy to and from the Object Store
REST Resource
POST /interop/rest/v2/objectstorage/copyto
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-151
Chapter 9
Copy to and from the Object Store
https://
swiftobjectstorage.region_identifier.oraclecl
oud.com/v1/namespace/bucket_name
9-152
Chapter 9
Copy to and from the Object Store
https://<BASE URL>/interop/rest/v2/objectstorage/copyto
{
"url": "https://swiftobjectstorage.<region_identifier>.oraclecloud.com/v1/
epmclouddev/epm_artifact_snapshot",
"userName": "username",
"password": "password",
"filePath": "Artifact Snapshot"
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
{
"status": -1,
"items": null,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v2/objectstorage/copyto",
"data": null,
"action": "POST"
}, {
"rel": "Job Status",
9-153
Chapter 9
Copy to and from SFTP
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
1502357937045",
"data": null,
"action": "GET"
}],
"details": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Copy to SFTP
Copies a file or a backup snapshot from the current cloud environment (the source) to the
SFTP server (the target).
You can copy any file or snapshot available in Oracle Fusion Cloud Enterprise Performance
Management. For example, if you export data to a file, the exported file is stored in the Outbox.
9-154
Chapter 9
Copy to and from SFTP
You can then use this API to copy the file directly to an SFTP server where you have an
account.
This API is version v2.
Note:
This API supports SFTP server running on port 22 only.
Note:
If IP allowlist is enabled for the SFTP server, you must add the outbound IP address
of the OCI region that hosts the Cloud EPM environments to the IP allowlist of the
SFTP server. See Outbound IP Addresses of Cloud EPM Regions for the outbound
IP addresses of OCI regions.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/config/services/copytosftp
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-155
Chapter 9
Copy to and from SFTP
{
"userName" : "username",
"password" : "password",
"url" : "sftp://mysever/mydir/File_New.txt",
"filePath" : "inbox/File_new.txt"
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link and HTTP call type
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can use
the href to get the status of the job
data Parameters as key value pairs passed in the request
{
"details": null,
"status": -1,
"items": null,
"links": [
{
"href" : "https://<BASE-URL>/interop/rest/v2/config/services/
copytosftp",
"action": "POST",
"rel" : "self",
"data" : null
},
{
9-156
Chapter 9
Copy to and from SFTP
"href" : "https://<BASE-URL>/interop/rest/v2/config/status/
service/copytosftp/1716282748110",
"action": "GET",
"rel" : "Job Status",
"data" : null
}
]
}
Note:
This API supports SFTP server running on port 22 only.
Note:
If IP allowlist is enabled for the SFTP server, you must add the outbound IP address
of the OCI region that hosts the Oracle Fusion Cloud Enterprise Performance
Management environments to the IP allowlist of the SFTP server. See Outbound IP
Addresses of Cloud EPM Regions for the outbound IP addresses of OCI regions.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/config/services/copyfromsftp
9-157
Chapter 9
Copy to and from SFTP
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
{
"userName" : "username",
"password" : "password",
"url" : "sftp://mysever/mydir/File_new.txt",
"filePath" : "inbox/File_new.txt"
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link and HTTP call type
href Links to API call or status API
9-158
Chapter 9
Working with Essbase
Name Description
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can use
the href to get the status of the job
data Parameters as key value pairs passed in the request
{
"details": null,
"status": -1,
"items": null,
"links": [
{
"href" : "https://<BASE-URL>/interop/rest/v2/config/services/
copyfromsftp",
"action": "POST",
"rel" : "self",
"data" : null
},
{
"href" : "https://<BASE-URL>/interop/rest/v2/config/services/
copyfromsftp/1716274994528",
"action": "GET",
"rel" : "Job Status",
"data" : null
}
]
}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
9-159
Chapter 9
Working with Essbase
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/essbase/export
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-160
Chapter 9
Working with Essbase
https://<BASE-URL>V/interop/rest/v2/ essbase/export
{
"cubeName": "Plan1",
"fileName": "Plan1Export.zip",
"parameters": {
"level": "0"
}
}
Response
Supported Media Types: application/json
Attribute Description
details In case of errors, details are published with the error string
status See Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values. Can be self and/or Job Status. If set to Job Status, you
can use the href to get the status of the re-export operation
data Parameters as key value pairs passed in the request
{
"details": "Essbase Database Export",
"status": -1,
"items": null,
"links": [
{
9-161
Chapter 9
Working with Essbase
"href": "https://<BASE-URL>/interop/rest/v2/essbase/export",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
19974850954170405",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
{
"details": null,
"status": 0,
"items": null,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
19974850954170405",
"action": "GET",
"rel": "self",
"data": null
}
]
}
9-162
Chapter 9
Working with Essbase
• Top 100 Dense Member Combinations with Repeated Values: Shows the top 100
dense combinations with repeated values in the cube. The "Cell Value" column shows a
value for each member, in the order it appears in the hierarchy, as a different column. For
example, if Period is across the column, there will be a different column for January,
February, and so on. Other dense dimension(s) appear in the rows. This should help you
identify the locations of the repeated values.
Before executing this API, use the Export Essbase Data (v2) API to export the data from the
cube for which you want to create the Block Analysis report to a zip file. You may export level0
or all data as needed. Execute this API to create the Block Analysis report for this zip file. The
report is created in the outbox; you can use the Download API to download it to a local
computer or the Send Email (v1) or Send Email (v2) API to email it.
This API is version v1.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/diag/v1/services/essbaseblockanalysisreport
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
9-163
Chapter 9
Working with Essbase
Name Description
details Detailed status of the operation performed.
status See Migration Status Codes
links Detailed information about the link and HTTP call type
items Detailed information about the API
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you
can use the href to get the status
data Parameters as key value pairs passed in the request
{
"details": null,
"status": -1,
"items": [],
"links": [
{
"href": "https://<BASE-URL>/interop/rest/diag/v1/services/
essbaseblockanalysisreport,
"action": "POST",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/diag/v1/services/jobs/
537707435156101,
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
Required Roles
Service Administrator
REST Resource
GET /interop/rest/{api_version}/config/services/essbaseqrygovexectime
9-164
Chapter 9
Working with Essbase
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href
to get the status of the import operation
data Parameters as key value pairs passed in the request
{
"details": null,
"status": 0,
"items": [
{
"qryexectime": "600"
}
],
"links": [
{
"href": "<uri>/interop/rest/v2/config/services/
essbaseqrygovexectime",
"action": "GET",
"rel": "self",
"data": null
}
9-165
Chapter 9
Working with Essbase
]
}
Required Roles
Service Administrator
REST Resource
PUT /interop/rest/{api_version}/config/services/essbaseqrygovexectime
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
{
"qryexectime": "600"
}
Response
Supported Media Types: application/json
9-166
Chapter 9
Copy a File Between Instances (v1)
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href
to get the status of the import operation
data Parameters as key value pairs passed in the request
{
"links": [{
"rel": "self",
"href": "<uri>/interop/rest/v2/config/services/
essbaseqrygovexectime",
"data": null,
"action": "PUT"
}],
"details": "null",
"status": 0,
"items": null
}
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
9-167
Chapter 9
Copy a File Between Instances (v1)
REST Resource
POST /interop/rest/v1/services/copyfile
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
https://<BASE-URL>/interop/rest/v1/services/copyfile
{
"sourceFileName": "<NAME>",
"userName": "<USERNAME>",
"pwd": "e0FFUzJ9aXXXXYYYY5pZXFSMGo4cVI1dz09LmVwdzIwMTUue0FFU",
"sourceURL": "https://<BASE URL>,"
"targetFileName": "<NAME>"
}
Response
Supported Media Types: application/json
9-168
Chapter 9
Copy a File Between Instances (v2)
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can use the
href to get the status
data Parameters as key value pairs passed in the request
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
POST /interop/rest/v2/files/copyfrominstance
9-169
Chapter 9
Copy a File Between Instances (v2)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/v2/files/copyfrominstance
{
"sourceFileName": "<NAME>",
"userName": "<USERNAME>",
"pwd": "e0FFUzJ9aXXXXYYYY5pZXFSMGo4cVI1dz09LmVwdzIwMTUue0FFU",
"sourceURL": "https://<BASE URL>,"
"targetFileName": "<NAME>"
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
9-170
Chapter 9
Copy a File Between Instances (v2)
Name Description
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data null
"status": -1,
"items": null,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v2/files/copyfrominstance",
"data": null,
"action": "POST"
}, {
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
1502357937045",
"data": null,
"action": "GET"
}],
"details": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-171
Chapter 9
Clone an Environment
Clone an Environment
Use this REST API to clone the current environment and, optionally, identify domain artifacts
(users and predefined roles), Data Management records, audit records, Job Console records,
contents of the inbox and outbox, and stored snapshots.
This API is executed on the source environment after details are provided for the target
environment to be cloned. It is an alternative to using the Clone Environment feature in a
browser or the EPM Automate cloneEnvironment command.
Prerequisites: The password of the target Oracle Fusion Cloud Enterprise Performance
Management environment must have already been encrypted using EPM Automate. The
encrypted password string must then be passed as one of the parameters for the Clone
Environment REST API. See the encrypt command.
This REST API is version v1.
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
REST Resource
POST /interop/rest/v1/services/clone
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-172
Chapter 9
Clone an Environment
9-173
Chapter 9
Clone an Environment
Example Payload
{
"targetURL":"https://<BASE-URL>",targetUserName":"cloneUser@oracle.com",
"targetEncryptPassword":"<targetUserEncryptedPasswordString>",
"parameters":{"snapshotName":"Artifact Snapshot",
"migrateUsers":"true","maintenanceStartTime":"true", "dataManagement":"true",
"jobConsole":"true", "applicationAudit":"true",
"storedSnapshotsAndFiles":"false"}
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you
can use the href to get the status
intermittentSta Status of each step performed; can be polled regularly from the job status
tus URL
//
// BEGIN – Clone Environment
//
public void cloneEnvironment() throws Exception {
String targetUrl = "https://<BASE-URL>";
String targetUsername = "<Target User name>";
String encryptedPwdString =
fetchPwdFromFile("epw_file_Path") ; //"<Target system encrypted password>";
String snapshotToClone = "Artifact Snapshot";
JSONObject params = new JSONObject();
JSONObject payload = new JSONObject();
9-174
Chapter 9
Clone an Environment
getMigrationJobStatus(fetchPingUrlFromResponse(response, "Job
Status"),"GET");
}
try {
br = new BufferedReader(new FileReader(filePath));
String line = null;
String pwdString = null;
while ((line = br.readLine()) != null) {
pwdString = line;
}
return pwdString;
} catch (Exception e) {
} finally {
if (null != br)
try {
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
//
// END – Clone Environment
//
9-175
Chapter 9
Clone an Environment
funcCloneEnvironment() {
url="$SERVER_URL/interop/rest/v1/services/clone"
local targetUrl="<TargetSystemURL>"
local targetUserName="<TargetSystemUsername>"
local targetEncryptedPassword= $(cat $EPWfilePath)
#"<TargetSystemEncryptedPasswordString>"
#optionalParams="{\"snapshotName\":\"Artifact
Snapshot\",\"migrateUsers\":\"true\",\"maintenanceStartTime\":\"true\",\"dataM
anagement\":\"true\"}"
param="{\"targetURL\":\"$targetUrl\",\"targetUserName\":\"$targetUserName\",\"
targetEncryptPassword\":\"$targetEncryptedPassword\"}"
#,\"parameters\":\"$optionalParams\"}"
funcExecuteRequest "POST" $url "$param" "application/json"
output=$(cat response.txt)
status=$(echo $output | jq '.status')
if [ $status == -1 ]; then
echo "CloneEnvironment is in progress.."
funcGetStatus "GET"
else
error=$(echo $output | jq '.details')
echo "Error occurred. " $error
fi
}
def cloneEnvironment(targetURL,targetUsername,targetEncyptedPasswordFile){
String scenario = "Clone Environment";
def targetEncyptedPassword = fetchPwdFromFile(targetEncyptedPasswordFile);
def json = new JsonBuilder()
//Optional parameter to be set if needed
//def optionalParams = [snapshotName: "Artifact Snapshot", migrateUsers:
"true", maintenanceStartTime: "true" ,dataManagement:"true"]
params=payload.toString();
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/v1/services/clone");
} catch (MalformedURLException e) {
9-176
Chapter 9
Clone an Environment
try {
br = new BufferedReader(new FileReader(filePath));
String line = null;
String pwdString = null;
while ((line = br.readLine()) != null) {
pwdString = line;
}
return pwdString;
} catch (Exception e) {
} finally {
if (null != br)
try {
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
9-177
Chapter 9
Provide Feedback (v11.1.2.3.600)
NAME>","migrateUsers":"true","maintenanceStartTime":"<TRUE/
FALSE>","dataManagement":
"<TRUE/FALSE>","jobConsole":"<TRUE/FALSE>","applicationAudit":"<TRUE/
FALSE>","storedSnapshotsAndFiles":"<TRUE/FALSE>"}}'
'https://<BASE-URL>/interop/rest/v1/services/clone'
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
POST /interop/rest/{api_version}/feedback
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Name Description
details Published in case of errors with the error string
status See Migration Status Codes
items Details about the resource
issueRef Feedback reference to contact Oracle support
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
9-178
Chapter 9
Provide Feedback (v11.1.2.3.600)
{
"details":null,
"status":0,
"items":[{"issueRef":"UDR_default_fin_superuser_2015_09_14_11_10_18"}],
"links":[{
"data":null,
"action":"POST",
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/{api_version}/feedback"
}]
}
//
// BEGIN - Provide Feedback
//
public void provideFeedback(String description) throws Exception {
JSONObject params = new JSONObject();
JSONObject config = new JSONObject();
config.put("URL",serverUrl);
params.put("configuration",config);
params.put("description",description);
funcProvideFeedback() {
url=$SERVER_URL/interop/rest/$LCM_VERSION/feedback
description=$(echo $1 | sed -f urlencode.sed)
param="{\"configuration\":
9-179
Chapter 9
Provide Feedback (v11.1.2.3.600)
{\"URL\":\"$SERVER_URL\"},\"description\":\"$description\"}"
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Feedback successful"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def provideFeedback(description) {
def url;
JSONObject params = new JSONObject();
try {
JSONObject config = new JSONObject();
config.put("URL",serverUrl)
params.put("configuration",config);
params.put("description",description);
url = new URL(serverUrl + "/interop/rest/" + lcmVersion + "/
feedback");
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params.toString(), "application/
json");
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-180
Chapter 9
Provide Feedback (v2)
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
POST /interop/rest/v2/services/feedback
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: multipart/form-data
https://<BASE-URL>/interop/rest/v2/services/feedback
configuration:{"configuration":{"Operating_System": "Windows
10","EPMAutomate_Version":"22.11.12","Java_Vendor":"Oracle Corporation",
"Java_Version":"1.8.0_341","URL":<BASE-URL>/interop/rest/
v2,"description":"Issue description"}}
Response
Supported Media Types: application/json
9-181
Chapter 9
Send Email (v1)
Name Description
details Published in case of errors with the error string
status See Migration Status Codes
items Details about the resource
issueRef Feedback reference to contact Oracle support
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
"details": null,
"status": 0,
"items": [
{
"issueRef":
"UDR_default_epm_default_cloud_admin_2022_10_11_01_47_10"
}
],
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/services/feedback",
"action": "POST",
"rel": "self",
"data": null
}
]
}
9-182
Chapter 9
Send Email (v1)
API can be incorporated into REST API programs and scripts to notify users of various
conditions or to send reports.
This topic describes the original version of this REST API. You can also use the simplified v2
version of the REST API. The v2 version contains all parameters in the payload and does not
require URL encoding while calling the REST APIs. This makes the v2 API easier to use. The
v2 version is backwards compatible.
The API is asynchronous and returns the Job ID. Use the job status URI to determine whether
the process is complete. The presence of status -1 in the response indicates that the process
is in progress. Any non-zero status except -1 indicates failure.
This REST API is version v1.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/<api_version>/services/sendmail
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
9-183
Chapter 9
Send Email (v1)
to:abc@oracle.com
subject:EPM
body:EPM weekly email
attachments:apr/2021-08-10 11_30_25/2021-08-10 11_30_25.html
Response
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"status": -1,
"items": null,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v1/services/sendmail",
"data": null,
"action": "POST"
}, {
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v1/services/jobs/
1502357937045",
"data": null,
"action": "GET"
}],
9-184
Chapter 9
Send Email (v2)
"details": null
}
JobID is appended only to the API used to fetch the status of the progress.
Sample code:
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
9-185
Chapter 9
Send Email (v2)
REST Resource
POST /interop/rest/v2/mails/send
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE URL>/interop/rest/v2/mails/send
{
"to": "<EMAIL_ADDRESS>",
"subject": "EPM",
"body": "EPM weekly email",
"parameters": {
"attachments":"apr/Feedback 2022-03-01 07_42_04/access_log.zip"
}
}
9-186
Chapter 9
Send Email (v2)
Response
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"status": -1,
"items": null,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v2/mails/send",
"data": null,
"action": "POST"
}, {
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
1502357937045",
"data": null,
"action": "GET"
}],
"details": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-187
Chapter 9
Skip Updates (v1)
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v1/services/skipupdate
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
9-188
Chapter 9
Skip Updates (v1)
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
{
"links":[{
"https://<BASE-URL>/interop/rest/v1/services/skipupdate",
"rel":"self",
"data":null,
"action":"POST"
}
],
"details":null,
"status":0
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-189
Chapter 9
Skip Updates (v2)
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/services/skipupdate
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-190
Chapter 9
Skip Updates (v2)
https://<BASE-URL>/interop/rest/v2/services/skipupdate
{
"type":"Add",
"parameters": {
"version": "22.12",
"comment": "Year end"
}
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data null
{
"status": 0,
"items": null,
"links": [{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v2/services/skipupdate",
"data": null,
"action": "POST"
}
9-191
Chapter 9
List or Restore Backups
"details": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
List Backups
You can list available backup snapshots archived by Oracle in the Oracle Object storage
Cloud.
You can then restore available backup snapshots (copy them to the environment), To restore
backup snapshots, see Restore Backups. After copying the backup, you can archive it or use it
to restore the current environment by yourself. With the List Backups and Restore Backup
APIs, you do not have to create a service request to request a backup from an environment.
This API is version v2.
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
GET /interop/rest/v2/backups/list
9-192
Chapter 9
List or Restore Backups
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Response
Supported Media Types: application/json
Attribute Description
details Published in case of errors with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
intermittentSta Stats of each step perormed; can be polled regularly from the job status URL
tus
{
"details": null,
"links": [{
"href": "https://<BASE-URL>/interop/rest/v2/backups/list",
"rel": "self",
"data": null,
"action": "GET"
}],
"status": 0,
"items": ["2022-02-16T05:49:15/Artifact_Snapshot.zip",
"2022-02-18T05:44:54/Artifact_Snapshot.zip"]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-193
Chapter 9
List or Restore Backups
Restore Backups
You can restore an available backup snapshot archived by Oracle in Oracle Object Storage
(that is, copy it to the environment).
To view available backup snapshots, see List Backups. If a backup snapshot is available, you
can copy it to the current environment using the Restore Backup API.
After copying the backup, you can archive it or use it to restore the current environment by
yourself. With the List Backups and Restore Backup APIs, you do no have to create a service
request to request a backup from an environment.
This REST API is version v2.
Required Roles
Required Roles
Service Administrator
Power User assigned to the Migration Administrator Profitability and Cost Management
application role
REST Resource
POST /interop/rest/v2/backups/restore
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
9-194
Chapter 9
List or Restore Backups
{
"backupName": "2022-02-16T21:00:02/Artifact_Snapshot_2021-12-16T21:00:02",
"parameters": {
"targetName": "Backup_16Dec"
}
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
9-195
Chapter 9
List or Restore Backups
Name Description
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status of the copy snapshot
intermittentSta Status of each step performed; can be polled regularly from the job status URL
tus
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v2/backups/restore",
"data": null,
"action": "POST"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
4534730166024804",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
9-196
10
Security REST APIs
This section describes the REST APIs to manage security features in Oracle Fusion Cloud
Enterprise Performance Management.
https://<BASE-URL>/interop/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
10-1
Chapter 10
Get Restricted Data Access
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
Required Roles
Service Administrator
REST Resource
GET /interop/rest/{api_version}/config/services/restricteddataaccess
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
10-2
Chapter 10
Set Restricted Data Access
Response
Supported Media Types: application/json
Name Description
details Detailed status of the operation performed.
status See Migration Status Codes
links Detailed information about the link and HTTP call type
items Detailed information about the API
dataAccessRestr Whether the restricted data access is enabled
iction
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you
can use the href to get the status
data Parameters as key value pairs passed in the request
{
"details": null,
"status": 0,
"items": [
{
"dataAccessRestriction": "true"
}
],
"links": [
{
"href": "<uri>/interop/rest/v2/config/services/
restricteddataaccess",
"action": "GET",
"rel": "self",
"data": null
}
]
}
10-3
Chapter 10
Set Restricted Data Access
Required Roles
Service Administrator
REST Resource
PUT /interop/rest/{api_version}/config/services/restricteddataaccess
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
{
"dataAccessRestriction": "true"
}
Response
Supported Media Types: application/json
Name Description
details Detailed status of the operation performed.
status See Migration Status Codes
links Detailed information about the link and HTTP call type
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you
can use the href to get the status
10-4
Chapter 10
Get Virus Scan on File Upload
Name Description
error Detailed information about the error
data Parameters as key value pairs passed in the request
{
"details": null,
"status": 0,
"items": null,
"links": [
{
"href": "<uri>/interop/rest/v2/config/services/
restricteddataaccess",
"action": "PUT",
"rel": "self",
"data": null
}
]
}
Required Roles
Service Administrator
REST Resource
GET /interop/rest/{api_version}/config/services/virusscanonfileupload
10-5
Chapter 10
Get Virus Scan on File Upload
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
items Detailed information about the API
scanfiles Indicates whether the virus scan is enabled
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
{
"details": null,
"links": [{
"rel": "self",
"href": "<uri>/interop/rest/v2/config/services/
virusscanonfileupload",
"data": "null",
"action": "GET"
}],
"status": "0",
"items": [{
"scanfiles": "true"
10-6
Chapter 10
Set Virus Scan on File Upload
}]
}
Required Roles
Service Administrator
REST Resource
PUT /interop/rest/{api_version}/config/services/virusscanonfileupload
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
10-7
Chapter 10
Manage Permission for Manual Access to Database (v1)
Parameters Description
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
{
"links": [{
"rel": "self",
"href": "<uri>/interop/rest/v2/config/services/
virusscanonfileupload",
"data": null,
"action": "PUT"
}],
"details": "null",
"status": 0,
"items": null
}
10-8
Chapter 10
Manage Permission for Manual Access to Database (v1)
Required Roles
Service Administrator
REST Resource
PUT /interop/rest/{api_version}/services/dataaccess?accessType={allow|
revoke}&disableEmergencyAccess={true|false}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
10-9
Chapter 10
Manage Permission for Manual Access to Database (v2)
Parameters Description
data Parameters as key value pairs passed in the request
Copy
{
"links": [1]
0: {
"rel":"self", "href":"https://<BASE-URL>/interop/rest/v1/services/
dataaccess?accessType=allow&disableEmergencyAccess=true"
"data":"null",
"action":"PUT,
}-
-
"details":"null",
"status":"0"
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator
REST Resource
PUT /interop/rest/v2/services/setmanualdataaccess
10-10
Chapter 10
Manage Permission for Manual Access to Database (v2)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE URL>/interop/rest/v2/services/setmanualdataaccess
{
"accessType": "Revoke",
"parameters": {
"disableEmergencyAccess": "False"
}
}
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
10-11
Chapter 10
Set Encryption Key (v1)
Parameters Description
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data null
{
"details": null,
"status": 0,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/services/
setmanualdataaccess",
"action": "PUT",
"rel": "self",
"data": null
}
]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
10-12
Chapter 10
Set Encryption Key (v1)
This is an asynchronous job and uses the job status URI to determine if the operation is
complete.
Before using the REST resources, you must understand how to access the REST resources
and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs.
Using this REST API requires prerequisites. See Prerequisites.
This API is version v1.
Required Roles
Service Administrator
REST Resource
PUT /interop/rest/{api_version}/services/encryptionkey
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
10-13
Chapter 10
Set Encryption Key (v1)
Parameters Description
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
{
"details":null,
"status":-1,
"links":[{
"href":"https://<BASE-URL>/interop/rest/v1/services/encryptionkey",
"rel":"self",
"data":null,
"action":"PUT"
},{
"href":"https://<BASE-URL>/interop/rest/v1/services/jobs/777",
"rel":"Job Status",
"data":null,
"action":"GET"
}]
}
funcSetEncryptionKey() {
url=$SERVER_URL/interop/rest/v1/services/encryptionkey
10-14
Chapter 10
Set Encryption Key (v2)
funcResetEncryptionKey() {
url=$SERVER_URL/interop/rest/v1/services/encryptionkey
param=""
Required Roles
Service Administrator
REST Resource
PUT interop/rest/v2/services/setencryptionkey
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
10-15
Chapter 10
Set Encryption Key (v2)
Request
Supported Media Types: application/json
https://<BASE URL>/interop/rest/v2/services/setencryptionkey
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data null
{
"status": -1,
"items": null,
"links": [{
10-16
Chapter 10
View or Update the IP Allowlist
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/v2/services/
setencryptionkey",
"data": null,
"action": "PUT"
}, {
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
8921378039543483",
"data": null,
"action": "GET"
}],
"details": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
10-17
Chapter 10
View or Update the IP Allowlist
Required Roles
Service Administrator
REST Resource
GET /interop/rest/epmociservice/v2/ipallowlist
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status.
items List of IP addresses and CIDRs that are set as the allowlist for your environment.
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/epmociservice/v2/
ipallowlist",
"data": null,
"action": "GET"
10-18
Chapter 10
View or Update the IP Allowlist
}
],
"details": null,
"status": 0,
"items": [
"ip_address1/24",
"ip_address2",
"ip_address3",
"ip_address4",
"ip_address5"
]
}
Required Roles
Service Administrator
REST Resource
POST /interop/rest/epmociservice/v2/ipallowlist
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
10-19
Chapter 10
View or Update the IP Allowlist
xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx/n
Note:
• Only IP V4 IP addresses are supported.
• Use CIDR format, rather than individual IP addresses, to
specify a continuous range of IP addresses.
action Use add to add IP addresses and CIDRs to the allowlist of Payload Yes None
your environment.
Use remove to remove IP addresses and CIDRs from the
allowlist.
{
"fileName" : "IPList.txt",
"action" : "add"
}
{
"fileName" : "IPList.txt",
"action" : "remove"
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
10-20
Chapter 10
View or Update the IP Allowlist
Name Description
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status of the copy snapshot
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>interop/rest/epmociservice/v2/
ipallowlist",
"data": null,
"action": "POST"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/epmociservice/v2/status/
jobs/2126145698194859",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
10-21
11
Viewing and Setting the Daily Maintenance
Window Time
Use these REST APIs to get the current build version and daily maintenance window time, and
to set the daily maintenance window time. You can also run the daily maintenance while
skipping the scheduled daily maintenance.
https://<BASE-URL>/interop/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
11-1
Chapter 11
Get the Build Version and Daily Maintenance Time (v1)
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
REST Resource
GET /interop/rest/{api_version}/services/dailymaintenance
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
The following table summarizes the request parameters.
11-2
Chapter 11
Get the Build Version and Daily Maintenance Time (v1)
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
items Detailed information about the API
amwTime Scheduled start time of the daily maintenance window in 24-hour format in
Etc/UTC timezone by default or in the specified time zone when the
"showTimeZone" optional parameter is true.
buildVersion Current build version
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
{
"details":null,
"links":[
{
"rel":"self","href":"https://<BASE-URL>/interop/rest/v1/services/
dailymaintenance",
"data":"null",
"action":"GET"}],
"status":"0",
"items":[
{
"amwTime":"19",
"buildVersion":"16.10.17"}
]
}
//
// BEGIN
//
public void getMaintenanceDetails () throws Exception {
String urlString = String.format("%s/interop/rest/v1/services/
11-3
Chapter 11
Get the Build Version and Daily Maintenance Time (v1)
dailymaintenance", serverUrl);
String response = executeRequest(urlString, "GET", null);
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0) {
JSONArray fileList = json.getJSONArray("items");
System.out.println("List of items are :");
JSONObject jObj = null;
for(int i=0; i<fileList.length(); i++){
jObj = (JSONObject)fileList.get(i);
System.out.println("build version :" +
jObj.getString("buildVersion"));
System.out.println("AMW time :" + jObj.getString("amwTime"));
System.out.println("Link :" + ((JSONObject)
((JSONArray)json.getJSONArray("links")).get(0)).getString("href") + "\n");
}
}
}
//
// END
//
funcGetMaintenanceDetails () {
url=$SERVER_URL/interop/rest/v1/services/dailymaintenance
funcExecuteRequest "GET" $url
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "List of items :"
count=`echo $output | jq '.items | length'`
i=0
while [ $i -lt $count ]; do
echo "Build Version : " `echo $output | jq
'.items['$i'].buildVersion'`
echo "AMW Time :" `echo $output | jq '.items['$i'].amwTime`
echo "Link :" `echo $output | jq '.links[0].href'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
11-4
Chapter 11
Get the Build Version and Daily Maintenance Window Time (v2)
def getMaintenanceDetails () {
def url;
try {
url = new URL(serverUrl + "/interop/rest/v1/services/
dailymaintenance ")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "GET", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 ) {
def items = object.items
println "List of items :"
items.each{
println "Build Version : " + it.buildVersion
println "AMW Time : " + it.amwTime
println "Link : " + it.links[0].href + "\n"
}
} else {
println "Error occurred while listing versions"
if (object.details != null)
println "Error details: " + object.details
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Get the Build Version and Daily Maintenance Window Time (v2)
This REST API (v2) returns information about the current build version and the scheduled daily
maintenance window start time.
This API is version v2
Before using the REST resources, you must understand how to access the REST resources
and other important concepts. See About the REST APIs. Using this REST API requires
prerequisites. See Prerequisites.
Required Roles
Service Administrator, or any predefined role and the Migrations - Administer application role
REST Resource
GET /interop/rest/v2/maintenance/getdailymaintenancestarttime
11-5
Chapter 11
Get the Build Version and Daily Maintenance Window Time (v2)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
The following table summarizes the request parameters.
Example URL
https://<BASE URL>/interop/rest/v2/maintenance/getdailymaintenancestarttime?
showTimeZone=true
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
items Detailed information about the API
amwTime Scheduled start time of the daily maintenance window in 24-hour format in
Etc/UTC timezone by default or in the specified time zone when the
"showTimeZone" optional parameter is true.
buildVersion Current build version
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data null
{
"details": null,
"status": 0,
11-6
Chapter 11
Setting the Daily Maintenance Time (v1)
"items": [
{
"buildVersion": "22.09.40",
"amwTime": "19:00",
"timeZone": "Etc/UTC"
}
],
"links": [
{
"href": "https://<BASE URL>/interop/rest/v2/maintenance/
getdailymaintenancestarttime",
"action": "GET",
"rel": "self",
"data": null
}
]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
To ensure that the use of this API does not interfere with the Oracle requirement for
creating backups, this API will not change the maintenance start time if the daily
maintenance process did not run in the last 36 hours.
Required Roles
Service Administrator, or any predefined role and the Migrations - Administer application role
11-7
Chapter 11
Setting the Daily Maintenance Time (v1)
REST Resource
PUT /interop/rest/{api_version}/services/dailymaintenance?StartTime={N}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See About the REST APIs. Using this REST
API requires prerequisites. See Prerequisites.
Request
The following table summarizes the request parameters.
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
{
"links": [1]
0: {
"rel":"self",
"href":"https://<BASE-URL>/interop/rest/v1/services/dailymaintenance?
StartTime=23"
11-8
Chapter 11
Setting the Daily Maintenance Time (v1)
"data":"null",
"action":"PUT,
}-
-
"details":"null",
"status":"0"
}
//
// BEGIN
//
public void setMaintenanceDetails () throws Exception {
String urlString = String.format("%s/interop/rest/v1/services/
dailymaintenance?StartTime=23", serverUrl);
String response = executeRequest(urlString, "PUT", null);
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0) {
System.out.println("Updated successfully");
}
}
//
// END
//
uncSetMaintenanceDetails () {
rl=$SERVER_URL/interop/rest/v1/services/dailymaintenance?StartTime=23
funcExecuteRequest "PUT" $url
output='cat response.txt'
status='echo $output | jq '.status''
if [ $status == 0 ]; then
echo "Updated Successfully"
else
error='echo $output | jq '.details''
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
11-9
Chapter 11
Setting the Daily Maintenance Time (v2)
def setMaintenanceDetails () {
def url;
try {
url = new URL(serverUrl + "/interop/rest/v1/services/
dailymaintenance?StartTime=23 ")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", null);
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == 0 ) {
println "Updated Successfully"
} else {
println "Error occurred while listing versions"
if (object.details != null)
println "Error details: " + object.details
}
}
Note:
To ensure that the use of this API does not interfere with the Oracle requirement for
creating backups, this API will not change the maintenance start time if the daily
maintenance process did not run in the last 36 hours.
Required Roes
Service Administrator, or any predefined role and the Migrations - Administer application role
REST Resource
PUT /interop/rest/v2/maintenance/setdailymaintenancestarttime
11-10
Chapter 11
Setting the Daily Maintenance Time (v2)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See About the REST APIs. Using this REST
API requires prerequisites. See Prerequisites.
Request
The following table summarizes the request parameters.
https://<BASE URL>/interop/rest/v2/maintenance/setdailymaintenancestarttime
{"startTime":"08:00"}
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data null
{
"details": null,
"status": 0,
"items": null,
"links": [
11-11
Chapter 11
Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v1)
{
"href": " https://<BASE-URL>/interop/rest/v2/maintenance/
setdailymaintenancestarttime",
"action": "PUT",
"rel": "self",
"data": null
}]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
REST Resource
POST /interop/rest/{api_version}/services/maintenancewindow
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
11-12
Chapter 11
Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v1)
Request
The following table summarizes the request parameters.
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
11-13
Chapter 11
Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v1)
Exception {
Scanner in = null;
try {
params.put("skipNext", skipNext);
} finally {
in.close();
}
}
11-14
Chapter 11
Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v1)
System.out.println("Completed");
}
completed = true;
}
} catch (Exception e) {
System.out.println(e.getMessage());
// services are down, waiting to come up
Thread.sleep(60000);
}
}
}
#!/bin/sh
SERVER_URL=""
USERNAME=""
PASSWORD=""
API_VERSION=""
DOMAIN=""
funcSetMaintenancewithSkipNext () {
url=$SERVER_URL/interop/rest/v1/services/maintenancewindow
skipNext="false"
param="{\"skipNext\":\"$skipNext\"}"
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Daily Maintainence succesfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
11-15
Chapter 11
Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v2)
class DailyMaintenanceWithSkipNextv1 {
Required Roles
Service Administrator or any user assigned to the Migrations - Administer application role
REST Resource
POST /interop/rest/v2/maintenance/rundailymaintenance
11-16
Chapter 11
Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v2)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE URL>/interop/rest/v2/maintenance/rundailymaintenance
Response
Supported Media Types: application/json
{"skipNext":"true"}
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible value: self
data Null
{
"details": null,
"status": -1,
"items": null,
"links": [
{
11-17
Chapter 11
Running Daily Maintenance While Skipping the Scheduled Daily Maintenance (v2)
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
11-18
12
Managing Users, Groups, and Roles
This section describes the REST APIs to manage users, groups, and roles.
12-1
Chapter 12
12-2
Chapter 12
URL Structure for Users, Groups, and Roles
https://<BASE-URL>/interop/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• {api_version}: API version you are developing with.
• {path}: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
This API sends each new user an email with details about their accounts (user name and
password) if resetpassword is set to true. If resetpassword is set to false, the email is not
sent. If you set resetpassword to false, you should specify userpassword. Otherwise, a
unique temporary password will be assigned to each user, but, because no email is sent, the
passwords will not be known to the users so they will not be able to log in.
See Importing a Batch of User Accounts in Getting Started with Oracle Cloud for a detailed
description of the CSV file format.
If a user definition in the CSV file matches a user account that exists in the identity domain, no
changes will be made to the existing user account. This API creates accounts only for new
users whose account information is included in the file. Because user accounts are common to
12-3
Chapter 12
Add Users to an Identity Domain (v1)
all service environments that an identity domain supports, new users are available to all the
environments that share the identity domain.
This API should be run only by an Identity Domain Administrator in the identity domain where
users are to be created. In addition, the user running the API must also be the Service
Administrator of the environment where the API is targeted.
The API is asynchronous and returns the Job ID. The presence of status -1 in the response
indicates that the creation of users is in progress. Use the job status URI to determine whether
the creation of users is complete. Any non-zero status except -1 indicates failure of adding
users.
Note:
This API assigns one password (value of userpassword) to all the users specified in
the CSV file. Assigning the same password to all users may be desirable if you are
creating users purely for testing purposes.
If you are creating real Oracle Fusion Cloud Enterprise Performance Management
users and want to assign a specific password to each user, use this API for a single
user at a time. That is, specify a single user in the CSV file and provide a password
for this user in the API. Then, specify the other user in the CSV file and provide a
different password for this user in the API.
When you add users using this API, unlike when you add users from Oracle Cloud
Console, Oracle Cloud emails to each newly-added user are not automatically sent.
You should manually email credentials (login name and password) to each new user.
Additionally, you should force new users to change password at first login by
specifying resetpassword as true.
Required Roles
Identity Domain Administrator and any predefined role (Service Administrator, Power User,
User, or Viewer)
REST Resource
POST /interop/rest/security/<api_version>/users
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-4
Chapter 12
Add Users to an Identity Domain (v1)
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
12-5
Chapter 12
Add Users to an Identity Domain (v1)
Name Description
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/users",
"data": {
"jobType": "ADD_USERS",
"filename": "<filename>",
"resetpassword": "<true|false>" },
"action": "POST"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/users",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
"details": "Failed to add users. Input file <fileName> is not found.
Specify a valid file name.",
"status": 1,
12-6
Chapter 12
Add Users to an Identity Domain (v1)
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"UserName":"<USERNAME>","Error_Details": "User <USERNAME> already exists.
Please provide a different user name."
}
]
)
12-7
Chapter 12
Add Users to an Identity Domain (v1)
funcAddUsers() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&userpassword=$2&resetpassword=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUsers"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
12-8
Chapter 12
Add Users to an Identity Domain (v2)
'filename=addUsers.csv&resetpassword=true&userpassword=Passw0rd1234'
'https://<BASE-URL>/interop/rest/security/v1/users'
Required Roles
Identity Domain Administrator and any predefined role (Service Administrator, Power User,
User, or Viewer)
REST Resource
POST /interop/rest/security/v2/users/add
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-9
Chapter 12
Add Users to an Identity Domain (v2)
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/security/v2/users/add
{
"users":
[
{
"firstname": "Jane",
"lastname": "Doe",
"email": "jane.doe@example.com",
"userlogin": "jdoe",
"resetpassword": true
},
{
"firstname": "chris",
"lastname": "west",
"email": "chris.west@example.com",
"userlogin": "chris",
"password": "userPassword",
"resetpassword": false
}
]
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed and reason why they failed.
12-10
Chapter 12
Add Users to an Identity Domain (v2)
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/users/add",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 3,
"succeeded": 3,
"failed": 0,
"faileditems": null
}
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/users/add",
"action": "POST"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21146",
"errormessage": "Failed to add users. Invalid or insufficient
parameters specified. Provide all required parameters for the REST API."
},
"details": null
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/users/add",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"userlogin": "jdoe",
12-11
Chapter 12
Remove Users from an Identity Domain (v1)
"errorcode": "EPMCSS-21150",
"errormessage": "Failed to add user. Invalid email
jdoe.com. Please provide a valid email."
},
{
"userlogin": "chris",
"errorcode": "EPMCSS-21151",
"errormessage": "Failed to add user. Missing
[firstname]. Please provide value: [firstname]."
}
]
}
}
User Login
jane.doe@example.com
jdoe@example.com
This API should be run only by Service Administrators who are also assigned to the Identity
Domain Administrator role in the identity domain from which users are to be removed. The
CSV file should not include the account of the user who executes this command. Because user
accounts are common to all service environments that an Identity Domain Administrator
supports, deleting an account for one environment deletes it for all environments that share the
Identity Domain Administrator. With this API, you can see which records failed and the reason
why they failed in addition to how many records passed and failed.
12-12
Chapter 12
Remove Users from an Identity Domain (v1)
The API is asynchronous and returns the Job ID. The presence of status -1 in the response
indicates that the removal of users is in progress. Use the job status URI to determine whether
the removal of users is complete. Any non-zero status except -1 indicates failure of removing
users.
This API is version v1.
Required Roles
Identity Domain Administrator and any predefined role (Service Administrator, Power User,
User, or Viewer)
REST Resource
DELETE /interop/rest/security/<api_version>/users?filename=<filename>
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
12-13
Chapter 12
Remove Users from an Identity Domain (v1)
Name Description
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/users?
filename=<filename>",
"data": {
"jobType": "REMOVE_USERS",
"filename": "<filename>"
},
"action": "DELETE"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
12-14
Chapter 12
Remove Users from an Identity Domain (v1)
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 1, Failed - 2.",
"status": 0,
"items": [
{
"UserName":"<USERNAME>","Error_Details": "User <USERNAME> is not
found. Verify that the user exists."
},
}
12-15
Chapter 12
Remove Users from an Identity Domain (v1)
funcRemoveUsers() {
url="$SERVER_URL/interop/rest/security/<api_version>/users"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUsers"
statusMessage=$(funcCSSRESTHelper "DELETE" "$url" "$header"
"$USERNAME" "$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
def deleteUsers(fileName) {
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-16
Chapter 12
Remove Users from an Identity Domain (v2)
Required Roles
Identity Domain Administrator and any predefined role (Service Administrator, Power User,
User, or Viewer)
REST Resource
POST /interop/rest/security/v2/users/remove
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-17
Chapter 12
Remove Users from an Identity Domain (v2)
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/security/v2/users/remove
{
"users":
[
{
"userlogin": "jdoe"
},
{
"userlogin": "chris"
}
]
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed and reason for why it failed.
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/users/
remove",
12-18
Chapter 12
Remove Users from an Identity Domain (v2)
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 2,
"succeeded": 2,
"failed": 0,
"faileditems": null
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/users/
remove",
"action": "POST"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21147",
"errormessage": "Failed to remove users. Invalid or
insufficient parameters specified. Provide all required parameters for the
REST API."
},
"details": null
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/users/
remove",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"userlogin": "jdoe",
"errorcode": "EPMCSS-21174",
"errormessage": "Failed to remove user. User jdoe
does not exist. Provide a valid userlogin."
},
{
"userlogin": "chris",
"errorcode": "EPMCSS-21174",
"errormessage": " Failed to remove user. User chris
12-19
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
User Login
jane.doe@example.com
jdoe
The API is asynchronous and returns the Job ID. The presence of status -1 in the response
indicates that assigning users is in progress. Use the job status URI to determine whether the
assignment of roles is complete. Any non-zero status except -1 indicates failure of assigning
users. With this API, you can see which records failed and the reason why they failed, in
addition to how many records passed and failed.
This API is version v1.
Required Roles
For predefined roles:
Service Administrator, or Identity Domain Administrator and any predefined role (Power User,
User, or Viewer)
For application roles:
12-20
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
REST Resource
PUT /interop/rest/security/<api_version>/users
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
12-21
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
12-22
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
12-23
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
12-24
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/users",
"data": {
"jobType": "ASSIGN_ROLE",
"filename": "<filename>",
"rolename": "<rolename>"
},
"action": "PUT"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobid>",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobid>",
"data": null,
"action": "GET"
}
],
"details": " Failed to assign role for users. Input file <filename> is not
found. Specify a valid file name.",
"status": 1,
"items": null
}
{
"links": [
{
12-25
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobid>",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"UserName":"<USERNAME>","Error_Details": "User <USERNAME> is not
found. Verify that the user exists."
}
]
}
funcAssignRole() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
12-26
Chapter 12
Assign Users to a Predefined Role or Application Role (v1)
params="filename=$1&jobtype=ASSIGN_ROLE&rolename=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AssignRole"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
String scenario = "Assigning users in " + fileName + " with role " +
roleName;
String params = "jobtype=ASSIGN_ROLE&filename="+ fileName +"&rolename="+
roleName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
users");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
12-27
Chapter 12
Assign Users to a Predefined Role or Application Role (v2)
'jobtype=ASSIGN_ROLE&filename=assignRoleUsers.csv&rolename=Power User'
'https://<BASE-URL>/interop/rest/security/v1/users'
Required Roles
For predefined roles:
Service Administrator, or Identity Domain Administrator and any predefined role (Power User,
User, or Viewer)
For application roles:
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/v2/role/assign/user
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-28
Chapter 12
Assign Users to a Predefined Role or Application Role (v2)
Request
Supported Media Types: application/json
12-29
Chapter 12
Assign Users to a Predefined Role or Application Role (v2)
12-30
Chapter 12
Assign Users to a Predefined Role or Application Role (v2)
12-31
Chapter 12
Assign Users to a Predefined Role or Application Role (v2)
https://<BASE-URL>/interop/rest/security/v2/role/assign/user
{
"rolename": "Service Administrator",
"users": [
{
"userlogin": "jdoe"
},
{
"userlogin": "chris"
}
]
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0: Operation Success
• 1: Operation Failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed and reason for why it failed.
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/role/assign/
user",
"action": "PUT"
12-32
Chapter 12
Assign Users to a Predefined Role or Application Role (v2)
},
"status": 0,
"error": null,
"details": {
"processed": 3,
"succeeded": 3,
"failed": 0,
"faileditems": null
}
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/role/assign/
user",
"action": "PUT"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21000",
"errormessage": "Failed to assign role. Invalid role name <rolename>.
Please provide a valid role name."
},
"details": null
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/role/assign/
user",
"action": "PUT"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"userlogin": "jdoe",
"errorcode": "EPMCSS-21002",
"errormessage": "Failed to assign role. User jdoe does not
exist. Provide a valid userlogin."
},
{
"userlogin": "chris",
"errorcode": "EPMCSS-21002",
"errormessage": "Failed to assign role. User chris does not
exist. Provide a valid userlogin."
12-33
Chapter 12
Remove Users' Role Assignment (v1)
}
]
}
}
12-34
Chapter 12
Remove Users' Role Assignment (v1)
Required Roles
For predefined roles:
Service Administrator, or Identity Domain Administrator and any predefined role (Power User,
User, or Viewer)
For application roles:
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/<api_version>/users
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
User Login
<email>
<FirstName2.LastName2>
12-35
Chapter 12
Remove Users' Role Assignment (v1)
12-36
Chapter 12
Remove Users' Role Assignment (v1)
12-37
Chapter 12
Remove Users' Role Assignment (v1)
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is Job Details
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/users",
"data": {
"jobtype": "UNASSIGN_ROLE",
"filename": "<fileName>",
"rolename": "<roleName>"
},
"action": "PUT"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobid>",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
12-38
Chapter 12
Remove Users' Role Assignment (v1)
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobid>",
"data": null,
"action": "GET"
}
],
"details": "Failed to unassign role for users. Input file <filename> is not
found. Specify a valid file name.",
"status": 1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobid>",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"UserName":"<USERNAME>","Error_Details": "User <USERNAME> is not
found. Verify that the user exists."
}
]
}
12-39
Chapter 12
Remove Users' Role Assignment (v1)
funcUnassignRole() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&jobtype=UNASSIGN_ROLE&rolename=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="UnassignRole"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
String scenario = "Un-assigning users in " + fileName + " with role " +
roleName;
String params = "jobtype=UNASSIGN_ROLE&filename="+ fileName
+"&rolename="+ roleName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
users");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
12-40
Chapter 12
Remove Users' Role Assignment (v2)
}
}
Required Roles
For predefined roles:
Service Administrator, or Identity Domain Administrator and any predefined role (Power User,
User, or Viewer)
12-41
Chapter 12
Remove Users' Role Assignment (v2)
REST Resource
PUT /interop/rest/security/v2/role/unassign/user
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
12-42
Chapter 12
Remove Users' Role Assignment (v2)
12-43
Chapter 12
Remove Users' Role Assignment (v2)
12-44
Chapter 12
Remove Users' Role Assignment (v2)
https://<BASE-URL>/interop/rest/security/v2/role/unassign/user
{
"rolename": "Service Administrator",
"users": [
{
"userlogin": "jdoe"
},
{
"userlogin": "chris"
}
]
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0 - Operation Success
• 1 - Operation Failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed and reason for why it failed.
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/role/
unassign/user",
"action": "PUT"
12-45
Chapter 12
Remove Users' Role Assignment (v2)
},
"status": 0,
"error": null,
"details": {
"processed": 3,
"succeeded": 3,
"failed": 0,
"faileditems": null
}
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/role/
unassign/user",
"action": "PUT"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21008",
"errormessage": "Failed to unassign role. Invalid role name
<rolename>. Please provide a valid role name."
},
"details": null
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/role/
unassign/user",
"action": "PUT"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"userlogin": "jdoe",
"errorcode": "EPMCSS-21010",
"errormessage": "Failed to unassign role. User jdoe does not
exist. Provide a valid userlogin."
},
{
"userlogin": "chris",
"errorcode": "EPMCSS-21010",
"errormessage": "Failed to unassign role. User chris does not
exist. Provide a valid userlogin."
12-46
Chapter 12
Add Users to a Group (v1)
}
]
}
}
User Login
<user name>
<email>
12-47
Chapter 12
Add Users to a Group (v1)
Note:
A user is added to the group only if both these conditions are met:
• User login IDs included in the file exist in the identity domain that services the
environment
• The user is assigned to a pre-defined role in the identity domain
This API should be run only by a service administrator in the identity domain where users are
to be added to the group.
The API is asynchronous and returns the Job ID. Use the job status URI to determine whether
the assignment of users to the group is complete. The presence of status -1 in the response
indicates that the addition of users to a group is in progress. Any non-zero status except -1
indicates failure of adding users. With this API, you can see which records failed and the
reason why they failed in addition to how many records passed and failed.
This API is version 1.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/<api_version>/groups
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
12-48
Chapter 12
Add Users to a Group (v1)
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/groups",
"data": {
"jobType": "ADD_USERS_TO_GROUP",
"filename": "<fileName>",
"groupName": "<groupName>",
},
"action": "GET"
},
{
"rel": "Job Status",
12-49
Chapter 12
Add Users to a Group (v1)
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobId>",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobID>",
"data": null,
"action": "GET"
}
],
"details": "Failed to add users to group. Input file <fileName> is not
found. Specify a valid file name.",
"status": 1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobId>",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"UserName":"<USERNAME>","Error_Details": "User <USERNAME> is not
found. Verify that the user exists."
}
]
}
Sample Code
Java Sample Code
12-50
Chapter 12
Add Users to a Group (v1)
Prerequisites: json.jar
Common Functions: See: CSS Common Helper Functions for Java
funcAddUsersToGroup() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=ADD_USERS_TO_GROUP&groupname=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUsersToGroup"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
Example 8-15 Groovy Sample Code
Common Functions: See CSS Common Helper Functions for Groovy.
12-51
Chapter 12
Add Users to a Group (v1)
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-52
Chapter 12
Add Users to a Group (v2)
Note:
A user is added to the group only if both these conditions are met:
• User login IDs provided in payload should exist in the identity domain that
services the environment
• The user is assigned to a pre-defined role in the identity domain
This topic describes the simplified v2 version of this REST API. This version contains all
parameters in the payload and does not require URL encoding while calling the REST APIs.
This makes the v2 API easier to use.
The API is synchronous and returns the outcome of the operation in the response. Any non-
zero status indicates failure of adding users to group. With this API, you can see which records
failed and the reason why they failed, in addition to how many records passed and failed.
This API is version v2.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/v2/groups/adduserstogroup
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
12-53
Chapter 12
Add Users to a Group (v2)
https://<BASE-URL>/interop/rest/security/v2/groups/adduserstogroup
{
"groupname": "G1",
"users": [
{
"userlogin": "jdoe"
},
{
"userlogin": "chris"
}
]
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0 - Operation Success
• 1 - Operation Failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed and reason for why it failed.
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
adduserstogroup",
"action": "PUT"
},
"status": 0,
12-54
Chapter 12
Add Users to a Group (v2)
"error": null,
"details": {
"processed": 3,
"succeeded": 3,
"failed": 0,
"faileditems": null
}
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
adduserstogroup",
"action": "PUT"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21021",
"errormessage": "Failed to add users to group. Group <groupname> does
not exist. Provide a valid groupname."
},
"details": null
}
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
adduserstogroup",
"action": "PUT"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"userlogin": "jdoe",
"errorcode": "EPMCSS-21031",
"errormessage": "Failed to add user to group. User jdoe does
not exist. Provide a valid userlogin."
},
{
"userlogin": "chris",
"errorcode": "EPMCSS-21031",
"errormessage": "Failed to add user to group. User chris does
not exist. Provide a valid userlogin."
}
]
12-55
Chapter 12
Remove Users from a Group (v1)
}
}
User Login
jdoe
john.doe@example.com
Note:
A user is removed from a group only if both of these conditions are met:
• User logins included in the file exist in the identity domain that services the
environment
• The user is assigned to a pre-defined role in the identity domain
This API can be run only by a service administrator in the identity domain from which users are
to be removed.
The presence of status -1 in the response indicates that the removal of users is in progress.
Use the job status URI to determine whether the removal of users is complete. Any non-zero
status except -1 indicates failure of removing users. With this API, you can see which records
failed and the reason why they failed in addition to how many records passed and failed.
This API is version v1.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/<api_version>/groups
12-56
Chapter 12
Remove Users from a Group (v1)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
12-57
Chapter 12
Remove Users from a Group (v1)
Name Description
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/groups",
"data": {
"jobType": "REST_REMOVE_USERS_FROM_GROUP",
"filename": "<filename>"
"groupName": "<groupName>"
},
"action": "PUT"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobID>",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobId>",
"data": null,
"action": "GET"
}
],
"details": "Failed to remove users. Input file <filename> is not found.
Specify a valid file name.",
"status": 1,
12-58
Chapter 12
Remove Users from a Group (v1)
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobId>",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"UserName":"<USERNAME>","Error_Details": "User <USERNAME> is not
found. Verify that the user exists."
}
]
}
12-59
Chapter 12
Remove Users from a Group (v1)
} catch (Exception e) {
e.printStackTrace();
}
}
funcRemoveUsersFromGroup() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=REMOVE_USERS_FROM_GROUP&groupname=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUsersFromGroup"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
String scenario = "Removing users in " + fileName + " from group " +
groupName;
String params = "jobtype=REMOVE_USERS_FROM_GROUP&filename="+ fileName
+"&groupname="+ groupName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-60
Chapter 12
Remove Users from a Group (v2)
Note:
A user is removed from a group only if both of these conditions are met:
• User login IDs included in the request payload should exist in the identity domain
that services the environment
• The user is assigned to a pre-defined role in the identity domain
This topic describes the simplified v2 version of this REST API. This version contains all
parameters in the payload and does not require URL encoding while calling the REST APIs.
This makes the v2 API easier to use.
The API is synchronous and returns the outcome of the operation in the response. Any non-
zero status indicates failure of removing users from group. With this API, you can see which
records failed and the reason why they failed, in addition to how many records passed and
failed.
This API is version v2.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/v2/groups/removeusersfromgroup
12-61
Chapter 12
Remove Users from a Group (v2)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/security/v2/groups/removeusersfromgroup
{
"groupname": "G1",
"users": [
{
"userlogin": "jdoe"
},
{
"userlogin": "chris"
}
]
}
Response
Supported Media Types: application/json
12-62
Chapter 12
Remove Users from a Group (v2)
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0: Operation Success
• 1: Operation Failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed and reason for why it failed.
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
removeusersfromgroup",
"action": "PUT"
},
"status": 0,
"error": null,
"details": {
"processed": 3,
"succeeded": 3,
"failed": 0,
"faileditems": null
}
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
removeusersfromgroup",
"action": "PUT"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21022",
"errormessage": "Failed to remove users from group. Group <groupname>
does not exist. Provide a valid groupname."
},
"details": null
}
12-63
Chapter 12
List Users
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
removeusersfromgroup",
"action": "PUT"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"userlogin": "jdoe",
"errorcode": "EPMCSS-21032",
"errormessage": "Failed to remove user from group. User jdoe
does not exist. Provide a valid userlogin."
},
{
"userlogin": "chris",
"errorcode": "EPMCSS-21032",
"errormessage": "Failed to remove user from group. User chris
does not exist. Provide a valid userlogin."
}
]
}
}
List Users
The List Users REST API generates a list of available users in the environment.
The API identifies the userlogin, firstname, lastname, and email. Additionally, it can provide
information about the EPM groups the users belong to and the application roles assigned to
the users. Users can be retrieved based on specific user login or any matching user attribute
(first name, last name, user login, email).
12-64
Chapter 12
List Users
The API is synchronous and returns the outcome of the operation in the response. Any non-
zero status indicates failure in listing users.
This API is version v1.
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/security/v1/users/list
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
12-65
Chapter 12
List Users
https://<BASE-URL>/interop/rest/security/v1/users/list
{
"userlogin": "john",
"memberof": true,
"roles": true,
"userattribute": "jack"
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details User details
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/users/list",
"action": "POST"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.com"
},
{
"userlogin": "Jeff",
"firstname": "Jeff",
"lastname": "Clark",
"email": "jeff.clark@example.com"
},
{
"userlogin": "john",
12-66
Chapter 12
List Users
"firstname": "john",
"lastname": "kennedy",
"email": "john.kennedy@example.com"
}
]
Example 2: REST API Issued with "userlogin" in Payload Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/users/list",
"action": "POST"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "john",
"firstname": "john",
"lastname": "kennedy",
"email": "john.kennedy@example.com"
}
]
}
Example 3: REST API Issued with "userlogin", "memberof " and "roles " in Payload
Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/users/list",
"action": "POST"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "john",
"firstname": "john",
"lastname": "kennedy",
"email": "john.kennedy@example.com",
"memberof": {
"groups": [
{
"groupname": "Analyst",
"description": "analyst",
"type": "EPM"
},
{
"groupname": "InteractiveUser",
"description": "UsedforaccessassignmentsforPowerUsers",
"type": "EPM"
}
]
},
12-67
Chapter 12
List Users
"roles": [
{
"rolename": "AdHoc-ReadOnlyUser",
"id": "HP: 0017"
},
{
"rolename": "AdHoc-User",
"id": "HP: 0015"
}
]
}
]
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/users/list",
"action": "POST"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21193",
"errormessage": "Failed to get Users. Authorization failed. Please
provide valid authorized User."
},
"details": null
}
12-68
Chapter 12
Update Users
Update Users
Modifies attributes such as email, first name, and last name of Oracle Fusion Cloud Enterprise
Performance Management users in an identity domain using the new values identified in an
ANSI or UTF-8 encoded comma-separated value (CSV) file that was uploaded to the
environment. Before using this API, use the Upload REST API to upload the file. Use double
quotation marks to enclose fields that contain space charaters in the CSV file. The file should
be deleted after the API executes. The file format is as follows:
This API should be run only by Service Administrators who are also assigned to the Identity
Domain Administrator role in the identity domain in which users are to be updated. The CSV
file should not include the account of the user who executes this command. It updates all
properties of the user identified by User Login. Because user accounts are common to all
service environments that an Identity Domain Administrator supports, updating an account for
one environment updates it for all environments that share the Identity Domain.
With this API, you can see which records failed and the reason why they failed in addition to
how many records passed and failed.
The API is asynchronous and returns the Job ID. The presence of status -1 in the response
indicates that the updating of users is in progress. Use the job status URI to determine whether
the process is complete. Any non-zero status except -1 indicates failure.
This API is version v1.
Required Roles
Identity Domain Administrator and any predefined role (Service Administrator, Power User,
User, or Viewer)
REST Resource
PUT /interop/rest/security/<api_verion>/users
12-69
Chapter 12
Update Users
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
12-70
Chapter 12
Update Users
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
users",
"data": {
"jobType": "UPDATE_USERS",
"filename": "<filename>"
},
"action": "UPDATE"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobID>",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/
<api_version>/jobs/",
"data": null,
"action": "GET"
}
],
"details": "Failed to update users. Input file <filename> not found. Specify
a valid file name.",
"status": 1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/
<api_version>/jobs/",
"data": null,
"action": "GET"
12-71
Chapter 12
Update Users
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"UserName": "<username>",
"Error_Details": " User <USER_NAME> not found. Verify that the
user exists. "
}
]}
funcUpdateUsers() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&jobtype=UPDATE_USERS"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="UpdateUsers"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
12-72
Chapter 12
Add a User to a Batch of Groups
echo $statusMessage
}
def updateUsers(fileName) {
Group Name
GroupA
GroupB
12-73
Chapter 12
Add a User to a Batch of Groups
The user is added to the groups only if these conditions are met:
• The user must exist in the identity domain that services the environment
• The user must be assigned to a pre-defined role in the identity domain
• The groups provided must exist in Access Control and must not be pre-defined groups
Additionally, the user running this API must be authorized to perform this action. This API
should be run only by a service administrator in the environment where the user is to be added
to the groups.
The API is asynchronous and returns the Job ID. Use the job status URI to determine whether
the assignment of a user to the groups is complete. The presence of status -1 in the response
indicates that the addition of a user to groups is in progress. Any non-zero status except -1
indicates failure of adding a user.
This API is version v1.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/<api_version>/groups
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
12-74
Chapter 12
Add a User to a Batch of Groups
Group Name
GroupA
GroupB
username The name of the user to add to the provided list of groups. Form Yes None
This user must already exist.
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
groups",
"rel": "self",
"data": {
"jobType": "ADD_USER_TO_GROUPS",
"filename": "<filename>",
"username": "<username>"
12-75
Chapter 12
Add a User to a Batch of Groups
},
"action": "PUT"
},
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "Job Status",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/v1/jobs/<jobID>",
"data": null,
"action": "GET"
}
],
"details": "Failed to add user to groups. Input file <fileName> is not
found. Specify a valid file name.",
"status": 1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobId>",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 2, Failed - 1.",
"status": 0,
"items": [
{
"GroupName":"<GROUPNAME>","Error_Details": "Group <GROUPNAME> is
not found. Verify that the group exists."
}
]
}
12-76
Chapter 12
Add a User to a Batch of Groups
funcAddUserToGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=ADD_USER_TO_GROUPS&username=$2"
header="Content-Type: application/x-www-form-urlencoded"
cssRESTAPI="AddUserToGroups"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
String scenario = "Adding users in " + fileName + " to group " + userName;
String params = "jobtype=ADD_USER_TO_GROUPS&filename="+ fileName
12-77
Chapter 12
Add a User to a Batch of Groups
+"&username="+ userName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-78
Chapter 12
Remove a User from a Batch of Groups
Group Name
GroupA
GroupB
Required Roles
Service Administrator or Access Control – Manage
REST Resource
PUT /interop/rest/security/<api_version>/groups
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-79
Chapter 12
Remove a User from a Batch of Groups
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"links": [
12-80
Chapter 12
Remove a User from a Batch of Groups
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
groups",
"rel": "self",
"data": {
"jobType": "REMOVE_USER_FROM_GROUPS",
"filename": "<filename>",
"username": "<username>"
},
"action": "PUT"
},
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "Job Status",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobId>",
"data": null,
"action": "GET"
}
],
"details": "Failed to remove user from groups. File <filename> is not
found. Specify a valid file name.",
"status": 1,
"items": null
}
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/jobs/
<jobId>",
"data": null,
"action": "GET"
}
],
"details": "Processed - 3, Succeeded - 1, Failed - 2.",
12-81
Chapter 12
Remove a User from a Batch of Groups
"status": 0,
"items": [
{
"GroupName":"<GROUPNAME>","Error_Details": "Group <GROUPNAME> is not
found. Verify that the group exists."
},
funcRemoveUserFromGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=REMOVE_USER_FROM_GROUPS&username=$2"
header="Content-Type: application/x-www-form-urlencoded"
cssRESTAPI="RemoveUserFromGroups"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
12-82
Chapter 12
Remove a User from a Batch of Groups
String scenario = "Removing users in " + fileName + " from group " +
userName;
String params = "jobtype=REMOVE_USER_FROM_GROUPS&filename="+ fileName
+"&username="+ userName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-83
Chapter 12
Add Groups (v1)
Group Name,Description
GroupA,GroupADescription
GroupB,GroupBDescription
The user running this API must be authorized to perform this action. This API should be run
only by a service administrator in the environment where groups are to be added. With this
API, you can see which records failed and the reason why they failed in addition to how many
records passed and failed.
The API is asynchronous and returns the Job ID. Use the job status URI to determine whether
adding groups is complete. The presence of status -1 in the response indicates that the
addition is in progress. Any non-zero status except -1 indicates failure of adding a group.
This API is version v1.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
POST /interop/rest/security/<api_version>/groups
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
12-84
Chapter 12
Add Groups (v1)
Group Name,Description
GroupA,GroupADescription
GroupB,GroupBDescription
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you can
use the href to get the status
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job Details"
{
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
groups",
"rel": "self",
"data": {
"jobType": "ADD_GROUPS",
"filename": "<filename>"
},
"action": "POST"
},
12-85
Chapter 12
Add Groups (v1)
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId",
"rel": "Job Status",
"data": null,
"action": "GET"
}
],
"status": -1,
"details": null,
"items": null
}
{
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
groups",
"rel": "self",
"data": {
"jobType": "ADD_GROUPS",
"filename": ""
},
"action": "POST"
}
],
"status": 1,
"details": "EPMCSS-20671: Failed to create groups. Invalid or
insufficient parameters specified. Provide all required parameters for the
REST API. ",
"items": null
}
{
"links": [
{
"data": null,
"action": "GET",
"href": " https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "self"
}
],
"status": 0,
"details": "Processed - 4, Succeeded - 3, Failed - 1. ",
"items": [
{
"GroupName":"<GROUPNAME>","Error_Details": "Failed to create a group
with the name <GROUPNAME>. This group already exists in the system. Provide a
different group name."
}
12-86
Chapter 12
Add Groups (v1)
]
}
funcAddGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="addGroups"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
def addGroups(fileName) {
12-87
Chapter 12
Add Groups (v2)
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-88
Chapter 12
Add Groups (v2)
Required Roles
Service Administrator or Access Control – Manage
REST Resource
POST /interop/rest/security/v2/groups/add
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/security/v2/groups/add
{
"groups":
[
{
"groupname": "GroupA",
"description": "GroupADescription"
},
{
"groupname": "GroupB",
"description": "GroupBDescription"
}
]
}
12-89
Chapter 12
Add Groups (v2)
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0 - Operation succeeded
• 1 - Operation failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed, and the reason for why they failed.
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/add",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 2,
"succeeded": 2,
"failed": 0,
"faileditems": null
}
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/add",
"action": "POST"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21119",
"errormessage": "Failed to add groups. Invalid or insufficient
parameters specified. Provide all required parameters for the REST API."
},
"details": null
}
12-90
Chapter 12
List Groups
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/add",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"groupname": "GroupA",
"errorcode": "EPMCSS-21140",
"errormessage": "Failed to add group. Group already
exists in System. Provide different group name."
},
{
"groupname": "GroupB",
"errorcode": "EPMCSS-21140",
"errormessage": "Failed to add group. Group already
exists in System. Provide different group name."
}
]
}
}
List Groups
The List Groups REST API generates a list of available groups in the environment.
The API identifies the group name, description, type, and identity. Additionally, it can provide
information about the groups/user members belonging to the groups and the application roles
assigned to the groups.
12-91
Chapter 12
List Groups
The API is synchronous and returns the outcome of the operation in the response. Any non-
zero status indicates failure in listing groups.
This API is version v1.
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/security/v1/groups/list
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
12-92
Chapter 12
List Groups
https://<BASE-URL>/interop/rest/security/v1/groups/list
{
"groupname": "Analyst",
"type": ["EPM","IDCS","PREDEFINED"],
"members": true,
"roles": true
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details Group details
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/groups/list",
"action": "POST"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "Analyst",
"description": "Used for access assignments for Users",
"type": "EPM",
"identity": "native://nvid=7afc645a6c46bb19:39236dfe:17f68cb24d0:-7fbe?
GROUP"
},
{
"groupname": "Interactive User",
"description": "Used for access assignments for Power Users",
"type": "EPM",
"identity": "native://nvid=7afc645a6c46bb19:39236dfe:17f68cb24d0:-7fc0?
GROUP"
},
12-93
Chapter 12
List Groups
{
"groupname": "IDCS_Group",
"description": "Sample IDCS Group",
"type": "IDCS",
"identity": "rest://groupName=IDCS_Group?GROUP"
},
{
"groupname": "Finance",
"description": "Finance Group",
"type": "IDCS",
"identity": "rest://groupName=Finance?GROUP"
}
]
}
Example 2: REST API Issued with Group Name and Type "EPM" in Payload Completes
without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/groups/list",
"action": "POST"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "Analyst",
"description": "Used for access assignments for Users",
"type": "EPM",
"identity": "native://nvid=7afc645a6c46bb19:39236dfe:17f68cb24d0:-7fbe?
GROUP"
}
]
}
Example 3: REST API Issued with Group Name, Members, and Roles in Payload
Completes with Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/groups/list",
"action": "POST"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "Analyst",
"description": "Used for access assignments for Users",
"type": "EPM",
"identity": "native://nvid=7afc645a6c46bb19:39236dfe:17f68cb24d0:-7fbe?
GROUP",
"members": {
"users": [
12-94
Chapter 12
List Groups
{
"userlogin": "jdoe",
"firstname": "Jane",
"lastname": "Doe",
"email": "jane.doe@example.com"
},
{
"userlogin": "chris",
"firstname": "Chris",
"lastname": "West",
"email": "chris.west@example.com"
}
],
"groups": [
{
"groupname": "User",
"description": "UserRole",
"type": "PREDEFINED"
},
{
"groupname": "InteractiveUser",
"description": "Used for access assignments for Power Users",
"type": "EPM"
}
]
},
"roles": [
{
"rolename": "Ad Hoc - Read Only User",
"id": "HP: 0017"
},
{
"rolename": "Ad Hoc - User",
"id": "HP: 0015"
}
]
}
Example 4: REST API Issued Only with Type "EPM, IDCS, PREDEFINED" in Payload
Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/groups/list",
"action": "POST"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "Analyst",
"description": "Used for access assignments for Users",
"type": "EPM",
"identity": "native://nvid=7afc645a6c46bb19:39236dfe:17f68cb24d0:-7fbe?
GROUP"
12-95
Chapter 12
List Groups
},
{
"groupname": "Interactive User",
"description": "Used for access assignments for Power Users",
"type": "EPM",
"identity": "native://nvid=7afc645a6c46bb19:39236dfe:17f68cb24d0:-7fc0?
GROUP"
},
{
"groupname": "IDCS_Group",
"description": "Sample IDCS Group",
"type": "IDCS",
"identity": "rest://groupName=IDCS_Group?GROUP"
},
{
"groupname": "Finance",
"description": "Finance Group",
"type": "IDCS",
"identity": "rest://groupName=Finance?GROUP"
},
{
"groupname": "Service Administrator",
"description": "Service Administrator Role",
"type": "PREDEFINED",
"identity": "rest://displayName=Service_Administrator?GROUP"
},
{
"groupname": "User",
"description": "User Role",
"type": "PREDEFINED",
"identity": "rest://displayName=User?GROUP"
}
]
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/groups/list",
"action": "POST"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21263",
"errormessage": "Failed to get Groups. Authorization failed. Please
provide valid authorized ser."
},
"details": null
}
12-96
Chapter 12
Remove Groups (v1)
Group Name
GroupA
GroupB
The user running this API must be authorized to perform this action. This API should be run
only by a service administrator in the environment where a group is to be removed.
The presence of status -1 in the response indicates that the removal in progress. Use the job
status URI to determine whether the removal is complete. Any non-zero status except -1
indicates failure. With this API, you can see which records failed and the reason why they
failed in addition to how many records passed and failed.
This API is version v1.
Required Roles
Service Administrator or Access Control – Manage
REST Resource
DELETE /interop/rest/security/<api_version>/groups
12-97
Chapter 12
Remove Groups (v1)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Group Name
GroupA
GroupB
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job
Status, you can use the href to get the status
12-98
Chapter 12
Remove Groups (v1)
Name Description
data Parameters as key value pairs passed in the request
items Details about the resource
links Details of the first URL to be requested to get the job details; rel is "Job
Details"
{
"status": -1,
"items": null,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
groups?filename=<filename>",
"rel": "self",
"data": {
"jobType": "REMOVE_GROUPS",
"filename": "<filename>"
},
"action": "DELETE"
},
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "Job Status",
"data": null,
"action": "GET"
}
],
"details": null
}
{
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
groups",
"rel": "self",
"data": {
"jobType": "REMOVE_GROUPS",
"filename": ""
},
"action": "DELETE"
}
12-99
Chapter 12
Remove Groups (v1)
],
"status": 1,
"details": "EPMCSS-20673: Failed to delete groups. Invalid or
insufficient parameters specified. Provide all required parameters for the
REST API. ",
"items": null
}
{
"links": [
{
"data": null,
"action": "GET",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "self"
}
],
"status": 0,
"details": "Processed - 3, Succeeded – 2, Failed - 1. ",
"items": [
{
"GroupName":"<GROUPNAME>","Error_Details": "Group <GROUPNAME> is not
found. Verify that the group exists."
}
]
}
12-100
Chapter 12
Remove Groups (v1)
e.printStackTrace();
}
}
FuncRemoveGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="removeGroups"
statusMessage=$(funcCSSRESTHelper "DELETE" "$url" "$header"
"$USERNAME" "$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
def removeGroups(fileName) {
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-101
Chapter 12
Remove Groups (v2)
Required Roles
Service Administrator or Access Control – Manage
REST Resource
POST /interop/rest/security/v2/groups/remove
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-102
Chapter 12
Remove Groups (v2)
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/security/v2/groups/remove
{
"groups":
[
{
"groupname": "GroupA"
},
{
"groupname": "GroupB"
}
]
}
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Identifies the status of the operation
• 0 - Operation succeeded
• 1 - Operation failed
error Detailed information about the error
details Detailed status of the operation performed. Total number of records
processed, succeeded, and failed, and the reason for why they failed.
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
remove",
12-103
Chapter 12
Remove Groups (v2)
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 2,
"succeeded": 2,
"failed": 0,
"faileditems": null
}
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
remove",
"action": "POST"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21120",
"errormessage": "Failed to remove groups. Invalid or
insufficient parameters specified. Provide all required parameters for the
REST API."
},
"details": null
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/groups/
remove",
"action": "POST"
},
"status": 0,
"error": null,
"details": {
"processed": 5,
"succeeded": 3,
"failed": 2,
"faileditems":
[
{
"groupname": "GroupA",
"errorcode": "EPMCSS-21125",
"errormessage": "Failed to remove group. Group GroupA
does not exist. Provide a valid groupname."
},
{
"groupname": "GroupB",
"errorcode": "EPMCSS-21125",
12-104
Chapter 12
User Group Report (v1)
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/security/<api_version>/usergroupreport
12-105
Chapter 12
User Group Report (v1)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
12-106
Chapter 12
User Group Report (v1)
{
"details": null,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
usergroupreport",
"rel": "self",
"data": {
"jobType": "GENERATE_USER_GROUP_REPORT",
"filename": "<filename>"
},
"action": "POST"
},
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "Job Status",
"data": null,
"action": "GET"
}
],
"status": -1,
"items": null
}
{
"details": "Failed to generate User Group Report. File <filename> already
exists. Please provide different file name. ",
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "self",
"data": null,
"action": "GET"
}
],
"status": 1,
"items": null
}
{
"details": null,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobid>",
"rel": "self",
"data": null,
12-107
Chapter 12
User Group Report (v1)
"action": "GET"
}
],
"status": 0,
"items": null
}
//
// BEGIN
//
public void generateUserGroupReport(String fileName) {
try {
String url = this.serverUrl + "/interop/rest/security/" +
apiVersion + "/usergroupreport";
Map<String, String> reqHeaders = new HashMap<String, String>();
reqHeaders.put("Authorization", "Basic " + DatatypeConverter
.printBase64Binary((this.userName + ":" +
this.password).getBytes(Charset.defaultCharset())));
funcGenerateUserGroupReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/usergroupreport"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateUserGroupReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
12-108
Chapter 12
User Group Report (v2)
def generateUserGroupReport(fileName) {
String scenario = "Generating User Group Report in " + fileName;
String params = "jobtype=GENERATE_USER_GROUP_REPORT&filename="+ fileName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
usergroupreport");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-109
Chapter 12
User Group Report (v2)
The report indicates whether the user assignment to an EPM group is direct (as member of a
group) or indirect (as member of a group that is a child of a nested group). The report identifies
the user's login name, first name, last name, email address, assigned group, and type of
assignment.
The API is synchronous and returns the outcome of the operation in the response. Any non-
zero status indicates failure in generating a User Group Report.
This API is version v2.
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
GET /interop/rest/security/v2/report/usergroupreport?userlogin=<
userlogin>&groupname=<groupname>&userattribute=<search user attributes>
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
12-110
Chapter 12
User Group Report (v2)
Response
Supported Media Types: application/json
Parameters Description
links Detailed information about the link
status Status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details Records matching the request
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
usergroupreport",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.oracle.com",
"groups": [
{
"direct": "Yes",
"groupname": "Interactive User"
},
{
"direct": "No",
12-111
Chapter 12
User Group Report (v2)
Example 2: REST API Issued with userlogin and groupname Query Parameters
Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
usergroupreport? userlogin=’Jade’&groupname='Interactive User'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.oracle.com",
"groups": [
{
"direct": "Yes",
"groupname": "Interactive User"
}
]
}
]
}
Example 3: REST API Issued with userattribute and groupname Query Parameters
Completes without Errors
{
"links": {
12-112
Chapter 12
User Group Report (v2)
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
usergroupreport?userattribute=’Doe’&groupname=’Super User’",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jeffrey",
"firstname": "Jeffrey",
"lastname": "Doe",
"email": "jeffrey.doe@example.oracle.com",
"groups": [
{
"direct": "Yes",
"groupname": "Super User""
}
]
}
]
}
Example 4: REST API Issued Only with a userlogin Query Parameter Completes without
Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
usergroupreport?userlogin='Jade'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.oracle.com",
"groups": [
{
"direct": "Yes",
"groupname": "Interactive User"
},
{
"direct": "No",
"groupname": "Strategic Planner"
}
]
}
]
}
12-113
Chapter 12
User Group Report (v2)
Example 5: REST API Issued Only with a groupname Query Parameter Completes without
Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
usergroupreport?groupname='Strategic Planner'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.oracle.com",
"groups": [
{
"direct": "No",
"groupname": "Strategic Planner"
}
]
},
{
"userlogin": "Jeff",
"firstname": "Jeff",
"lastname": "Clark",
"email": "jeff.clark@example.oracle.com",
"groups": [
{
"direct": "No",
"groupname": "Strategic Planner"
}
]
}
]
}
Example 6: REST API Issued Only with userattribute Query Parameter Completes
without Errors
{
"links": {
"href": " https://<BASE-URL>/interop/rest/security/v2/report/
usergroupreport?userattribute='Doe'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jeff",
"firstname": "Jeff",
"lastname": "Doe",
12-114
Chapter 12
User Group Report (v2)
"email": "jeff.doe@example.oracle.com",
"groups": [
{
"direct": "Yes",
"groupname": "Analyst"
}
]
},
{
"userlogin": "Jeffrey",
"firstname": "Jeffrey",
"lastname": "Doe",
"email": "jeffrey.doe@example.oracle.com",
"groups": [
{
"direct": "Yes",
"groupname": "Super User"
}
]
},
{
"userlogin": "johndoe",
"firstname": "John",
"lastname": "Doe",
"email": "john.doe@example.oracle.com",
"groups": [
{
"direct": "Yes",
"groupname": "Super User"
}
]
}
]
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
usergroupreport",
"action": "GET"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21192",
"errormessage": "Failed to generate User Group Report. Authorization
failed. Please provide valid authorized user."
},
"details": null
}
12-115
Chapter 12
User Access Report (v1)
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/{api_version}/reports?
q=%7Btype%3Aprovisionreport%2CfileName%3Aprovreport_17_Apr.csv%2Cformat%3Asimplif
ied%2Cusertype%3Aserviceusers%7D
12-116
Chapter 12
User Access Report (v1)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
12-117
Chapter 12
User Access Report (v1)
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/{api_version}/reports?
q={type=provisionreport,fileName=provreport.csv,format=simplified,usertype=ser
viceusers}",
"data": null,
"action": "POST"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v1/reports/
3180399797144693",
"data": null,
"action": "GET"
}
],
"status": -1,
"details": null
}
//
// BEGIN
//
public void provisionReport (String fileName, String type) throws Exception {
JSONObject params = new JSONObject();
params.put("fileName",java.net.URLEncoder.encode(fileName));
params.put("type",java.net.URLEncoder.encode(type));
params.put("format","simplified");
params.put("usertype","usertype","serviceusers"));
12-118
Chapter 12
User Access Report (v1)
funcProvisionReport () {
url=$SERVER_URL/interop/rest/$LCM_VERSION/reports/
param=$(echo
"q={type:$reporttype,fileName:$fileName,format:$mode,usertype:$usertype}" |
sed -f urlencode.sed)
url=$url?$param
output='cat response.txt'
status='echo $output | jq '.status''
if [ $status == -1 ]; then
echo "copying snapshot in progress"
funcGetStatus "GET"
else
error='echo $output | jq '.details''
echo "Error occured. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
param.put("fileName",fileName);
param.put("type",type);
param.put("format",mode);
param.put("usertype",usertype);
12-119
Chapter 12
User Access Report (v2)
if (response != null) {
getJobStatus(fetchPingUrlFromResponse(response, "Job
Status"),"GET");
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/v2/reports/useraccess
12-120
Chapter 12
User Access Report (v2)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/v2/reports/useraccess
{
"fileName": "provisionreport.csv",
"parameters": {
"format": "simplified",
"usertype": "IDAdmins"
}
}
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
12-121
Chapter 12
User Access Report (v2)
Parameters Description
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href
to get the status of the import operation
data null
{
"details": null,
"status": -1,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/reports/useraccess",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
22747066997747363",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
12-122
Chapter 12
User Audit Report (v1)
{"format":"simplified","usertype":"ServiceUsers"}}' 'https://<BASE-URL>/
interop/rest/v2/reports/useraccess'
Note:
Oracle Fusion Cloud EPM ensures that only valid date range is used during report
generation. These validations are performed for the start and end dates:
• The start date cannot be earlier than the allowed maximum retention period (120
days) from the current date.
• The end date cannot be later than the maximum retention period from the start
date.
• The end date cannot be earlier than the start date.
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST/interop/rest/{api_version}/reports?
q=%7Btype%3Auserauditreport%2CfileName%3Auseraudit%20report.csv%2Csince%3A2025-04
-01%2Cuntil%3A2025-04-31%7D
12-123
Chapter 12
User Audit Report (v1)
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
12-124
Chapter 12
User Audit Report (v1)
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/{api_version}/reports?
q={type:userauditreport,fileName:useraudit
report.csv,since:2017-12-10,until:2018-06-10}",
"data": null,
"action": "POST"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v1/reports/
3180621025673301",
"data": null,
"action": "GET"
}
],
"status": -1,
"details": null
}
//
// BEGIN
//
public void userAuditReport (String fileName, String type, String since,
String until) throws Exception {
JSONObject params = new JSONObject();
params.put("fileName",java.net.URLEncoder.encode(fileName));
params.put("type",java.net.URLEncoder.encode(type));
params.put("since",java.net.URLEncoder.encode(since));
params.put("until",java.net.URLEncoder.encode(until));
12-125
Chapter 12
User Audit Report (v1)
funcUserAuditReport () {
url=$SERVER_URL/interop/rest/$LCM_VERSION/reports/
param=$(echo
"q={type:$reporttype,fileName:$fileName,since:$since,until:$until}" | sed -f
urlencode.sed)
url=$url?$param
output='cat response.txt'
status='echo $output | jq '.status''
if [ $status == -1 ]; then
echo "copying snapshot in progress"
funcGetStatus "GET"
else
error='echo $output | jq '.details''
echo "Error occured. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
param.put("fileName",fileName);
param.put("type",type);
param.put("since",since);
param.put("until",until);
if (response != null) {
waitForCompletion(fetchPingUrlFromResponse(response, "Job
Status"));
12-126
Chapter 12
User Audit Report (v2)
}
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
Note:
Oracle Fusion Cloud EPM ensures that only valid date range is used during report
generation. These validations are performed for the start and end dates:
• The start date cannot be earlier than the allowed maximum retention period (120
days) from the current date.
• The end date cannot be later than the maximum retention period from the start
date.
• The end date cannot be earlier than the start date.
12-127
Chapter 12
User Audit Report (v2)
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/v2/reports/useraudit
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
https://<BASE-URL>/interop/rest/v2/reports/useraudit
{
"fileName": "userauditreport.csv",
"since": "2022-10-01",
"until":"2022-11-01"
}
Response
Supported Media Types: application/json
12-128
Chapter 12
User Audit Report (v2)
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href
to get the status of the import operation
data Parameters as key value pairs passed in the request
{
"details": null,
"status": -1,
"links": [
{
"href": "https://<BASE-URL>/interop/rest/v2/reports/useraudit",
"action": "POST",
"rel": "self",
"data": null
},
{
"href": "https://<BASE-URL>/interop/rest/v2/status/jobs/
22747152577657842",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
12-129
Chapter 12
User Login Report
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
GET /interop/rest/security/v1/report/userloginreport?
userlogin=<USERLOGIN>&from_date=<FROM_DATE>&to_date=<TO_DATE>'
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
12-130
Chapter 12
User Login Report
Response
Supported Media Types: application/json
Name Description
links Detailed information about the link and HTTP call type
status Status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details Records matching the request
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/report/
userloginreport",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "John",
"ipaddress": "10.69.112.149",
"accessdateandtime": "July 3, 2025 11:34:33 UTC"
},
{
"userlogin": "Alex",
"ipaddress": "10.14.110.178",
"accessdateandtime": "July 3, 2025 13:45:21 UTC"
},
{
"userlogin": "Clark",
"ipaddress": "10.54.123.118",
"accessdateandtime": "July 3, 2025 17:23:47 UTC"
}
12-131
Chapter 12
User Login Report
]
}
Example 2: Job Issued with "from_date" and "to_date " Query Parameters and
Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/report/
userloginreport?from_date=2025-06-24&to_date=2025-07-03",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Clark",
"ipaddress": "10.54.123.118",
"accessdateandtime": "June 27, 2025 17:23:47 UTC"
},
{
"userlogin": "Alex",
"ipaddress": "10.14.110.178",
"accessdateandtime": "July 2, 2025 13:45:21 UTC"
},
{
"userlogin": "John",
"ipaddress": "10.69.112.149",
"accessdateandtime": "July 3, 2025 11:34:33 UTC"
}
]
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v1/report/
userloginreport?userlogin=clark&from_date=2024-06-24&to_date=2024-07-03",
"action": "GET"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21192",
"errormessage": "Failed to generate User Login Report. Authorization
failed. Please provide valid authorized user."
},
"details": null
}
12-132
Chapter 12
Role Assignment Report (v1)
12-133
Chapter 12
Role Assignment Report (v1)
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/security/{api_version}/roleassignmentreport
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
12-134
Chapter 12
Role Assignment Report (v1)
Parameters Description
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
{
"links": [
{
"data": {
"jobType": "GENERATE_ROLE_ASSIGNMENT_REPORT",
"filename": "<filename>"
"usertype": "<USER_TYPE>"
},
"action": "POST",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobId>",
"rel": "Job Status"
}
],
"status": -1,
"details": null,
"items": null
}
{
"links": [
{
"data": {
"jobType": "GENERATE_ROLE_ASSIGNMENT_REPORT",
"filename": "<filename>"
"usertype": "<USER_TYPE>"
},
"action": "POST",
"href": "https://<BASE-URL>/interop/rest/security/{api_version}/
roleassignmentreport",
"rel": "self"
}
],
"status": 1,
12-135
Chapter 12
Role Assignment Report (v1)
{
"links": [
{
"data": null,
"action": "GET",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobID>",
"rel": "self"
}
],
"status": 0,
"details": null,
"items": null
}
12-136
Chapter 12
Role Assignment Report (v1)
funcGenerateRoleAssignmentReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
roleassignmentreport"
params="filename=$1&usertype=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateRoleAssignmentReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-137
Chapter 12
Role Assignment Report for Users (v2)
'filename=roleAssignmentReportUsers.csv&usertype=ServiceUsers' 'https://<BASE-
URL>/interop/rest/security/v1/roleassignmentreport'
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
GET /interop/rest/security/v2/report/roleassignmentreport/user?
userlogin=<userlogin>&rolename=<rolename>&userattribute=<search user attribute>
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-138
Chapter 12
Role Assignment Report for Users (v2)
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
links Detailed information about the link and HTTP call type
status status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details Lists records matching the request
12-139
Chapter 12
Role Assignment Report for Users (v2)
Example 1: REST API Issued without Any Query Parameters Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/user",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
},
{
"rolename": "Ad Hoc - Creater",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
},
{
"userlogin": "Jeff",
"firstname": "Jeff",
"lastname": "Clark",
"email": "jeff.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": "idcsgroup"
},
{
"rolename": "Ad Hoc - Read Only User",
"roletype": "Application",
"grantedthroughgroup": ""
},
{
"rolename": "Application - Mass Allocate",
"roletype": "Application",
"grantedthroughgroup": "Analyst->idcsgroup"
}
]
}
]
}
12-140
Chapter 12
Role Assignment Report for Users (v2)
Example 2: REST API Issued with userlogin and rolename Query Parameters Completes
without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/user?userlogin='Jade'&rolename='Service Administrator'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
}
]
}
]
}
Example 3: REST API Issued with userattribute and rolename Query Parameters and
Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/user? userattribute='Clark'&rolename='Service
Administrator'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
}
]
},
{
12-141
Chapter 12
Role Assignment Report for Users (v2)
"userlogin": "Jeff",
"firstname": "Jeff",
"lastname": "Clark",
"email": "jeff.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": "idcsgroup"
}
]
}
]
}
Example 4: REST API Issued with Only rolename Query Parameter Completes without
Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/user?rolename='Ad Hoc - Read Only User'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.com",
"roles": [
{
"rolename": "Ad Hoc - Read Only User",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
},
{
"userlogin": "Jeff",
"firstname": "Jeff",
"lastname": "Clark",
"email": "jeff.clark@example.com",
"roles": [
{
"rolename": "Ad Hoc - Read Only User",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
}
]
}
12-142
Chapter 12
Role Assignment Report for Users (v2)
Example 5: REST API Issued with Only userlogin Query Parameter Completes without
Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/user?userlogin='Jade'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
},
{
"rolename": "Ad Hoc - Creater",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
}
]
}
Example 6: REST API Issued with Only userattribute Query Parameter and Completes
without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/user?userattribute='Clark'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"userlogin": "Jade",
"firstname": "Jade",
"lastname": "Clark",
"email": "jade.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
12-143
Chapter 12
Role Assignment Report for Users (v2)
},
{
"rolename": "Ad Hoc - Creater",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
},
{
"userlogin": "Jeff",
"firstname": "Jeff",
"lastname": "Clark",
"email": "jeff.clark@example.com",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": "idcsgroup"
},
{
"rolename": "Ad Hoc - Read Only User",
"roletype": "Application",
"grantedthroughgroup": ""
},
{
"rolename": "Application - Mass Allocate",
"roletype": "Application",
"grantedthroughgroup": "Analyst->idcsgroup"
}
]
}
]
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/user",
"action": "GET"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21206",
"errormessage": "Failed to generate Role Assignment Report for Users.
Authorization failed. Please provide valid authorized user."
},
"details": null
}
12-144
Chapter 12
Role Assignment Report for Groups (v2)
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
12-145
Chapter 12
Role Assignment Report for Groups (v2)
REST Resource
GET /interop/rest/security/v2/report/roleassignmentreport/group?
groupname=<groupname>&rolename=<rolename>
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
links Detailed information about the link and HTTP call type
status See Migration Status Codes
12-146
Chapter 12
Role Assignment Report for Groups (v2)
Parameters Description
error Detailed information about the error
details Lists records matching the request
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/group",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "idcsgroup",
"description": "Sample IDCS Group",
"type": "IDCS",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
},
{
"rolename": "Application - Mass Allocate",
"roletype": "Application",
"grantedthroughgroup": ""
},
{
"rolename": "Ad Hoc - Read Only User",
"roletype": "Application",
"grantedthroughgroup": "Analyst"
}
]
},
{
"groupname": "FinancialAnalyst",
"description": "Sample EPM Group",
"type": "EPM",
"roles": [
{
"rolename": "Application - Mass Allocate",
"roletype": "Application",
"grantedthroughgroup": ""
},
12-147
Chapter 12
Role Assignment Report for Groups (v2)
{
"rolename": "DataIntegration-Create",
"roletype": "Application",
"grantedthroughgroup": ""
},
{
"rolename": "DataIntegration-Run",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
},
{
"groupname": "GroupPU",
"description": "Sample IDCS GroupPU",
"type": "IDCS",
"roles": [
{
"rolename": "PowerUser",
"roletype": "Predefined",
"grantedthroughgroup": ""
},
{
"rolename": "Approval-Supervise",
"roletype": "Application",
"grantedthroughgroup": ""
},
{
"rolename": "DataIntegration-Run",
"roletype": "Application",
"grantedthroughgroup": "Analyst->FinancialAnalyst"
}
]
}
]
}
Response 2: REST API Issued with groupname and rolename Query Parameters
Completes without Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/group?groupname='idcsgroup'&rolename='Service
Administrator'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "idcsgroup",
"description": "Sample IDCS Group",
"type": "IDCS",
"roles": [
12-148
Chapter 12
Role Assignment Report for Groups (v2)
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
}
]
}
]
}
Response 3: REST API Issued with Only rolename Query Parameter Completes without
Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/group?rolename='Application - Mass Allocate'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "idcsgroup",
"description": "Sample IDCS Group",
"type": "IDCS",
"roles": [
{
"rolename": "Application - Mass Allocate",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
},
{
"groupname": "FinancialAnalyst",
"description": "Sample EPM Group",
"type": "EPM",
"roles": [
{
"rolename": "Application - Mass Allocate",
"roletype": "Application",
"grantedthroughgroup": ""
}
]
}
]
}
Response 4: REST API Issued with Only groupname Query Parameter Completes without
Errors
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
12-149
Chapter 12
Role Assignment Report for Groups (v2)
roleassignmentreport/group?groupname='idcsgroup'",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"groupname": "idcsgroup",
"description": "Sample IDCS Group",
"type": "IDCS",
"roles": [
{
"rolename": "Service Administrator",
"roletype": "Predefined",
"grantedthroughgroup": ""
},
{
"rolename": "Application - Mass Allocate",
"roletype": "Application",
"grantedthroughgroup": ""
},
{
"rolename": "Ad Hoc - Read Only User",
"roletype": "Application",
"grantedthroughgroup": "Analyst"
}
]
}
]
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/report/
roleassignmentreport/group",
"action": "GET"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21203",
"errormessage": "Failed to generate Role Assignment Report for Groups.
Authorization failed. Please provide valid authorized user."
},
"details": null
}
12-150
Chapter 12
Get Available Roles
Required Roles
Service Administrator or Access Control – Manage
REST Resource
GET /interop/rest/security/v2/role/getavailableroles?type=<type>
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-151
Chapter 12
Get Available Roles
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters Description
links Detailed information about the link
status Status of the operation
• 0: Operation succeeded
• 1: Operation failed
error Detailed information about the error
details Records matching the request
{
"links": {
"href": "https://<BASE URL>/interop/rest/security/v2/role/
getavailableroles",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
12-152
Chapter 12
Get Available Roles
{
"links": {
"href": " https://<BASE URL>/interop/rest/security/v2/role/
getavailableroles?type=application",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"name": "Ad Hoc - Create",
"id": "HP:0016"
},
{
"name": "Ad Hoc - Read Only User",
"id": "HP:0017"
},
{
"name": "Ad Hoc - User",
"id": "HP:0015"
},
{
"name": "Announcements - Manage",
"id": "HP:0021"
}
12-153
Chapter 12
Get Available Roles
]
}
{
"links": {
"href": " https://<BASE URL>/interop/rest/security/v2/role/
getavailableroles?type=predefined",
"action": "GET"
},
"status": 0,
"error": null,
"details": [
{
"name": "User",
"id": "HUB:003"
},
{
"name": "Viewer",
"id": "HUB:004"
}
. . .
]
}
{
"links": {
"href": "https://<BASE-URL>/interop/rest/security/v2/role/
getavailableroles",
"action": "GET"
},
"status": 1,
"error": {
"errorcode": "EPMCSS-21192",
"errormessage": "Failed to get available roles. Authorization failed.
Please provide valid authorized user."
},
"details": null
}
12-154
Chapter 12
Role Assignment Audit Report
Note:
Oracle Fusion Cloud EPM ensures that only valid date range is used during report
generation. Thesevalidations are performed for the start and end dates:
• The start date cannot be earlier than the allowed maximum retention period (90
days) from the current date.
• The end date cannot be later than the maximum retention period from the start
date.
• The end datecannot be earlier than the start date.
Required Roles
• Service Administrator
• Any predefined role and the Identity Domain Administrator role
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
12-155
Chapter 12
Role Assignment Audit Report
REST Resource
POST /interop/rest/security/{api_version}/roleassignmentauditreport
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status
data Parameters as key value pairs passed in the request
12-156
Chapter 12
Role Assignment Audit Report
Information on deleted users who were previously assigned to predefined roles in the
environment is listed with the display name (first and last name) of the user in the User Name
column. In such cases, the Role column indicates the predefined role that the user had before
the user's account was deleted. This change does not apply to application roles, if any, that
were assigned to the deleted user; such assignments are shown with the User Login Name of
the user. For an example, see the information in the red box in the following illustration.
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
roleassignmentauditreport",
"data": {
"jobType": "GENERATE_ROLE_ASSIGNMENT_AUDIT_REPORT",
"to_date": "<toDate>",
"filename": "<filename>",
"from_date": "<fromDate>"
},
"action": "POST"
12-157
Chapter 12
Role Assignment Audit Report
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/3023387588778806",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"data": {
"jobType": "GENERATE_ROLE_ASSIGNMENT_AUDIT_REPORT",
"from_date": " ",
"to_date": " ",
"filename": " "
},
"action": "POST",
"href": "https://<BASE-URL>/interop/rest/security/{api_version}/
roleassignmentauditreport",
"rel": "self"
}
],
"status": 1,
"details": "EPMCSS-20678: Failed to generate Role Assignment Audit
Report. Invalid or insufficient parameters specified. Provide all required
parameters for the REST API. ",
"items": null
}
{
"links": [
{
"data": null,
"action": "GET",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobID>",
"rel": "self"
}
],
"status": 0,
"details": null,
"items": null
}
12-158
Chapter 12
Role Assignment Audit Report
"POST");
String jobStatus =
CSSRESTHelper.getCSSRESTJobCompletionStatus(restResult, reqHeaders);
System.out.println(jobStatus);
} catch (Exception e) {
e.printStackTrace();
}
}
funcGenerateRoleAssignmentAuditReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
roleassignmentauditreport"
params="from_date=$1&to_date=$2&filename=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateRoleAssignmentAuditReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
12-159
Chapter 12
Invalid Login Report
def generateRoleAssignmentAuditReport(from_date,to_date,fileName) {
12-160
Chapter 12
Invalid Login Report
This is an asynchronous job and uses the job status URI to determine if the operation is
complete.
The presence of status -1 in the response indicates that the generation of the report is in
progress. Use the job status URI to determine whether the generation of the report is
complete. Any non-zero status except -1 indicates failure of generating the report.
The default retention period for audit data is 30 days; however, you can extend the retention
period up to a maximum of 90 days from the Identity Console. If you want a longer duration of
audit data, download an Invalid Login Report and archive it.
This API is version v1.
Note:
Cloud EPM ensures that only valid date range is used during report generation.
These validations are performed for the start and end dates:
• The start date cannot be earlier than the allowed maximum retention period (90
days) from the current date.
• The end date cannot be later than the maximum retention period from the start
date.
• The end date cannot be earlier than the start date.
Required Roles
Identity Domain Administrator and any predefined role (Service Administrator, Power User,
User, or Viewer)
REST Resource
POST /interop/rest/security/{api_version}/invalidloginreport
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
12-161
Chapter 12
Invalid Login Report
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status
data Parameters as key value pairs passed in the request
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
invalidloginreport",
"data": {
"jobType": "GENERATE_INVALID_LOGIN_REPORT",
"to_date": "<toDate>",
12-162
Chapter 12
Invalid Login Report
"filename": "<filename>",
"from_date": "<fromDate>"
},
"action": "POST"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<job_id>",
"data": null,
"action": "GET"
}
],
"details": null,
"status": -1,
"items": null
}
{
"links": [
{
"data": {
"jobType": "GENERATE_INVALID_LOGIN_REPORT",
"from_date": " ",
"to_date": " ",
"filename": " "
},
"action": "POST",
"href": "https://<BASE-URL>/interop/rest/security/{api_version}/
invalidloginreport",
"rel": "self"
}
],
"status": 1,
"details": "EPMCSS-20679: Failed to generate Invalid Login Report.
Invalid or insufficient parameters specified. Provide all required parameters
for the REST API. ",
"items": null
}
{
"links": [
{
"data": null,
"action": "GET",
"href": "https://<BASE-URL>/interop/rest/security/<api_version>/
jobs/<jobID>",
"rel": "self"
}
],
"status": 0,
12-163
Chapter 12
Invalid Login Report
"details": null,
"items": null
}
funcGenerateInvalidLoginReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
invalidloginreport"
params="from_date=$1&to_date=$2&filename=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateInvalidLoginReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
12-164
Chapter 12
Group Assignment Audit Report
def generateInvalidLoginReport(from_date,to_date,fileName) {
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-165
Chapter 12
Group Assignment Audit Report
removed, the group to which the user or group was added or removed from, the Service
Administrator who performed the action, and the date and time when the action was
completed. The API writes the report to the filename provided, and the report can then be
downloaded using the Download REST API.
This is an asynchronous job and uses the job status URI to determine if the operation is
complete.
The presence of status -1 in the response indicates that the generation of Group Assignment
Audit Report is in progress. Use the job status URI to determine whether the generation of the
report is complete. Any non-zero status except -1 indicates failure of generating the report.
This API is version v2.
Note:
Oracle Fusion Cloud EPM ensures that only valid date range is used during report
generation. These validations are performed for the start and end dates:
• The start date cannot be earlier than the allowed maximum retention period (120
days) from the current date.
• The end date cannot be later than the maximum retention period from the start
date.
• The end date cannot be earlier than the start date.
Required Roles
• Service Administrator
• Any predefined role and the Access Control - Manage application role
• Any predefined role and the Access Control - View application role
REST Resource
POST /interop/rest/{api_version}/reports/groupaudit
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
12-166
Chapter 12
Group Assignment Audit Report
Request
Supported Media Type: application/json
groupAssignmentAuditReport.csv
from_date The start date for the report (in YYYY-MM-DD format) Payload Yes None
to_date The end date for the report (in YYYY-MM-DD format) Payload Yes None
Example Payload
{
fileName":"groupauditreport_test.csv",
"from_date":"2022-03-26",
"to_date":"2022-05-30"
}
Response
Supported Media Types: application/json
Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to
get the status of the import operation
data Parameters as key value pairs passed in the request
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/interop/rest/{api_version}/reports/
groupaudit",
12-167
Chapter 12
Group Assignment Audit Report
"data": null,
"action": "POST"
},
{
"rel": "Job Status",
"href": "https://<BASE-URL>/interop/rest/v2/jobs/3180621025673301",
"data": null,
"action": "GET"
}
],
"status": -1,
"details": null
}
//
//BEGIN
//
public void groupAssignmentAuditReport(String fileName, String from_date,
String to_date)
throws Exception {
JSONObject params = new JSONObject();
params.put("fileName", fileName);
params.put("from_date", from_date);
params.put("to_date", to_date);
funcgroupAssignmentAuditReport () {
url=$SERVER_URL/interop/rest/v2/reports/groupaudit
fileName="groupAssignmentAuditReport.csv"
from_date="2022-03-01"
to_date="2022-05-30"
param="{\"fileName\":\"$fileName\",\"from_date\":\"$from_date\",\"to_date\":\"
$to_date\"}"
funcExecuteRequest "POST" $url "$param" "application/json"
12-168
Chapter 12
Group Assignment Audit Report
output=$(cat response.txt)
status=$(echo $output | jq '.status')
echo "Status :$status"
if [ $status == -1 ]; then
echo "group assignment audit report generation in progress"
funcGetStatus "GET"
else
error='echo $output | jq '.details''
echo "Error occured. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
12-169
Chapter 12
Adding Users to a Team for Account Reconciliation
The users are added only if both these conditions are met:
• User login IDs included in the file exist in the identity domain that services the environment
• The user is assigned to a pre-defined role in the identity domain
The API is asynchronous and returns the Job ID. Use the job status URI to determine whether
the process is complete. The presence of status -1 in the response indicates that the update is
in progress. Any non-zero status except -1 indicates failure for the update.
Required Roles
Service Administrator, Power User, User, Viewer
Users with Power User, User, and Viewer predefined roles may require additional application
roles
REST Resource
POST /armARCS/rest/{version}/jobs
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
12-170
Chapter 12
Adding Users to a Team for Account Reconciliation
teamName String The name of an existing team in Access Control, such as Team1
https://<BASE-URL>/armARCS/rest/v1/jobs/
{
"jobName":"ADD_USERS_TO_TEAM",
"parameters":{
"fileName":"users.csv",
"teamName":"Team1"
}
}
Response
Supported Media Types: application/json
Name Description
status -1 - In Progress
0 - Success
1 - Failure
details In case of errors, details are published with the error string
descriptiveStat The status of the job, such as Completed or Error.
us
items Collection of notification categories
links Detailed information about the link
12-171
Chapter 12
Adding Users to a Team for Financial Consolidation and Close and Tax Reporting
Name Description
href Links to the API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
{
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/armARCS/rest/v1/jobs/100000000053010",
"action": "GET"
}
],
"status": -1,
"type": "ARCS",
"link": null,
"items": null,
"error": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
The users are added only if both these conditions are met:
• User login IDs included in the file exist in the identity domain that services the environment
12-172
Chapter 12
Adding Users to a Team for Financial Consolidation and Close and Tax Reporting
Note:
This feature uses a Planning REST API to run a job. Details about Planning REST
APIs are described here: Planning REST APIs.
Required Roles
Service Administrator, Power User, User, Viewer
Users with Power User, User, and Viewer predefined roles may require additional application
roles.
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/fcmjobs
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Name Description
jobName The name of the job, ADD_USERS_TO_TEAM
12-173
Chapter 12
Adding Users to a Team for Financial Consolidation and Close and Tax Reporting
Name Description
fileName The name of the uploaded ANSI or UTF-8 encoded CSV file containing information
on the users to be added, for example, addUsersToTeam.csv.
The file must have been uploaded already using the Upload REST API. The CSV
file should not include the account of the user who executes this command.
A primary user is, by default, designated to perform the tasks that are assigned to
the team. The file format is as follows:
teamName The name of an existing team in Access Control, for example, Team1
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/FCCS/fcmjobs
{
"jobName":"ADD_USERS_TO_TEAM",
"parameters":{
"fileName":"users.csv",
"teamName":"Team1"
}
}
Response
Supported Media Types: application/json
Name Description
jobName ADD_USERS_TO_TEAM
jobID The ID of the job, such as 100000000114040
status -1 - In Progress
0 - Success
1 - Failure
details In case of errors, details are published with the error string
descriptiveStat The status of the job, such as Completed or Error
us
items Collection of notification categories
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Possible value: self
12-174
Chapter 12
Removing Users from a Team for Account Reconciliation
Name Description
data Parameters as key value pairs passed in the request
{
"jobName":"ADD_USERS_TO_TEAM",
"jobId":100000000114040,
"descriptiveStatus":",
"detail":"In Progress",
"status":-1,
"items":null,
"links":[
{
"rel":"self",
"href":"https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
FCCS/fcmjobs/100000000114040",
"action":"GET"
}
]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
The users are removed only if both these conditions are met:
• User login IDs included in the file exist in the identity domain that services the environment
• The user is assigned to a pre-defined role in the identity domain
12-175
Chapter 12
Removing Users from a Team for Account Reconciliation
The API is asynchronous and returns the Job ID. Use the job status URI to determine whether
the process is complete. The presence of status -1 in the response indicates that the update is
in progress. Any non-zero status except -1 indicates failure for the update.
Required Roles
Service Administrator
REST Resource
POST /armARCS/rest/{version}/jobs
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
teamName String The name of an existing team in Access Control, such as Team1
12-176
Chapter 12
Removing Users from a Team for Account Reconciliation
https://<<BASE-URL>/armARCS/rest/v1/jobs
{
"jobName":"REMOVE_USERS_FROM_TEAM",
"parameters":{
"fileName":"users.csv",
"teamName":"Team1"
}
}
Response
Supported Media Types: application/json
Name Description
type Application type
status -1 - In Progress
0 - Success
1 - Failure
details In case of errors, details are published with the error string
descriptiveStat The status of the job, such as Completed or Error.
us
items Collection of notification categories
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
{
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/armARCS/rest/v1/jobs/100000000053010",
"action": "GET"
}
],
"status": -1,
"type": "ARCS",
"link": null,
"items": null,
12-177
Chapter 12
Removing Users from a Team for Financial Consolidation and Close and Tax Reporting
"error": null
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
• See CSS Common Helper Functions for Groovy
The users are removed only if both these conditions are met:
• User login IDs included in the file exist in the identity domain that services the environment
• The user is assigned to a pre-defined role in the identity domain
The API is asynchronous and returns the Job ID. Use the job status URI to determine whether
the process is complete. The presence of status -1 in the response indicates that the update is
in progress. Any non-zero status except -1 indicates failure for the update.
Note:
This feature uses a Planning REST API to run a job. Details about Planning REST
APIs are described here: Planning REST APIs.
Required Roles
Service Administrators
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/fcmjobs
12-178
Chapter 12
Removing Users from a Team for Financial Consolidation and Close and Tax Reporting
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/x-www-form-urlencoded
Name Description
jobName The name of the job, REMOVE_USERS_FROM_TEAM
fileName The name of the uploaded ANSI or UTF-8 encoded CSV file containing information
on the users to be removed, for example, removeUsersFromTeam.csv.
The file must have been uploaded already using the Upload REST API. The CSV
file should not include the account of the user who executes this command.
A primary user is, by default, designated to perform the tasks that are assigned to
the team. The file format is as follows:
https://<BASE-URL>/HyperionPlanning/rest/v3/applications/FCCS/fcmjobs
{
"jobName":"REMOVE_USERS_FROM_TEAM",
"parameters":{
"fileName":"users.csv",
12-179
Chapter 12
Removing Users from a Team for Financial Consolidation and Close and Tax Reporting
"teamName":"Team1"
}
}
Response
Supported Media Types: application/json
Name Description
jobName REMOVE_USERS_FROM_TEAM
jobID The ID of the job, such as 100000000114040
status -1 - In Progress
0 - Success
1 - Failure
details In case of errors, details are published with the error string
descriptiveStat The status of the job, such as Completed or Error
us
items Collection of notification categories
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Possible value: self
data Parameters as key value pairs passed in the request
{
"jobName":"REMOVE_USERS_FROM_TEAM",
"jobId":100000000114040,
"descriptiveStatus":",
"detail":"In Progress",
"status":-1,
"items":null,
"links":[
{
"rel":"self",
"href": "https://BASE-URL>/HyperionPlanning/rest/v3/applications/
FCCS/fcmjobs/100000000114040",
"action":"GET"
}
]
}
Common Functions
• See Common Helper Functions for Java
• See Common Helper Functions for cURL
12-180
Chapter 12
Removing Users from a Team for Financial Consolidation and Close and Tax Reporting
12-181
13
Usage Simulation REST APIs
This section describes the REST APIs for simulating user activities for testing purposes.
https://<BASE-URL>/interop/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• {api_version}: API version you are developing with.
• {path}: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
13-1
Chapter 13
Simulate Concurrent Usage
This REST API performs the simulation by executing the specified operations for a given
number of users and iterations. It runs multiple iterations to calculate the minimum time, the
maximum time and the average time for a particular operation. It supports these operations to
perform concurrent usage load testing:
• Open forms
• Save forms
• Run business rules
• Run business rulesets
• Run data rules
• Open ad hoc grids
• Execute report
• Execute book
Note:
This API executes the specified operations on the current environment and may,
depending on the operation, update the data in the environment. Run this API on test
environments. Running this API on production environments is not advised.
This REST API accepts a ZIP file, that must already have been uploaded to the environment,
as input. The ZIP file contains one requirement.csv file, and the input files that support the
use cases included in requirement.csv. It can also optionally contain a
UserVarMemberMapping.csv file to provide user variable member mapping and an options.xml
file to provide Smart View options for some use cases. The REST API then simulates the use
cases and creates a report that may be emailed to one or more recipients.
This REST API is version v1.
Required Roles
Service Administrator (Identity Domain Administrator is also required to use testModes 0, 1,
and 2.)
REST Resource
POST /interop/rest/v1/concurrentusage/run
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
13-2
Chapter 13
Simulate Concurrent Usage
13-3
Chapter 13
Simulate Concurrent Usage
13-4
Chapter 13
Simulate Concurrent Usage
https://<BASE URL>/interop/rest/v1/concurrentusage/run
{
"inputFile": "<ZIP_FILE_NAME>",
"numberOfIterations": 1,
"testMode": 0,
"notificationEmails": "<EMAIL_ADDRESS>",
"lagTime": 5,
"testName" : "<TEST_NAME>"
}
Sample Request
{
"inputFile" : "InputFiles2.zip",
"numberOfIterations" : 1,
"testMode" : 0,
"notificationEmails" : "abc@example.oracle.com",
"lagTime" : 10,
"testName" : "MyTest2"
}
Response
Supported Media Types: application/json
Name Description
details In the case of errors, details are published with the error string
status See Migration Status Codes
13-5
Chapter 13
Simulate Concurrent Usage
Name Description
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Possible values: self or Job Status. If the value is set to Job Status, you
can use the href to get the status
data null
{
"details": "InputFile is missing in request body",
"status": 1,
"items": null,
"links": [{
"href": "https://<BASE URL>/interop/rest/v1/concurrentusage/run",
"action": "POST",
"rel": "self",
"data": {
"jobType": "RUN_CONCURRENTUSAGE",
"numberOfIterations": 2,
"testMode": 0,
"lagTime": 5,
"inputfile": "",
"notificationEmails": "abc@example.oracle.com"
}
}]
}
{
"details": null,
"status": -1,
"items": null,
"links": [{
"href": "https://<BASE URL>/interop/rest/v1/concurrentusage/run",
"action": "POST",
"rel": "self",
"data": {
"jobType": "RUN_CONCURRENTUSAGE",
"numberOfIterations": 2,
"testMode": 0,
"lagTime": 5,
"inputfile": "InputFiles2.zip",
"notificationEmails": "abc@example.oracle.com"
}
},
13-6
Chapter 13
Simulate Concurrent Usage
{
"href": "https://<BASE URL>/interop/rest/v1/concurrentusage/jobs/
437838742934700",
"action": "GET",
"rel": "Job Status",
"data": null
}
]
}
13-7
14
Reporting REST APIs
Use the topics in this chapter to run reports with REST APIs for Account Reconciliation,
Financial Consolidation and Close, Tax Reporting, and Data Management.
For reports on users with REST APIs, see User Access Report (v1) and User Access Report
(v2).
Note:
All parameters must be specified for a report.
REST Resource
POST /arm/rest/fcmapi/{api_version}/report
Required Roles
Service Administrator, Power User, User, Viewer
Users with Power User, User, and Viewer predefined roles may require additional application
roles.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
14-1
Chapter 14
Generate Report for Account Reconciliation
14-2
Chapter 14
Generate Report for Account Reconciliation
Note:
If the required parameters, groupName or reportName are not specified, you receive
an error.
For details about reportName or parameters, see Working with Predefined Reports in
Reconciliation Compliance or Working with Predefined Reports in Transaction
Matching in Administering Account Reconciliation.
For details about Output Format, see Generating the Report in Administering
Account Reconciliation.
For details about retrieving job status while running reports, see Retrieve Job Status
for a Report.
.
Example of request body (to be run synchronously)
{
"groupName":"Reconciliation Manager",
"reportName":"Balance by Account Type",
"generatedReportFileName":"myReport.pdf",
"parameters":{"Period":"June 2018","Currency Bucket": "Entered", "Rate
Type": "Accounting"},
"format":"PDF",
"module":"RC",
"emails":"user1@oracle.com,user2@oracle.com",
"runAsync":false
}
{
"groupName":"Reconciliation Manager",
"reportName":"Balance by Account Type",
"generatedReportFileName":"myReport.pdf",
"parameters":{"Period":"June 2018","Currency Bucket": "Entered", "Rate
Type": "Accounting"},
"format":"PDF",
"module":"RC",
"emails":"user1@oracle.com,user2@oracle.com",
"runAsync":true
}
Response
Supported Media Types: application/json
Parameters:
14-3
Chapter 14
Generate Report for Account Reconciliation
Name Description
type The module within Account Reconciliation: RC (Reconciliation Compliance)
or TM (Transaction Matching.
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Relationship type (self, Job Status). if set to Job Status, you can use
the href to get the status of the operation
data Parameters as key value pairs passed in the request
{
"type":"RC",
"status":0,
"details": "myReport.pdf",
"links" [{
"action": "POST",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/fcm/rest/fcmapi/v1/report",
"rel": "self"
},
{
"rel": "report-content",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v1/
applicationsnapshots/myReport.pdf",
"action": "GET"
}
]
}
The following is an example of the response body in JSON format for a Reconciliation
Compliance report generated asynchronously (runAsync=true) where the report is "In Process"
and you can use the Job ID generated to retrieve the job status. See Retrieve Job Status for a
Report:
{
"links":[
{
"rel":"self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/report",
"action": "POST"
14-4
Chapter 14
Generate Report for Financial Consolidation and Close and Tax Reporting
},
{
"rel":"Job Status",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/
report/job/TM/100000001001009",
"action": "GET"
}
],
"details":"In Process",
"status":-1,
}
Note:
All parameters must be specified for a report.
REST Resource
POST /HyperionPlanning/rest/fcmapi/{api_version}/report
Required Roles
Service Administrator, Power User, User, Viewer
Request
Supported Media Types: application/json
14-5
Chapter 14
Generate Report for Financial Consolidation and Close and Tax Reporting
For details about reportName or parameters, see Using Task Manager and Supplemental Data
Manager Reports.
For details about Output Format, see Generating the Report.
For details about retrieving job status while running reports, see Retrieve Job Status for a
Report.
14-6
Chapter 14
Generate Report for Financial Consolidation and Close and Tax Reporting
{
"groupName":"Task Manager",
"reportName":"Late Tasks",
"generatedReportFileName":"myReport.pdf",
"parameters":{"Schedule" : "Qtr 2 Close", "Period":"Jun" },
"format":"PDF",
"module":"FCM",
"emails":"user1@oracle.com,user2@oracle.com",
"runAsync":false
}
{
"groupName":"Task Manager",
"reportName":"Late Tasks",
"generatedReportFileName":"myReport.pdf",
"parameters":{"Schedule" : "Qtr 2 Close", "Period":"Jun" },
"format":"PDF",
"module":"FCM",
"emails":"user1@oracle.com,user2@oracle.com",
"runAsync":true
}
Response
Supported Media Types: application/json
Parameters:
Name Description
type Type of report: SDM (Supplemental Data Management) or FCCS {Task
Manager).
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Relationship type (self, Job Status). If set to Job Status, you can use
the href to get the status of the operation.
data Parameters as key value pairs passed in the request
14-7
Chapter 14
Generate Report for Financial Consolidation and Close and Tax Reporting
The following is an example of the response body in JSON format for a Financial Consolidation
and Close report called MyReport in pdf format that was run successfully synchronously
(runAsync=false):
{
"links": [
{
"rel": "self",
"href":
"https://<BASE-URL>/HyperionPlanning/rest/fcmapi/v1/myReport.pdf",
"action": "POST"
},
{
"rel": "report-content",
"href":
"https://<BASE-URL>/HyperionPlanning/rest/fcmapi/v1/myReport.pdf",
"action": "POST"
"GET"
}
],
"details": "MyReport.pdf",
"type": "FCCS",
"status": 0,
"link": null,
"error": null,
"items": null
}
The following is an example of the response body in JSON format for a Financial Consolidate
and Close report generated asynchronously (runAsync=true) where the report is "In Process"
and you can use the Job ID generated to retrieve the job status. See Retrieve Job Status for a
Report:
{
"links":[
{
"rel":"self",
"href": "https://<SERVICE_NAME>-<TENANT_NAME>.<dcX>.oraclecloud.com/
HyperionPlanning/rest/fcmapi/v1/report",
"action": "POST"
},
{
"rel":"Job Status",
"href": "https://<SERVICE_NAME>-<TENANT_NAME>.<dcX>.oraclecloud.com/
HyperionPlanning/rest/fcmapi/v1/report/job/FCCS/100000001001009",
"action": "GET"
}
],
"details":"In Process",
"status":-1,
"type":"FCCS",
"link":null,
"error":null
"items":null
}
14-8
Chapter 14
Generate User Details Report for Account Reconciliation
REST Resource
POST /arm/rest/fcmapi/{api_version}/rc/export/users
Required Roles
Service Administrator, Access Control - Manage, or Access Control - View
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Note:
For details about retrieving job status while running reports, see Retrieve Job Status
for a Report.
14-9
Chapter 14
Generate User Details Report for Account Reconciliation
Example 1
{
"fileName":"UserDetails.csv",
"format":"CSV"
}
Example 2
{
"fileName":"UserDetails.csv"
}
Example 3
{
"fileName":"UserDetails.xls",
"format":"xls"
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Relationship type can be (self, or Job Status). If set to Job Status, you
can use the href to get the status of the operation
{
"links": [
{
"rel": "self",
"href": "https:<BASE-URL>/arm/rest/fcmapi/v1/rc/export/users",
"action": "POST"
},
{
"rel": "Job Status",
14-10
Chapter 14
Generate User Details Report for Financial Consolidation and Close and Tax Reporting
"href": "https:<BASE-URL>/arm/rest/fcmapi/v1/rc/job/42233",
"action": "GET"
}
],
"details": "In Process",
"status": -1,
"type": "rc",
"link": {},
"error": null,
"items": []
}
{
"links": [
{
"rel": "self",
"href": "https:<BASE-URL>/arm/rest/fcmapi/v1/rc/job/42233",
"action": "GET"
},
{
"rel": "report-content",
"href": "https:<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/UserDetails.csv/contents",
"action": "GET"
}
],
"details": "File UserDetails.csv generated successfully.",
"status": 0,
"type": "rc",
"link": null,
"error": null,
"items": null
}
REST Resource
POST /HyperionPlanning/rest/fcmapi/{api_version}/fcm/export/users
14-11
Chapter 14
Generate User Details Report for Financial Consolidation and Close and Tax Reporting
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Note:
For details about retrieving job status while running reports, see Retrieve Job Status
for a Report.
{
"fileName":"UserDetails.csv",
"format":"CSV"
}
Example 2
{
"fileName":"UserDetails.csv"
}
14-12
Chapter 14
Generate User Details Report for Financial Consolidation and Close and Tax Reporting
Example 3
{
"fileName":"UserDetails.xls",
"format":"xls"
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Relationship type can be (self, or Job Status). If set to Job Status, you
can use the href to get the status of the operation
{
"links": [
{
"rel": "self",
"href": "https:<BASE-URL>/HyperionPlanning/rest/fcmapi/v1/fcm/
export/users",
"action": "POST"
},
{
"rel": "Job Status",
"href": "https:<BASE-URL>/HyperionPlanning/rest/fcmapi/v1/fcm/job/
39068",
"action": "GET"
}
],
"details": "In Process",
"status": -1,
"type": "fcm",
"link": {},
"error": null,
"items": []
}
14-13
Chapter 14
Retrieve Job Status for a Report
{
"links": [
{
"rel": "self",
"href": "https:<BASE-URL>/HyperionPlanning/rest/fcmapi/v1/fcm/job/
39068",
"action": "GET"
},
{
"rel": "report-content",
"href": "https:<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/userDetail.xls/contents",
"action": "GET"
}
],
"details": "File userDetail.xls generated successfully.",
"status": 0,
"type": "fcm",
"link": null,
"error": null,
"items": null
}
Required Roles
Service Administrator, Power User, User, Viewer
GET /arm/rest/fcmapi/{api_version}/job/{module}/{jobIdentifier}
REST Resource
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
14-14
Chapter 14
Retrieve Job Status for a Report
Parameters
Parameters
The following table summarizes the response parameters.
Name Description
status Status of the job: -1 = in process; 0 = completed (success); 1 = error
details Details about the job status, such as "Big Report 10.csv" for
generation of a report in csv format named Big Report 10
jobID The ID of the job, such as 224
type The type of report: RC (Reconciliation Compliance); TM
(Transaction Matching); FCCS (Task Manager) or SDM
(Supplemental Data Manager)
{
"links": [
{
"rel": "self",
"href": "https:<BASE-URL>/arm/rest/fcmapi/v1/report",
"action": "POST"
},
}
"rel": "report-content",
"href": "https:<BASE-URL>/interop/rest/11.1.2.3.600/
applicationsnapshots/Big+Report+10.csv/contents",
"action": "GET"
}
],
"details": "Big Report 10.csv".
"status": 0,
"type": "RC",
"link": null,
"error": null,
14-15
Chapter 14
Execute Reports for Data Management
"items": null
}
The following shows an example of the response body for an error occurring during report
generation:
{
"links": [
{
"rel": "self",
"href": "https:<BASE-URL>/arm/rest/fcmapi/v1/report/job/TM/1145",
"action": "GET"
},
]
"details": "Invalid query attached to the report".
"status": 1,
"type": "RC",
"link": null,
"error": null,
"items": null
}
The following shows an example of the response body for a report generation that is in
process:
{
"links": [
{
"rel": "self",
"href": "https:<BASE-URL>/arm/rest/fcmapi/v1/report/job/TM/1124",
"action": "GET"
},
]
"details": "In Process".
"status": -1,
"type": "RC",
"link": null,
"error": null,
"items": null
}
14-16
Chapter 14
Execute Reports for Data Management
REST Resource
POST /aif/rest/{api_version}/jobs
Request
Supported Media Types: application/json
{
"jobType":"REPORT",
"jobName":"Dimension Map For POV (Dimension, Cat, Per)",
"reportFormatType":"PDF",
"parameters":{
"Dimension Name":"ENTITY",
"Category":"Actual",
"Period":"Jan15",
"Location":"Comma_Vision"
}
}
For sample code, see the code samples included in Running Data Rules in Data Management.
Response
The following table summarizes the response parameters.
Name Description
jobId The process ID generated in Data Management for the job, such as
1885
status The job status, such as RUNNING
14-17
Chapter 14
Execute Reports for Data Management
Name Description
logFileName Log file containing entries for this execution, such as
outbox\logs\BESSAPP-DB_1885.log
outputFileName Name of the output file generated; you can use this name to download
the report
processType Type of process executed, EXECUTE_REPORT
executedBy Login name of the user used to execute the rule, such as admin
details Returns the exception stack trace in case of an application error, or
null
Parameters
{
"links":
[
0]
"status":"-1",
"details":"null",
"jobId":"1885",
"jobStatus":"RUNNING",
"logFileName":"outbox/logs/1885.log",
"outputFileName":"outbox/reports",
"processType":"EXECUTE_REPORT",
"executedBy":"admin"
}
For sample code, see the code samples included in Running Data Rules in Data Management.
14-18
15
Data Integration REST APIs
Use the Data Integration REST APIs to run integrations, import and export data mapping,
import and export Data Integration APIs, and to execute reports.
Note:
All REST APIs used for Data Integration can be used as REST APIs for Data
Management.
https://<BASE-URL>/aif/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for Data
Integration is V1.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
15-1
Chapter 15
Getting API Versions for Data Integration APIs
Note:
An API version is always supported even when deprecated.
REST Resource
GET /aif/rest/
Required Roles
Service Administrator, Power User, User, Viewer
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Detailed information about the API
version The version, such as V1
lifecycle Possible values: active, deprecated
isLatest Whether this resource is the latest, true or false
15-2
Chapter 15
Getting API Versions for Data Integration APIs
{
"items": [1]
{
"version": "V1"
"isLatest": "true"
"lifecycle": "active"
"links": [3]
{
"rel": "self"
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/aif/rest/"
"action": "GET"
},{
"rel": "canonical"
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/aif/rest/"
"action": "GET"
},{
"rel": "current"
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/aif/rest/V1"
"action": "GET"
}
}
}
Get Information about a Specific API Version for Data Integration APIs
Returns details for a specific REST API version for Data Integration.
REST Resource
GET /aif/rest/{api_version}
Required Roles
Service Administrator, Power User, User, Viewer
Request
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
api_version Version of the API you are developing with, such as
V1
15-3
Chapter 15
Lock and Unlock POV
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
version The version, such as V1
lifecycle Lifecycle of the resource, active or deprecated
isLatest Whether this resource is the latest, true or false
{
"version": "V1"
"lifecycle": "active"
"isLatest": "true"
"links": [1]{
"rel": "canonical"
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/aif/rest/V1"
"action": "GET"
}
}
Required Roles
Service Administrator, Power User
Method:
15-4
Chapter 15
Lock and Unlock POV
POST
Lock/Unlock by Location RESP API Request Parameters
The following table summarizes the request parameters for locking by location:
{
"category": "Actual",
"period": "Jan-17",
"location": "FCCSAPP1_LOC1A",
"locktype":"location",
"operation": "lock"
}
{
"details":",
"status": 0,
"response": "Location:FCCSAPP1_LOC1A has been locked successfully."
}
{
"category": "Actual",
"period": "Jan-17",
"location": "FCCSAPP1_LOC1A",
"locktype":"location",
15-5
Chapter 15
Lock and Unlock POV
"operation":"unlock"
}
{
"details":",
"status": 0,
"response":"Location:FCCSAPP1_LOC1A has been unlocked successfully."
}
15-6
Chapter 15
Lock and Unlock POV
{
"category": "Actual",
"period": "Jan-17",
"application": "FCCSAPP1",
"locktype":"application",
"operation": "lock"
}
{
"details":null,
"status": 0,
"response":"Application: FCCSAPP1 has been locked successfully."
}
{
"category": "Actual",
"period": "Jan-17",
"application": "FCCSAPP1",
"locktype":"application",
"unlockbylocation":"true",
"operation": "lock"
}
{
"details":null,
"status": 0,
"response":"Application: FCCSAPP1 has been locked successfully."
}
15-7
Chapter 15
Lock and Unlock POV
GET
REST Resource
/aif/rest/V1/POV?
location=<locationname>&period=<periodname>&category=<catname>&application=<ap
plicationname>
/aif/rest/V1/POV?application=FCCSAPP1&period=Jan-17&category=Actual
Response
Supported Media Types: application/json
{
"details": null,
"status": 0,
"response": [
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC11"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "AD_ASO_PBCS_To_FCCS"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "AD_ASO_EPBCS_To_FCCS"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
15-8
Chapter 15
Lock and Unlock POV
"location": "ORCL_To_FCCS"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "SQL_To_FCCS"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC31"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC23"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC22"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC27"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC26"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC25"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
15-9
Chapter 15
Running Integrations
"location": "FCCSAPP1_LOC24"
},
{
"period": "Jan-17",
"category": "Actual",
"status": "Locked",
"application": "FCCSAPP1",
"location": "FCCSAPP1_LOC21"
}
}
]
}
Running Integrations
Running an integration entails using the INTEGRATION job type for the jobs REST API to
execute an integration or data load rule based on how periods are processed and source
filters.
The INTEGRATION job type is an enhanced version of DATARULE job type (see Running
Data Rules in Data Management). It is recommended that you use the INTEGRATION job type
for future integration jobs.
The INTEGRATION jobtype supports running integrations/data load rules based on:
• period names provided to Planning
• Global POVs
• Planning substitution variables
• source filters selected as runtime parameters
• target options selected as runtime parameters
• existing period ranges
It also supports overriding the source filters and target options at runtime without modifying the
integration definition.
Prerequisites:
You must have the required privileges to execute a specific data rule/integration.
REST Resource
/aif/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User
Request
Supported Media Types: application/json
Method:
POST
15-10
Chapter 15
Running Integrations
Payload:
{
"jobType":"INTEGRATION",
"jobName":"GLDATA",
"periodName":"{Mar-20}",
"importMode":"Replace",
"exportMode":"Merge",
"fileName":"inbox/GLBALANCE.txt"
}
15-11
Chapter 15
Running Integrations
15-12
Chapter 15
Running Integrations
Note:
If you use
any other
period
naming
parameter
other than
the
parameters
described
above, you
get an
"Invalid Input
– HTTP 400
" error
message.
15-13
Chapter 15
Running Integrations
15-14
Chapter 15
Running Integrations
15-15
Chapter 15
Running Integrations
15-16
Chapter 15
Running Integrations
15-17
Chapter 15
Running Integrations
15-18
Chapter 15
Running Integrations
{
"jobType":"INTEGRATION",
"jobName":"ERPDATA",
"periodName":"{Jan-20}",
"importMode":"REPLACE",
"exportMode":"NONE",
"fileName":"inbox/TestData.txt"
}
Planning Applications
In these examples, the source is an Essbase/Planning based application. The supported
applications include:
• Planning modules
• Reporting cubes (plan types) of Planning
• Financial Consolidation and Close
• Tax Reporting
• Profitability and Cost Management
• Oracle ERP Cloud - Oracle General Ledger Balances Cube
15-19
Chapter 15
Running Integrations
{
"jobType":"INTEGRATION",
"jobName":"PBCStoFCCS",
"periodName":"{Jan-20}",
"importMode":"REPLACE",
"exportMode":"NONE",
"sourceFilters":{
"Account":"@RELATIVE(Acc1,0)",
"Entity":" @CHILDREN(Europe)",
"Scenario":"Actual"
}
}
{
"jobType":"INTEGRATION",
"jobName":"PBCStoFCCS",
"periodName":"{Jan-20}",
"importMode":"REPLACE",
"exportMode":"NONE",
"sourceFilters":{
"Account":"@RELATIVE(Acc1,0)",
"Entity":" @CHILDREN(Europe)",
"Scenario":"Actual"
},
"targetOptions":{
"Download File Name":"PlanningToFile.csv",
"Column Delimiter":",",
"Include Header":"Yes"
}
}
{
"jobType":"INTEGRATION",
"jobName":"MyIncrementalFileLoad",
"periodName":"{Jan-20}{Mar-20}",
"importMode":"REPLACE",
"exportMode":"NONE",
"sourceFilters":{"Source File":"File1.txt"}
}
{
"jobType":"INTEGRATION",
"jobName":"NetsuiteLoad",
"periodName":"{Jan-20}{Mar-20}",
15-20
Chapter 15
Running Integrations
"importMode":"REPLACE",
"exportMode":"NONE",
"sourceFilters":{
"Postingperiod":"This Fiscal Quarter",
"Mainline":"True"
}
}
{
"jobType":"INTEGRATION",
"jobName":"NetsuiteMetadataLoad",
"periodName":"{Jan-20}{Mar-20}",
"importMode":"REPLACE",
"exportMode":"NONE",
"targetOptions":{
"Refresh Database":"Yes",
"Dimension Name":"Product"
}
}
{
"jobType":"INTEGRATION",
"jobName":"Payables1Load",
"periodName":"{Jan-20}",
"importMode":"REPLACE",
"exportMode":"NONE",
"sourceFilters":{
"Invoice Type":"Credit Memo",
"Cancelled Invoices Only ":"Yes"
}
}
{
{
"jobType":"INTEGRATION",
"jobName":"QuickMode_LOC1_DL1",
"periodName":"{Jan-17}",
"importMode":"Direct",
"exportMode":"Merge",
"executionMode":"ASYNC"
}
Response
Supported Media Types: application/json
15-21
Chapter 15
Running a Pipeline
Running a Pipeline
Executes a Pipeline based on job parameters and variables that you select.
The Pipeline jobtype supports running a Pipeline based on the variable list (depends on how
many variables have been defined for the Pipeline in the Data Integration user interface.)
Prerequisites:
• You must have predefined the Pipeline to run it.
• You must have the required privileges to execute a Pipeline.
REST Resource
/aif/rest/{api_version}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Method:
POST
Payload:
{
"jobName": "DAILYLOAD",
"jobType": "pipeline",
"variables": {
"STARTPERIOD": "Jan-23",
"ENDPERIOD": "Jan-23",
"IMPORTMODE": "Replace",
"EXPORTMODE": "Merge",
"ATTACH_LOGS": "N",
"SEND_MAIL": "ALWAYS",
"SEND_TO": "user@company.com"
}
}
15-22
Chapter 15
Running a Pipeline
15-23
Chapter 15
Running a Pipeline
15-24
Chapter 15
Import Data Mapping
15-25
Chapter 15
Import Data Mapping
mappings define relationships between source members and target dimension members within
a single dimension. You must create a member mapping for each target dimension.
You can import member mappings from a selected Excel, .CSV or .TXT file. You can also
create new mappings in a text file and import them. Import member mappings support merge
or replace modes, along with validate or no validate options for target members.
REST Resource
POST /aif/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User
Request
Supported Media Types: application/json
15-26
Chapter 15
Import Data Mapping
{
"jobType":"MAPPINGIMPORT",
"jobName":"ACCOUNT"
"fileName":"inbox/BESSAPPJan-06.csv",
"importMode":"MERGE",
"validationMode":"false",
"locationName":"BESSAPP"
}
For sample code, see the code samples included in Running Data Rules in Data Management.
Response
The following table summarizes the response parameters.
Name Description
jobId The process ID generated in Data Management for the job, such as
1880
jobStatus The job status, such as RUNNING
logFileName Log file containing entries for this execution, such as outbox/logs/
BESSAPP-DB_1880.log
outputFileName Name of the output file generated, if any, or else null
processType Type of process executed, IMPORT_MAPPING
executedBy Login name of the user used to execute the rule, such as admin
details Returns the exception stack trace in case of an application error, or
null
Parameters
{
"links":
[
0]
"status":"-1"
"details":"null"
"jobId":"1880"
"jobStatus":"RUNNING",
"logFileName":"outbox/logs/BESSAPP-DB_1880.log",
"outputFileName":"null",
"processType":"IMPORT_MAPPING",
15-27
Chapter 15
Export Data Mapping
"executedBy":"admin"
}
For sample code, see the code samples included in Running Data Rules in Data Management.
Required Roles
Service Administrator, Power User
Request
Supported Media Types: application/json
ACCOUNT,*,*,10,,
ENTITY,*,*,10,,
UD3,*,*,10,,
15-28
Chapter 15
Export Data Mapping
{
"jobType":"MAPPINGEXPORT",
"jobName":"ACCOUNT",
"fileName":"outbox/BESSAPPJan-06.csv",
"locationName":"BESSAPP"
}
For sample code, see the code samples included in Running Data Rules in Data Management.
Response
The following table summarizes the response parameters.
Name Description
jobId The process ID generated in Data Integration for the job, such as 1881
jobStatus The job status, such as SUCCESS
logFileName Log file containing entries for this execution, such as outbox/logs/
BESSAPP-DB_1881.log
outputFileName Name of the output file generated, such asoutbox/
BESSAPPJan-06.csv
processType The type of process executed, EXPORT_MAPPING
executedBy Log-in name of the user used to execute the rule, such as admin
details Returns the exception stack trace in case of an application error, or
else null
{
"links":
[
0]
"status":"0",
"details":"null",
"jobId":"1881",
"jobStatus":"SUCCESS",
"logFileName":"outbox/logs/BESSAPP-DB_1881.log",
"outputFileName":"outbox/BESSAPPJan-06.csv",
"processType":"EXPORT_MAPPING",
"executedBy":"admin"
}
For sample code, see the code samples included in Running Data Rules in Data Management.
15-29
Chapter 15
Export Data Integration
Required Roles
Service Administrator, Power User
Method
POST
Request
Supported Media Types: application/json
{
"action":"EXPORT",
"snapshotType":"ALL",
"fileName":"MyBackup.zip",
"overwriteFile":true
}
15-30
Chapter 15
Export Data Integration
Response
The following table summarizes the response parameters.
Name Description
action Always EXPORT
snapshotType Name of the snapshot type
jobId The process ID generated in Data Integration for the job, such as 1880
links Describes links to other resources and actions applicable on the current
resource.
15-31
Chapter 15
Import Data Integration
Name Description
status Status of the job: -1 = in progress; 0 = success; 1 = error; 2 =cancel
pending; 3 = cancelled; 4 = invalid parameter;Integer.MAX_VALUE =
unknown
{
"action": "EXPORT",
"snapshotType": "SETUP",
"jobId": 423,
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/aif/rest/v1/jobs/jobID",
"action": "GET"
}
],
"status": -1
}
Required Roles
Service Administrator, Power User
Method
POST
Request
Supported Media Types: application/json
"action":"IMPORT",
"fileName":"inbox/MyBackup.zip"
}
15-32
Chapter 15
Import Data Integration
Response
The following table summarizes the response parameters.
Name Description
action Always IMPORT
jobId The process ID generated in Data Integration for an import Data
Integration job is "0."
links Describes links to other resources and actions applicable on the current
resource.
status Status of the job: -1 = in progress; 0 = success; 1 = error; 2 =cancel
pending; 3 = cancelled; 4 = invalid parameter;Integer.MAX_VALUE =
unknown
"action": "IMPORT",
"jobId": 0,
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/aif/rest/v1/jobs/jobID",
"action": "GET"
],
"status": -1
15-33
Chapter 15
Retrieve Job Status
Rest Resource
GET/aif/rest/{api_version}/jobs/{jobIdentifier}
The current REST API version for Data Integration must be V1.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Name Description
status Status of the job: -1 = in progress; 0 = success; 1 = error; 2 = cancel
pending; 3 = cancelled; 4 = invalid parameter; Integer.MAX_VALUE
= unknown
details Details about the job status, such as "SUCCESS" when member
mappings have been processed successfully.
jobId The ID of the job, such as 228
jobName The name of the job, such as BESSAPP
descriptiveStatus The status of the job, such as Completed or Error
{
"links":
[
0]
"status":"0",
"details":"null",
"jobId":"1881",
"jobStatus":"SUCCESS",
"logFileName":"outbox/logs/BESSAPP-DB_1881.log",
"outputFileName":"outbox/BESSAPPJan-06.csv",
15-34
Chapter 15
Retrieve Job Status
"processType":"EXPORT_MAPPING",
"executedBy":"admin"
}
15-35
16
Data Management REST APIs
Use the Data Management REST APIs to run data rules and batch rules.
Note:
All REST APIs used for Data Integration can be used as REST APIs for Data
Management.
https://<BASE-URL>/aif/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for Data
Management is V1.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
16-1
Chapter 16
Getting API Versions for Data Management APIs
Note:
An API version is always supported even when deprecated.
REST Resource
GET /aif/rest/
Required Roles
Service Administrator, Power User, User, Viewer
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
items Detailed information about the API
version The version, such as V1
lifecycle Possible values: active, deprecated
isLatest Whether this resource is the latest, true or false
16-2
Chapter 16
Getting API Versions for Data Management APIs
{
"items": [1]
{
"version": "V1"
"isLatest": "true"
"lifecycle": "active"
"links": [3]
{
"rel": "self"
"href": "https://<BASE-URL>/aif/rest/"
"action": "GET"
},{
"rel": "canonical"
"href": "https://<BASE-URL>/aif/rest/"
"action": "GET"
},{
"rel": "current"
"href": https://<BASE-URL>/aif/rest/V1"
"action": "GET"
}
}
}
Get Information about a Specific API Version for Data Management APIs
Returns details for a specific REST API version for Data Management.
REST Resource
GET /aif/rest/{api_version}
Required Roles
Service Administrator, Power User, User, Viewer
Request
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
api_version Version of the API you are developing with, such as
V1
16-3
Chapter 16
Running Data Rules in Data Management
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
version The version, such as V1
lifecycle Lifecycle of the resource, active or deprecated
isLatest Whether this resource is the latest, true or false
{
"version": "V1"
"lifecycle": "active"
"isLatest": "true"
"links": [1]{
"rel": "canonical"
"href": "https://<BASE-URL>/aif/rest/V1"
"action": "GET"
}
}
Required Roles
Service Administrator, Power User
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
16-4
Chapter 16
Running Data Rules in Data Management
16-5
Chapter 16
Running Data Rules in Data Management
Example URL
https://<BASE-URL>/aif/rest/V1/jobs
Example of Request Body
{"jobType":"DATARULE",
"jobName":"aso to bso dr",
"startPeriod":"Dec-18",
"endPeriod":"Dec-18",
16-6
Chapter 16
Running Batch Rules
"importMode":"REPLACE",
"exportMode":"NONE",
"fileName":"#epminbox/TestData.txt"
}
Response
Supported Media Types: application/json
Name Description
status Status of the job: -1 = in progress; 0 = success; 1 = error; 2 = cancel
pending; 3 = cancelled; 4 = invalid parameter
jobStatus A text representation of the job status, with one of the following values"
RUNNING," "SUCCESS," and"FAILED".
jobId The process ID generated in Data Management for the job
logFileName Log File containing entries for this execution.
outputFileName Name of the output file generated, if any.
processType Type of the process executed. Will contain "COMM_LOAD_BALANCES" for
all Data Rule executions
executedBy Login name of the user used to execute the rule.
details Returns the exception stack trace in case of an application error
{
"jobStatus": "RUNNING",
"jobId": 2019,
"logFileName": "\outbox\logs\Account Reconciliation Manager_2019.log",
"outputFileName": null,
"processType": "COMM_LOAD_BALANCES",
"executedBy": "admin",
"status": -1,
"links": [1],
0: {
"rel": "self",
"href": "https://<BASE-URL>/aif/rest/V1/jobs/2019",
"action": "GET",
}
"details": null
16-7
Chapter 16
Running Batch Rules
• The batch must be defined in Data Management before it can be executed using the REST
API.
• You must have the required privileges to execute a specific batch.
REST Resource
POST /aif/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User
Request
Supported Media Types: application/json
Example URL
https://<BASE-URL>/aif/rest/V1/jobs
Example of Request Body
{"jobType":"BATCH",
"jobName":"BatchDataLoad"
}
Response
The following table summarizes the response parameters.
Name Description
status Status of the job: -1 = in progress; 0 = success; 1 = error; 2 = cancel pending;
3 = cancelled; 4 = invalid parameter
jobStatus A text representation of the job status, with one of the following values
"RUNNING", "SUCCESS". "FAILED"
jobId The process Id generated in Data Management for the job
logFileName Log File containing entries for this execution.
outputFileName Name of the output file generated, if any.
processType Type of the process executed. Will contain "COMM_BATCH" for all Data Rule
executions
executedBy Login name of the user used to execute the rule.
details Returns the exception stack trace in case of an application error
16-8
Chapter 16
Retrieve Job Status
{
"jobStatus": "SUCCESS",
"jobId": 2024,
"logFileName": "\outbox\logs\BATCH1_7595.log",
"outputFileName": null,
"processType": "COMM_BATCH",
"executedBy": "admin",
"status": -1,
"links": [1],
0: {
"rel": "self",
"href": "https://<BASE-URL>/aif/rest/V1/jobs/2016",
"action": "GET",
}
"details": null
}
For sample code, see the code samples included in Running Data Rules in Data Management.
REST Resource
GET/aif/rest/{api_version}/jobs/{jobIdentifier}
The current REST API version for Data Integration must be V1.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
16-9
Chapter 16
Retrieve Job Status
Response
Parameters
The following table summarizes the response parameters.
Name Description
status Status of the job: -1 = in progress; 0 = success; 1 = error; 2 = cancel
pending; 3 = cancelled; 4 = invalid parameter; Integer.MAX_VALUE
= unknown
details Details about the job status, such as "SUCCESS" when a batch has
processed successfully.
jobId The ID of the job, such as 226
jobName The name of the job, such as BATCH1
descriptiveStatus The status of the job, such as Completed or Error
{
"jobStatus": "SUCCESS",
"jobId": 2024,
"logFileName": "\outbox\logs\BATCH1_7595.log",
"outputFileName": null,
"processType": "COMM_BATCH",
"executedBy": "admin",
"status": -1,
"links": [1],
0: {
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/aif/rest/V1/jobs/2024,
"action": "GET"
}
"details": null
}
16-10
17
Account Reconciliation APIs
Use the Account Reconciliation REST APIs to get the REST API version, create
reconciliations, change period status, import pre-mapped transactions, import profiles, import
currency rates, import balances, import pre-mapped balances, monitor reconciliations, and
retrieve job status. In Transaction Matching, you can use REST APIs to import pre-mapped
transactions, or run auto match.
https://<BASE-URL>/armARCS/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for
Account Reconciliation is V1.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
17-1
Chapter 17
Getting API Versions for Account Reconciliation REST APIs
Note:
An API version is always supported even when deprecated.
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
GET /armARCS/rest/
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
details In case of errors, details are published with the
error string
status See Migration Status Codes
items Version of the API you are developing with
version The version, such as v1
lifecycle Possible values: active, deprecated
isLatest Whether this resource is the latest, true or false
links Detailed information about the link
href Links to API call
17-2
Chapter 17
Getting API Versions for Account Reconciliation REST APIs
Name Description
action The HTTP call type
rel Can be self or Job Status. If set to Job Status, you
can use the href to get the status of the import
operation
data The parameters as key value pairs passed in the
request
{
"items": [{
"isLatest": false,
"lifecycle": "deprecated",
"version": "v1",
"links": [{
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
"rel": "canonical"
}, {
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
"rel": "successor-version"
}]
}, {
"isLatest": true,
"lifecycle": "active",
"version": "v1",
"links": [{
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
"rel": "canonical"
}, {
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
"rel": "predecessor-version"
}]
}],
"links": [{
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
"rel": "canonical"
}, {
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
"rel": "current"
}]
}
17-3
Chapter 17
Getting API Versions for Account Reconciliation REST APIs
REST Resource
GET /armARCS/rest/{api_version}
Required Roles
Service Administrator, Power User, User, Viewer
Request
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
version The version, such as v1
lifecycle Possible values: active, deprecated
isLatest Whether this resource is the latest, true or false
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data The parameters as key value pairs passed in the
request
17-4
Chapter 17
Execute a Job in Account Reconciliation
{
"version": "v1",
"lifecycle": "active",
"isLatest": true,
"links": [{
"rel": "canonical",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
}, {
"rel": "predecessor-version",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1",
}]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, User, Viewer
17-5
Chapter 17
Execute a Job in Account Reconciliation
Users with Power User, User, and Viewer predefined roles may require additional application
roles.
Request
Supported Media Types: application/json
Parameters
This table summarizes the request parameters that are generic to all jobs. The following tables
describe parameters specific to individual rules.
Example URL
https://<BASE-URL>/armARCS/rest/v1/jobs
Response
Supported Media Types: application/json
Parameters
This table summarizes the response parameters that are generic to all jobs. The following
tables describe parameters specific to individual rules.
Name Description
jobName The name of the job, such as Create
Reconciliations
period The name of period, such as July2016
Note:
For
monitor_reconciliation
s, the parameter is
periodName.
17-6
Chapter 17
Retrieve Periods with a Specific Status
Name Description
filter The name of filter, such as MyFilter
Note:
For
monitor_reconciliation
s, the parameter is
filterName.
REST Resource
GET /armARCS/rest/periods?status={status}
Required Roles
Service Administrator, Power User, or Viewer
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this API.
17-7
Chapter 17
Retrieve Periods with a Specific Status
Example URLs
https://<BASE-URL>oraclecloud.com/armARCS/rest/periods?status=ALL
https://<BASE-URL>/armARCS/rest/periods?status=OPEN_PENDING
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status Status of the request. See Migration Status Codes.
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
items List of periods with the specified status. The format is:
{
"Status": <status code>,
"Id": <internal period ID>,
"Name": <name of the period>
}
{
"type": "ARCS",
"items": [
{
"Status": "53",
"Id": "100000000135004",
"Name": "January 2022"
},
{
"Status": "53",
"Id": "100000000135007",
"Name": "February 2022"
},
{
17-8
Chapter 17
Change Period Status (Reconciliation Compliance)
"Status": "53",
"Id": "100000000135009",
"Name": "March 2022"
},
{
"Status": "53",
"Id": "100000000135011",
"Name": "April 2022"
}
],
"status": 0,
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/armARCS/rest/periods",
"action": "GET"
}
]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator or Periods - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
17-9
Chapter 17
Change Period Status (Reconciliation Compliance)
{
"jobName" : "SET_PERIOD_STATUS",
"parameters": {
"period":"July2016",
"status":"closed"
}
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes. When the period's status is changed to Open,
the status of the job that opens reconciliations for the specified period is
sent as additional information. Use this additional information to check the
status of the open reconciliations job.
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action": "GET"
}
17-10
Chapter 17
Create Reconciliation (Reconciliation Compliance)
]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job. For additional
parameters that are common to all jobs, see Execute a Job.
{
"jobName" : "CREATE_RECONCILIATIONS",
"parameters": {
"period":"July2016",
"filter":"MyFilter"
}
}
Response
Parameters:
Name Description
details In case of errors, details are published with the error string
17-11
Chapter 17
Delete Profile
Name Description
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action": "GET"
}
]
}
Delete Profile
Deletes an Account Reconciliation profile.
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
17-12
Chapter 17
Delete Profile
{
"jobName": "DELETE_PROFILE",
"parameters": {
"accountId": "101-1234-5678",
}
}
Response
Parameters
The following table summarizes the response parameters.
Name Description
type The value is "RC".
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "RC",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action": "GET"
}
17-13
Chapter 17
Import Pre-Mapped Balances (Reconciliation Compliance)
]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator or Periods - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{
"jobName" : "IMPORT_PREMAPPED_BALANCES",
"parameters": {
"period":"July2016",
"balanceType":"SRC",
"file":"balances.csv",
"currencyBucket":"Functional"
}
}
Response
Supported Media Types: application/json
17-14
Chapter 17
Import Pre-Mapped Transactions (Reconciliation Compliance)
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action":"GET"
}
]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
17-15
Chapter 17
Import Pre-Mapped Transactions (Reconciliation Compliance)
{
"jobName" : "IMPORT_PREMAPPED_TRANSACTIONS",
"parameters": {
"period":"July2016",
"transactionType":"SRC",
"file":"transactions.csv",
"dateFormat": "MMM d,yyyy"
}
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
17-16
Chapter 17
Import Balances (Reconciliation Compliance)
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action": "GET"
}
]
}
Dataload process failed for process {JOB_ID}. Check the Data Management log
for more details.
Data Management log file name: {LOG_FILE_NAME}
Detailed error from Data Management process: {DETAILS}
Refer to the Data Management log file to understand the reason for the job failure. If multiple
data load rules fail, a separate log is created for each data load rule.
REST Resource
POST /armARCS/rest/{api_version}/jobs/
Required Roles
Service Administrator or Periods - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
17-17
Chapter 17
Import Balances (Reconciliation Compliance)
{
"jobName" : "IMPORT_BALANCES",
"parameters": {
"period":"April 2016",
"dl_Definition":"DL_test"
}
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Relationship type (self, Job Status). if set to Job Status, you can use
the href to get the status of the operation
data Parameters as key value pairs passed in the request
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141
17-18
Chapter 17
Import Profiles (Reconciliation Compliance)
"action": "GET"
}
]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{
"jobName" : "IMPORT_PROFILES",
"parameters": {
"period":"July2016",
"importType":"Replace",
"fileLocation":"profiles.csv",
"dateFormat": "MMM d,yyyy"
}
}
17-19
Chapter 17
Import Rates (Reconciliation Compliance)
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action": "GET"
}
]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator or Periods – Manage
Request
Supported Media Types: application/json
Parameters
17-20
Chapter 17
Import Rates (Reconciliation Compliance)
The following table summarizes the client request parameters specific to this job.
{
"jobName" : "IMPORT_RATES",
"parameters": {
"period":"July2016",
"rateType":"Accounting",
"file":"rates.csv",
"importType":"ReplaceAll"
}
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
17-21
Chapter 17
Import Pre-Mapped Transactions (Transaction Matching)
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action": "GET"
}
]
}
REST Resource
POST /arm/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{
"jobName" : "importtmpremappedtransactions",
"parameters": {
17-22
Chapter 17
Import Attribute Values
"dataSource":"CLEARING",
"reconciliationType":"CLEARING",
"file":"clearingTransaction.csv",
"dateFormat": "MM-dd-yyyy"
}
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "TM",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/2141",
"action": "GET"
}
]
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
17-23
Chapter 17
Import Attribute Values
Required Roles
Service Administrator, Power User, or Profiles and Reconciliations – Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
{
"jobName" : "IMPORT_ATTRIBUTE_VALUES",
"parameters": {
"attribute":"Store",
"importType":"Replace",
"fileLocation":"StoreData.csv",
"dateFormat": "MMM d,yyyy",
"module": "RC"}
}
Response
Parameters
17-24
Chapter 17
Monitor Reconciliations (Reconciliation Compliance)
Name Description
type The application type
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
{
"type": "ARCS",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/oraclecloud.com/arm/rest/
fcmapi/v1/RC/job/2141",
"action": "GET"
}
]
}
Note:
• If the Reconciliation status for all the Reconciliations in the given Period Name
and Filter Name were closed, then the output status would be ‘0’.
• If the Reconciliations status for any one of the Reconciliations in the given Period
Name and Filter Name is open, then the output status would be ‘-1’.
REST Resource
POST /armARCS/rest/{api_version}/jobs/
17-25
Chapter 17
Monitor Reconciliations (Reconciliation Compliance)
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
{
"parameters":
{"periodName":"September 2017","filterName":"DemoFilter"},
"jobName":"MONITOR_RECONCILIATIONS"
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to the API call
action The HTTP call type
rel Relationship type (self, Job Status). if set to Job Status, you can use
the href to get the status of the operation
data Parameters as key value pairs passed in the request
17-26
Chapter 17
Import Reconciliation Attributes (Reconciliation Compliance)
{
"error":null,
"details":"Account ID : 100-1210, Name : Accounts Receivable, Status :
Closed",
"items":null,
"status":0,
"link":null,
"links":[{"action":"GET","rel":"self","href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/
monitorReconciliations/September%202017/DemoFilter"}],
"type":"ARCS"
}
The following is an example of the response body in JSON format when any reconciliation
status is open:
{
"error":null,
"details":"Account ID : 100-1210, Name : Accounts Receivable, Status : Open",
"items":null,
"status":-1,
"link":null,
"links":[{"action":"GET","rel":"self","href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/
monitorReconciliations/September%202017/DemoFilter"}],
"type":"ARCS"
}
REST Resource
POST /armARCS/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles and Reconciliations – Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
17-27
Chapter 17
Import Reconciliation Attributes (Reconciliation Compliance)
{
"jobName" : "IMPORT_RECONCILIATION_ATTRIBUTES",
"parameters":
{
"fileName":"import_recon.csv",
"period":"January 2010",
"rules":"AUTO_APP,AUTO_SUB",
"reopen":"true",
"dateformat":"MM-dd-yyyy;MMM d, yyyy"
}
}
Example 2
{
"jobName" : "IMPORT_RECONCILIATION_ATTRIBUTES",
"parameters":
{
"fileName":"Reconciliations.csv",
"period":"June 2019",
"rules":"AUTO_APP,AUTO_SUB",
"reopen":"true"
17-28
Chapter 17
Import Reconciliation Attributes (Reconciliation Compliance)
}
}
Example 3
{
"jobName" : "IMPORT_RECONCILIATION_ATTRIBUTES",
"parameters":
{
"fileName":"import_recon.csv",
"period":"January 2010",
"rules":"ALL",
"reopen":"true"
}
}
Example 4
{
"jobName" : "IMPORT_RECONCILIATION_ATTRIBUTES",
"parameters":
{
"fileName":"Reconciliations.csv",
"period":"June 2019"
}
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status • -1 = In Progress
• 0 = Success
• 1 = Fail
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type. Can be self and/or Job Status. If set to Job Status, you
can use the href to get the status of the import operation.
{
"type": "ARCS",
"links": [
17-29
Chapter 17
Run Auto Match (Transaction Matching)
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/
100000001155018",
"action": "GET"
}
],
"details": "In Process",
"status": -1
}
REST Resource
POST /arm/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{"jobName":"runautomatch",
"parameters":{"reconTypeId":"INTERCO"}}
Response
Supported Media Types: application/json
Parameters:
17-30
Chapter 17
Run Auto Alert (Transaction Matching)
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "TM",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/v1/jobs/2141",
"action": "GET"
}
],
"error": null,
"items": null,
"link": null
}
REST Resource
POST /arm/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
17-31
Chapter 17
Run Auto Alert (Transaction Matching)
The following table summarizes the client request parameters specific to this job.
{"jobName":"runautoalert,
"parameters":{"reconTypeId":"INTERCO"}}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "TM",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/v1/jobs/2141",
"action": "GET"
}
],
"error": null,
"items": null,
17-32
Chapter 17
Purge Transactions (Transaction Matching)
"link": null
}
REST Resource
POST /arm/rest/{api_version}/jobs
Required Roles
Service Administrator or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
17-33
Chapter 17
Purge Transactions (Transaction Matching)
{
"jobName" : "purgetransactions",
17-34
Chapter 17
Purge Transactions (Transaction Matching)
"parameters":
{
"reconTypeId" : "CLEARING",
"age" : 120,
"filterOperator":"EQUALS",
"filterValue" : ["101-1234","102-1234"],
"logFileName" : "purge-clearing"
}
}
Example of purging matched transactions 120 days or older for CLEARING match type and
accounts start with 101:
{
"jobName" : "purgetransactions",
"parameters":
{
"reconTypeId" : "CLEARING",
"age" : 120,
"filterOperator":"STARTS_WITH",
"filterValue" : ["101"],
"logFileName" : "purge-clearing"
}
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type": "TM",
"status": -1,
"details": "In Process",
"links": [
{
"rel": "self",
17-35
Chapter 17
Retrieve Job Status (Reconciliation Compliance)
"href":"https://
<SERVICE_NAME><TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/v1/
jobs/2141",
"action": "GET"
}
],
"error": null,
"items": null,
"link": null
}
REST Resource
GET /armARCS/rest/{api_version}/jobs/{job_id}
Required Roles
Service Administrator, Power User, or Jobs - View
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
Response
Parameters
The following table summarizes the response parameters.
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
17-36
Chapter 17
Retrieve Job Status (Transaction Matching)
Name Description
data Parameters as key value pairs passed in the request
{
"type": "ARCS",
"status": 0,
"details": "Total to copy : 3\nSuccessfully copied : 2\nUnsuccessfully
copied : 1\n",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/jobs/91",
"action": "GET"
}
],
"error": null,
"items": null,
"link": null
}
REST Resource
GET /arm/rest/{api_version}/jobs/{job_id}
Required Roles
Service Administrator, Power User, or Jobs - View
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
17-37
Chapter 17
Retrieve Job Status (Transaction Matching)
Response
Parameters
The following table summarizes the response parameters.
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
log-content Link to the log file location. This is applicable to Archive Matched
Transactions, Purge Archived Transactions, Purge Transactions
(Transaction Matching), Import Pre-Mapped Transactions (Transaction
Matching), and Unmatch Matched Transaction (Transaction Matching)
jobs.
file-content Link to the location of the archive file, for Archive Matched Transactions
jobs.
{
"type": "TM",
"items": [
0
],
"error": null,
"link": null,
"status": 0,
"details": "Job Completed. Job ID: 100000003918002",
"links": [
{
"rel": "self",
"href": https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest//v1/jobs/
100000003918002,
"action": "GET",
"data": null
}
17-38
Chapter 17
Retrieve Job Status (Transaction Matching)
]
}
Example 2: Retrieve job status for Archive Matched Transactions (Transaction Matching) job
{
"type": "TM",
"items": [
0
],
"error": null,
"link": null,
"status": 0,
"details": "Job Completed. Job ID: 100000003846005 Log file:
Archive_Transactions_Pos2Processor.log\nRe Archive for the Archive Job ID ::
100000003810002\r\nArchive Transactions for Match Type ::
Pos2Processor\nArchive Transactions on or before :: 2022-02-18 23:59:59
UTC\nArchive Transactions age :: 330\nAccount ID : Equals 'XX-XX-
YYYY'\nAccounts considered for Archive : XX-XX-YYYY\n\n Total Number of
Matches present in this archive :: 1479730\nTotal Number of Transactions
Present in this Archive for DataSource - Delivery Partner :: 1490233\nTotal
Number of Transactions Present in this Archive for DataSource - POS ::
1515718\nTotal Number of Adjustments Present in this Archive ::
104709\n\nTotal Number of Transactions Present in this Archive ::
3110660\nTime taken 22 Minute(s) and 02 Second(s) to Archive
Transactions.\r\n",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/v1/jobs/
100000003846005",
"action": "GET",
"data": null
},
{
"rel": "log-content",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/rest/applicationsnapshots/
Archive_Transactions_Pos2Processor.log/contents",
"action": "GET",
"data": null
},
{
"rel": "file-content",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/rest/applicationsnapshots/
Archived_Transactions_Pos2Processor_100000003846005.zip/contents",
"action": "GET",
"data": null
}
]
}
17-39
Chapter 17
Export Application Properties
Example 3: Retrieve job status for Purge Archived Transactions (Transaction Matching) job
{
"type": "TM",
"items": [
0
],
"error": null,
"link": null,
"status": 0,
"details": "Job Completed. Job ID: 100000003801002 Log file:
PurgeTransactions_100000003801002.log\nMatch Type: Pos2Processor, Purge for
Archive Job ID: 100000003798009\n\n\nTotal adjustments purged: 0\nTotal
transactions purged from all sources: 0\nTotal matches purged: 0\n\nStatus:
No transactions found for the Archive Transactions job ID. Purge Transactions
might be already run for this Archive job ID.\n\nTotal time taken: 00
Minute(s) and 00 Second(s)\n",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest//v1/jobs/
100000003801002",
"action": "GET",
"data": null
},
{
"rel": "log-content",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/rest/applicationsnapshots/
PurgeTransactions_100000003801002.log/contents",
"action": "GET",
"data": null
}
]
}
REST Resource
POST /arm/rest/fcmapi/{api_version}/rc/export/applicationproperties
17-40
Chapter 17
Export Application Properties
Required Roles
Administrator, or any predefined role and the Migrations - Administer application role
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{
"fileName": "ApplicationProperties.json"
}
17-41
Chapter 17
Export Application Properties
{
"fileName": "ApplicationProperties.json",
"properties":["Theme", "EmailNotification", "DisplayBusinessProcessName",
"RedwoodExperience"]
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string.
status Status of the job:
• -1 = In Progress
• 0 = Success
• 1 = Fail
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type. It can be self or export-content. If the export
succeeds, you can use the href to download the exported file.
{
"details": "Application properties exported successfully",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/rc/
export/applicationproperties",
"action": "POST"
},
{
"rel": "export-content",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/armARCS/rest/v1/
ApplicationProperties.json/contents",
"action": "GET"
}
],
"status": 0,
"type": "RC",
"link": {},
"error": null,
17-42
Chapter 17
Import Application Properties
"items": []
}
REST Resource
POST /arm/rest/fcmapi/{api_version}/rc/import/applicationproperties
Required Roles
Administrator, or any predefined role and the Migrations - Administer application role
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{
"fileName":"applicationProperties.json"
}
Response
Supported Media Types: application/json
Parameters:
17-43
Chapter 17
Export Background Image
Name Description
details In case of errors, details are published with the error string
status Status of the job:
• -1 = In Progress
• 0 = Success
• 1 = Fail
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type. Possible values: self.
{
"details": "Application properties imported successfully",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/rc/
import/applicationproperties",
"action": "POST"
],
"status": 0,
"type": "RC",
"link": {},
"error": null,
"items": []
}
REST Resource
POST /arm/rest/fcmapi/{api_version}/rc/export/backgroundImage
Required Roles
Administrator, or any predefined role and the Migrations - Administer application role
Request
Supported Media Types: application/json
17-44
Chapter 17
Export Background Image
Parameters
The following table summarizes the client request parameters specific to this job.
{
"fileName":"backgroundImage.jpg"
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status Status of the job:
• -1 = In Progress
• 0 = Success
• 1 = Fail
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type. It can be self or export-content. If the export
succeeds, you can use the href to download the exported file.
{
"details": "Background Image exported successfully",
"links": [
{
17-45
Chapter 17
Import Background Image
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/rc/
export/backgroundImage",
"action": "POST"
},
{
"rel": "export-content",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/11.1.2.3.600/
applicationsnapshots/bgImage.jpg/contents",
"action": "GET"
}
],
"status": 0,
"type": "RC",
"link": {},
"error": null,
"items": []
}
REST Resource
POST /arm/rest/fcmapi/{api_version}/rc/import/backgroundImage
Required Roles
Administrator, or any predefined role and the Migrations - Administer application role
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
17-46
Chapter 17
Import Background Image
{
"fileName":"backgroundImage.jpg"
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string
status Status of the job:
• -1 = In Progress
• 0 = Success
• 1 = Fail
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type. Possible values: self.
{
"details": "Background image imported successfully.",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/rc/
import/backgroundImage",
"action": "POST"
}
],
"status": 0,
"type": "RC",
"link": {},
17-47
Chapter 17
Export Logo Image
"error": null,
"items": []
}
REST Resource
POST /arm/rest/fcmapi/{api_version}/rc/export/logo
Required Roles
Administrator, or any predefined role and the Migrations - Administer application role
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{
"fileName":"logo.jpg"
}
Response
Supported Media Types: application/json
Parameters:
17-48
Chapter 17
Import Logo Image
Name Description
details In case of errors, details are published with the error string.
status Status of the job:
• -1 = In Progress
• 0 = Success
• 1 = Fail
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type. It can be self or export-content. If the export
succeeds, you can use the href to get the status of the import operation.
{
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/RC/
export/logo",
"action": "POST"
},
{
"rel": "export-content",
"href": "<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/11.1.2.3.600/
applicationsnapshots/logo.jpg/contents",
"action": "GET"
}
],
"details": "Logo image exported successfully.",
"type": "RC",
"status": 0,
"link": {},
"error": null,
"items": []
}
17-49
Chapter 17
Import Logo Image
REST Resource
POST /arm/rest/fcmapi/{api_version}/rc/import/logo
Required Roles
Administrator, or any predefined role and the Migrations - Administer application role
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
{
"fileName":"logo.jpg"
}
Response
Supported Media Types: application/json
Parameters:
Name Description
details In case of errors, details are published with the error string.
status Status of the job:
• -1 = In Progress
• 0 = Success
• 1 = Fail
links Detailed information about the link
href Links to API call or status API
action The HTTP call type
rel Relationship type. Possible values: self.
17-50
Chapter 17
Working with Connections in Account Reconciliation
{
"links": [
{
"rel": "self",
"href": "<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/fcmapi/v1/RC/
import/logo",
"action": "POST"
}
],
"details": "Logo image imported successfully.",
"type": "RC",
"status": 0,
"link": {},
"error": null,
"items": []
}
Create a Connection
Use this REST API to create a connection that will be saved in an application.
REST Resource
POST /arm/rest/fcmapi/{api_version}/{module}/connections
Required Roles
Service Administrator
17-51
Chapter 17
Working with Connections in Account Reconciliation
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request parameters specific to this job.
Example URL
https://<BASE-URL>/arm/rest/fcmapi/v1/rc/connections
{
"url": "https://<BASE-URL>",
"username": "<NEW_USERNAME>",
"password": "<NEW_PASSWORD>",
"type" : "ENTERPRISE_JOURNALS"
}
Response
Supported Media Type: application/json
Parameters Description
details In case of errors, details are published with the error string.
17-52
Chapter 17
Working with Connections in Account Reconciliation
{
"details": "Connection created successfully."
}
REST Resource
GET /arm/rest/fcmapi/{api_version}/{module}/connections
Request
Parameters:
The following table summarizes the client request.
Example URL
https://<BASE-URL>/arm/rest/fcmapi/v1/rc/connections
Response
Supported Media Types: application/json
Parameters Description
items Collection of information about the resource
id Unique identifier for the connection, such as 1c89922d-92ba-46c1-850f-
e2a8a416ddf2
type The type of connection
url The URL of the connection, such as https://<BASE-URL>
links Detailed information about the link
details In case of errors, details are published with the error string
17-53
Chapter 17
Working with Connections in Account Reconciliation
Example Response
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/arm/rest/fcmapi/v1/rc/connections",
"action": "GET"
}
],
"details": null,
"items": [
{
"username": "ats_admin2",
"password": null,
"url": "https://<BASE-URL>",
"id": 100000000558005,
"type": "ENTERPRISE_JOURNALS"
}
]
}
Update a Connection
Use this REST API to update a specific connection that is saved in an application.
REST Resource
PUT /arm/rest/fcmapi/{api_version}/{module}/connections/{id}
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
17-54
Chapter 17
Working with Connections in Account Reconciliation
Example URL
https://<BASE-URL>/arm/rest/fcmapi/v1/rc/connections/100000000658005
{
"url": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com",
"username": "<NEW_USERNAME>",
"password": "<NEW_PASSWORD>"
}
Response
Supported Media Type: application/json
Parameters Description
details In case of errors, details are published with the error string.
{
"details": "Connection updated successfully."
}
Example 2:
{
"details": "Invalid parameters. Test Connection is failed"
}
17-55
Chapter 17
Working with Connections in Account Reconciliation
Delete a Connection
Use this REST API to delete a specific connection that is saved in an application.
Required Roles
Service Administrator
REST Resource
DELETE /arm/rest/fcmapi/{api_version}/{module}/connections/{id}
Request
Parameters:
The following table summarizes the client request.
Example URL
https://<BASE-URL>/arm/rest/fcmapi/v1/rc/connections/100000000552006
Response
Supported Media Type: application/json
Parameters Description
details In case of errors, details are published with the error string.
{
"details": "Connection deleted successfully."
}
17-56
Chapter 17
Set Application Access Level
REST Resource
POST /armARCS/rest/{api_version}/appaccess
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request parameters.
{
"access": "ALL_USERS"
}
Example 2
{
"access": "ADMINISTRATORS"
}
Response
Supported Media Type: application/json
17-57
Chapter 17
Retrieve Application Access Level
Parameters Description
details In case of errors, details are published with the error string.
status See Migration Status Codes
links Detailed information about the link
{
"status": 0,
"details": "Application access updated successfully",
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/armARCS/rest/v1/appaccess",
"action": "GET",
"data": null
}
]
}
REST Resource
GET /armARCS/rest/{api_version}/appaccess
Required Roles
Service Administrator
Request
Parameters:
The following table summarizes the client request parameters.
Example URL
https://<BASE-URL>/armARCS/rest/v1/appacess
Response
Supported Media Type: application/json
17-58
Chapter 17
View Reconciliation Comments
Parameters Description
links Detailed information about the link
access Indicates the access level for users.
• ALL_USERS - all users can access the application
• ADMINISTRATORS - only Service Administrators can access the
application
{
"items": [
{
"access": "ALL_USERS"
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/armARCS/rest/v1/appaccess",
"action": "GET",
"data": null
}
]
}
REST Resource
GET /armARCS/rest/{api_version}/period/{period}/reconciliation/
{accountId}/comments
Required Roles
Service Administrator, Power User, or Viewer
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request specific to this job.
17-59
Chapter 17
View Reconciliation Comments
Example URL
https:// <SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/
armARCS/rest/v1/period/Jan 2022/reconciliation/101-BC2-Premapped/comments
Response
Supported Media Types: application/json
[
{
"commentId": 100000002580008,
"parentObjectId": 100000001956143,
"commentText": "Please investigate the alert on the account. The Risk
Rating has been increased.",
"postedBy": "admin1",
"postedDate": "Oct 6, 2022 4:03 PM",
"carryForward": null,
"references": [
{
"referenceId": 100000002580012,
"type": "FILE",
"url": null,
"name": "adjustment1.pdf",
"fileDownloadLink": "https://<BASE-URL>/arm/rest/fcmapi/v1/rc/
references/100000002580012/file"
},
{
"referenceId": 100000002580010,
"type": "URL",
"url": "https://www.my-example.com",
"name": "my-example",
"fileDownloadLink": null
}
]
}
]
17-60
Chapter 17
Archive Matched Transactions (Transaction Matching)
REST Resource
POST /arm/rest/{api_version}/jobs
Required Roles
Service Administrator or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request specific to this job.
17-61
Chapter 17
Purge Archived Transactions (Transaction Matching)
{
"jobName": "archivetransactions",
"parameters": {
"reconTypeId": "Pos2Processor",
"age": 120,
"logFileName" : "Archive_Transactions_IC120XXXX.log",
"fileName" : "Archived_Transactions_IC120XXXX.zip",
"filterOperator": "EQUALS",
"filterValue": [
"201-1234",
"202-1234"
]
}
}
Response
Supported Media Types: application/json
{
"type": "TM",
"items": null,
"error": null,
"link": null,
"status": -1,
"details": null,
"links": [
{
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/v1/jobs/
100000003846005",
"action": "GET",
"rel": "self",
"data": null
}
]
}
To get the status of the archive matched transactions job and view its details, see Retrieve Job
Status (Transaction Matching).
REST Resource
POST /arm/rest/{api_version}/jobs
17-62
Chapter 17
Purge Archived Transactions (Transaction Matching)
Required Roles
Service Administrator or Profiles and Reconciliations - Manage
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request specific to this job.
{
"jobName": "purgearchivetransactions",
"parameters": {
"jobId": "100000003801002"
"logFileName" : "Purge_Archive_Transactions_IC120XXXX.log"
}
}
Response
Supported Media Types: application/json
{
"type": "TM",
"items": null,
"error": null,
"link": null,
"status": -1,
"details": null,
"links": [
{
"href": "https://<SERVICE_NAME>-
17-63
Chapter 17
Unmatch Matched Transactions (Transaction Matching)
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/v1/jobs/
100000003801002",
"action": "GET",
"rel": "self",
"data": null
}
]
}
To get the status of the purge archived transactions job and view its details, see Retrieve Job
Status (Transaction Matching).
REST Resource
POST /arm/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, Preparer, or Profiles and Reconciliations - Manage
The user who created a profile can also unmatch transactions associated with that profile.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request specific to this job.
17-64
Chapter 17
Unmatch Matched Transactions (Transaction Matching)
{
"jobName": "unmatchtransactions",
"parameters": {
"matchTypeTextId": "IC120",
"matchIds":[9195754,9219755],
"forceReopen": false
}
}
Response
Supported Media Types: application/json
{
"type": "TM",
"items": null,
"error": null,
"link": null,
"status": -1,
"details": null
"links": [
{
"rel": "self",
17-65
Chapter 17
Unmatch Transactions Matched by Auto Match (Transaction Matching)
"href": "https://<BASE-URL>/arm/rest/v1/jobs/100000002574034",
"action": "GET"
} ]
}
To get the status of the unmatch transactions job and view its details, see Retrieve Job Status
(Transaction Matching).
REST Resource
POST /arm/rest/{api_version}/jobs
Required Roles
Service Administrator, Power User, Preparer, or Profiles and Reconciliations - Manage
The user who created a profile can also unmatch transactions associated with that profile.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request specific to this job.
{
"jobName": "unmatchtransactionsbyautomatch",
"parameters": {
"autoMatchJobId": 100000000067039,
17-66
Chapter 17
Update Unmatched Transactions (Transaction Matching)
"createReverseAdjustment": true
}
Response
Supported Media Types: application/json
{
"type": "TM",
"items": null,
"error": null,
"link": null,
"status": -1,
"details": null,
"links": [
{
"href": "https://<BASE-URL>/arm/rest/jobs/100000000079002",
"action": "GET",
"rel": "self",
"data": null
} ]
}
REST Resource
POST /arm/rest/{api_version}/dataSources/{dataSource}/transactions/
{transaction}
Required Roles
Service Administrator, Power User, Preparer, or Profiles and Reconciliations - Manage
The user who created a profile can also unmatch transactions associated with that profile.
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request specific to this job.
17-67
Chapter 17
Update Unmatched Transactions (Transaction Matching)
Example URL
https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/v1/
dataSources/POS/transactions/1012
{
"reconId": "INTERCO133",
"attributeId": "POS_AMOUNT",
"value": "210015.05",
"calculate": false,
17-68
Chapter 17
Update Unmatched Transactions (Transaction Matching)
"forceReopen": false
}
Response
Supported Media Types: application/json
{
"type": "TM",
"items": null,
"error": null,
"link": null,
"status": 0,
"details": "Success : Update transaction - 1012",
"links": [
{
"rel": "self",
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/arm/rest/dataSources/POS/
transactions/1012",
"action": "GET",
"data": null
}
]
}
17-69
18
Financial Consolidation and Close REST APIs
Use the Financial Consolidation and Close REST APIs to get the REST API version, retrieve
journals and journal details, submit, approve, post, unpost, and reject journals, and update
journal periods. You can also import supplementation data, copy data, clear data, and deploy
form templates.
https://<BASE-URL>/HyperionPlanning/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for
Financial Consolidation and Close is v3.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
18-1
Chapter 18
Getting API Versions for Financial Consolidation and Close APIs
REST Resource
GET /HyperionPlanning/rest/{api_version}
Required Roles
Service Administrator, Power User, User, Viewer
Request
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
api_version Version of the API you are developing with, such as V1
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
version The version, such as V1
{
"version": "v1",
"lifecycle": "active",
"isLatest": true,
"links": [{
"rel": "canonical",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v2"
}, {
"rel": "predecessor-version",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v1"
}]
}
18-2
Chapter 18
Perform Journal Actions for Financial Consolidation and Close
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
journals/{journalLabel}/actions
Required Roles
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
18-3
Chapter 18
Perform Journal Actions for Financial Consolidation and Close
{"parameters" :{
"scenario":
"Actual",
"year": "FY17",
"period": "Jan",
"consolidation":
"FCCS_Entity Input",
"action": "POST"
}
}
These parameter fields are described in
rows below.
scenario The scenario for which you are performing Query Yes None
the journal action
year The year for which you are performing the Query Yes None
journal action
period The period for which you are performing the Query Yes None
journal action
consolidation The consolidation for which you are Query No Entity Input
performing the journal action
action The journal action. Supported valid Action Query Yes None
values:
SUBMIT,REJECT,APPROVE,POST,UNPOS
T
Response
Parameters
The following table summarizes the response parameters.
Name Description
actionDetail Journal action, such as Posted
actionStatus Action status, such as 0
{
"scenario": "Actual",
"year": "FY17",
"period": "Jan",
18-4
Chapter 18
Perform Journal Period Updates for Financial Consolidation and Close
"action": "POST"
}
{
"actionDetail": "Posted",
"actionStatus": 0
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
journalPeriods/{period}/actions
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
18-5
Chapter 18
Perform Journal Period Updates for Financial Consolidation and Close
{
"parameters": {
"scenario": "Actual",
"year": "FY17",
"action": "OPEN"
}
}
Response
Parameters
The following table summarizes the response parameters.
Name Description
scenario Journal scenario, such as Actual
year Journal year, such as FY18
period Journal period, such as Jan
action Journal period action, such as Open
{
"scenario": "Actual",
"year": "FY17",
"period": "Jan",
"action": "OPEN"
}
}
18-6
Chapter 18
Retrieve Journals for Financial Consolidation and Close
{
"actionDetail": "Open",
"actionStatus": 0
}
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
journals?
q={"scenario":"Actual","year":"FY16","period":"Jan","consolidation":"FCCS_Enti
ty Input","status":
"WORKING","group":"group1" ,"label":"J1" ,"description":"JournalDesc","entity"
:"FCCS_Total Geography"}&offset=0&limit=5
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
18-7
Chapter 18
Retrieve Journals for Financial Consolidation and Close
{"scenario":"Actual","year":"FY1
6","period":"Jan","consolidation
":"FCCS_Entity Input","status":
"WORKING","group":"group1" ,"lab
el":"J1" ,"description":"Journal
Desc","entity":"FCCS_Total
Geography"}
Response
The following table summarizes the response parameters.
Name Description
totalResults Total number of journals matching the filter criteria
hasMore True/False, if there are more pages of records
18-8
Chapter 18
Retrieve Journals for Financial Consolidation and Close
Name Description
count Number of journals in this page
limit Current page size
offset Current page number
items List of journals, followed by attributes of journals, such as below:
[{
"scenario": "Actual",
"currency": "Entity Currency",
"createdOn": "2018-07-30 06:22:47.516",
"modifiedBy": "epm_default_cloud_admin",
"journalType": "Regular",
"createdBy": "epm_default_cloud_admin",
"balanceType": "Balanced",
"postedBy": null,
"year": "FY17",
"description": "JournalDesc1",
"group": "grp1",
"status": "Working",
"label": "J4",
"period": "Jan"]
}]
{
"totalResults": 10
"hasMore": false,
"count": 5,
"limit": 5,
"offset": 0,
"items": [{
"scenario": "Actual",
"createdOn": "2018-07-30 06:22:47.516",
"modifiedBy": "epm_default_cloud_admin",
"journalType": "Regular",
"createdBy": "epm_default_cloud_admin",
"balanceType": "Balanced",
"postedBy": null,
"year": "FY17",
"description": "JournalDesc1",
"group": "grp1",
"status": "Working",
"label": "J4",
"period": "Jan",
18-9
Chapter 18
Retrieve Journal Details for Financial Consolidation and Close
"journalUrl": {,
"rel": "Journal Item",
"href": "https://<SERVICE_NAME-
<TENANT_NAME.<SERVICE_TYPE.<dcX>.oraclecloud.com/HyperionPlanning/faces/LogOn?
SO_jumpToEfsStructureHome=Y&SO_efsJumpToCardId=EPM_CA_6",",
"data": null,
"action": "GET",
}
},
{
"scenario": "Actual",
"currency": "Entity Currency",
"createdOn": "2018-07-26 10:21:35.634",
"modifiedBy": "epm_default_cloud_admin",
"journalType": "Regular",
"createdBy": "epm_default_cloud_admin",
"balanceType": "Balanced",
"postedBy": null,
"year": "FY17",
"description": "JournalDesc1",
"group": "grp1",
"status": "Working",
"label": "J2",
"period": "Jan",
"journalUrl": {,
"rel": "Journal Item",
"href": "https://<SERVICE_NAME-
<TENANT_NAME.<SERVICE_TYPE.<dcX>.oraclecloud.com/HyperionPlanning/faces/LogOn?
SO_jumpToEfsStructureHome=Y&SO_efsJumpToCardId=EPM_CA_6",",
"data": null,
"action": "GET",
},
}
],
"links": [
{
"rel": "Get Journals",
"href": "https://<SERVICE_NAME-
<TENANT_NAME.<SERVICE_TYPE.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/BotApp/journals",
"action": "GET
}
],
}
18-10
Chapter 18
Retrieve Journal Details for Financial Consolidation and Close
REST Resource
GET /HyperionPlanning/rest/{api_version}/applications/{application}/
journals/{journal label}?
q={"scenario":"Actual","year":"FY16","period":"Jan","consolidation":"Entity
Input"}&"lineItems"="true"
Required Roles
Service Administrator
Request
Supported Media Types: application/json
q={"scenario":"A
ctual","year":"F
Y16","period":"J
an","consolidati
on":"Entity
Input"}
18-11
Chapter 18
Retrieve Journal Details for Financial Consolidation and Close
Response
Parameters
The following table summarizes the response parameters.
Name Description
totalResults Total number of journals matching the filter criteria
hasMore True/False, if there are more pages of records
count Number of journals in this page
limit Current page size
offset Current page number
items List of journals, followed by attributes of journals, such as below:
[{
"scenario": "Actual",
"currency": "Entity Currency",
"createdOn": "2018-07-30 06:22:47.516",
"modifiedBy": "epm_default_cloud_admin",
"journalType": "Regular",
"createdBy": "epm_default_cloud_admin",
"balanceType": "Balanced",
"postedBy": null,
"year": "FY17",
"description": "JournalDesc1",
"group": "grp1",
"status": "Working",
"label": "J4",
"period": "Jan"]
}]
{
[
"scenario": "Actual",
"year": "FY18",
"period": "Feb",
"label": "JETest11",
"journalType": "Regular",
"balanceType": "Balanced",
"status": "Posted",
"description": "Journal description",
"group": "IMPORT_Group",
"createdBy": "epm_default_cloud_admin",
18-12
Chapter 18
Export Consolidation Journals
"modifiedBy": "epm_default_cloud_admin",
"postedBy": "epm_default_cloud_admin",
"createdOn": "2023-12-06 18:48:33.503",
"currency": "Entity Currency",
"consolidation": "FCCS_Entity Input",
"totCredit": 1300,
"totDebit": 1300,
"journalLineItems":[
{"amountType": "Debit", "amount": 800, "description": "line description",
"entity": "YY_E1",…},
{"amountType": "Credit", "amount": 500, "description": "line description",
"entity": "YY_E1",…},
{"amountType": "Debit", "amount": 500, "description": "line description",
"entity": "YY_E1",…},
{"amountType": "Credit", "amount": 800, "description": "line description",
"entity": "YY_E1",…}
]
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
18-13
Chapter 18
Export Consolidation Journals
{
"jobType": "EXPORT_JOURNAL,
"jobName": "Export Journal",
"parameters": {
"fileName": "JExport1"
}
}
Response Body
Supported Media Types: application/json
Name Description
status Status of the job: -1 =In progress; 0 = Success; 1
= Fail
details In case of errors, details are published with the
error string.
descriptiveStatus The status of the job, such as Completed or
Error
items Collection of Notification categories
links Detailed information about the link
href Links to API call
action The HTTP call type
18-14
Chapter 18
Import Consolidation Journals
Name Description
rel Relationship type. Possible values: self
{
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/rest/v3/applications/FccsRef3/jobs/
184",
"action": "GET"
},
{
"rel": "job-details",
"href": "https:<BASE-URL>/rest/v3/applications/FccsRef3/jobs/184/
details",
"action": "GET"
}
],
"descriptiveStatus": "Processing",
"status": -1,
"jobId": 184,
"jobName": "JExport1",
"details": null
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
18-15
Chapter 18
Import Consolidation Journals
{
"jobType": "IMPORT_JOURNAL",
"jobName": "IMPORT1",
"parameters": {
"fileName": "TestImport1.jlf",
"errorFileName": "DHQA_TestImport1_error.log"
}
}
Response Body
Supported Media Types: application/json
18-16
Chapter 18
Copy Data
Name Description
type Application type, for example, FCCS
status Status of the job: -1 =In progress; 0 = Success; 1
= Fail
details In case of errors, details are published with the
error string.in the job error file and Job
Console.
descriptiveStatus The status of the job, such as Completed or
Error
items Collection of Notification categories
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type. Possible values: self
{
"links":[
{
"rel": "self",
"href": " https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/FccsRef3/jobs/13",
"action": "GET"
},
{
"rel": "job-details",
"href": " https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
/applications/FccsRef3/jobs/13/details",
"action": "GET"
}
],
"descriptiveStatus": "Processing",
"status": -1,
"jobId": 13,
"jobName": "JIMPORT1",
"details": null
}
Copy Data
This REST API is used to execute a Copy Data job using the profile name. Before executing
this job, you should create a Copy Data profile in Financial Consolidation and Close.
For details on this task, see Using Copy Data Profiles.
18-17
Chapter 18
Copy Data
This REST API returns the job id after starting the Copy Data job.
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
{
"jobType": "Copy_Data",
"jobName": "Execute Profile",
"parameters": {
"ProfileName": "<ProfileName>",
}
}
Response Body
Supported Media Types: application/json
Name Description
type Financial Consolidation and Close Application type,
for example, FCCS
status Status of the job: -1 =In progress; 0 = Success; 1 =
Fail
details In case of errors, details are published with the
error string.
descriptiveStatus The status of the job, such as Completed or Error
items Collection of Notification categories
links Detailed information about the link
href Links to API call
18-18
Chapter 18
Clear Data
Name Description
action The HTTP call type
rel Relationship type. Possible values: self
{
"jobId": 8,
"descriptiveStatus": "Processing",
"details": null,
"jobName": "Copy Data",
"status": -1,
"links": [
{
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/<applicationName>/jobs/<JobId>","rel":"self","action":"GET"},
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/,
"rel":"job-details","action":"GET"},
}
]
}
Clear Data
This REST API is used to execute a Clear Data job using the profile name. Before executing
this job, you should create a Clear Data profile in Financial Consolidation and Close.
For details on this task, see Using Clear Data Profiles.
This REST API returns the job id after starting the job.
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
18-19
Chapter 18
Clear Data
{
"jobType": "Clear_Data",
"jobName": "Execute Profile",
"parameters": {
"ProfileName": "<ClearData_01>",
}
}
Response
Name Description
type Financial Consolidation and Close Application type, for example, FCCS
status Status of the job: -1 =In progress; 0 = Success; 1 = Fail
details In case of errors, details are published with the error string.
descriptiveStatus The status of the job, such as Completed or Error
items Collection of Notification categories
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type. Possible values: self
18-20
Chapter 18
Validate Metadata
{
"jobId": 8,
"descriptiveStatus": "Processing",
"details": null,
"jobName": "Clear Data",
"status": -1,
"links": [
{
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/<applicationName>/jobs/<JobId>","rel":"self","action":"GET"},
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/,
"rel":"job-details","action":"GET"},
}
]
}
Sample
{
"jobId": 8,
"descriptiveStatus": "Processing",
"details": null,
"jobName": "Clear Data",
"status": -1,
"links": [
{
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/ Testapp /jobs/8",
"rel":"self","action":"GET"},
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/Testapp/jobs/8/details",
"rel":"job-details","action":"GET"} }
]
}
Validate Metadata
This REST API is used to automatically run the Validate Metadata process to ensure an error-
free database refresh and consolidation.
For details on this task, see "Validating Metadata" in Administering Financial Consolidation and
Close.
Required Roles
18-21
Chapter 18
Export Configurable Consolidation Rulesets
Service Administrator
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application_name}/
application/validatemetadata?logFileName={logfile_name}
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Name Description
numWarnings Number of metadata warnings
numInfo Number of metadata information messages
outPutFileName Ouput file name with the extension of .csv
numErrors Number of metadata error messages
status The status of the job, such as Completed or
Error
{
"numWarnings": 0,
"numInfo": 0,
"outPutFileName": "ValidateMetadata.csv,
"numErrors": 20,
"status": "Validate Metadata Completed"
}
18-22
Chapter 18
Import Configurable Consolidation Rulesets
Details page and edited as needed. The contents and structure of the xml file is similar to that
exported through the user interface.
Required Roles
Service Administrator
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
exportConfigConsolRules
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
Sample Request
{
"rules"= ["Test1","Test2"]
}
Response
Supported Media Types: text/plain
If rules specified in the request body don't exist in the application, then the generated job will
be errored out and the error file can be downloaded from the Job Details page.
If the rules parameter is not provided in the request, or if no value is specified for the rules
parameter, the following error message will be returned as the response:
Please enter rules to be exported.
18-23
Chapter 18
Import Configurable Consolidation Rulesets
rulesets. The import validation process is similar to that implemented in the Import
Configurable Consolidation Rulesets user interface.
The xml file can be uploaded to the Planning Inbox/Outbox using the EPM Automate
uploadFile command.
Required Roles
Service Administrator
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
importConfigConsolRules
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
{"file" = "inbox/
Configurable_Consolidation.xml"
}
Sample Request
{
"file" = "inbox/Configurable_Consolidation.xml"
}
Response
Supported Media Types: text/plain
If any error exists in the rules specified in the xml file while importing/validating, the error
details can be viewed on the Job Details page.
If the file parameter is not specified in the request, or if no value is provided for the file
parameter, the following error message will be returned as the response:
18-24
Chapter 18
Generate an Intercompany Matching Report
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Request
Supported Media Types: application/json
Name Description
scenario The member of the Scenario dimension for the report, for example, Actual
years The member of the Year dimension for the report, for example, FY22
period The member of the Period dimension for the report, for example, December
reportFormat The format for the report, for example, HTML
fileName (optional) A filename for the report, for example, intercompany_receivables_report
{
"jobType": "GENERATE_INTERCOMPANY_REPORT",
"jobName": "icp1",
"parameters": {
"scenario":"actual",
"years": "FY22",
"period":"Dec",
18-25
Chapter 18
Generate an Intercompany Matching Report
"reportFormat":"HTML"
"fileName":"intercompany_receivables_report"
}
}
Response Body
Supported Media Types: application/json
Name Description
type Financial Consolidation and Close Application type,
for example, FCCS
status Status of the job:
• -1 =In progress
• 0 = Success;
• 1 = Fail
• 2 = Cancel Pending
• 3 = Cancelled
• 4 = Invalid Parameter
• >4 = Unknown
details In case of errors, details are published with the
error string.
descriptiveStatus The status of the job, such as Completed or Error
items Collection of Notification categories
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type. Possible values: self
{
"descriptiveStatus": "Processing",
"jobId": 33,
"jobName": "icp1",
"details": null,
"status": -1,
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/
applications/tst/jobs/33",
"action": "GET"
},
{
"rel": "job-details",
"href": "https:<BASE-URL>/HyperionPlanning/rest/v3/
applications/tst/jobs/33/details",
"action": "GET"
}
18-26
Chapter 18
Generate an Intercompany Matching Report
]
}
18-27
19
Task Manager REST APIs
Use the Task Manager REST APIs to deploy task manager templates, update the task status
for event monitoring, and manage Oracle Integration Cloud connections.
https://<BASE-URL>/HyperionPlanning/rest/cmapi/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for Task
Manager is v1.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
19-1
Chapter 19
Deploy Task Manager Templates
Parameters
The following table summarizes the client request:
REST Resource
POST/HyperionPlanning/rest/cmapi/{api_version}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
19-2
Chapter 19
Deploy Task Manager Templates
Parameters
The following table summarizes the client request parameters specific to this job.
"jobType":"TM_DEPLOY_TEMPLATE",
"parameters":{
"templateName":"Template1",
"scheduleName": "scheduleA",
"year":"2021",
"period":"Jan",
"dayZeroDate":"2021-01-01"
Example 2:
"jobType":"TM_DEPLOY_TEMPLATE",
"parameters":{
"templateName":"Template1",
"scheduleName": "scheduleA",
"year":"2021",
"period":"Jan",
19-3
Chapter 19
Deploy Task Manager Templates
"dayZeroDate":"2021-01-01",
"orgUnit":"JPAC"
Response
Supported Media Types: application/json
Name Description
jobId Job ID
descriptiveStatus Any additional details
details Message to the end user. In case of errors, details are published.
status -1 – In Progress; 0 – Success; 1 – Fail
items Not applicable for this job type
links Detailed information about the link
rel Possible values: self
href Links to API call
action The HTTP call type
JSON Output
The following is an example of the response body in JSON format.
"links": [
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/
cmapi/v1/jobs",
"action": "POST"
},
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/
cmapi/v1/jobs/14008",
19-4
Chapter 19
Update Task Status for Event Monitoring
"action": "GET"
],
"status": -1,
"type": "TM",
"link": {},
"error": null,
"items": []
REST Resource
POST /HyperionPlanning/rest/cmapi/{api_version}/updateTasksForEventMonitoring
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
19-5
Chapter 19
Update Task Status for Event Monitoring
Example URL
https://<BASE-URL>/HyperionPlanning/rest/cmapi/v1/
updateTasksForEventMonitoring
Payload
Example 1
If the custom event monitoring integration has the following properties:
• Integration Connection Name: customAppConn
• Integration Code: customPeriodClose
• Event Name: custom.CloseProcess.period.close
• Parameter Code: periodName and ledgerID
And the task is set up with following parameters:
• periodName: FY18
19-6
Chapter 19
Update Task Status for Event Monitoring
• ledgerID: 123
The following payload should be sent to close the task:
{
"eventName" : "custom.CloseProcess.period.close",
"integrationName" : "customPeriodClose",
"integrationConnectionName" : "customAppConn",
"parameters": [{
"name": "periodName",
"value": "FY18"
}, {
"name": "ledgerID",
"value": "123"
}]
}
Note:
The API expects integration code to be passed for the parameter integrationName.
Example 2
{
"eventName": "custom.CloseProcess.period.close",
"integrationName": "customPeriodClose",
"integrationConnectionName": "customAppConn",
"parameters": [
{
"name": "periodName",
"value": "FY18"
},
{
"name": "ledgerID",
"value": "123"
}
],
"message": "Close period",
"logLocation": "/logs/closeperiod.txt",
"reportLocations": [
"http://oracle.com/reportLocation.html"
]
}
Response
Supported Media Types: application/json
{
"type": "RC",
19-7
Chapter 19
Working with Connections in Task Manager
"items": null,
"error": null,
"link": null,
"status": null,
"details": "2 task(s) updated.",
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/cmapi/v1/
updateTasksForEventMonitoring",
"action": "POST"
}
]
}
Create a Connection
Use this REST API to create a connection to Oracle Integration Cloud using Task Manager.
REST Resource
POST /HyperionPlanning/rest/fcmapi/{api_version}/{module}/connections
Required Roles
Service Administrator
Request
Supported Media Types: application/json
19-8
Chapter 19
Working with Connections in Task Manager
Parameters:
The following table summarizes the client request parameters for Basic authentication and
OAuth 2.0 authentication.
Note:
The URL must be
provided only till the
server name, which
is oraclecloud.com.
Note:
The parameter is
applicable only for
OAuth 2.0
authentication type.
oauthProperties Specify the access token, client ID, and scope of Payload Payload None
the URL for OAuth 2.0 authentication.
Note:
The parameter is
applicable only for
OAuth 2.0
authentication type.
19-9
Chapter 19
Working with Connections in Task Manager
Note:
This parameter is
applicable only for
basic authentication
type.
password The encrypted password for the user. Payload Yes None
For security reasons, only an encrypted password
is allowed. Use the EPM Automate encrypt
command to generate the encrypted password.
See encrypt .
Note:
This parameter is
applicable only for
basic authentication
type.
type The type of connection. For Oracle Integration Payload Yes None
Cloud, set this value to ICS.
{
"url": "<URL of Oracle Integration Cloud>",
"username": "<NEW_USERNAME>",
"password": "<NEW_PASSWORD>",
"type" : "ICS"
"authType": "BASIC"
}
{
"url": "<URL of Oracle Integration Cloud>",
"type": "ICS",
"authType": "OAUTH2",
"oauthProperties": {
"accessTokenUrl": "<Access token URL>",
"clientId": "<Client ID>",
"scope": "<Scope URL>",
"clientSecret": "<EPMAUTOMATE Encrypted password>"
19-10
Chapter 19
Working with Connections in Task Manager
}
}
Response
Supported Media Type: application/json
Parameters Description
details In case of errors, details are published with the error string.
{
"details": "Connection created successfully."
}
REST Resource
GET /HyperionPlanning/rest/fcmapi/{api_version}/{module}/connections
Request
Parameters:
The following table summarizes the client request.
Response
Supported Media Types: application/json
19-11
Chapter 19
Working with Connections in Task Manager
Parameters Description
items Collection of information about the resource
id Unique identifier for the connection
type The type of connection. For Oracle Integration Cloud, set this value to ICS.
url The URL of the Integration Cloud environment.
Note:
The URL must be provided only till the server
name, which is oraclecloud.com.
{
"links": [
{
"rel": "self",
"href": "<URL of Oracle Integration Cloud>",
"action": "GET"
}
],
"details": null,
"items": [
{
"username": "ats_admin2",
"password": null,
"url": "<URL of Oracle Integration Cloud>",
"id": 100000000558008,
"type": "ICS"
"authType": "BASIC"
}
]
}
{
"details": null,
"items": [
{
"id": 100000000037009,
"url": "<URL of Oracle Integration Cloud>",
19-12
Chapter 19
Working with Connections in Task Manager
"type": "ICS",
"authType": "OAUTH2",
"oauthProperties": {
"accessTokenUrl": "<Access token URL>",
"clientId": "<Client ID>",
"scope": "<Scope URL>"
}
}
],
"links": [
{
"rel": "self",
"href": "<URL of Oracle Integration Cloud>",
"action": "GET"
}
]
}
Update a Connection
Use this REST API to update a specific connection to Oracle Integration Cloud using Task
Manager.
REST Resource
PUT /HyperionPlanning/rest/fcmapi/{api_version}/{module}/connections/{id}
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters:
The following table summarizes the client request.
19-13
Chapter 19
Working with Connections in Task Manager
Note:
The URL must be
provided only till the
server name, which
is oraclecloud.com.
Note:
The parameter is
applicable only for
OAuth 2.0
authentication type.
Note:
The parameter is
applicable only for
OAuth 2.0
authentication type.
Note:
This parameter is
applicable only for
basic authentication
type.
19-14
Chapter 19
Working with Connections in Task Manager
Note:
This parameter is
applicable only for
basic authentication
type.
type The type of connection. For Oracle Integration Payload Yes None
Cloud, set this value to ICS.
{
"url": "<URL of Oracle Integration Cloud>",
"username": "<NEW_USERNAME>",
"password": "<NEW_PASSWORD>"
"authType": "BASIC"
}
{
"url": "<URL of Oracle Integration Cloud>",
"type": "ICS",
"authType": "OAUTH2",
"oauthProperties": {
"accessTokenUrl": "<Access token URL>",
"clientId": "<Client ID>",
"scope": "<Scope URL>",
"clientSecret": "<EPMAUTOMATE Encrypted password>"
}
}
Response
Supported Media Type: application/json
Parameters Description
details In case of errors, details are published with the error string.
19-15
Chapter 19
Working with Connections in Task Manager
{
"details": "Connection updated successfully."
}
Example 2:
{
"details": "Invalid parameters. Test Connection is failed"
}
Delete a Connection
Use this REST API to delete a specific connection to Oracle Integration Cloud using Task
Manager.
Required Roles
Service Administrator
REST Resource
DELETE /HyperionPlanning/rest/fcmapi/{api_version}/{module}/connections/{id}
Request
Parameters:
The following table summarizes the client request.
Response
Supported Media Type: application/json
Parameters Description
details In case of errors, details are published with the error string.
19-16
Chapter 19
Working with Connections in Task Manager
{
"details": "Connection deleted successfully."
}
19-17
20
Supplemental Data Manager REST APIs
Use the Supplemental Data Manager REST APIs to import supplemental collection data for
Financial Consolidation and Close and deploy form templates.
https://<BASE-URL>/HyperionPlanning/rest/sdm/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for
Supplemental Data Manager is v3.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
20-1
Chapter 20
Import Supplemental Collection Data for Financial Consolidation and Close
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/
fcmjobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
Parameters
20-2
Chapter 20
Import Supplemental Collection Data for Financial Consolidation and Close
Parameter Value
Product Oracle EPM
Consolidation Entity Input
Movement Actual
{
"jobType" : "IMPORT_SUPPLEMENTAL_COLLECTION_DATA",
"parameters": {
"fileName":"import_sdm_data.csv",
"collection":"Investment Detail Collection",
"year":"2019",
"period":"Dec",
"product:"Oracle EPM",
"consolidation":"Entity Input",
}
}
Example 2
{
"jobType" : "IMPORT_SUPPLEMENTAL_COLLECTION_DATA",
"parameters": {
"fileName":"import_sdm_data.csv",
"collection":"Investment Detail Collection",
"year":"2020",
"period":"January",
"category":"Oracle EPM",
"movement":"Actual",
}
}
Example 3
{
"jobType" : "IMPORT_SUPPLEMENTAL_COLLECTION_DATA",
"parameters": {
"fileName":"import_sdm_data.csv",
20-3
Chapter 20
Import Supplemental Collection Data for Financial Consolidation and Close
Note:
Parameter names are case-sensitive except Year and Period. The frequency
dimension name as part of the parameter is case-sensitive.
Response
Supported Media Types: application/json
Parameters:
Name Description
type FCCS Application type, for example, FCCS
status -1 - In Progress; 0 - Success; 1 - Fail
details In case of errors, details are published with the error string
descriptiveStatus The status of the job, such as Completed or Error
items Collection of Notification categories
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type. Possible values: self
{
"jobId":100000000114040,
"descriptiveStatus":"In Progress",
"details": "In Progress",
"status": -1,
"items": [],
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME-
<TENANT_NAME.<SERVICE_TYPE.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/FCCS/fcmjobs/100000000114040"
}, {",
"action":"GET"
}
20-4
Chapter 20
Deploy Form Templates
],
}
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/fcmjobs
Required Roles
Service Administrator, Power User
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request parameters specific to this job.
20-5
Chapter 20
Deploy Form Templates
20-6
Chapter 20
Deploy Form Templates
20-7
Chapter 20
Deploy Form Templates
{
"jobType" : "DEPLOY_FORM_TEMPLATES",
"parameters":
{
"CollectionIntervalName" : "Journal Collection Interval",
"Year" : "2020",
"Period" : "July",
"Product" : "Oracle EPM",
"Consolidation" : "Entity Input",
"Template" : [ "Template,1","Template 2" ],
"ResetWorkflows" : "true"
}
}
Example 2:
{
"jobType" : "DEPLOY_FORM_TEMPLATES",
"parameters":
{
"CollectionIntervalName" : "Loan Collection Interval",
"Year" : "2020",
"Period" : "July",
"Category" : "Oracle EPM",
"Movement" : "Actual",
"Template" : ["Template 3"]
}
}
20-8
Chapter 20
Deploy Form Templates
Example 3:
{
"jobType" : "DEPLOY_FORM_TEMPLATES",
"parameters":
{
"CollectionIntervalName" : "Default",
"Year" : "2020",
"Period" : "July",
"Scenario" : "Actual",
"Template" : ["Template 5","Template 6"],
"ResetWorkflows" : "false",
}
}
Example 4:
{
"jobType" : "DEPLOY_FORM_TEMPLATES",
"parameters":
{
"CollectionIntervalName" : "Custom Interval",
"Year" : "2020",
"Period" : "July",
"Template" : ["Template 5","Template 6","Template
7","Template 8"]
}
}
Response
Name Description
jobId Financial Consolidation and Close job ID
descriptiveStatus
details Any additional details
Status -1 = In progress; 0 = Success; 1 = Fail
items Not applicable for this job type
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Possible values: self
JSON Output
The following is an example of the response body in JSON format.
{
"jobId":100000000114040,
20-9
Chapter 20
Execute Supplemental Data Manager Job
"descriptiveStatus":",
"detail":"In Progress",
"status":-1,
"items":null,
"links":[
{
"rel":"self",
"href":"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v3/
applications/FCCS/fcmjobs/100000000114040",
"action":"GET"
}
]
}
REST Resource
POST /HyperionPlanning/rest/sdm/{api_version}/jobs
Required Roles
Request
Supported Media Types: application/json
Parameters
This table summarizes the request parameters that are generic to all jobs. The following tables
describe parameters specific to individual rules.
20-10
Chapter 20
Execute Supplemental Data Manager Job
{
"jobType": "SDM_IMPORT_DIM_MEMBERS",
"parameters": {
"DimensionName": "Control",
"FileName": "Control_Error.csv"
}
}
Example 2:
{
"jobType": "SDM_IMPORT_DIM_MEMBERS",
"parameters": {
"DimensionName": "Control",
"FileName": "Control_Error.csv",
"importMode": "Update",
"delimiter": ",",
"dateFormat": "MM-dd-yyyy"
}
}
Response
Supported Media Types: application/json
20-11
Chapter 20
Execute Supplemental Data Manager Job
Name Description
jobId Supplemental Data job identifier
descriptiveStatus Additional details about the status
details Message to the user. In cases where there are
errors, the error details are published.
status • -1: In Progress
• 0: Success
• 1: Failed
items Not applicable for this job type
links Detailed information about the link
rel Valid value: self
href Links to API call
action The HTTP call type
{
"jobId":15016,
"details": "In Process",
"status": -1,
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/sdm/v1/jobs/15016",
"action": "GET"
}
"error": null,
"items": [ ],
"type": EPM
}
20-12
21
Enterprise Journal REST APIs
Use the Enterprise Journal REST APIs to:
• Monitor Enterprise Journals for Financial Consolidation and Close
• Execute an Enterprise Journal job
• Retrieve Enterprise Journals for Financial Consolidation and Close
• Retrieve Enterprise Journal Content for Financial Consolidation and Close
• Retrieve Enterprise Journal Content by Year and Period for Financial Consolidation and
Close
• Update Enterprise Journal Posting Status for Financial Consolidation and Close
https://<BASE-URL>/HyperionPlanning/rest/ej/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for
Enterprise Journal is v1.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
21-1
Chapter 21
Monitor Enterprise Journals for Financial Consolidation and Close
Note:
• If all journals for given parameters are closed, then the output status would be '0'
and detail text specifies that all journals are closed.
• If any journal for the given parameters is in Open status (Pending, Open with
Preparer, Open with Approver etc.), then the output status would be '-1'.
• In case of error, a positive number will be returned in status.
REST Resource
POST /rest/ej/{api_version}/jobs/
Required Roles
Service Administrator and Power User
Request
Supported Media Types: application/json
21-2
Chapter 21
Monitor Enterprise Journals for Financial Consolidation and Close
Note:
Either the combination of Year and Period or the Filter Name must be passed. If Year
and Period can be part of filter, then Filter Name is sufficient in the parameters.
"jobType": "EJ_MONITOR_JOURNALS",
"parameters": {
"year": "2022",
"period": "Jan",
"filterName": "Jan22_ERPDirectJournals"
Response
Supported Media Types: application/json
Parameters:
Name Description
details Journal Name and Status. First 100 journals only. Shows Open journals
first. In case of errors, details are published with the error string.
status See Migration Status Codes
links Detailed information about the link
href Links to the API call
21-3
Chapter 21
Execute an Enterprise Journals Job
Name Description
action The HTTP call type
rel Relationship type (self, Job Status). if set to Job Status, you can
use the href to get the status of the operation
{
"status": 0,
"details": "All journals for the given filter are closed.",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>/
HyperionPlanning/rest/ej/{api_version}/jobs/rest/ej/v1/jobs/monitorJournals?
year=2022&period=Jan&filterName=ERP_Direct",
"action": "GET"
}
],
"type": "EPM",
}
The following is an example of the response body in JSON format when any journal status is
open:
{
"status": -1,
"details": "Journal_NonDirect1|2022|Jan|1000000001, Status:Open with
Preparer; \n
Journal_NonDirect1|2022|Jan|1000000002, Status:Closed",
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com
HyperionPlanning/rest/ej/{api_version}/jobs/monitorJournals?
year=2022&period=Jan&filterName=EJ_NonDirect ",
"action": "GET"
}
],
"type": "EPM",
}
21-4
Chapter 21
Execute an Enterprise Journals Job
REST Resource
POST /HyperionPlanning/rest/ej/{api_version}/jobs
Required Roles
21-5
Chapter 21
Execute an Enterprise Journals Job
Request
Supported Media Types: application/json
Parameters
This table summarizes the request parameters that are generic to all jobs. The following tables
describe parameters specific to individual rules.
21-6
Chapter 21
Execute an Enterprise Journals Job
21-7
Chapter 21
Execute an Enterprise Journals Job
21-8
Chapter 21
Execute an Enterprise Journals Job
{
"jobType" : "exportEJJournals",
"parameters": {
"Filename":"export.zip",
"Year":"2020"
"Period":"Jan"
"Operation":"validation"
}
}
Example 2:
{
"jobType" : "exportEJJournals",
"parameters": {
"Filename":"export.zip",
}
}
{
"jobType" : "setEJJournalStatus",
"parameters": {
"Filename":"JournalsStatus.csv",
"Operation":"validation"
21-9
Chapter 21
Execute an Enterprise Journals Job
}
}
{
"jobType" : "EJ_DEPLOY_TEMPLATES",
"parameters": {
"Year":"2020"
"Period":"July"
"Template": ["Template 1","Template 2"],
"ResetJournals":"true"
}
}
Example 2:
{
"jobType" : "EJ_DEPLOY_TEMPLATES",
"parameters": {
"Year":"2020"
"Period":"July"
"Template": ["Template 3"],
}
}
Example 3:
{
"jobType" : "EJ_DEPLOY_TEMPLATES",
"parameters": {
"Year":"2020"
"Period":"July"
"Template": ["Template 5","Template 6",
"Template 7", "Template 8"],
}
}
Example 4:
{
"jobType" : "EJ_DEPLOY_TEMPLATES",
"parameters": {
"Year":"2020"
"Period":"July"
"Template": [ ]
}
}
21-10
Chapter 21
Execute an Enterprise Journals Job
Example 1:
{
"jobType": "EJ_IMPORT_DIM_MEMBERS",
"parameters": {
"DimensionName": "Control",
"FileName": "Control_Error.csv"
}
}
Example 2:
{
"jobType": "EJ_IMPORT_DIM_MEMBERS",
"parameters": {
"DimensionName": "Control",
"FileName": "Control_Error.csv",
"importMode": "Update"",
"delimiter": ",",
"dateFormat": "MM-dd-yyyy"
}
}
Response
Supported Media Types: application/json
Name Description
jobId Enterprise Journals job identifier
descriptiveStatus Additional details about the status
details Message to the user. In cases where there are
errors, the error details are published.
status • -1: In Progress
• 0: Success
• 1: Failed
items Not applicable for this job type
links Detailed information about the link
rel Valid value: self
href Links to API call
action The HTTP call type
{
"jobId":14013,
"details": "In Process",
"status": -1,
"links": [
21-11
Chapter 21
Retrieve Enterprise Journals for Financial Consolidation and Close
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/ej/v1/jobs/14013",
"action": "GET"
}
"error": null,
"items": [ ],
"type": EPM
}
REST Resource
GET /HyperionPlanning/rest/ej/{api_version}/ejjournals
Required Roles
Service Administrator
GET /HyperionPlanning/rest/ej/{api_version}/ejjournals?
Year=2018&Period=Jan&PostingStatus=ReadyToPost&ValidationStatus=ReadyToValidat
e
Parameters
The following table summarizes the client request.
"Year", "Period", "PostStatus" and "ValidationStatus" are optional. If "Year" and "Period" are not
passed, journals from all year and period are listed.
By default, only ReadyToPost journals are listed, however you can provide any valid value for
the PostingStatus parameter to get corresponding journals.
If a valid value is provided for "ValidationStatus", journals are listed based on the provided
value.
21-12
Chapter 21
Retrieve Enterprise Journals for Financial Consolidation and Close
PostingStatus=ReadyToPost
Response
Supported Media Types: application/json
{
"items": [
{
"year": 2020
"period": "Jan",
"journalId": "100000001",
"instanceId": "100000000008821",
"link": {
"rel": "content",
""https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/
rest/ej/v1/ejjournals/100000000008821",
"action": "GET"
}
}
{
"year": 2020
"period": "Jan",
"journalId": "100000002",
"instanceId": "100000000008822",
"link": {
"rel": "content",
21-13
Chapter 21
Retrieve Enterprise Journal Content for Financial Consolidation and Close
"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/
rest/ej/v1/ejjournals/100000000008822",
"action": "GET"
}
}
],
"link": {
"rel": "self",
"https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/
rest/ej/v1/ejjournals",
"action": "GET"
}
"error": null,{
"type": "EPM"
}
REST Resource
GET /HyperionPlanning/rest/ej/{api_version}/ejjournals/{instanceId}
Required Roles
Service Administrator
GET /HyperionPlanning/rest/ej/v1/ejjournals/100000000008821
21-14
Chapter 21
Retrieve Enterprise Journal Content for Financial Consolidation and Close
{
"year": 2018
"period": "Jan",
"journalId": "100000001",
"instanceId": "100000000008821",
"items": [
{
"Status Code": "NEW",
"Ledger ID": "LNR 12000",
"Journal Source": "EPM_EJ",
"Journal Category": "Adjustment",
"Currency Code": "EUR",
"Segment 1": "100091",
"Entered Debit Amount": "19800.00",
"Entered Credit Amount": "0.00"
},
{
"Status Code": "NEW",
"Ledger ID": "LNR 12000",
"Journal Source": "EPM_EJ",
"Journal Category": "Adjustment",
"Currency Code": "EUR",
"Segment 1": "100092",
"Entered Debit Amount": "0.00",
"Entered Credit Amount": "19800.00"
},
{
"Status Code": "NEW",
"Ledger ID": "LNR 12000",
"Journal Source": "EPM_EJ",
"Journal Category": "Adjustment",
"Currency Code": "EUR",
"Segment 1": "100093",
"Entered Debit Amount": "34900.00",
"Entered Credit Amount": "0.00"
},
{
"Status Code": "NEW",
"Ledger ID": "LNR 12000",
"Journal Source": "EPM_EJ",
"Journal Category": "Adjustment",
"Currency Code": "EUR",
"Segment 1": "1000943",
"Entered Debit Amount": "0.00",
"Entered Credit Amount": "34900.00"
}
],
"links": [
{
"rel": "self",
"href": "https://<BASE-URL>/HyperionPlanning/rest/ej/v1/ejjournals/
21-15
Chapter 21
Retrieve Enterprise Journal Content by Year and Period for Financial Consolidation and Close
100000000008821",
"action": "GET"
},
{
"rel": "update_posting_status",
"href": "https://<BASE-URL>/HyperionPlanning/rest/ej/v1/ejjournals/
100000000008821
/poststatus",
"action": "POST"
}
{
"rel": "update_validation_status",
"href": "https://<BASE-URL>/HyperionPlanning/rest/ej/v1/ejjournals/
100000000008821/validationstatus",
"action": "POST"
}
],
"error": null,
"type": "EPM"
}
REST Resource
GET /HyperionPlanning/rest/ej/{api_version}/ejjournalcontent?
Year={year}&Period={period}&JournalId={journalId}
Required Roles
Service Administrator
GET /HyperionPlanning/rest/ej/v1/ejjournalcontent?
Year=2018&Period=Jan&JournalId=100000001
21-16
Chapter 21
Retrieve Enterprise Journal Content by Year and Period for Financial Consolidation and Close
{
"year": 2018
"period": "Jan",
"journalId": "100000001",
"instanceId": "100000000008821",
"items": [
{
"Status Code": "NEW",
"Ledger ID": "LNR 12000",
"Journal Source": "EPM_EJ",
"Journal Category": "Adjustment",
"Currency Code": "EUR",
"Segment 1": "100091",
"Entered Debit Amount": "19800.00",
"Entered Credit Amount": "0.00"
},
{
"Status Code": "NEW",
"Ledger ID": "LNR 12000",
"Journal Source": "EPM_EJ",
"Journal Category": "Adjustment",
"Currency Code": "EUR",
"Segment 1": "100092",
"Entered Debit Amount": "0.00",
"Entered Credit Amount": "19800.00"
},
{
"Status Code": "NEW",
"Ledger ID": "LNR 12000",
"Journal Source": "EPM_EJ",
"Journal Category": "Adjustment",
"Currency Code": "EUR",
"Segment 1": "100093",
"Entered Debit Amount": "34900.00",
"Entered Credit Amount": "0.00"
},
{
21-17
Chapter 21
Update Enterprise Journal Posting Status for Financial Consolidation and Close
REST Resource
POST /HyperionPlanning/rest/ej/{api_version}/ejjournals/{instanceId}/
poststatus
Required Roles
Service Administrator
POST /HyperionPlanning/rest/ej/v1/ejjournals/100000000008821/Posted
21-18
Chapter 21
Update Enterprise Journal Posting Status for Financial Consolidation and Close
Note:
Only
"PostInProgres
s", "Failed" and
"Posted" are
supported for
status value.
{
"year": "2019",
"period": "Jan",
"journalId": "10000000012",
"status": "PostInProgress"
}
Example of an Error:
{
"year": "2019",
"period": "Jan",
"journalId": "100000001",
"status": "Failed",
"errorItems": [
{
"errorCode": "EF04",
21-19
Chapter 21
Update Validation Status of Enterprise Journals for Financial Consolidation and Close
{
"year": "2021",
"period": "Jan",
"journalId": "10000000003",
"status": "Posted",
"journalBatch": "111720201001-LNR11432"
}
Response
{
"detail": "Journal 2021 Jan 10000000001 is not in 'Post In Progress' or
'Ready to Post' status.",
"status": 400,
"message": "oracle.apps.epm.sdm.model.common.SDMModelException: Journal 2021
Jan 10000000001 is not in 'Post In Progress' or 'Ready to Post' status.",
"localizedMessage": "oracle.apps.epm.sdm.model.common.SDMModelException:
Journal 2021 Jan 10000000001 is not in 'Post In Progress' or 'Ready to Post'
status.",
"suppressed": []
}
Note:
The maximum character limit of the following fields are:
• journalBatch – 255 characters
• errorMessage – 255 characters
• errorCode – 20 characters
• entryId – 500 characters
21-20
Chapter 21
Update Validation Status of Enterprise Journals for Financial Consolidation and Close
must be updated as either "Valid" or "Failed". Error items are read only if validation status is
"Failed".
REST Resource
POST /HyperionPlanning/rest/ej/{api_version}/ejjournals/{identifier}/
validationstatus
Required Roles
Service Administrator
POST https://<BASE-URL>/HyperionPlanning/rest/ej/v1/ejjournals/
100000000008821/validationstatus
Note:
Only
"ValidationInProgr
ess", "Failed" and
"Valid" are
supported for
status value.
Note:
Errors are updated
only if status is
"Failed".
21-21
Chapter 21
Update Validation Status of Enterprise Journals for Financial Consolidation and Close
{
"status": "ValidationInProgress",
"message":"Validation initiated"
}
Example of an Error:
{
"status": "Failed",
"message":"Validation failed"
"errorItems": [
{
"errorCode": "EF04",
"errorMessage": "The account combination is invalid.",
"entryId": "Journal Ent 1"
},
{
"errorCode ": "EU07",
"errorMessage ": "Accounting period is not open for the ledger.",
"entryId ": "Journal Ent 2"
}
]
}
{
"items": [
"Journal validation status updated successfully."
],
"links": [
{
"rel": "self",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/
rest/ej/v1/ejjournals/100000000006929/validationstatus",
"action": "POST"
}
]
}
21-22
22
Tax Reporting REST APIs
Use the Tax Reporting REST APIs to get the REST API version, to import supplementation
data, copy data, clear data, and deploy form templates.
https://<BASE-URL>/HyperionPlanning/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• api_version: API version you are developing with. The current REST API version for Tax
Reporting is v3.
• path: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
REST Resource
GET /HyperionPlanning/rest/{api_version}
Required Roles
Service Administrator, Power User, User, Viewer
22-1
Chapter 22
Copy Data
Request
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
api_version Version of the API you are developing with,
such as V1
Response
Supported Media Types: application/json
Parameters
The following table summarizes the parameters.
Name Description
version The version, such as V3
{
"version": "v1",
"lifecycle": "active",
"isLatest": true,
"links": [{
"rel": "canonical",
"href": "https://https://<BASE-URL>/HyperionPlanning/rest/v2"
}, {
"rel": "predecessor-version",
"href": "https://<SERVICE_NAME>-
<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/HyperionPlanning/rest/v1"
}]
}
Copy Data
This REST API is used to execute a Copy Data job using the job name. Before executing this
job, you should create a Copy Data job in Tax Reporting.
For details on this task, see "Using Copy Data Job" in Administering Tax Reporting
This REST API returns the job ID after starting the Copy Data job.
22-2
Chapter 22
Copy Data
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
{
"jobType": "COPY_DATA",
"jobName": "Execute Profile",
"parameters": {
"ProfileName": "CopyJobTesting"
}
}
Response Body
Supported Media Types: application/json
Name Description
type Tax Reporting Application type, for example,
TRCS
status Status of the job: -1 =In progress; 0 = Success; 1
= Fail
details In case of errors, details are published with the
error string.
descriptiveStatus The status of the job, such as Completed or
Error
items Collection of Notification categories
links Detailed information about the link
22-3
Chapter 22
Clear Data
Name Description
href Links to API call
action The HTTP call type
rel Relationship type. Possible values: self
{
"jobId": 45,
"jobName": "Copy Data",
"descriptiveStatus": "Processing",
"details": null,
"status": -1,
"links": [
{
"href": "https://https://<BASE-URL>/HyperionPlanning/rest/v3/
applications/<applicationName>/jobs/<JobId>",
"rel": "self",
"action": "GET"
},
{
"href": "https://https://<BASE-URL>/HyperionPlanning/rest/v3/
applications/<applicationName>/jobs/<JobId>/details",
"rel": "job-details",
"action": "GET"
}
]
}
Clear Data
This REST API is used to execute a Clear Data job using the profile name. Before executing
this job, you should create a Clear Data job in Tax Reporting.
For details on this task, see "Using Clear Data Jobs" in Administering Tax Reporting
This REST API returns the job ID after starting the job.
REST Resource
POST /HyperionPlanning/rest/{api_version}/applications/{application}/jobs
Required Roles
Service Administrator
Request
Supported Media Types: application/json
22-4
Chapter 22
Clear Data
Parameters
The following table summarizes the client request parameters specific to this job.
{
"jobType": "CLEAR_DATA",
"jobName": "Execute Profile",
"parameters": {
"ProfileName": "ClearJobTesting"
}
}
Response Body
Supported Media Types: application/json
Name Description
type Tax Reporting Application type, for example, TRCS
status Status of the job: -1 =In progress; 0 = Success; 1 = Fail
details In case of errors, details are published with the error string.
descriptiveStatus The status of the job, such as Completed or Error
items Collection of Notification categories
links Detailed information about the link
22-5
Chapter 22
Clear Data
Name Description
href Links to API call
action The HTTP call type
rel Relationship type. Possible values: self
{
"jobId": 46,
"jobName": "Clear Data",
"descriptiveStatus": "Processing",
"details": null,
"status": -1,
"links": [
{
"href": "https://https://<BASE-URL>/HyperionPlanning/rest/v3/
applications/<applicationName>/jobs/<JobId>",
"rel": "self",
"action": "GET"
},
{
"href":"https://https://<BASE-URL>/HyperionPlanning/rest/v3/
applications/<applicationName>/jobs/<JobId>/details",
"rel": "job-details",
"action": "GET"
}
]
}
22-6
23
Enterprise Profitability and Cost Management
REST APIs
Related Topics
• URL Structure for Enterprise Profitability and Cost Management
• Getting API Versions for Enterprise Profitability and Cost Management
• Getting Information About a Specific REST API Version for Enterprise Profitability and Cost
Management
https://<BASE-URL>/HyperionPlanning/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• {api_version}: API version you are developing with. The current REST API version for
Enterprise Profitability and Cost Management is v3.
• {path}: Identifies the resource.
23-1
Chapter 23
Getting API Versions for Enterprise Profitability and Cost Management
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
Before using the REST resources, you must understand how to access the REST resources
and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs.
Using REST APIs requires prerequisites. See Prerequisites.
There are two sets of REST APIs relevant for Enterprise Profitability and Cost Management.
• Planning REST APIs (See Getting API Versions for Planning).
• Enterprise Profitability and Cost Management-specific REST APIs. (See Getting
Information About a Specific REST API Version for Enterprise Profitability and Cost
Management).
REST Resource
GET /HyperionPlanning/rest/{api_version}
Request
Supported Media Types: application/json
Parameters
The following table summarizes the client request.
23-2
Chapter 23
Calculate Model
Response Body
Supported Media Types: application/json
Attribute Description
version v3
lifecycle Lifecycle of the resource, active or deprecated
isLatest Whether this resource is the latest, true or false
{
"version": "v3",
"lifecycle": "active",
"isLatest": true,
"links": [{
"rel": "canonical",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3"
}, {
"rel": "predecessor-version",
"href": "https://<BASE-URL>/HyperionPlanning/rest/v2"
}]
}
Calculate Model
Runs the calculation on a given point of view in a selected cube. This API supports batch
calculation with multiple POVs.
This is an asynchronous call, so use the job status URI to determine whether the operation is
complete.
This API is version v3.
Required Roles
Service Administrators
23-3
Chapter 23
Calculate Model
REST Resource
POST /HyperionPlanning/rest/v3/applications/{AppName}/jobs/
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
23-4
Chapter 23
Calculate Model
Sample Payload
{
"jobType":"Calculation",
"jobName":"Calculation",
"parameters":{
"povDelimiter":":",
23-5
Chapter 23
Calculate Model
"povName":"FY21:Jan:Actual:Working",,
"modelName":"10 Actuals Allocation Process",
"executionType":"ALL_RULES",
"rulesetSeqNumStart":"1",
"rulesetSeqNumEnd":"1",
"clearCalculatedData":"true",
"executeCalculations":"true",
"optimizeForReporting":"true",
"captureDebugScripts":"false"
}
}
Response
Supported Media Types: application/json
Name Description
jobId ID of the job that is created
jobName Name of the job
details In case of errors, details are published with the error string
status See Migration Status Codes.
links Detailed information about the link
href Links to the API call
action HTTP call type
rel Can be self and/or Job-details. If set to Job Status, you can use the href
to get the status of the job.
data Parameters as key value pairs passed in the request
{
"jobId": 26,
"jobName": "Calculation",
"status": -1,
"descriptiveStatus": "Processing",
"details": null,
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26",
"action": "GET",
"rel": "self",
},
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26/details",
",
23-6
Chapter 23
Clear Data By Point of View
"action": "GET",
"rel": "job-details "
}
]
}
{
"jobId": 26,
"jobName": "Calculation",
"status": 0,
"descriptiveStatus": "Success",
"details": null
"links": [
{
"rel": "self"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26",
"action": "GET",
},
{
"rel": "job-details"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26/details",
"action": "GET",
}
]
}
Required Roles
Service Administrators
REST Resource
POST /HyperionPlanning/rest/v3/applications/{AppName}/jobs/
23-7
Chapter 23
Clear Data By Point of View
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
23-8
Chapter 23
Clear Data By Point of View
Sample Payload
{
"jobType":"Clear POV",
"jobName":"Clear POV",
"parameters":{
"povDelimiter":":",
"povName":"FY21:Jan:Actual:Working",
"cubeName":"PCM_CLC",
"clearInput":"true",
"clearAllocatedValues":"true",
"clearAdjustmentValues":"true"
}
}
Response
Supported Media Types: application/json
Name Description
jobId ID of the job that is created
jobName Name of the job
details In case of errors, details are published with the error string
status See Migration Status Codes.
links Detailed information about the link
href Links to the API call
action HTTP call type
rel Can be self and/or Job-details. If set to Job Status, you can use the href
to get the status of the job.
data Parameters as key value pairs passed in the request
{
"jobId": 26,
"jobName": "Clear POV",
"status": -1,
"descriptiveStatus": "Processing",
"details": null,
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26",
"action": "GET",
"rel": "self",
},
{
23-9
Chapter 23
Copy Data by Point of View
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26/details",
",
"action": "GET",
"rel": "job-details "
}
]
}
{
"jobId": 26,
"jobName": " Copy POV",
"status": 0,
"descriptiveStatus": "Success",
"details": null
"links": [
{
"rel": "self"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26",
"action": "GET",
},
{
"rel": "job-details"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26/details",
"action": "GET",
}
Required Roles
Service Administrators
REST Resource
POST /HyperionPlanning/rest/v3/applications/{AppName}/jobs/
23-10
Chapter 23
Copy Data by Point of View
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
23-11
Chapter 23
Copy Data by Point of View
Sample Payload
{
"jobType":"Copy POV",
"jobName":"Copy POV",
"parameters":{
"povDelimiter":":",
"sourcePOVName":"FY21:Jan:Actual:Working",
"destPOVName":"FY21:Feb:Actual:Working",
"sourceCubeName":"PCM_CLC",
"destCubeName":"PCM_CLC",
"createDestPOV":"true",
"copyType":"ALL_DATA"
}
}
Response
Supported Media Types: application/json
Name Description
jobId ID of the job that is created
jobName Name of the job
details In case of errors, details are published with the error string
status See Migration Status Codes.
links Detailed information about the link
href Links to the API call
action HTTP call type
rel Can be self and/or Job-details. If set to Job Status, you can use the href
to get the status of the job.
data Parameters as key value pairs passed in the request
{
"jobId": 26,
"jobName": "Copy POV",
"status": -1,
23-12
Chapter 23
Delete Point of View
"descriptiveStatus": "Processing",
"details": null,
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26",
"action": "GET",
"rel": "self",
},
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26/details",
",
"action": "GET",
"rel": "job-details "
}
]
}
{
"jobId": 26,
"jobName": " Copy POV",
"status": 0,
"descriptiveStatus": "Success",
"details": null
"links": [
{
"rel": "self"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26",
"action": "GET",
},
{
"rel": "job-details"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26/details",
"action": "GET",
}
Required Roles
Service Administrators
23-13
Chapter 23
Delete Point of View
REST Resource
POST /HyperionPlanning/rest/v3/applications/{AppName}/jobs/
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
Sample Payload
{
"jobType":"Delete POV",
"jobName":"Delete POV",
"parameters":{
23-14
Chapter 23
Delete Point of View
"povDelimiter":":",
"povName":"FY21:Jan:Actual:Working"
}
}
Response
Supported Media Types: application/json
Name Description
jobId ID of the job that is created
jobName Name of the job
details In case of errors, details are published with the error string
status See Migration Status Codes.
links Detailed information about the link
href Links to the API call
action HTTP call type
rel Can be self and/or Job-details. If set to Job Status, you can use the href
to get the status of the job.
data Parameters as key value pairs passed in the request
{
"jobId": 26,
"jobName": "Delete POV",
"status": -1,
"descriptiveStatus": "Processing",
"details": null,
"links": [
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26",
"action": "GET",
"rel": "self",
},
{
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/26/details",
",
"action": "GET",
"rel": "job-details "
}
]
}
23-15
Chapter 23
Generate Model Documentation Report
{
"jobId": 26,
"jobName": " Delete POV",
"status": 0,
"descriptiveStatus": "Success",
"details": null
"links": [
{
"rel": "self"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26",
"action": "GET",
},
{
"rel": "job-details"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26/details",
"action": "GET",
}
]
}
Required Roles
Service Administrators
REST Resource
POST /HyperionPlanning/rest/v3/applications/{AppName}/jobs/
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
23-16
Chapter 23
Generate Model Documentation Report
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
Sample Payload
{
"jobType":"Generate EPCM Report",
"jobName":"Model Documentation Report for 10 Actuals Allocation Process",
"parameters":{
"reportName":"MODEL_DOC",
"outputFileName":"My_Model_Doc_Report_Output",
"outputType":"PDF",
"modelName":"10 Actuals Allocation Process"
}
}
Response
Supported Media Types: application/json
Name Description
jobId ID of the job that is created
jobName Name of the job
details In case of errors, details are published with the error string
status See Migration Status Codes.
links Detailed information about the link
href Links to the API call
23-17
Chapter 23
Generate Model Documentation Report
Name Description
action HTTP call type
rel Can be self and/or Job-details. If set to Job Status, you can use the href
to get the status of the job.
data Parameters as key value pairs passed in the request
{
"jobId": 26,
"jobName": "Generate Report",
"status": -1,
"descriptiveStatus": "Processing",
"details": null,
"links": [
{
"rel": "self",
"href":https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/6,
"action": "GET"
},
{
"rel": "job-details",
"href":https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/6/details,
"action": "GET"
}
]
}
{
"jobId": 26,
"jobName": "Generate Report",
"status": 0,
"descriptiveStatus": "Success",
"details": null
"links": [
{
"rel": "self",
"href":https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/6,
"action": "GET"
},
{
"rel": "job-details",
23-18
Chapter 23
Validate Model
"href":https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
BksML40/jobs/6/details,
"action": "GET"
}
],
}
Validate Model
Automates the calculation process for validating a model.
This is an asynchronous call, so use the job status URI to determine whether the operation is
complete.
Any validation failures are written to file with file name provided in the parameters, and can be
accessed from Inbox/Outbox Explorer.
This API is version v3.
Required Roles
Service Administrators
REST Resource
POST /HyperionPlanning/rest/v3/applications/{AppName}/jobs/
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
The following table summarizes the client request parameters specific to this job.
23-19
Chapter 23
Validate Model
Sample Payload
{
"jobType":"Validate Model",
"jobName":"Validate Model",
"parameters":{
"modelName":"10 Actuals Allocation Process",
"fileName":"DISABLED_results4.txt"
"ruleStatus":"DISABLED"
}
}
Response
Supported Media Types: application/json
Name Description
jobId ID of the job that is created
jobName Name of the job
details In case of errors, details are published with the error string
status See Migration Status Codes.
links Detailed information about the link
href Links to the API call
action HTTP call type
rel Can be self and/or Job-details. If set to Job Status, you can use the href
to get the status of the job.
data Parameters as key value pairs passed in the request
{
"jobId": 26,
23-20
Chapter 23
Validate Model
{
"jobId": 26,
"jobName": "validate Model",
"status": 0,
"descriptiveStatus": "Success",
"details": null
"links": [
{
"rel": "self"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26",
"action": "GET",
},
{
"rel": "job-details"
"href": "https://<BASE-URL>/HyperionPlanning/rest/v3/applications/
jobs/26/details",
"action": "GET",
}
]
}
23-21
24
Profitability and Cost Management REST APIs
Related Topics
• URL Structure for Profitability and Cost Management
• Get API Versions for Profitability and Cost Management REST APIs
• Get Information about a Specific API Version for Profitability and Cost Management
24-1
Chapter 24
URL Structure for Profitability and Cost Management
https://<BASE-URL>/epm/rest/{api_version}/{path}
Where:
• <BASE-URL>: The first part of your service URL, before the context.
For example, if your service URL is https://epm-acme.epm.us-
phoenix-1.ocs.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm-
acme.epm.us-phoenix-1.ocs.oraclecloud.com. Similarly, if your service URL is https://
epm2-acme.epm.us6.oraclecloud.com/epmcloud, your <BASE-URL> is https://epm2-
acme.epm.us6.oraclecloud.com.
• {api_version}: API version you are developing with. The current REST API version for
Profitability and Cost Management is V1.
• {path}: Identifies the resource.
Note:
Oracle does not authorize or support the use of REST APIs with the path token "/
internal/" in the URL.
24-2
Chapter 24
Get API Versions for Profitability and Cost Management REST APIs
Note:
An API version is always supported even when deprecated.
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
GET /epm/rest/
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
items Version of the API you are developing with
version The version, such as v1
lifecycle Possible values: active, deprecated
isLatest Whether this resource is the latest, true or false
{
"items": [{
"isLatest": false,
"lifecycle": "deprecated",
"version": "11.1.2.4.000",
"links": [{
"href": "https://<BASE-URL>>/epm/rest/11.1.2.4.000",
"rel": "canonical"
}, {
"href": "https://<BASE-URL>>/epm/rest/v1",
"rel": "successor-version"
}]
}, {
24-3
Chapter 24
Get API Versions for Profitability and Cost Management REST APIs
"isLatest": true,
"lifecycle": "active",
"version": "v1",
"links": [{
"href": "https://<BASE-URL>>/epm/rest/v1",
"rel": "canonical"
}, {
"href": "https://<BASE-URL>>/epm/rest/11.1.2.4.000",
"rel": "predecessor-version"
}]
}],
"links": [{
"href": "https://<BASE-URL>>/epm/rest/11.1.2.4.000",
"rel": "canonical"
}, {
"href": "https://<BASE-URL>>/epm/rest/v1",
"rel": "current"
}]
}
funcGetRestAPIVersionInfo()
{
url=$SERVER_URL/epm/rest/$API_VERSION
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
status=$?
echo "status code :$status"
output='cat response.txt'
if [ $status == 200 ]; then
echo "Version $API_VERSION details :"
count='echo $output | jq '.links | length''
i=0
while [ $i -lt $count ]; do
echo "Service : " 'echo $output | jq '.links['$i'].rel''
echo "URL :" 'echo $output | jq '.links['$i'].href''
echo "Action :" 'echo $output | jq '.links['$i'].action''
24-4
Chapter 24
Get Information about a Specific API Version for Profitability and Cost Management
echo ""
i='expr $i + 1'
done
else
error='echo $output'
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def getRestAPIVersionsInfo() {
def url;
def response;
try {
url = new URL(serverUrl + "/epm/rest");
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
response = executeRequest(url, "GET", null, "application/json");
def object = new JsonSlurper().parseText(response)
if(object != null) {
def items = object.items
println "Rest API Versions Info : " + items
} else {
println "Error occurred while fetching rest api
versions details"
}
}
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
GET /epm/rest/
24-5
Chapter 24
Get Information about a Specific API Version for Profitability and Cost Management
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
Name Description
version The version, such as v1
lifecycle Possible values: active, deprecated
isLatest Whether this resource is the latest, true or false
{
"items": [{
"version": "v1",
"lifecycle": "active",
"isLatest": true,
"links": [{
"rel": "canonical",
"href": "https://<BASE-URL>>/epm/rest/v1",
}, {
"rel": "predecessor-version",
"href": "https://<BASE-URL>/epm/rest/v1",
}]
}],
"links": [{
"rel": "current",
"href": "https://<BASE-URL>/epm/rest/v1"
24-6
Chapter 24
Apply Data Grants
}]
}
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/applications/{application}/jobs/applyDataGrants
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Example URL
https://<BASE-URL>/epm/rest/v1/applications/BksML30/jobs/applyDataGrants
Response
Supported Media Types: application/json
Name Description
details Task ID, such as
BksML12_BksML12_LoadData_D20160118T051020_ba8_1
24-7
Chapter 24
Apply Data Grants
Name Description
status See Migration Status Codes
statusMessage Message about the status, such as Success
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_ApplyDataGrants_D20220511T114653_b85",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_ApplyDataGrants_D20220511T114653_b85",
"action":"GET",
"rel":"Job Status"
}
]
}
24-8
Chapter 24
Copy ML POV Data
funcApplyDataGrants() {
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/jobs/
applyDataGrants
funcExecuteRequest "POST" $url "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Data Grants successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
def applyDataGrants() {
String urlString = serverUrl + "/epm/rest/"+ apiVersion + "/
applications/" + appName +"/jobs/applyDataGrants";
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
Required Roles
Service Administrator, Power User
24-9
Chapter 24
Copy ML POV Data
REST Resource
POST /epm/rest/{api_version}/applications/{application}/povs/
{srcPOVMemberGroup}/jobs/copyPOVJob/{destPOVMemberGroup}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-10
Chapter 24
Copy ML POV Data
https://<BASE-URL>/epm/rest/v1/applications/LM1T2/povs/2014_January_Actual/jobs/
copyPOVJob/2014_March_Actual
{"isManageRule":"true","isInputData":"true","modelViewName":"Operating
Expenses","createDestPOV":"true","nonEmptyTupleEnabled":"true","stringDelimiter":
"_"}
Response
Supported Media Types: application/json
Name Description
details Task ID, such as
LM1T2_LM1T2_CopyMLPOV_D20160113T065943_75b_1
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_CopyMLPOV_D20220511T114800_7ad",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_CopyMLPOV_D20220511T114800_7ad",
"action":"GET",
"rel":"Job Status"
}
]
}
24-11
Chapter 24
Copy ML POV Data
funcCopyPOVData() {
stringDelimiter="_"; modelViewName="Operating Expenses";
destPovGroupMember="2014_December_Actual";
param="{\"isManageRule\":\"true\",\"isInputData\":\"true\",\modelViewName\":\"
$modelViewName\",\"createDestPOV\":\"true\",\"stringDelimiter\":\"$stringDelim
iter\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/
povs/$POV_GROUP_MEMBER/jobs/copyPOVJob/$destPovGroupMember
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Copying POV successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
24-12
Chapter 24
Create File-Based Application
json.put("isManageRule", true);
json.put("isInputData", true);
json.put("modelViewName", modelViewName);
json.put("createDestPOV", true);
json.put("stringDelimiter", "_");
Required Roles
Service Administrator
REST Resource
POST /epm/rest/{api_version}/fileApplications/{application}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-13
Chapter 24
Create File-Based Application
https://<BASE-URL>/epm/rest/v1/fileApplications/BksML12
{"description":
"description","ruleDimensionName":"Rule","balanceDimensionName":"Balance"}
Response
Supported Media Types: application/json
Name Description
details Task ID, such as
BksML12_BksML12_LoadData_D20160118T051020_ba8_1
status See Migration Status Codes
statusMessage Message about the status, such as Success
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_UpdateDimensions_D20220513T062046_c61",
"links":[
{
"href":"https://<<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_UpdateDimensions_D20220513T062046_c61",
"action":"GET",
"rel":"Job Status"
}
]
}
24-14
Chapter 24
Create File-Based Application
json.put("ruleDimensionName", "Rule");
json.put("balanceDimensionName", "Balance");
if(resStatus == 0) {
System.out.println("Application created successfully");
} else {
System.out.println("Application creation failed");
}
}
funcCreateFlatFileApplication() {
description="Flat file based application";
ruleDimensionName="Rule"
balanceDimensionName="Balance"
param="{\"description\":\"$description\",\"ruleDimensionName\":\"$ruleDimensio
nName\",\"balanceDimensionName\":\"$balanceDimensionName\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/fileApplications/BksML13
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Application created successfully"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def createFlatFileApplication() {
24-15
Chapter 24
Deploy ML Cube
json.put("balanceDimensionName", "Balance");
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
if(resStatus == 0) {
println "Application created successfully"
} else {
println "Application creation failed"
}
}
Deploy ML Cube
Deploys or redeploys the calculation cube for a selected Profitability and Cost Management
application.
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/applications/{application}/jobs/ledgerDeployCubeJob
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-16
Chapter 24
Deploy ML Cube
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_DeployCube_D20220511T114550_da1",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_DeployCube_D20220511T114550_da1",
24-17
Chapter 24
Deploy ML Cube
"action":"GET",
"rel":"Job Status"
}
]
}
funcDeployCube() {
comment="Cube deployment Curl"
param="{\"isKeepData\":\"false\",\"isReplaceCube\":\"true\",\"isRunNow\":\"tru
e\",\"comment\":\"$comment\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/jobs/
ledgerDeployCubeJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Deploying Cube successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
24-18
Chapter 24
Enable File-Based Application
def deployCube() {
def url;
def response;
try {
url = new URL(serverUrl + "/epm/rest/" + apiVersion + "/
applications/" + appName + "/jobs/ledgerDeployCubeJob")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/fileApplications/{application}/enableApplication
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-19
Chapter 24
Enable File-Based Application
Example URL
https://<BASE-URL>/epm/rest/v1/fileApplications/BksML12/enableApplication
Response
Supported Media Types: application/json
Name Description
details Task ID, such as
BksMl12_BksMl12_EnableApplication_D20160113T075011_53c_1
status See Migration Status Codes
statusMessage Message about the status, such as Success
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_EnableApplication_D20220511T114947_65c",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_EnableApplication_D20220511T114947_65c",
"action":"GET",
"rel":"Job Status"
}
]
}
24-20
Chapter 24
Enable File-Based Application
Common Functions: See Profitability and Cost Management Common Helper Functions for
Java
funcEnableApplication() {
url=$SERVER_URL/epm/rest/$API_VERSION/fileApplications/$APP_NAME/
enableApplication
funcExecuteRequest "POST" $url "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Enabling Application successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def enableApplication() {
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url, "POST", null);
}
24-21
Chapter 24
Essbase Data Load for Profitability and Cost Management
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/applications/{application}/jobs/essbaseDataLoadJob
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
24-22
Chapter 24
Essbase Data Load for Profitability and Cost Management
Name Description
details Task ID, such as
BksML12_BksML12_LoadData_D20160118T051020_ba8_1
status See Migration Status Codes
statusMessage Message about the status, such as Success
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_LoadData_D20220511T114654_8bf",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_LoadData_D20220511T114654_8bf",
"action":"GET",
"rel":"Job Status"
}
]
}
24-23
Chapter 24
Essbase Data Load for Profitability and Cost Management
funcLoadData() {
dataLoadValue="ADD_EXISTING_VALUES"
dataFileName="BksML12C.txt"
param="{\"clearAllDataFlag\":\"false\",\"dataLoadValue\":\"$dataLoadValue\",\"
dataFileName\":\"$dataFileName\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/jobs/
essbaseDataLoadJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Loading Data successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def loadData() {
def url;
def response;
try {
url = new URL(serverUrl + "/epm/rest/" + apiVersion + "/
applications/" + appName + "/jobs/essbaseDataLoadJob")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url, "POST", json.toString());
}
24-24
Chapter 24
Export Query Results
Required Roles
Service Administrator, Power User, User, Viewer
REST Resource
POST /epm/rest/{api_version}/applications/{application}/jobs/
exportQueryResultsJob
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-25
Chapter 24
Export Query Results
Response
Supported Media Types: application/json
Name Description
details Task ID, such as
BksML12_BksML12_ExportQueryResults_D20160323T024820_f73_
1
24-26
Chapter 24
Export Query Results
Name Description
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_ExportQueryResults_D20220511T114843_935",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_ExportQueryResults_D20220511T114843_935",
"action":"GET",
"rel":"Job Status"
}
]
}
24-27
Chapter 24
Export Query Results
funcExportQueryResult() {
queryName="Profitability - Product";
fileName=$APP_NAME+"_"+$queryName+"_Query_Result"
param="{\"queryName\":\"$queryName\",\"fileName\":\"$fileName\",\"exportOnlyLe
vel0Flg\":\"false\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/jobs/
exportQueryResultsJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Exporting successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def exportQueryResult() {
String queryName = "Profitability - Product";
String fileName = appName +"_"+ queryName + "_Query_Result";
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url, "POST", json.toString());
}
24-28
Chapter 24
Export Template for Profitability and Cost Management
Required Roles
Service Administrator, Power User
REST Resource
POST/epm/rest/{api_version}/applications/{application}/jobs/templateExportJob?
fileName={fileName}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Note:
If the file name is the same as an existing file name, this will override content in
existing file.
Response
Supported Media Types: application/json
24-29
Chapter 24
Export Template for Profitability and Cost Management
Name Description
details Task ID, such as
BksML30_ExportTemplate_D20180201T210316_a80
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_ExportTemplate_D20220511T114738_16e",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_ExportTemplate_D20220511T114738_16e",
"action":"GET",
"rel":"Job Status"
}
]
}
24-30
Chapter 24
Export Template for Profitability and Cost Management
}
cURL Sample – ExportTemplate.sh for Profitability and Cost Management
Common Functions: See Profitability and Cost Management Common Helper Functions for
cURL.
funcExportTemplate() {
fileName=$APP_NAME+"_Template_Export_File"
param="{\"fileName\":\"$fileName\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/jobs/
templateExportJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Exporting successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def exportTemplate() {
String fileName = appName + "_Template_Export_File";
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url, "POST", json.toString());
}
24-31
Chapter 24
Generate Program Documentation Report
Required Roles
Service Administrator, Power User, User, or Viewer
REST Resource
GET epm/rest/{api_version}/applications/{application}/povs/{POV}/
programDocumentationReport
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-32
Chapter 24
Generate Program Documentation Report
Example URL with fileType set to PDF and useAlias set to true:
https://<BASE-URL>/epm/rest/v1/applications/BksML30/povs/2016_January_Actual/
programDocumentationReport?queryParameter={"fileType":"PDF","useAlias":"true"}
Response
Supported Media Types: application/json
Name Description
details Program Documentation report name, such as
HPCMMLProgramDocumentationReport_BksML30_2016_January_Ac
tual.pdf, and report status
status See Migration Status Codes
statusMessage Message about the status, such as Success
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":0,
"statusMessage":"Success",
"details":"Program Documentation report
HPCMMLProgramDocumentationReport_BksML30_2016_January_Actual.pdf generated
successfully in the Outbox folder."
}
24-33
Chapter 24
Generate Program Documentation Report
if(resStatus == 0) {
System.out.println("Program Documentation Report Generated
Successfully");
}
String details = jsonObj.getString("details");
System.out.println(details);
funcGeneratePrgDocReport() {
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/
povs/$POV_GROUP_MEMBER1/programDocumentationReport
echo $url
curl -G "$url" --data-urlencode
'queryParameter={"fileType":"PDF","stringDelimter":"_","useAlias":"false"}' -
u "$USERNAME:$PASSWORD" -o "response.txt" -D "respHeader.txt"
output=`cat response.txt`
status=`echo $output | jq '.status'`
echo $status
if [ $status == 0 ]; then
echo "Program Documentation Report generated successfully"
message=`echo $output | jq '.details'`
echo $message
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
def generateProgramDocReportJob() {
JSONObject json = new JSONObject();
json.put("fileName", "2016JanActual.pdf");
24-34
Chapter 24
Generate Program Documentation Report - Run as a Job
json.put("fileType", "PDF");
json.put("useAlias", false);
json.put("stringDelimter", "_");
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url, "POST", json.toString());
}
Required Roles
Service Administrator, Power User, User, or Viewer
REST Resource
POST
/epm/rest/{api_version}/applications/<applicationName>/povs/<povName>/jobs/
programDocReportJob
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-35
Chapter 24
Generate Program Documentation Report - Run as a Job
Example URL
https://<BASE-URL>/rest/v1/applications/<applicationName>/povs/<povName>/jobs/
programDocReportJob
Request Payload
{
"fileName":"FY12ActualReport.pdf",
"fileType": "PDF",
"subsetStart":"1",
"subsetEnd":"6",
"useAlias": false,
"stringDelimiter":"_"
}
Response
Supported Media Types: application/json
24-36
Chapter 24
Generate Program Documentation Report - Run as a Job
Name Description
details Program Documentation report name, such as
HPCMMLProgramDocumentationReport_BksML30_2016_January_Ac
tual.pdf, and report status
status See Migration Status Codes
statusMessage Message about the status, such as Success
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"Program Documentation report 2016JanActual1.pdf generated
successfully in the Outbox folder.",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_ProgramDocumentation_D20220511T115113_52a",
"action":"GET",
"rel":"Job Status"
}
]
}
24-37
Chapter 24
Generate Program Documentation Report - Run as a Job
funcProgramDocReportJob() {
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/
povs/$POV_GROUP_MEMBER1/jobs/programDocReportJob
stringDelimter="_";
param="{\"fileName\":\"2016JanActual.pdf\",\"fileType\":\"PDF\",\"subsetStart\
":\"1\",\"subsetEnd\":\"6\",
\"useAlias\":\"false\",\"stringDelimter\":\"$stringDelimiter\"}"
echo $param
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started program doc report generation"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def generateProgramDocReportJob() {
JSONObject json = new JSONObject();
json.put("fileName", "2016JanActual");
json.put("fileType", "PDF");
json.put("subsetStart", "1");
json.put("subsetEnd", "6");
json.put("useAlias", false);
json.put("stringDelimter", "_");
String urlString = serverUrl + "/epm/rest/"+ apiVersion +
"/applications/" + appName + "/povs/" +
povGroupMember.trim().replaceAll(" ", "%20") +
"/jobs/programDocReportJob";
def url;
24-38
Chapter 24
Import Template for Profitability and Cost Management
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url, "POST", json.toString());
}
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/applications/{application}/jobs/templateImportJob
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-39
Chapter 24
Import Template for Profitability and Cost Management
Response
Supported Media Types: application/json
Name Description
details Task ID, such as TD_ae61e427d9ab4d6f99e3b87378fa1c94
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_ImportTemplate_D20220511T114059_d3b",
"links":[
{
"href":"https:// ://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_ImportTemplate_D20220511T114059_d3b",
"action":"GET",
"rel":"Job Status"
}
]
}
24-40
Chapter 24
Import Template for Profitability and Cost Management
json.put("fileName", "HPCM_BksML12_20160128_200053.zip");
json.put("isApplicationOverwrite", true);
funcImportTemplate() {
description="Import Template through Curl Sample"
instance="PROFITABILITY_WEB_APP"
essAppServer="EssbaseCluster-1"
sharedServicesProject="EssbaseCluster-1"
applicationType="Management Ledger"
fileName="PCM_BksML12_20160413_042937.zip"
isApplicationOverwrite="true"
param="{\"description\":\"$description\",\"instanceName\":\"$instance\",\"essA
pplicationServer\":\"$essAppServer\",\"sharedServicesProject\":\"$sharedServic
esProject\",\"applicationType\":\"$applicationType\",\"fileName\":\"$fileName\
",\"isApplicationOverwrite\":\"$isApplicationOverwrite\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/jobs/
templateImportJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started importing successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def importTemplate() {
24-41
Chapter 24
Merge Slices for Profitability and Cost Management
def url;
def response;
try {
url = new URL(serverUrl + "/epm/rest/" + apiVersion + "/
applications/" + appName + "/jobs/templateImportJob")
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
println "URL : " + url
println "Payload : " + json.toString()
executeJob(url, "POST", json.toString());
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/applications/{application}/jobs/mergeSlices
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-42
Chapter 24
Merge Slices for Profitability and Cost Management
Request Payload:
{
"removeZeroCells":"true"
)
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string.
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use
the href to get the status of the import operation.
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_MERGE_CUBE_D20220511T115052_771",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/ChecktaskStatusJob/
BksML30_MERGE_CUBE_D20220511T115052_771",
"action":"GET",
"rel":"Job Status"
}
]
}
24-43
Chapter 24
Optimize ASO Cube
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/v1/applications/{AppName}/jobs/optimizeASOCube
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-44
Chapter 24
Optimize ASO Cube
Response
Supported Media Types: application/json
Name Description
details In case of errors, details are published with the error string.
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use
the href to get the status of the import operation.
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_OptimizeASOCube_D20220511T115135_55d",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_OptimizeASOCube_D20220511T115135_55d",
24-45
Chapter 24
Optimize ASO Cube
"action":"GET",
"rel":"Job Status"
}
]
}
funcOptimizeASOCube() {
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/jobs/
optimizeASOCube
param="{\"type\":\"createAggregations\"}"
echo $param
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Optimize ASO Cube successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def optimizeASOCube() {
24-46
Chapter 24
Retrieve Task Status for Profitability and Cost Management
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
Required Roles
Service Administrator, Power User
REST Resource
GET /epm/rest/{api_version}/applications/jobs/ChecktaskStatusJob/{processName}
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-47
Chapter 24
Run ML Calculations
Response
Supported Media Types: application/json
Name Description
processName The Process Name or TaskflowId, such as
RBkML1_ExportTemplate_D20160112T025419_836
task Task name, such as ExportTemplate
status Task status, such as Success
{
"type": "Profitability",
"links": [{
"href": "https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/RBkML1_ExportTemplate_D20160112T025419_836",
"action": "GET",
"rel": "self"
}],
"status": 0,
"details":
"ExportTemplate=Success,RBkML1_ExportTemplate_D20160112T025419_836=Done",
"statusMessage": "Success"
}
Run ML Calculations
Runs or clears calculations for a selected application. You can run calculations using rules in a
model POV against data in a different data POV without copying rules.
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/applications/{application}/povs/{povGroupMember}/
jobs/runLedgerCalculationJob
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
24-48
Chapter 24
Run ML Calculations
Request
Supported Media Types: application/json
24-49
Chapter 24
Run ML Calculations
Response
Supported Media Types: application/json
Name Description
details Task ID, such as
BksML1_BksML1_RunCalcs_D20160113T070358_1da_1
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
24-50
Chapter 24
Run ML Calculations
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_RunCalcs_D20220511T114716_a14",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_RunCalcs_D20220511T114716_a14",
"action":"GET",
"rel":"Job Status"
}
]
}
24-51
Chapter 24
Run ML Calculations
funcRunCalculation() {
subsetStart=""
subsetEnd=""
ruleName=""
ruleSetName=""
comment="Run Calculation Curl"
exeType="ALL_RULES"
stringDelimiter="_"
param="{\"isClearCalculated\":\"true\",\"isExecuteCalculations\":\"true\",\"is
RunNow\":\"true\",\"comment\":\"$comment\",\"subsetStart\":\"$subsetStart\",\"
subsetEnd\":\"$subsetEnd\",\"ruleName\":\"$ruleName\",\"ruleSetName\":\"$ruleS
etName\",\"exeType\":\"$exeType\",\"stringDelimiter\":\"$stringDelimiter\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/
povs/$POV_GROUP_MEMBER/jobs/runLedgerCalculationJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Running Calc successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def runCalculation() {
24-52
Chapter 24
Run ML Clear POV
json.put("ruleSetName", ruleSetName);
json.put("exeType", "ALL_RULES");
json.put("stringDelimiter", "_");
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url, "POST", json.toString());
}
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/applications/{application}/povs/{povGroupMember}/
jobs/clearPOVJob
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-53
Chapter 24
Run ML Clear POV
Note:
If queryName is used (is not null), then isManageRule, isAllocatedValues, and
isAdjustmentValues must be set to false.
Example URL and payload to clear to a particular region within input data
https://<BASE-URL>/epm/rest/{api_version}/applications/{application}/povs/
{povGroupMember}/jobs/clearPOVJob
{"isInputData":"true","queryName":"myQueryName","stringDelimiter":"_"}
Response
Supported Media Types: application/json
Name Description
details Task ID, such as
BksML1_BksML1_ClearMLPOV_D20160113T070358_1da_1
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
links Detailed information about the link
24-54
Chapter 24
Run ML Clear POV
Name Description
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_ClearMLPOV_D20220511T114821_f4b",
"links":[
{
"href":"https://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_ClearMLPOV_D20220511T114821_f4b",
"action":"GET",
"rel":"Job Status"
}
]
}
24-55
Chapter 24
Run ML Clear POV
uncClearPOVData() {
stringDelimiter="_";
param="{\"isManageRule\":\"true\",\"isInputData\":\"true\",\"stringDelimiter\"
:\"$stringDelimiter\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/
povs/$POV_GROUP_MEMBER/jobs/clearPOVJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started Clearing POV successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
def clearPOVData() {
def url;
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
24-56
Chapter 24
Run ML Rule Balancing
Required Roles
Service Administrator, Power User
REST Resource
GET /epm/rest/{api_version}/applications/{application}/povs/{povGroupMember}/
ruleBalance
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
Response
Supported Media Types: application/json
24-57
Chapter 24
Run ML Rule Balancing
Name Description
details Rule balancing output for the given POV
status See Migration Status Codes
statusMessage Message about the status, such as Success
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
"items": [{
"ruleNumber": "",
"rules": [],
"balanceTypeRule": true,
"scale": 2,
"sequence": 0,
"name": "NoRule",
"description": null,
"runningBalance": 49357098.03,
"balance": 49357098.03,
"allocationIn": null,
"allocationOut": null,
"adjustmentIn": null,
"adjustmentOut": null,
"input": 49357098.03,
"runningRemainder": 49357098.03,
"remainder": 49357098.03,
"netChange": null,
"offset": null,
"inputAsString": "49,357,098.03",
"adjInAsString": "-",
"adjOutAsString": "-",
"allocInAsString": "-",
"allocOutAsString": "-",
"balanceAsString": "49,357,098.03",
"runningBalanceAsString": "49,357,098.03",
"runningRemainderAsString": "49,357,098.03",
"remainderAsString": "49,357,098.03",
"netChangeAsString": "-",
"offsetAsString": "-"
},
],
"type": "Profitability",
"status": 0,
24-58
Chapter 24
Run ML Rule Balancing
"details": "",
"statusMessage": "Success"
}
if(resStatus == 0) {
System.out.println("Rule Balancing ran successfully");
JSONArray itemsArray = jsonObj.getJSONArray("items");
System.out.println("Details : " + itemsArray.toString());
} else {
String details = jsonObj.getString("details");
System.out.println("Rule Balancing failed. Details : " + details);
}
funcRunRuleBalancing() {
url=$SERVER_URL/epm/rest/$API_VERSION/applications/$APP_NAME/
povs/$POV_GROUP_MEMBER/ruleBalance
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
list=`cat response.txt | jq 'select(.items != null) | .items[].name'`
if [[ ! -z $list ]]; then
echo $list
else
24-59
Chapter 24
Run ML Rule Balancing
def runRuleBalancing() {
def url;
def response;
try {
url = new URL(urlString);
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
if(resStatus == 0) {
println "Rule Balancing ran successfully"
JSONArray itemsArray = jsonObj.getJSONArray("items");
println "Details : " + itemsArray.toString()
} else {
String details = jsonObj.getString("details");
println "Rule Balancing failed. Details : " + details
}
}
24-60
Chapter 24
Update Dimensions As a Job
Required Roles
Service Administrator, Power User
REST Resource
POST /epm/rest/{api_version}/fileApplications/{application}/jobs/updateDimension
Note:
Before using the REST resources, you must understand how to access the REST
resources and other important concepts. See Implementation Best Practices for
Cloud EPM REST APIs. Using this REST API requires prerequisites. See
Prerequisites.
Request
Supported Media Types: application/json
24-61
Chapter 24
Update Dimensions As a Job
https://<BASE-URL>/epm/rest/<api_version>/fileApplications/BksML12/jobs/
updateDimension{"dataFileName":"input.txt","stringDelimiter":",","acceptableDec
reasePercentage":"5"}
Response
Supported Media Types: application/json
Name Description
details Task ID, such as BksML12_BksML12_
UpdateDimension_D20160118T051020_bb8_1
status See Migration Status Codes
statusMessage Message about the status, such as In Progress
type Profitability
data Parameters as key value pairs
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Relationship type
data Parameters as key value pairs passed in the request
{
"type":"Profitability",
"status":-1,
"statusMessage":"In Progress",
"details":"BksML30_UpdateDimensions_D20220513T062046_c61",
"links":[
{
"href":"https:// ://<BASE-URL>/epm/rest/v1/applications/jobs/
ChecktaskStatusJob/BksML30_UpdateDimensions_D20220513T062046_c61",
"action":"GET",
"rel":"Job Status"
}
]
}
24-62
Chapter 24
Update Dimensions As a Job
Note:
In the main method, enter the following statement:
restSamplesObj.updateDimensionsJob();
funcUpdateDimensionJob() {
dataFileName="Accounts.txt,Activity.txt"
param="{\"dataFileName\":\"$dataFileName\"}"
url=$SERVER_URL/epm/rest/$API_VERSION/fileApplications/$APP_NAME/
updateDimensionJob
funcExecuteRequest "POST" $url "$param" "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [$status == -1 ]; then
echo "Started Update Dimensions Job successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred." $error
fi
funcRemoveTempFiles "respHeader.txt" response.txt"
}
Note:
At the end, call this statement along with other statements:
funcUpdateDimensionsJob
24-63
Chapter 24
Update Dimensions As a Job
def updateDimensionsJob() {
try {
url = new URL(urlString)
} catch (MalformedURLException e) {
println "Malformed URL. Please pass valid URL"
System.exit(0);
}
executeJob(url,"POST",json.toString());
}
Note:
In the main method, add the following statement:
restSamplesObj.updateDimensionJob();
24-64
25
Narrative Reporting REST APIs
You can use the REST APIs for Narrative Reporting to work with Narrative Reporting artifacts,
report packages, report snapshots, and reports.
You can use the REST APIs for Narrative Reporting to execute these actions:
• Files
– Download a file from the temporary repository or to the Library.
– Upload a temporary file to the Narrative Reporting repository.
• Jobs
– Start a new Narrative Reporting job for asynchronous execution by the service.
– Get a Narrative Reporting job's status that provides links to the job results when the
job is complete.
• Reports
– You can get the corresponding Report information
– You can get the global point of view selections and member suggestions for the Report
– You can get the required member selection prompts for the Report
• Books
– You can get the corresponding Book information
– You can get the global point of view selections and member suggestions for Book
• Bursting Definitions
– You can view the Bursting Definitions and their content
– You can execute the Bursting Definition file
25-1
26
Enterprise Data Management Cloud REST
APIs
Use the REST APIs for Enterprise Data Management Cloud to work with applications, files,
jobs, requests, and views.
26-1
27
Support for IAM REST APIs
Cloud EPM suports IAM REST APIs. The IAM Identity Domain APIs enable you to securely
manage your resources, including identities and configuration data.
The AIM REST APIs support SCIM 2.0 compliant endpoints with standard SCIM 2.0 core
schemas and Oracle schema extensions to:
• Manage users, groups, and apps.
• Perform identity functions, including password generation and reset.
• Perform administrative tasks, including bulk operations and job scheduling.
• Manage settings for your instance, including re-branding and notification templates.
Learn more about the IAM REST APIs.
27-1
A
Common Helper Functions for Java
This appendix shows the common helper functions for Java for the EPM REST APIs.
Note: The userName variable uses the format <domain>.<username>. See Authentication.
/*
File: PbcsRestSamples.java - Created on Feb 19, 2015
Copyright (c) 2015 Oracle Corporation. All Rights Reserved.
This software is the proprietary information of Oracle.
*/
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
import org.json.JSONArray;
import org.json.JSONObject;
/*
* PBCS Rest Samples.
* The userName variable uses the format <domain>.<username>.
*/
public class PbcsRestSamples{
private String userName; // PBCS user name
private String password; // PBCS user password
private String serverUrl; // PBCS server URL
private String apiVersion; // Version of the PBCS API that you
are developing/compiling with.
private String applicationName; // PBCS application used in this sample
samples.integrationScenarioExportMetadataAndDataAndDownloadFiles();
A-1
Appendix A
samples.integrationScenarioRemoveUnnecessaryFiles();
samples.integrationScenarioExportDataAndDownloadFiles();
samples.integrationScenarioRefreshTheApplication();
} catch (Throwable x) {
System.err.println("Error: " + x.getMessage());
}
}
//
// BEGIN - Integration scenarios.
//
public void integrationScenarioImportMetadataIntoApplication() throws
Exception {
uploadFile("accounts.zip");
executeJob("IMPORT_METADATA", "accountMetadata",
"{importZipFileName:accounts.zip}");
executeJob("CUBE_REFRESH", null, null);
}
A-2
Appendix A
Exception {
executeJob("EXPORT_DATA", "entitydata",
"{exportFileName:entitydata.zip}");
executeJob("EXPORT_DATA", "forecastdata",
"{exportFileName:forecastdata.zip}");
listFiles();
downloadFile("entitydata.zip");
downloadFile("forecastdata.zip");
}
//
// BEGIN - Methods that invoke REST API
//
//
// Common Helper Methods
//
private String getStringFromInputStream(InputStream is) {
BufferedReader br = null;
StringBuilder sb = new StringBuilder();
String line;
try {
br = new BufferedReader(new InputStreamReader(is));
while ((line = br.readLine()) != null) {
sb.append(line);
}
A-3
Appendix A
} catch (IOException e) {
e.printStackTrace();
} finally {
if (br != null) {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return sb.toString();
}
A-4
Appendix A
System.out.println("Please wait...");
Thread.sleep(20000);
} catch (InterruptedException e) {
completed = true;
throw e;
}
}
else {
if (status > 0) {
System.out.println("Error occurred: " +
json.getString("details"));
}
else {
System.out.println("Completed");
}
completed = true;
}
}
}
A-5
Appendix A
Details")) {
taskURL = (String) arr.get("href");
break;
}
}
System.out.println("Details:");
System.out.println("Source: " + source);
System.out.println("Destination: "+ destination);
boolean errorsCompleted = false;
String currentMessageCategory = "";
String nextPingURL = taskURL;
while(!errorsCompleted){
String nextPingResponse =
executeRequest(nextPingURL, "GET", null, "application/x-www-form-urlencoded");
JSONObject jsonObj = new
JSONObject(nextPingResponse);
int status1 = jsonObj.getInt("status");
if(status1 == 0){
JSONArray artifactArray =
jsonObj.getJSONArray("items");
JSONObject jRes = null;
for(int k=0; k < artifactArray.length(); k++){
jRes = (JSONObject)artifactArray.get(k);
String artifact =
jRes.getString("artifact").toString();
String msgCategory =
jRes.getString("msgCategory").toString();
String msgText =
jRes.getString("msgText").toString();
if(currentMessageCategory.isEmpty() || !
currentMessageCategory.equals(msgCategory)){
currentMessageCategory = msgCategory;
System.out.println(currentMessageCategory);
}
System.out.println(artifact +" - " +
msgText);
}
nextPingURL = "";
JSONArray nextLinks =
jsonObj.getJSONArray("links");
for (int j = 0; j < nextLinks.length(); j++) {
JSONObject nextArray =
nextLinks.getJSONObject(j);
if (!JSONObject.NULL.equals(nextArray)
&& !JSONObject.NULL.equals(nextArray.get("rel")) &&
nextArray.get("rel").equals("next")) {
nextPingURL = (String)
nextArray.get("href");
break;
}
}
if(nextPingURL.isEmpty())
errorsCompleted = true;
}else if(status1 > 0){
System.out.println("Error occured while
A-6
Appendix A
//
// BEGIN - List all the versions in PBCS
//
public void getLCMVersions() throws Exception {
String urlString = String.format("%s/interop/rest", serverUrl);
String response = executeRequest(urlString, "GET", null,
"application/x-www-form-urlencoded");
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0) {
JSONArray fileList = json.getJSONArray("items");
System.out.println("List of files are :");
JSONObject jObj = null;
for(int i=0; i<fileList.length(); i++){0) {
jObj = (JSONObject)fileList.get(i);
System.out.println("Version :" + jObj.getString("version"));
System.out.println("Lifecycle :" +
jObj.getString("lifecycle"));
System.out.println("Latest :" + jObj.getString("latest"));
System.out.println("Link :" + ((JSONObject) ((JSONArray)
jObj.getJSONArray("links")).get(0)).getString("href") + "\n");
}
A-7
Appendix A
}
}
//
// END - List all the versions in PBCS
//
//
// BEGIN - Get application snapshot details
//
public void getApplicationSnapshotDetails(String snapshotName) throws
Exception {
String urlString = String.format("%s/interop/rest/%s/
applicationsnapshots/%s", serverUrl, apiVersion, snapshotName);
String response = executeRequest(urlString, "GET", null,
"application/x-www-form-urlencoded");
JSONObject json = new JSONObject(response);
//
// BEGIN - List all the files in PBCS
//
public void listFiles() throws Exception {
String urlString = String.format("%s/interop/rest/%s/
A-8
Appendix A
//
// BEGIN - Delete a file in PBCS
//
public void deleteFile(String fileName) throws Exception {
String urlString = String.format("%s/interop/rest/%s/
applicationsnapshots/%s", serverUrl, apiVersion, fileName);
String response = executeRequest(urlString, "DELETE", null,
"application/x-www-form-urlencoded");
JSONObject json = new JSONObject(response);
int resStatus = json.getInt("status");
if (resStatus == 0)
System.out.println("File deleted successfully");
else
System.out.println("Error deleting file : " +
json.getString("details"));
}
//
// END - Delete a file in PBCS
//
//
// BEGIN - Download a file from PBCS
//
public void downloadFile(String fileName) throws Exception {
HttpURLConnection connection = null;
InputStream inputStream = null;
FileOutputStream outputStream = null;
try {
URL url = new URL(String.format("%s/interop/rest/%s/
applicationsnapshots/%s/contents", serverUrl, apiVersion, fileName));
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
A-9
Appendix A
connection.setInstanceFollowRedirects(false);
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setRequestProperty("Authorization", "Basic " + new
sun.misc.BASE64Encoder().encode((userName + ":" + password).getBytes()));
connection.setRequestProperty("Content-Type", "application/x-www-
form-urlencoded");
int status = connection.getResponseCode();
if (status == 200) {
if (connection.getContentType() != null &&
connection.getContentType().equals("application/json")) {
JSONObject json = new
JSONObject(getStringFromInputStream(connection.getInputStream()));
System.out.println("Error downloading file : " +
json.getString("details"));
} else {
inputStream = connection.getInputStream();
outputStream = new FileOutputStream(new File(fileName));
int bytesRead = -1;
byte[] buffer = new byte[5 * 1024 * 1024];
while ((bytesRead = inputStream.read(buffer)) != -1)
outputStream.write(buffer, 0, bytesRead);
System.out.println("File download completed.");
}
} else {
throw new Exception("Http status code: " + status);
}
} finally {
if (connection != null)
connection.disconnect();
if (outputStream != null)
outputStream.close();
if (inputStream != null)
inputStream.close();
}
}
//
// END - Download a file from PBCS
//
//
// BEGIN - Upload a file to PBCS
//
public void uploadFile(String fileName) throws Exception {
final int DEFAULT_CHUNK_SIZE = 50 * 1024 * 1024;
InputStream fis = null;
byte[] lastChunk = null;
long totalFileSize = new File(fileName).length(), totalbytesRead = 0;
boolean isLast = false, status = true;
Boolean isFirst = true;
int packetNo = 1, lastPacketNo = (int) (Math.ceil(totalFileSize /
(double) DEFAULT_CHUNK_SIZE));
try {
fis = new BufferedInputStream(new FileInputStream(fileName));
A-10
Appendix A
try {
URL url = new URL(String.format("%s/interop/rest/%s/
applicationsnapshots/%s/contents?q={chunkSize:%d,isFirst:%b,isLast:%b}",
serverUrl, apiVersion, fileName, lastChunk.length,
isFirst, isLast));
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setInstanceFollowRedirects(false);
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setDoInput(true);
connection.setRequestProperty("Authorization", "Basic " + new
sun.misc.BASE64Encoder().encode((userName + ":" + password).getBytes()));
connection.setRequestProperty("Content-Type", "application/octet-
stream");
DataOutputStream wr = new
DataOutputStream(connection.getOutputStream());
wr.write(lastChunk);
wr.flush();
A-11
Appendix A
getJobStatus(fetchPingUrlFromResponse(status, "Job
Status"), "GET");
}
}
return false;
} finally {
if (connection != null)
connection.disconnect();
}
}
//
// BEGIN - Import an application snapshot
//
public void importSnapshot(String applicationSnapshotName) throws
Exception {
JSONObject params = new JSONObject();
params.put("type","import");
String urlString = String.format("%s/interop/rest/%s/
applicationsnapshots/%s/migration?q=%s", serverUrl, apiVersion,
applicationSnapshotName, params.toString());
String response = executeRequest(urlString, "POST", null,
"application/x-www-form-urlencoded");
System.out.println("Import started successfully");
getMigrationJobStatus(fetchPingUrlFromResponse(response, "Job
Status"),"POST");
}
//
// END - Import an application snapshot
//
//
// BEGIN - Export an application snapshot
//
public void exportSnapshot(String applicationSnapshotName) throws
Exception {
JSONObject params = new JSONObject();
params.put("type","export");
String urlString = String.format("%s/interop/rest/%s/
applicationsnapshots/%s/migration?q=%s", serverUrl, apiVersion,
applicationSnapshotName, params.toString());
String response = executeRequest(urlString, "POST", null,
"application/x-www-form-urlencoded");
System.out.println("Export started successfully");
A-12
Appendix A
getMigrationJobStatus(fetchPingUrlFromResponse(response, "Job
Status"), "POST");
}
//
// END - Export an application snapshot
//
//
// BEGIN - Provide Feedback
//
public void provideFeedback(String description) throws Exception {
JSONObject params = new JSONObject();
JSONObject config = new JSONObject();
config.put("URL",serverUrl);
params.put("configuration",config);
params.put("description",description);
//
// BEGIN - Reset services
//
public void hardReset(String comment) throws Exception {
Scanner in = new Scanner(System.in);
System.out.println("Are you sure you want to restart the service
instance (yes/no): no ?[Press Enter]");
String s = in.nextLine();
if (!s.equals("yes")) {
System.out.println("User cancelled the recreate command");
System.exit(0);
}
A-13
Appendix A
Note:
Note on Proxy Setting: In case of proxies, set the proxy host and port as the system
arguments.
A-14
B
CSS Common Helper Functions for Java
This appendix shows the CSS common helper functions for Java for the EPM REST APIs.
Prerequisites: json.jar
Note on Proxy Setting: In case of proxies, set the proxy host and port as the system
arguments.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.xml.bind.DatatypeConverter;
import org.json.JSONArray;
import org.json.JSONObject;
B-1
Appendix B
// samples.removeGroups("DeleteGroup1.csv");
// samples.generateInvalidLoginReport("2021-06-01",
"2021-06-10","invalidLoginReport141.csv");
// samples.generateRoleAssignmentAuditReport("2021-06-01",
"2021-06-10","roleAssignmentaudit_14778.csv");
// samples.updateUsers("updateuser.csv");
} catch (Throwable x) {
System.err.println("Error: " + x.getMessage());
}
}
B-2
Appendix B
B-3
Appendix B
System.out.println(jobStatus);
} catch (Exception e) {
e.printStackTrace();
}
}
B-4
Appendix B
B-5
Appendix B
B-6
Appendix B
"POST");
String jobStatus =
CSSRESTHelper.getCSSRESTJobCompletionStatus(restResult, reqHeaders);
System.out.println(jobStatus);
} catch (Exception e) {
e.printStackTrace();
}
}
B-7
Appendix B
B-8
Appendix B
urlConnection = (HttpURLConnection)
uri.toURL().openConnection();
urlConnection.setRequestMethod(methodType);
if (requestHeaders != null) {
Set<String> requestHeaderKeys = requestHeaders.keySet();
for (String requestHeaderKey : requestHeaderKeys) {
urlConnection.setRequestProperty(requestHeaderKey,
requestHeaders.get(requestHeaderKey));
}
}
urlConnection.setUseCaches(false);
urlConnection.setDoOutput(true);
urlConnection.setDoInput(true);
if (isPostMethod) {
OutputStreamWriter writer = new
OutputStreamWriter(urlConnection.getOutputStream(),
Charset.defaultCharset());
writer.write(reqParams);
writer.flush();
}
if (!isPostMethod) {
urlConnection.connect();
}
B-9
Appendix B
} catch (Exception e) {
restResult.put(REST_CALL_RESPONSE, e.getMessage());
} finally {
if (urlConnection != null) {
urlConnection.disconnect();
}
}
return restResult;
}
B-10
Appendix B
}
}
return response;
}
jobStatusResult.get(CSSRESTHelper.REST_CALL_RESPONSE));
}
Thread.sleep(1000);
}
completionStatus =
jobStatusResult.get(CSSRESTHelper.REST_CALL_RESPONSE);
B-11
Appendix B
}
} catch (Exception ex) {
ex.printStackTrace();
}
return completionStatus;
}
};
}
B-12
C
Common Helper Functions for cURL
This appendix shows the common helper functions for cURL for the Cloud EPM REST APIs.
Note: the USERNAME variable is <domain>.<username>. See Authentication.
#!/bin/sh
SERVER_URL="https://<BASE-URL>"
USERNAME=<username>
PASSWORD=<password>
APP_NAME="Vision"
API_VERSION="11.1.2.3.600"
funcRemoveTempFiles() {
for var in "$@"
do
if [ -f $var ]; then
rm $var
fi
done
}
funcPrintErrorDetails() {
contentType=`echo $(grep 'Content-Type:' respHeader.txt) | tr -d
[:space:]`
if [ ! -z $contentType ] && [[ $contentType = *"application/json"* ]];
then
output=`cat $1`
error=`echo $output | jq '.details'`
echo "Error details: " $error
fi
}
funcExecuteRequest() {
if [ ! -z "$4" ]; then
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $4" -d $3 $2`
else
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $3" $2`
fi
if [ $statusCode != 200 ]; then
echo "Error executing request"
if [ $statusCode != 000 ]; then
echo "Response error code : " $statusCode
funcPrintErrorDetails "response.txt"
funcRemoveTempFiles "respHeader.txt" "response.txt"
fi
exit 0
fi
C-1
Appendix C
funcGetStatus() {
output=`cat response.txt`
count=`echo $output | jq '.links | length'`
i=0
pingUrl=""
while [ $i -lt $count ]; do
rel=`echo $output | jq '.links['$i'].rel'`
rel=`echo "$rel" | tr -d "\""`
if [ "$rel" == "Job Status" ]; then
pingUrl=`echo $output | jq '.links['$i'].href'`
pingUrl=`echo "$pingUrl" | tr -d "\""`
fi
i=`expr $i + 1`
done
echo $pingUrl
completed="false"
while [ $completed != "true" ]; do
statusCode2=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD"
-o "pingResponse.txt" -H "Content-Type: application/x-www-form-urlencoded"
"$pingUrl"`
if [ $statusCode2 == 200 ]; then
status2=`jq '.status' pingResponse.txt`
if [ $status2 != -1 ]; then
completed="true"
echo "Job completed"
else
echo "Please wait..."
sleep 20
fi
else
echo "Please wait..."
sleep 20
fi
funcRemoveTempFiles "pingResponse.txt"
done
}
funcGetMigrationStatus() {
output=`cat response.txt`
count=`echo $output | jq '.links | length'`
i=0
pingUrl=""
while [ $i -lt $count ]; do
rel=`echo $output | jq '.links['$i'].rel'`
rel=`echo "$rel" | tr -d "\""`
if [ "$rel" == "Job Status" ]; then
pingUrl=`echo $output | jq '.links['$i'].href'`
pingUrl=`echo "$pingUrl" | tr -d "\""`
fi
i=`expr $i + 1`
done
echo $pingUrl
completed="false"
C-2
Appendix C
C-3
Appendix C
-d "\""`
fi
k=`expr $k + 1`
done
if [ -z $firstPing ]; then
taskCompleted="true"
fi
j=`expr $j + 1`
done
done
i=`expr $i + 1`
done
fi
else
echo "Please wait..."
sleep 20
fi
else
echo "Please wait..."
sleep 20
fi
funcRemoveTempFiles "pingResponse.txt" "taskpingResponse.txt"
done
}
funcGetLCMVersions() {
url=$SERVER_URL/interop/rest
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "List of versions :"
count=`echo $output | jq '.items | length'`
i=0
while [ $i -lt $count ]; do
echo "Version : " `echo $output | jq '.items['$i'].version'`
echo "Lifecycle :" `echo $output | jq '.items['$i'].lifecycle'`
echo "Latest :" `echo $output | jq '.items['$i'].latest'`
echo "Link :" `echo $output | jq '.items['$i'].links[0].href'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcGetLCMVersionDetails() {
url=$SERVER_URL/interop/rest/$API_VERSION
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
C-4
Appendix C
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Version $API_VERSION details :"
count=`echo $output | jq '.links | length'`
i=0
while [ $i -lt $count ]; do
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcGetServices() {
url=$SERVER_URL/interop/rest/$API_VERSION/services
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Services list :"
count=`echo $output | jq '.links | length'`
i=0
while [ $i -lt $count ]; do
rel=`echo $output | jq '.links['$i'].rel'`
rel=`echo "$rel" | tr -d "\""`
if [ "$rel" != "self" ]; then
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
fi
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcRecreateService() {
echo "Are you sure you want to recreate the EPM environment (yes/no): no ?
[Press Enter]"
read toCreate
if [ $toCreate != "yes" ]; then
echo "User cancelled the recreate command"
exit 0
fi
C-5
Appendix C
url=$SERVER_URL/interop/rest/$API_VERSION/services/$1/recreate
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started recreating the environment successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcGetApplicationSnapshotDetails() {
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Application details :"
echo "Application snapshot name : " `echo $output | jq
'.items[0].name'`
echo "Application snapshot type : " `echo $output | jq
'.items[0].type'`
echo "Can be exported flag : " `echo $output | jq
'.items[0].canExport'`
echo "Can be imported flag : " `echo $output | jq
'.items[0].canImport'`
echo "Can be uploaded flag : " `echo $output | jq
'.items[0].canUpload'`
echo "Can be downloaded flag : " `echo $output | jq
'.items[0].canDownload'`
count=`echo $output | jq '.links | length'`
i=0
echo "Services details :"
while [ $i -lt $count ]; do
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcListFiles() {
C-6
Appendix C
url=$SERVER_URL/interop/rest/$API_VERSION/applicationsnapshots
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
funcDeleteFile() {
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName
funcExecuteRequest "DELETE" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Deleted successfully"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcUploadFile() {
infile=$1
if [ ! -f $infile ]; then
echo "File does not exist"
exit 0
fi
encodedFileName=$(echo $infile | sed -f urlencode.sed)
url="$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/contents?q="
filename=$( basename $infile)
filesize=$( stat -c %s $infile)
bs=52428800
noOfPackets=$(($((filesize / bs)) + 1))
uploadedsize=0
isFirst=true
count=1
isLast="false"
if [ $noOfPackets = 1 ]; then
isLast="true"
fi
tempFile=/u01/temp/$filename
if [ ! -d "/u01/temp" ]; then
mkdir /u01/temp
fi
C-7
Appendix C
(
dd bs=1 skip=$skip count=0 &> /dev/null
dd bs=$length count=1 of=$tempFile &> /dev/null
) < "$infile"
param=$(echo "{chunkSize=$length,isFirst=$isFirst,isLast=$isLast}" |
sed -f urlencode.sed)
urlwithparam="$url$param"
echo $urlwithparam
statusCode=`curl -X POST -s -w "%{http_code}" -T $tempFile -u
"$USERNAME:$PASSWORD" -o "response.txt" -D "respHeader.txt" -H "Content-Type:
application/octet-stream" "$urlwithparam"`
funcRemoveTempFiles $tempFile
C-8
Appendix C
funcDownloadFile() {
filepath="/u01/$1"
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/contents
statusCode=`curl -X GET -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o $filepath -H "Content-Type: application/x-www-form-urlencoded" -D
respHeader.txt $url`
funcImportSnapshot() {
param=$(echo "{type:import}" | sed -f urlencode.sed)
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/migration?q=$param
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
C-9
Appendix C
funcExportSnapshot() {
param=$(echo "{type:export}" | sed -f urlencode.sed)
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/migration?q=$param
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started exporting succesfully"
funcGetMigrationStatus "POST"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcProvideFeedback() {
url=$SERVER_URL/interop/rest/$LCM_VERSION/feedback
description=$(echo $1 | sed -f urlencode.sed)
param="{\"configuration\":
{\"URL\":\"$SERVER_URL\"},\"description\":\"$description\"}"
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Feedback successful"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcHardReset() {
echo "Are you sure you want to restart the service instance (yes/no): no ?
[Press Enter] "
read toCreate
if [ $toCreate != "yes" ]; then
echo "User cancelled the recreate command"
exit 0
fi
url=$SERVER_URL/interop/rest/$LCM_VERSION/services/PBCS/resetservice
C-10
Appendix C
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started hard reset succesfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcGenerateAuditReport(){
param=$(echo "{type:userauditreport,fileName:$1,since:$2,until:$3}" | sed
-f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/reports?q=$param
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started generating report successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcGenerateProvisionReport(){
param=$(echo "{type:provisionreport,fileName:$1}" | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/reports?q=$param
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started generating report successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcExecuteJob() {
url="$SERVER_URL/HyperionPlanning/rest/$API_VERSION/
applications/$APP_NAME/jobs"
encodedJobName=$(echo $2 | sed -f urlencode.sed)
C-11
Appendix C
if [ ! -z "$3" ]; then
param="jobType=$1&jobName=$encodedJobName¶meters=$3"
else
param="jobType=$1&jobName=$encodedJobName"
fi
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started executing job successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcIntegrationScenarioImportMetadataIntoApplication() {
funcUploadFile "DemoApplication_HSS_Vision.zip"
funcExecuteJob "IMPORT_METADATA" "accountMetadata"
"{importZipFileName=accounts.zip}"
funcExecuteJob "CUBE_REFRESH" "cubeRefresh"
}
funcIntegrationScenarioImportDataRunCalcCopyToAso() {
funcUploadFile "data.csv"
funcExecuteJob "IMPORT_DATA" "loadingq1data" "{importFileName=data.csv}"
funcExecuteJob "CUBE_REFRESH","cubeRefresh"
funcExecuteJob "PLAN_TYPE_MAP" "CampaignToReporting" "{clearData=false}"
}
funcIntegrationScenarioExportMetadataAndDataAndDownloadFiles() {
funcExecuteJob "EXPORT_METADATA" "exportentitymetadata"
"{exportZipFileName=entitydata.zip}"
funcExecuteJob "EXPORT_DATA" "Forecastdata"
"{exportFileName=forecastdata.zip}"
funcListFiles
funcDownloadFile "entitydata.zip"
funcDownloadFile "forecastdata.zip"
}
funcIntegrationScenarioRemoveUnnecessaryFiles() {
funcListFiles
funcDeleteFile "entitymetadata.csv"
funcDeleteFile "forecastdata.csv"
}
funcIntegrationScenarioExportDataAndDownloadFiles() {
funcExecuteJob "EXPORT_DATA" "entitydata"
"{exportFileName:entitydata.zip}"
funcExecuteJob "EXPORT_DATA" "forecastdata"
"{exportFileName:forecastdata.zip}"
funcListFiles
funcDownloadFile "entitydata.zip"
C-12
Appendix C
funcDownloadFile "forecastdata.zip"
}
funcIntegrationScenarioRefreshTheApplication() {
funcUploadFile "accounts.zip"
funcExecuteJob "IMPORT_METADATA" "accountMetadata"
"{importZipFileName:accounts.zip}"
funcExecuteJob "CUBE_REFRESH" "cubeRefresh"
}
funcIntegrationScenarioCloneServiceInstance() {
# Part 1 : Change SERVER_URL, USERNAME, PASSWORD, API_VERSION variables
values to match those of first environment
# Download file from source instance.
# Comment out all lines below Part 2
# Uncomment the below line for the first step.
# funcDownloadFile "Artifact Snapshot"
funcIntegrationScenarioImportMetadataIntoApplication
funcIntegrationScenarioImportDataRunCalcCopyToAso
funcIntegrationScenarioExportMetadataAndDataAndDownloadFiles
funcIntegrationScenarioRemoveUnnecessaryFiles
funcIntegrationScenarioExportDataAndDownloadFiles
funcIntegrationScenarioRefreshTheApplication#!/bin/sh
SERVER_URL="https://<BASE-URL>"
USERNAME="epm_default_cloud_admin"
PASSWORD="epm_cloud"
APP_NAME="Vision"
API_VERSION="11.1.2.3.600"
funcRemoveTempFiles() {
for var in "$@"
do
if [ -f $var ]; then
rm $var
fi
done
}
funcPrintErrorDetails() {
contentType=`echo $(grep 'Content-Type:' respHeader.txt) | tr -d
[:space:]`
if [ ! -z $contentType ] && [[ $contentType = *"application/json"* ]];
then
C-13
Appendix C
output=`cat $1`
error=`echo $output | jq '.details'`
echo "Error details: " $error
fi
}
funcExecuteRequest() {
if [ ! -z "$4" ]; then
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $4" -d $3 $2`
else
statusCode=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o "response.txt" -D "respHeader.txt" -H "Content-Type: $3" $2`
fi
if [ $statusCode != 200 ]; then
echo "Error executing request"
if [ $statusCode != 000 ]; then
echo "Response error code : " $statusCode
funcPrintErrorDetails "response.txt"
funcRemoveTempFiles "respHeader.txt" "response.txt"
fi
exit 0
fi
}
funcGetStatus() {
output=`cat response.txt`
count=`echo $output | jq '.links | length'`
i=0
pingUrl=""
while [ $i -lt $count ]; do
rel=`echo $output | jq '.links['$i'].rel'`
rel=`echo "$rel" | tr -d "\""`
if [ "$rel" == "Job Status" ]; then
pingUrl=`echo $output | jq '.links['$i'].href'`
pingUrl=`echo "$pingUrl" | tr -d "\""`
fi
i=`expr $i + 1`
done
echo $pingUrl
completed="false"
while [ $completed != "true" ]; do
statusCode2=`curl -X $1 -s -w "%{http_code}" -u "$USERNAME:$PASSWORD"
-o "pingResponse.txt" -H "Content-Type: application/x-www-form-urlencoded"
"$pingUrl"`
if [ $statusCode2 == 200 ]; then
status2=`jq '.status' pingResponse.txt`
if [ $status2 != -1 ]; then
completed="true"
echo "Job completed"
else
echo "Please wait..."
sleep 20
fi
else
C-14
Appendix C
funcGetLCMVersions() {
url=$SERVER_URL/interop/rest
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "List of versions :"
count=`echo $output | jq '.items | length'`
i=0
while [ $i -lt $count ]; do
echo "Version : " `echo $output | jq '.items['$i'].version'`
echo "Lifecycle :" `echo $output | jq '.items['$i'].lifecycle'`
echo "Latest :" `echo $output | jq '.items['$i'].latest'`
echo "Link :" `echo $output | jq '.items['$i'].links[0].href'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcGetLCMVersionDetails() {
url=$SERVER_URL/interop/rest/$API_VERSION
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Version $API_VERSION details :"
count=`echo $output | jq '.links | length'`
i=0
while [ $i -lt $count ]; do
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
C-15
Appendix C
funcGetServices() {
url=$SERVER_URL/interop/rest/$API_VERSION/services
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Services list :"
count=`echo $output | jq '.links | length'`
i=0
while [ $i -lt $count ]; do
rel=`echo $output | jq '.links['$i'].rel'`
rel=`echo "$rel" | tr -d "\""`
if [ "$rel" != "self" ]; then
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
fi
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcRecreateService() {
echo "Are you sure you want to recreate the EPM environment (yes/no): no ?
[Press Enter]"
read toCreate
if [ $toCreate != "yes" ]; then
echo "User cancelled the recreate command"
exit 0
fi
url=$SERVER_URL/interop/rest/$API_VERSION/services/$1/recreate
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started recreating the environment successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcGetApplicationSnapshotDetails() {
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName
C-16
Appendix C
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == 0 ]; then
echo "Application details :"
echo "Application snapshot name : " `echo $output | jq
'.items[0].name'`
echo "Application snapshot type : " `echo $output | jq
'.items[0].type'`
echo "Can be exported flag : " `echo $output | jq
'.items[0].canExport'`
echo "Can be imported flag : " `echo $output | jq
'.items[0].canImport'`
echo "Can be uploaded flag : " `echo $output | jq
'.items[0].canUpload'`
echo "Can be downloaded flag : " `echo $output | jq
'.items[0].canDownload'`
count=`echo $output | jq '.links | length'`
i=0
echo "Services details :"
while [ $i -lt $count ]; do
echo "Service : " `echo $output | jq '.links['$i'].rel'`
echo "URL :" `echo $output | jq '.links['$i'].href'`
echo "Action :" `echo $output | jq '.links['$i'].action'`
echo ""
i=`expr $i + 1`
done
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcListFiles() {
url=$SERVER_URL/interop/rest/$API_VERSION/applicationsnapshots
funcExecuteRequest "GET" $url "application/x-www-form-urlencoded"
funcDeleteFile() {
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName
funcExecuteRequest "DELETE" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
C-17
Appendix C
funcUploadFile() {
infile=$1
if [ ! -f $infile ]; then
echo "File does not exist"
exit 0
fi
encodedFileName=$(echo $infile | sed -f urlencode.sed)
url="$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/contents?q="
filename=$( basename $infile)
filesize=$( stat -c %s $infile)
bs=52428800
noOfPackets=$(($((filesize / bs)) + 1))
uploadedsize=0
isFirst=true
count=1
isLast="false"
if [ $noOfPackets = 1 ]; then
isLast="true"
fi
tempFile=/u01/temp/$filename
if [ ! -d "/u01/temp" ]; then
mkdir /u01/temp
fi
(
dd bs=1 skip=$skip count=0 &> /dev/null
dd bs=$length count=1 of=$tempFile &> /dev/null
) < "$infile"
param=$(echo "{chunkSize=$length,isFirst=$isFirst,isLast=$isLast}" |
sed -f urlencode.sed)
urlwithparam="$url$param"
C-18
Appendix C
echo $urlwithparam
statusCode=`curl -X POST -s -w "%{http_code}" -T $tempFile -u
"$USERNAME:$PASSWORD" -o "response.txt" -D "respHeader.txt" -H "Content-Type:
application/octet-stream" "$urlwithparam"`
funcRemoveTempFiles $tempFile
funcDownloadFile() {
filepath="/u01/$1"
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/contents
statusCode=`curl -X GET -s -w "%{http_code}" -u "$USERNAME:$PASSWORD" -
o $filepath -H "Content-Type: application/x-www-form-urlencoded" -D
respHeader.txt $url`
C-19
Appendix C
funcImportSnapshot() {
param=$(echo "{type:import}" | sed -f urlencode.sed)
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/migration?q=$param
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started importing successfully"
funcGetStatus "POST"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcExportSnapshot() {
param=$(echo "{type:export}" | sed -f urlencode.sed)
encodedFileName=$(echo $1 | sed -f urlencode.sed)
url=$SERVER_URL/interop/rest/$API_VERSION/
applicationsnapshots/$encodedFileName/migration?q=$param
funcExecuteRequest "POST" $url "application/x-www-form-urlencoded"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started exporting successfully"
funcGetStatus "POST"
else
error=`echo $output | jq '.details'`
C-20
Appendix C
funcExecuteJob() {
url="$SERVER_URL/HyperionPlanning/rest/$API_VERSION/
applications/$APP_NAME/jobs"
encodedJobName=$(echo $2 | sed -f urlencode.sed)
if [ ! -z "$3" ]; then
param="jobType=$1&jobName=$encodedJobName¶meters=$3"
else
param="jobType=$1&jobName=$encodedJobName"
fi
funcExecuteRequest "POST" $url $param "application/json"
output=`cat response.txt`
status=`echo $output | jq '.status'`
if [ $status == -1 ]; then
echo "Started executing job successfully"
funcGetStatus "GET"
else
error=`echo $output | jq '.details'`
echo "Error occurred. " $error
fi
funcRemoveTempFiles "respHeader.txt" "response.txt"
}
funcIntegrationScenarioImportMetadataIntoApplication() {
funcUploadFile "DemoApplication_HSS_Vision.zip"
funcExecuteJob "IMPORT_METADATA" "accountMetadata"
"{importZipFileName=accounts.zip}"
funcExecuteJob "CUBE_REFRESH" "cubeRefresh"
}
funcIntegrationScenarioImportDataRunCalcCopyToAso() {
funcUploadFile "data.csv"
funcExecuteJob "IMPORT_DATA" "loadingq1data" "{importFileName=data.csv}"
funcExecuteJob "CUBE_REFRESH","cubeRefresh"
funcExecuteJob "PLAN_TYPE_MAP" "CampaignToReporting" "{clearData=false}"
}
funcIntegrationScenarioExportMetadataAndDataAndDownloadFiles() {
funcExecuteJob "EXPORT_METADATA" "exportentitymetadata"
"{exportZipFileName=entitydata.zip}"
funcExecuteJob "EXPORT_DATA" "Forecastdata"
"{exportFileName=forecastdata.zip}"
funcListFiles
funcDownloadFile "entitydata.zip"
funcDownloadFile "forecastdata.zip"
}
funcIntegrationScenarioRemoveUnnecessaryFiles() {
funcListFiles
funcDeleteFile "entitymetadata.csv"
funcDeleteFile "forecastdata.csv"
C-21
Appendix C
funcIntegrationScenarioExportDataAndDownloadFiles() {
funcExecuteJob "EXPORT_DATA" "entitydata"
"{exportFileName:entitydata.zip}"
funcExecuteJob "EXPORT_DATA" "forecastdata"
"{exportFileName:forecastdata.zip}"
funcListFiles
funcDownloadFile "entitydata.zip"
funcDownloadFile "forecastdata.zip"
}
funcIntegrationScenarioRefreshTheApplication() {
funcUploadFile "accounts.zip"
funcExecuteJob "IMPORT_METADATA" "accountMetadata"
"{importZipFileName:accounts.zip}"
funcExecuteJob "CUBE_REFRESH" "cubeRefresh"
}
funcIntegrationScenarioCloneServiceInstance() {
# Part 1 : Change SERVER_URL, USERNAME, PASSWORD, API_VERSION variables
values to match those of first environment
# Download file from source instance.
# Comment out all lines below Part 2
# Uncomment the below line for the first step.
# funcDownloadFile "Artifact Snapshot"
funcIntegrationScenarioImportMetadataIntoApplication
funcIntegrationScenarioImportDataRunCalcCopyToAso
funcIntegrationScenarioExportMetadataAndDataAndDownloadFiles
funcIntegrationScenarioRemoveUnnecessaryFiles
funcIntegrationScenarioExportDataAndDownloadFiles
funcIntegrationScenarioRefreshTheApplication
Note on Proxy Setting: In case of proxies, set the proxy host and port as the system
arguments.
C-22
D
CSS Common Helper Functions for cURL
This appendix shows the CSS common helper functions for cURL for the Cloud EPM REST
APIs.
Note on Proxy Setting: In case of proxies, set the proxy host and port as the system
arguments.
#!/bin/sh
#set -x
export PATH=$PATH:<PATH_TO_JQ_BINARY>
SERVER_URL="<SERVICE_URL>"
USERNAME="<USERNAME>"
PASSWORD="<PASSWORD>"
API_VERSION="v1"
# To avoid SSL connection issue in the environment please add -k option for
below curl commands.
funcCallRESTAPI() {
if [ "$1" == "GET" ] || [ "$1" == "DELETE" ]; then
if [ "$6" != "" ]; then
echo `curl -s -u $4:$5 -H "$3" --request $1 -G $2 -d "$6"`
else
echo `curl -s -u $4:$5 -H "$3" --request $1 -G $2`
fi
else
if [ "$6" != "" ]; then
echo `curl -s -u $4:$5 -H "$3" --request $1 $2 -d
"$6"`
else
echo `curl -s -u $4:$5 -H "$3" --request $1 $2`
fi
fi
}
funcCSSRESTHelper() {
jobOutput=$(funcCallRESTAPI "$1" "$2" "$3" "$4" "$5" "$6")
jobUrl=`echo $jobOutput | jq '.links[1].href'`
if [ $jobUrl != null ]; then
jobUrl="${jobUrl%\"}"
jobUrl="${jobUrl#\"}"
jobStatus=-1
while [ $jobStatus == -1 ]; do
jobOutput=$(funcCallRESTAPI "GET" "$jobUrl" "$header"
"$USERNAME" "$PASSWORD")
jobStatus=`echo $jobOutput | jq '.status'`
done
restStatus=`echo $jobOutput | jq '.details'`
restStatus="${restStatus%\"}"
restStatus="${restStatus#\"}"
statusMessage=""
D-1
Appendix D
if [ $jobStatus == 0 ]; then
statusMessage="$7 completed successfully."
#"$restStatus"
else
statusMessage=$restStatus
fi
echo "$statusMessage"
else
failedMessage=`echo $jobOutput | jq '.details'`
failedMessage="${failedMessage%\"}"
failedMessage="${failedMessage#\"}"
echo $failedMessage
fi
}
funcAddUsers() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&userpassword=$2&resetpassword=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUsers"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcRemoveUsers() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUsers"
statusMessage=$(funcCSSRESTHelper "DELETE" "$url" "$header"
"$USERNAME" "$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcAssignRole() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&jobtype=ASSIGN_ROLE&rolename=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AssignRole"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcUnassignRole() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&jobtype=UNASSIGN_ROLE&rolename=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="UnassignRole"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcAddUsersToGroup() {
D-2
Appendix D
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=ADD_USERS_TO_GROUP&groupname=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUsersToGroup"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcRemoveUsersFromGroup() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=REMOVE_USERS_FROM_GROUP&groupname=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUsersFromGroup"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcAddUserToGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=ADD_USER_TO_GROUPS&username=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUserToGroups"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcRemoveUserFromGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=REMOVE_USER_FROM_GROUPS&username=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUserFromGroups"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcGenerateRoleAssignmentReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
roleassignmentreport"
params="filename=$1&usertype=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateRoleAssignmentReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcGenerateUserGroupReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/usergroupreport"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateUserGroupReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
D-3
Appendix D
funcAddGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="addGroups"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcRemoveGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="removeGroups"
statusMessage=$(funcCSSRESTHelper "DELETE" "$url" "$header"
"$USERNAME" "$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcGenerateInvalidLoginReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
invalidloginreport"
params="from_date=$1&to_date=$2&filename=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateInvalidLoginReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcGenerateRoleAssignmentAuditReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
roleassignmentauditreport"
params="from_date=$1&to_date=$2&filename=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateRoleAssignmentAuditReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcUpdateUsers() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&jobtype=UPDATE_USERS"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="UpdateUsers"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
D-4
Appendix D
D-5
E
CSS Common Helper Functions for Groovy
This appendix shows the CSS common helper functions for Groovy for the Cloud EPM REST
APIs.
Note:
• Proxy setting: In case of proxies, set the proxy host and port as the system arguments.
• Username: The username variable uses the format <domain>.<username>.
Authentication.
import java.nio.charset.StandardCharsets
import groovy.json.JsonSlurper
serverUrl="<SERVICE_URL>"
username="<DOMAINNAME.USERNAME>"
password="<PASSWORD>"
apiVersion = "v1";
userCredentials = username + ":" + password;
basicAuth = "Basic " +
javax.xml.bind.DatatypeConverter.printBase64Binary(userCredentials.getBytes())
def getResponse(is) {
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line+"\n");
}
br.close();
return sb.toString();
}
E-1
Appendix E
def getJobStatusFromResponse(response) {
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == -1)
return "Processing"
else if (status == 0)
return "Completed"
else
return object.details
}
def getJobDetailsFromResponse(response) {
def object = new JsonSlurper().parseText(response)
def details = object.details
if (details != null)
return object.details
else
return null
}
if (payload != null) {
E-2
Appendix E
int statusCode
try {
statusCode = connection.responseCode;
} catch (all) {
println "Error connecting to the URL"
System.exit(0);
}
def response
if (statusCode == 200 || statusCode == 201) {
if (connection.getContentType() != null && !
connection.getContentType().startsWith("application/json")) {
println "Error occurred in server"
System.exit(0)
}
InputStream is = connection.getInputStream();
if (is != null)
response = getResponse(is)
} else {
println "Error occurred while executing request"
println "Response error code : " + statusCode
InputStream is = connection.getErrorStream();
if (is != null && connection.getContentType() != null &&
connection.getContentType().startsWith("application/json"))
println getJobStatusFromResponse(getResponse(is))
System.exit(0);
}
connection.disconnect();
return response;
}
E-3
Appendix E
"GET");
}
}
String scenario = "Removing users in " + fileName + " from group " +
groupName;
String params = "jobtype=REMOVE_USERS_FROM_GROUP&filename="+ fileName
+"&groupname="+ groupName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
String scenario = "Adding users in " + fileName + " to group " + userName;
String params = "jobtype=ADD_USER_TO_GROUPS&filename="+ fileName
+"&username="+ userName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
String scenario = "Removing users in " + fileName + " from group " +
userName;
String params = "jobtype=REMOVE_USER_FROM_GROUPS&filename="+ fileName
+"&username="+ userName;
def url = null;
E-4
Appendix E
def addUsers(fileName) {
addUsers(fileName, null, null);
}
def deleteUsers(fileName) {
E-5
Appendix E
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
String scenario = "Assigning users in " + fileName + " with role " +
roleName;
String params = "jobtype=ASSIGN_ROLE&filename="+ fileName +"&rolename="+
roleName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
users");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
String scenario = "Un-assigning users in " + fileName + " with role " +
roleName;
String params = "jobtype=UNASSIGN_ROLE&filename="+ fileName
+"&rolename="+ roleName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
users");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
E-6
Appendix E
def generateUserGroupReport(fileName) {
def addGroups(fileName) {
println "addgroups"
String scenario = "Creating Groups in " + fileName;
String params = "filename="+ fileName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params, "application/x-www-form-
urlencoded");
E-7
Appendix E
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
def removeGroups(fileName) {
def generateRoleAssignmentAuditReport(from_date,to_date,fileName) {
def generateInvalidLoginReport(from_date,to_date,fileName) {
E-8
Appendix E
te+"&filename="+ fileName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
invalidloginreport");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
def updateUsers(fileName) {
//POST
//
deleteUsers("RemoveUsers.csv");
//DELETE
//assignUsersRoles("Users.csv", "Service
E-9
Appendix E
Administrator"); //PUT
//assignUsersRoles("users.csv",
"viewer"); //PUT
//unassignUsersRoles("Users.csv", "Drill
Through"); //PUT
//
generateRoleAssignmentReport("GroovySampleReport3.csv,"ServiceUsers");
// POST
//
generateUserGroupReport("UserGroupReportGroovy.csv");
// POST
//addUserToGroups("Group.csv",
"user1"); //PUT
//removeUserFromGroups("groups.csv",
"joe"); //PUT
//
addGroups("CreateGroup1.csv");
// POST
//
removeGroups("DeleteGroup1.csv");
// DELETE
//generateInvalidLoginReport("2020-06-01", "2021-06-10",
"report12345.csv"); //POST
//updateUsers("updateuser.csv"); // PUT
E-10
F
REST API Examples with Postman
This appendix provides examples of how to run selected REST APIs using a web client called
Postman.
Examples:
• Example: Using REST APIs to Upload with Postman
• Example: Using REST APIs to Upload to an External Directory with Postman
• Example: Using REST APIs to Upload a Snapshot with Postman
For an example of coding parameters, scroll down to the end of this topic.
Notes:
• This example uses the 11.1.2.3.600 Upload API, which is a simpler non-chunked version.
• The name of the file is passed in the URL itself, for example, https://<BASE-URL>/
interop/rest/11.1.2.3.600/applicationsnapshots/users.csv/contents
• If the filename contains special characters or has whitespace, it should be encoded using
any online resource, such as urlencode.org.
1. Example of Upload parameters.
F-1
Appendix F
Example: Using REST APIs to Upload with Postman
F-2
Appendix F
Example: Using REST APIs to Upload to an External Directory with Postman
Notes:
• This example uses the 11.1.2.3.600 Upload API, which is a simpler non-chunked version.
• The name of the file is passed in the URL itself, for example, https://<BASE-URL>/
interop/rest/11.1.2.3.600/applicationsnapshots/data.txt/contents?
extDirPath=inbox
• If the filename contains special characters or has white space, it must be encoded using
any online resource, such as urlencode.org . (See an example at the bottom of this topic:
Example: Using REST APIs to Upload with Postman .)
1. Example of parameters for Upload to external directory.
F-3
Appendix F
Example: Using REST APIs to Upload a Snapshot with Postman
Notes:
• We are using the 11.1.2.3.600 Upload API, which is a simpler non-chunked version.
• The name of the file is passed in the URL itself, for example, https://<BASE-URL>/
interop/rest/11.1.2.3.600/applicationsnapshots/Artifact%20Snapshot.zip/
contents
• If the filename contains special characters or has white space, it must be encoded using
any online resource, such as urlencode.org
1. Example of Upload snapshot parameters.
F-4
Appendix F
Example: Using REST APIs to Upload a Snapshot with Postman
F-5
Appendix F
Example: Using REST APIs to Upload a Snapshot with Postman
F-6
G
Profitability and Cost Management Common
Helper Functions
Use the Profitability and Cost Management common helper functions as you work with
Profitability and Cost Management REST APIs..
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.xml.bind.DatatypeConverter;
import org.json.JSONArray;
import org.json.JSONObject;
G-1
Appendix G
Profitability and Cost Management Common Helper Functions for Java
// samples.generateRoleAssignmentReport("JavaSampleReport.csv");
// samples.generateUserGroupReport("UserGroupReport.csv");
// samples.addUserToGroups("Group.csv", "user1");
// samples.removeUserFromGroups("groups.csv", "joe");
// samples.addGroups("Group1.csv");
// samples.removeGroups("DeleteGroup1.csv");
// samples.generateInvalidLoginReport("2021-06-01",
"2021-06-10","invalidLoginReport141.csv");
// samples.generateRoleAssignmentAuditReport("2021-06-01",
"2021-06-10","roleAssignmentaudit_14778.csv");
} catch (Throwable x) {
System.err.println("Error: " + x.getMessage());
}
}
G-2
Appendix G
Profitability and Cost Management Common Helper Functions for Java
this.password).getBytes(Charset.defaultCharset())));
G-3
Appendix G
Profitability and Cost Management Common Helper Functions for Java
G-4
Appendix G
Profitability and Cost Management Common Helper Functions for Java
e.printStackTrace();
}
}
G-5
Appendix G
Profitability and Cost Management Common Helper Functions for Java
G-6
Appendix G
Profitability and Cost Management Common Helper Functions for Java
G-7
Appendix G
Profitability and Cost Management Common Helper Functions for Java
e.printStackTrace();
}
}
urlConnection = (HttpURLConnection)
G-8
Appendix G
Profitability and Cost Management Common Helper Functions for Java
uri.toURL().openConnection();
urlConnection.setRequestMethod(methodType);
if (requestHeaders != null) {
Set<String> requestHeaderKeys = requestHeaders.keySet();
for (String requestHeaderKey : requestHeaderKeys) {
urlConnection.setRequestProperty(requestHeaderKey,
requestHeaders.get(requestHeaderKey));
}
}
urlConnection.setUseCaches(false);
urlConnection.setDoOutput(true);
urlConnection.setDoInput(true);
if (isPostMethod) {
OutputStreamWriter writer = new
OutputStreamWriter(urlConnection.getOutputStream(),
Charset.defaultCharset());
writer.write(reqParams);
writer.flush();
}
if (!isPostMethod) {
urlConnection.connect();
}
G-9
Appendix G
Profitability and Cost Management Common Helper Functions for Java
result.append((isPostMethod ?
URLEncoder.encode(reqParamKey, "UTF-8") : reqParamKey));
result.append("=");
result.append((isPostMethod ?
URLEncoder.encode(reqParamValue, "UTF-8") : reqParamValue));
}
reqParams = result.toString();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return reqParams;
}
G-10
Appendix G
Profitability and Cost Management Common Helper Functions for cURL
jobStatus = jsonResponse.get("status").toString();
} catch (Exception ex) {
ex.printStackTrace();
}
return jobStatus;
}
jobStatusResult.get(CSSRESTHelper.REST_CALL_RESPONSE));
}
Thread.sleep(1000);
}
completionStatus =
jobStatusResult.get(CSSRESTHelper.REST_CALL_RESPONSE);
}
} catch (Exception ex) {
ex.printStackTrace();
}
return completionStatus;
}
};
}
#!/bin/sh
#set -x
export PATH=$PATH:<PATH_TO_JQ_BINARY>
SERVER_URL="<SERVICE_URL>"
USERNAME="<USERNAME>"
PASSWORD="<PASSWORD>"
API_VERSION="v1"
G-11
Appendix G
Profitability and Cost Management Common Helper Functions for cURL
# To avoid SSL connection issue in the environment please add -k option for
below curl commands.
funcCallRESTAPI() {
if [ "$1" == "GET" ] || [ "$1" == "DELETE" ]; then
if [ "$6" != "" ]; then
echo `curl -s -u $4:$5 -H "$3" --request $1 -G $2 -d "$6"`
else
echo `curl -s -u $4:$5 -H "$3" --request $1 -G $2`
fi
else
if [ "$6" != "" ]; then
echo `curl -s -u $4:$5 -H "$3" --request $1 $2 -d
"$6"`
else
echo `curl -s -u $4:$5 -H "$3" --request $1 $2`
fi
fi
}
funcCSSRESTHelper() {
jobOutput=$(funcCallRESTAPI "$1" "$2" "$3" "$4" "$5" "$6")
jobUrl=`echo $jobOutput | jq '.links[1].href'`
if [ $jobUrl != null ]; then
jobUrl="${jobUrl%\"}"
jobUrl="${jobUrl#\"}"
jobStatus=-1
while [ $jobStatus == -1 ]; do
jobOutput=$(funcCallRESTAPI "GET" "$jobUrl" "$header"
"$USERNAME" "$PASSWORD")
jobStatus=`echo $jobOutput | jq '.status'`
done
restStatus=`echo $jobOutput | jq '.details'`
restStatus="${restStatus%\"}"
restStatus="${restStatus#\"}"
statusMessage=""
if [ $jobStatus == 0 ]; then
statusMessage="$7 completed successfully."
#"$restStatus"
else
statusMessage=$restStatus
fi
echo "$statusMessage"
else
failedMessage=`echo $jobOutput | jq '.details'`
failedMessage="${failedMessage%\"}"
failedMessage="${failedMessage#\"}"
echo $failedMessage
fi
}
funcAddUsers() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&userpassword=$2&resetpassword=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUsers"
G-12
Appendix G
Profitability and Cost Management Common Helper Functions for cURL
funcRemoveUsers() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUsers"
statusMessage=$(funcCSSRESTHelper "DELETE" "$url" "$header"
"$USERNAME" "$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcAssignRole() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&jobtype=ASSIGN_ROLE&rolename=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AssignRole"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcUnassignRole() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/users"
params="filename=$1&jobtype=UNASSIGN_ROLE&rolename=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="UnassignRole"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcAddUsersToGroup() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=ADD_USERS_TO_GROUP&groupname=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUsersToGroup"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcRemoveUsersFromGroup() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=REMOVE_USERS_FROM_GROUP&groupname=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUsersFromGroup"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcAddUserToGroups() {
G-13
Appendix G
Profitability and Cost Management Common Helper Functions for cURL
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=ADD_USER_TO_GROUPS&username=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="AddUserToGroups"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcRemoveUserFromGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1&jobtype=REMOVE_USER_FROM_GROUPS&username=$2"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="RemoveUserFromGroups"
statusMessage=$(funcCSSRESTHelper "PUT" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcGenerateRoleAssignmentReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
roleassignmentreport"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateRoleAssignmentReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcGenerateUserGroupReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/usergroupreport"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateUserGroupReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcAddGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="addGroups"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcRemoveGroups() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/groups"
params="filename=$1"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="removeGroups"
statusMessage=$(funcCSSRESTHelper "DELETE" "$url" "$header"
G-14
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
funcGenerateInvalidLoginReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
invalidloginreport"
params="from_date=$1&to_date=$2&filename=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateInvalidLoginReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
funcGenerateRoleAssignmentAuditReport() {
url="$SERVER_URL/interop/rest/security/$API_VERSION/
roleassignmentauditreport"
params="from_date=$1&to_date=$2&filename=$3"
header="Content-Type: application/x-www-form-urlencoded;charset=UTF-8"
cssRESTAPI="generateRoleAssignmentAuditReport"
statusMessage=$(funcCSSRESTHelper "POST" "$url" "$header" "$USERNAME"
"$PASSWORD" "$params" "$cssRESTAPI")
echo $statusMessage
}
import java.nio.charset.StandardCharsets
import groovy.json.JsonSlurper
serverUrl="<SERVICE_URL>"
username="<DOMAINNAME.USERNAME>"
password="<PASSWORD>"
G-15
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
apiVersion = "v1";
userCredentials = username + ":" + password;
basicAuth = "Basic " +
javax.xml.bind.DatatypeConverter.printBase64Binary(userCredentials.getBytes())
def getResponse(is) {
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line+"\n");
}
br.close();
return sb.toString();
}
G-16
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
def getJobStatusFromResponse(response) {
def object = new JsonSlurper().parseText(response)
def status = object.status
if (status == -1)
return "Processing"
else if (status == 0)
return "Completed"
else
return object.details
}
def getJobDetailsFromResponse(response) {
def object = new JsonSlurper().parseText(response)
def details = object.details
if (details != null)
return object.details
else
return null
}
if (payload != null) {
OutputStreamWriter writer = new
OutputStreamWriter(connection.getOutputStream());
writer.write(payload);
writer.flush();
}
int statusCode
try {
statusCode = connection.responseCode;
} catch (all) {
println "Error connecting to the URL"
System.exit(0);
}
def response
if (statusCode == 200 || statusCode == 201) {
if (connection.getContentType() != null && !
connection.getContentType().startsWith("application/json")) {
println "Error occurred in server"
System.exit(0)
}
InputStream is = connection.getInputStream();
if (is != null)
G-17
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
response = getResponse(is)
} else {
println "Error occurred while executing request"
println "Response error code : " + statusCode
InputStream is = connection.getErrorStream();
if (is != null && connection.getContentType() != null &&
connection.getContentType().startsWith("application/json"))
println getJobStatusFromResponse(getResponse(is))
System.exit(0);
}
connection.disconnect();
return response;
}
String scenario = "Removing users in " + fileName + " from group " +
groupName;
String params = "jobtype=REMOVE_USERS_FROM_GROUP&filename="+ fileName
+"&groupname="+ groupName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
G-18
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
"GET");
}
}
String scenario = "Adding users in " + fileName + " to group " + userName;
String params = "jobtype=ADD_USER_TO_GROUPS&filename="+ fileName
+"&username="+ userName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
String scenario = "Removing users in " + fileName + " from group " +
userName;
String params = "jobtype=REMOVE_USER_FROM_GROUPS&filename="+ fileName
+"&username="+ userName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
G-19
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
users");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
def addUsers(fileName) {
addUsers(fileName, null, null);
}
def deleteUsers(fileName) {
String scenario = "Assigning users in " + fileName + " with role " +
roleName;
String params = "jobtype=ASSIGN_ROLE&filename="+ fileName +"&rolename="+
roleName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
users");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
G-20
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
String scenario = "Un-assigning users in " + fileName + " with role " +
roleName;
String params = "jobtype=UNASSIGN_ROLE&filename="+ fileName
+"&rolename="+ roleName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
users");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "PUT", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
def generateRoleAssignmentReport(fileName) {
def generateUserGroupReport(fileName) {
G-21
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
def addGroups(fileName) {
println "addgroups"
String scenario = "Creating Groups in " + fileName;
String params = "filename="+ fileName;
def url = null;
def response = null;
try {
url = new URL(serverUrl + "/interop/rest/security/" + apiVersion + "/
groups");
} catch (MalformedURLException e) {
println "Please enter a valid URL"
System.exit(0);
}
response = executeRequest(url, "POST", params, "application/x-www-form-
urlencoded");
if (response != null) {
getJobStatus(getUrlFromResponse(scenario, response, "Job Status"),
"GET");
}
}
def removeGroups(fileName) {
G-22
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
}
}
def generateRoleAssignmentAuditReport(from_date,to_date,fileName) {
def generateInvalidLoginReport(from_date,to_date,fileName) {
G-23
Appendix G
Profitability and Cost Management Common Helper Functions for Groovy
//PUT
//addUsers("AddUsers123.csv", "false",
"newPassword"); //POST
//
addUsers("AddUsers456.csv");
//POST
//
deleteUsers("RemoveUsers.csv");
//DELETE
//assignUsersRoles("Users.csv", "Service
Administrator"); //PUT
//assignUsersRoles("users.csv",
"viewer"); //PUT
//unassignUsersRoles("Users.csv", "Drill
Through"); //PUT
//
generateRoleAssignmentReport("GroovySampleReport3.csv");
// POST
//
generateUserGroupReport("UserGroupReportGroovy.csv");
// POST
//addUserToGroups("Group.csv",
"user1"); //PUT
//removeUserFromGroups("groups.csv",
"joe"); //PUT
//
addGroups("CreateGroup1.csv");
// POST
//
removeGroups("DeleteGroup1.csv");
// DELETE
//generateInvalidLoginReport("2020-06-01", "2021-06-10",
"report12345.csv"); //POST
G-24
H
Sample Starter Kit for Consultants - Integration
with Business Intelligence Cloud Service
This topic describes a sample starter kit that can be used by infrastructure consultants to plan
integration for Planning with Business Intelligence Cloud Service.
Prerequisites
• You have accounts for Business Intelligence Cloud Service, Planning, and Oracle
Application Express.
• You have considerable technical and functional expertise with Business Intelligence Cloud
Service, Planning, Oracle Application Express, REST, Groovy, and scripting.
These are the basic tasks for the sample starter kit for consultants:
• Export data and metadata from Planning using the Planning REST API.
• Download data and metadata to an on-premise server using the Planning REST API.
• Use the metadata to create schema/tables in Business Intelligence Cloud Service using
the Business Intelligence Cloud Service REST API.
• Populate the tables in Business Intelligence Cloud Service using the data imported from
Planning by using the Business Intelligence Cloud Service REST API.
Note:
If you are using DBaaS, the target reporting database can optionally be accessed by
standard tools like SQL Developer and Toad.
Note:
The DataSync tool (available from OTN) can also be used to create tables and load
and update data in the tables. Data uploads can be scheduled using the DataSync
jobs and native scheduler. This approach will work for Database Schema Service and
DBaaS used as reporting database for BICS.
These are the basic steps for the sample starter kit for consultants:
1. Install the scripting engine and deploy demo scripts.
2. Use the SQL APEX REST API client to call a client sample that calls a SQL query with a
bind variable passed on the URL.
3. Use the Business Intelligence REST API client to provide methods as necessary for your
use case.
4. Use the Planning REST API client to provide methods as necessary for your use case.
H-1
Appendix H
Installing the Scripting Engine and Deploying Demo Scripts
pbcsbics
PBCSBICSAutomation.properties
com
oracle
ceal
<groovy files>
3. Open a shell:
cd <yourrootfolder>\pbcsbics
<yourrootfolder>\apache-groovy-binary-2.4.5\groovy-2.4.5\bin\groovy -
classpath
<yourrootfolder>\pbcsbics
<yourrootfolder>\pbcsbics\com\oracle\ceal\PBCSBICSIntegration.groovy
H-2
Appendix H
SQL Application Express REST API client
apexClient.launchSQLQueryUsingGETAndVariableOnUrl("<module name>/<uri>",
"<bind variable>")
Example:
apexClient.launchSQLQueryUsingGETAndVariableOnUrl("bics/test", "7839")
This example uses the following definition of the REST service in APEX:
RESTful Service Module: bics/ URI Template: test/{ID} Method: GET Source Type: Query
Format: JSON Requires Secure Access: YES Source: Select
EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO from EMP where EMPNO = :ID
The URL call will be in the following format:
https://<SERVER>.oraclecloudapps.com/apex/bics/test/7839
The response will be in the following format:
Response Content-Type:application/json
{"next":{"$ref":"https://<SERVER>.oraclecloudapps.com/apex/bics/test/7839?
page=1"},"items":
[{"empno":7839,"ename":"KING","job":"PRESIDENT","hiredate":"1981-11-17T00:0
0:00Z","sal":5000,"deptno":10}]}
H-3
Appendix H
SQL Application Express REST API client
DECLARE
prevdeptno number;
deptloc varchar2(30);
deptname varchar2(30);
CURSOR getemps IS select * from emp
where ((select job from emp where ename = :empname) IN
('PRESIDENT', 'MANAGER'))
or deptno = (select deptno from emp where ename
= :empname)
order by deptno, ename;
BEGIN
sys.htp.htmlopen;
sys.htp.headopen;
sys.htp.title('Departments');
sys.htp.headclose;
sys.htp.bodyopen;
for emprecs in getemps
loop
if emprecs.deptno != prevdeptno or prevdeptno is null then
select dname, loc into deptname, deptloc
from dept where deptno = (select deptno
from emp where ename = emprecs.ename);
if prevdeptno is not null then
sys.htp.print('</ul>');
end if;
sys.htp.print('Department ' || deptname || ' located
in ' || deptloc || '<p/>');
sys.htp.print('<ul>');
end if;
sys.htp.print('<li>' || emprecs.ename || ', ' || emprecs.job
|| ', ' || emprecs.sal || '</li>');
prevdeptno := emprecs.deptno;
end loop;
sys.htp.print('</ul>');
sys.htp.bodyclose;
sys.htp.htmlclose;
END;
H-4
Appendix H
Business Intelligence REST API Client
bicsClient.createTableToLoadCSV("ceal_4", 3 ,"MYCOL")
This creates a table called CEAL_4 with three columns named: MYCOL1, MYCOL2, MYCOL3
H-5
Appendix H
Planning REST API Client
bicsClient.loadDataInTableUsingCSV("ceal_4","d:\
\temp","export.csv",",",3,0,"MYCOL",false)
PbcsRestClient pbcsClient=new
PbcsRestClient(pbcsParams.planningRestUrl,pbcsParams.interopRestUrl,pbcsPar
ams.proxyHost,pbcsParams.proxyPort,pbcsParams.identityDomain,pbcsParams.use
rname, pbcsParams.password, pbcsParams.ignoreSSLCertificationPathErrors)
H-6
Appendix H
Planning REST API Client
H-7
Appendix H
Helper Functions
Helper Functions
• The properties file containing connection parameters can also be accessed using this
class:
com.oracle.ceal.BICSAutomationParameters or
com.oracle.ceal.PBCSAutomationParameters or
com.oracle.ceal.APEXAutomationParameters
The Properties file must contain for BICS:
proxyHost=
proxyPort=
ignoreSSLCertificationPathErrors=true or false
bicsRestUrl=https://biserverurl
bicsIdentityDomain=
bicsUsername=
bicsPassword=
PBCSAutomationParameters pbcsParams=new
PBCSAutomationParameters(‘PBCSBICSAutomation.properties’)
pbcsClient=new
PbcsRestClient(pbcsParams.planningRestUrl,pbcsParams.interopRestUrl,pbcsPar
ams.proxyHost,pbcsParams.proxyPort,pbcsParams.identityDomain,pbcsParams.use
rname, pbcsParams.password, pbcsParams.ignoreSSLCertificationPathErrors)
pbcsPlanningRestUrl=https://<SERVER>/rest/11.1.2.3.600
pbcsInteropRestUrl=https://<SERVER>/interop/rest/11.1.2.3.600
pbcsIdentityDomain=
pbcsUsername=
pbcsPassword=
proxyHost=
proxyPort=
ignoreSSLCertificationPathErrors=true or false
APEXAutomationParameters apexParams=new
APEXAutomationParameters('PBCSBICSAutomation.properties')
H-8
Appendix H
Helper Functions
apexClient=new
ApexRestClient(apexParams.apexRestUrl,apexParams.proxyHost,apexParams.proxy
Port,apexParams.identityDomain,apexParams.username, apexParams.password,
apexParams.ignoreSSLCertificationPathErrors)
apexRestUrl=https://apexserver/apex
apexIdentityDomain=
apexUsername=
apexPassword=
proxyHost=
proxyPort=
ignoreSSLCertificationPathErrors=true or false
• The Planning REST client also contains helper functions for dealing with CSV files:
– Finding the number of columns in a .csv file
Example:
nbColsInCsv=pbcsClient.findNbOfColsInCSV("d:\\temp\\", "export.csv", ",")
– Finding header names in a .csv file (first line):
listHeaders=pbcsClient.getHeadersInCSVAsList(folder containing csv file,
csv filename, delimiter)
Example:
listHeaders=pbcsClient.getHeadersInCSVAsList("d:\\temp\\", fileName, ",")
• The Planning REST client also contains helpers functions for dealing with asynchronous
calls:
Class WaitForCode
Method retry(sleep time, nb of retries) { code to run }
Example:
• The Business Intelligence Cloud Service REST client also contains helpers functions for
trimming lists:
def truncateList(listName, truncateLength)
H-9
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def listHeaders
listHeaders=pbcsClient.getHeadersInCSVAsList("d:\\temp\\", fileNameInZip,
",")
listHeaders=bicsClient.truncateList(listHeaders, 30)
class PBCSBICSIntegration {
static main(args) {
def pbcsExportfiles
PbcsRestClient pbcsClient
BicsRestClient bicsClient
ApexRestClient apexClient
PBCSAutomationParameters pbcsParams=new
PBCSAutomationParameters('PBCSBICSAutomation.properties')
if (pbcsParams.isConfigValid() == true) {
pbcsClient=new
PbcsRestClient(pbcsParams.planningRestUrl,pbcsParams.interopRestUrl,pbcsParams
.proxyHost,pbcsParams.proxyPort,pbcsParams.identityDomain,pbcsParams.username,
pbcsParams.password, pbcsParams.ignoreSSLCertificationPathErrors)
pbcsClient.listFiles()
pbcsClient.deleteFile("ExportOliv.zip")
pbcsClient.deleteFile("ExportMetadataOliv.zip")
def response
//last parameter is server filename for export. If not set, this
defaults to jobname as filename
response=pbcsClient.exportData("Vision","JobOliv","ExportOliv.zip")
String jobId = "";
jobId=pbcsClient.getJobIdFromJSONResponse(response)
if (jobId!="") println "Export running with jobid:"+jobId
H-10
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def responseJobStatus
responseJobStatus=pbcsClient.getJobStatus("Vision",jobId)
if (responseJobStatus.contains("Processing")) throw new
Exception("Job not finished"
}
pbcsClient.exportMetaData("Vision","JobOlivMeta","ExportMetadataOliv.zip")
pbcsClient.downloadFile("ExportMetadataOliv.zip","d:\\temp")
pbcsExportfiles=pbcsClient.unZip("d:\\temp\\ExportOliv.zip","d:\
\temp\\")
pbcsExportfiles.each { fileNameInZip ->
println "-->"+fileNameInZip
println "Nb of cols in csv:"+pbcsClient.findNbOfColsInCSV("d:\
\temp\\", fileNameInZip, ",")
def headers
headers=pbcsClient.getHeadersInCSVAsList("d:\\temp\\",
fileNameInZip, ",")
headers.each { header ->
println "header --"+header+"--"
}
println "<--"
}
} else {
println "Configuration for PBCS is invalid. Please check
PBCSBICSAutomation.properties"
}
BICSAutomationParameters bicsParams=new
BICSAutomationParameters('PBCSBICSAutomation.properties')
if (bicsParams.isConfigValid() == true) {
// load to bics
bicsClient=new
BicsRestClient(bicsParams.bicsRestUrl,bicsParams.proxyHost,bicsParams.proxyPor
t,bicsParams.identityDomain,bicsParams.username, bicsParams.password,
bicsParams.ignoreSSLCertificationPathErrors)
bicsClient.aboutBics()
bicsClient.listAllTables()
bicsClient.getTableInfo("ceal_4")
bicsClient.deleteTable("ceal_4")
// this creates a table with x columns MYCOL1 MYCOL2 MYCOL3
bicsClient.createTableToLoadCSV("ceal_4", 3 ,"MYCOL")
bicsClient.deleteDataFromTable("ceal_4")
//loadDataInTableUsingCSV(tableName, localCsvFilePath,
localCsvFileName,
delimiterInCsv,numberOfColumnsInCsv,numberOfLinesToSkip,columnPrefixInTable,is
H-11
Appendix H
Integration of Planning to Business Intelligence Cloud Service
Zipped)
bicsClient.loadDataInTableUsingCSV("ceal_4", "d:\
\temp","export.csv",",",3,0,"MYCOL",false)
def listHeaders
listHeaders=pbcsClient.getHeadersInCSVAsList("d:\\temp\\",
fileNameInZip, ",")
listHeaders=bicsClient.truncateList(listHeaders, 30)
bicsClient.deleteTable("ceal_8")
bicsClient.createTableToLoadCSVWithHeaderNames("ceal_8",
listHeaders )
//loadDataInTableUsingCSVAndHeader(tableName,
localCsvFilePath, localCsvFileName,
delimiterInCsv,numberOfLinesToSkip,listHeaders,isZipped)
bicsClient.loadDataInTableUsingCSVAndHeader("ceal_8", "d:\
\temp",fileNameInZip,",",1,listHeaders,false)
println "<--"
}
println "****"
}else {
println "Configuration for BICS is invalid. Please check
PBCSBICSAutomation.properties"
}
APEXAutomationParameters apexParams=new
APEXAutomationParameters('PBCSBICSAutomation.properties')
if (apexParams.isConfigValid() == true) {
// load to bics
apexClient=new
ApexRestClient(apexParams.apexRestUrl,apexParams.proxyHost,apexParams.proxyPor
t,apexParams.identityDomain,apexParams.username, apexParams.password,
apexParams.ignoreSSLCertificationPathErrors)
// see ApexRestClient.groovy method def
launchProcUsingGETAndParameterOnUrl(apexUri, parameter) for info on the rest
configuration on server
apexClient.launchSQLQueryUsingGETAndVariableOnUrl("bics/test",
"7839")
apexClient.launchProcUsingGET("bics/plsql/")
} else {
println "Configuration for Apex is invalid. Please check
PBCSBICSAutomation.properties"
}
H-12
Appendix H
Integration of Planning to Business Intelligence Cloud Service
}
}
pbcsPlanningRestUrl=https://<SERVER>/HyperionPlanning/rest/11.1.2.3.600
pbcsInteropRestUrl=https://<SERVER>/interop/rest/11.1.2.3.600
pbcsIdentityDomain=
pbcsUsername=
pbcsPassword=
proxyHost=
proxyPort=
ignoreSSLCertificationPathErrors=false
bicsRestUrl=https://bicsserver
bicsIdentityDomain=
bicsUsername=
bicsPassword=
apexRestUrl=https://dbserver/apex
apexIdentityDomain=
apexUsername=
apexPassword=
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.HttpsURLConnection
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLSession
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
import java.net.HttpURLConnection
import java.util.regex.Pattern
import java.util.regex.Matcher
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
class PbcsRestClient {
private HttpURLConnection connection
private def planningUrl
private def interopUrl
private def proxyHost
private def proxyPort
private def user
private def pwd
private def domain
private def ignoreSSLCertsErrors
H-13
Appendix H
Integration of Planning to Business Intelligence Cloud Service
planningUrl=planningServerUrl
interopUrl=interopServerUrl
proxyHost=httpProxyHost
proxyPort=httpProxyPort
domain=identityDomain
user=username
pwd=password
ignoreSSLCertsErrors=ignoreSSLCertificationPathErrors
def setProxyParams() {
Properties systemProperties = System.getProperties()
systemProperties.setProperty("http.proxyHost",proxyHost)
systemProperties.setProperty("http.proxyPort",proxyPort)
systemProperties.setProperty("https.proxyHost",proxyHost)
systemProperties.setProperty("https.proxyPort",proxyPort)
def setSSLParams() {
if (ignoreSSLCertsErrors !=null &&
ignoreSSLCertsErrors.toUpperCase()=="TRUE") {
println "Ignoring SSL certification path errors"
// Disable SSL cert validation
def hostnameVerifier = [
verify: { hostname, session -> true }
]
def trustManager = [
checkServerTrusted: { chain, authType -> },
checkClientTrusted: { chain, authType -> },
getAcceptedIssuers: { null }
]
HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier as
HostnameVerifier)
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory())
}
}
def openConnection(restUrl,method,localFileNameWithPathForStorage) {
println "Opening connection to $restUrl with method:$method"
int statusCode
setProxyParams()
setSSLParams()
URL newUrl
newUrl=new URL(restUrl)
H-14
Appendix H
Integration of Planning to Business Intelligence Cloud Service
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
if (method=="")
connection.setRequestMethod("GET")
else
connection.setRequestMethod(method)
connection.setRequestProperty("Content-Type","application/x-www-form-
urlencoded")
String response=""
try {
statusCode = connection.responseCode
println "Connection status code: $statusCode "
if (statusCode==401) {
println "Not authorized"
}
if (statusCode==200) {
println "Authentication succeeded"
println "Server response:"
println "-----"
response=displayServerResponse(connection,localFileNameWithPathForStorage)
println "-----"
}
if (statusCode==400) {
println "Bad request"
println "Server response:"
println "-----"
response=displayServerResponse(connection,"")
println "-----"
}
} catch (Exception e) {
println "Error connecting to the URL"
println e.getMessage()
} finally {
if (connection != null) {
connection.disconnect();
}
}
return response
}
def displayServerResponse(connection,localFileNameWithPathForStorage) {
InputStream is;
if (connection.getResponseCode()==200) {
H-15
Appendix H
Integration of Planning to Business Intelligence Cloud Service
is=connection.getInputStream();
} else {
is=connection.getErrorStream();
}
println "Response Content-Type:"+connection.getContentType()
if (connection.getContentType().contains("application/json")) {
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line+"\n");
}
br.close();
println sb
return sb.toString()
} else {
if (connection.getResponseCode()==200) {
//storing content
final int BUFFER_SIZE = 5 * 1024 * 1024;
def fileExt = connection.getHeaderField("fileExtension");
println "Downloading file with fileExtension header:"+fileExt
if (fileExt!=null) {
def saveFilePath = localFileNameWithPathForStorage;
File f = new File(saveFilePath);
is = connection.getInputStream();
FileOutputStream outputStream = new FileOutputStream(f);
int bytesRead = -1;
byte[] buffer = new byte[BUFFER_SIZE];
while ((bytesRead = is.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
println "Downloaded file to $localFileNameWithPathForStorage"
return localFileNameWithPathForStorage
} else {
println "Could not find fileExtension header"
}
}
}
return ""
}
def listFiles() {
println "**Listing files**"
def restUrl=interopUrl+"/applicationsnapshots"
def response
response=openConnection(restUrl,"GET","")
println "****"
}
def deleteFile(serverFileName) {
println "**deleting file**"
def restUrl=interopUrl+"/applicationsnapshots/"+serverFileName
def response
H-16
Appendix H
Integration of Planning to Business Intelligence Cloud Service
response=openConnection(restUrl,"DELETE","")
println "****"
}
def getJobStatus(appName,jobId) {
println "**get Job status**"
def restUrl=planningUrl+"/applications/"+appName+"/jobs/" + jobId
def response
response=openConnection(restUrl,"GET","")
println "****"
return response
}
def response
response=openConnection(restUrl,"POST","")
println "****"
return response
}
def getJobIdFromJSONResponse(response) {
def jobId=""
try {
Pattern regex = Pattern.compile("\"jobId\":\\d+");
Matcher matcher = regex.matcher(response);
while (matcher.find()) {
jobId = matcher.group(0).replace("\"jobId\":","");
}
} catch (Exception e) {
println "No jobId found in server response"
}
return jobId
}
def downloadFile(serverFileName,localFolderForStorage) {
println "**Downloading file**"
def restUrl=interopUrl+"/applicationsnapshots/"+serverFileName+ "/
contents"
def response
response=openConnection(restUrl,"GET",localFolderForStorage+"/"+serverFileName
)
println "****"
}
H-17
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def executeLCMExport(snapshotName) {
println "**Exporting snapshot**"
def typeExport="{type:export}"
def restUrl=interopUrl+"/applicationsnapshots/"+snapshotName+ "/
migration?q="+typeExport
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def executeLCMImport(snapshotName) {
println "**Importing snapshot**"
def typeImport="{type:import}"
def restUrl=interopUrl+"/applicationsnapshots/"+snapshotName+ "/
migration?q="+typeImport
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def runRuleSet(appName,jobName) {
println "**Running rule set**"
def restUrl=planningUrl+"/applications/"+appName+"/jobs?jobName=" +
jobName + "&jobType=RULESET"
def response
response=openConnection(restUrl,"POST","")
println "****"
}
H-18
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def cubeRefresh(appName,jobName) {
println "**Refreshing cube**"
def restUrl=planningUrl+"/applications/"+appName+"/jobs?jobName=" +
jobName + "&jobType=CUBE_REFRESH"
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def uploadFile(localPath,fileName) {
println "**Uploading file**"
H-19
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def restUrl=interopUrl+"/applicationsnapshots/"+fileName
def url=restUrl+"/contents?
q={isLast:$isLast,chunkSize:"+lastChunk.length+",isFirst:$isLast}"
println "Opening connection for upload to $url"
H-20
Appendix H
Integration of Planning to Business Intelligence Cloud Service
int statusCode
setProxyParams()
setSSLParams()
URL newUrl
newUrl=new URL(url)
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
connection.setRequestMethod("POST")
connection.setRequestProperty("Content-Type","application/octet-
stream")
} catch (Exception e) {
println "Exception occurred while uploading file";
println e.getMessage()
} finally {
if (connection != null) {
connection.disconnect();
}
}
H-21
Appendix H
Integration of Planning to Business Intelligence Cloud Service
// Helper functions
}
return fileList
println "****"
}
def nbCols
nbCols=0
if (scanner.hasNextLine()) {
H-22
Appendix H
Integration of Planning to Business Intelligence Cloud Service
return nbCols
}
return headersList
}
class WaitForCode {
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.HttpsURLConnection
import javax.net.ssl.SSLContext
H-23
Appendix H
Integration of Planning to Business Intelligence Cloud Service
import javax.net.ssl.SSLSession
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
import java.net.HttpURLConnection
import java.util.regex.Pattern
import java.util.regex.Matcher
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
class PbcsRestClient {
private HttpURLConnection connection
private def planningUrl
private def interopUrl
private def proxyHost
private def proxyPort
private def user
private def pwd
private def domain
private def ignoreSSLCertsErrors
def setProxyParams() {
Properties systemProperties = System.getProperties()
systemProperties.setProperty("http.proxyHost",proxyHost)
systemProperties.setProperty("http.proxyPort",proxyPort)
systemProperties.setProperty("https.proxyHost",proxyHost)
systemProperties.setProperty("https.proxyPort",proxyPort)
def setSSLParams() {
if (ignoreSSLCertsErrors !=null &&
ignoreSSLCertsErrors.toUpperCase()=="TRUE") {
println "Ignoring SSL certification path errors"
// Disable SSL cert validation
def hostnameVerifier = [
verify: { hostname, session -> true }
]
def trustManager = [
checkServerTrusted: { chain, authType -> },
H-24
Appendix H
Integration of Planning to Business Intelligence Cloud Service
HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier as
HostnameVerifier)
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory())
}
}
def openConnection(restUrl,method,localFileNameWithPathForStorage) {
println "Opening connection to $restUrl with method:$method"
int statusCode
setProxyParams()
setSSLParams()
URL newUrl
newUrl=new URL(restUrl)
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
if (method=="")
connection.setRequestMethod("GET")
else
connection.setRequestMethod(method)
connection.setRequestProperty("Content-Type","application/x-www-form-
urlencoded")
String response=""
try {
statusCode = connection.responseCode
println "Connection status code: $statusCode "
if (statusCode==401) {
println "Not authorized"
}
if (statusCode==200) {
println "Authentication succeeded"
println "Server response:"
println "-----"
H-25
Appendix H
Integration of Planning to Business Intelligence Cloud Service
response=displayServerResponse(connection,localFileNameWithPathForStorage)
println "-----"
}
if (statusCode==400) {
println "Bad request"
println "Server response:"
println "-----"
response=displayServerResponse(connection,"")
println "-----"
}
} catch (Exception e) {
println "Error connecting to the URL"
println e.getMessage()
} finally {
if (connection != null) {
connection.disconnect();
}
}
return response
}
def displayServerResponse(connection,localFileNameWithPathForStorage) {
InputStream is;
if (connection.getResponseCode()==200) {
is=connection.getInputStream();
} else {
is=connection.getErrorStream();
}
println "Response Content-Type:"+connection.getContentType()
if (connection.getContentType().contains("application/json")) {
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line+"\n");
}
br.close();
println sb
return sb.toString()
} else {
if (connection.getResponseCode()==200) {
//storing content
final int BUFFER_SIZE = 5 * 1024 * 1024;
def fileExt = connection.getHeaderField("fileExtension");
println "Downloading file with fileExtension header:"+fileExt
if (fileExt!=null) {
def saveFilePath = localFileNameWithPathForStorage;
File f = new File(saveFilePath);
is = connection.getInputStream();
FileOutputStream outputStream = new FileOutputStream(f);
int bytesRead = -1;
byte[] buffer = new byte[BUFFER_SIZE];
while ((bytesRead = is.read(buffer)) != -1) {
outputStream.write(buffer, 0, bytesRead);
}
H-26
Appendix H
Integration of Planning to Business Intelligence Cloud Service
}
}
}
return ""
}
def listFiles() {
println "**Listing files**"
def restUrl=interopUrl+"/applicationsnapshots"
def response
response=openConnection(restUrl,"GET","")
println "****"
}
def deleteFile(serverFileName) {
println "**deleting file**"
def restUrl=interopUrl+"/applicationsnapshots/"+serverFileName
def response
response=openConnection(restUrl,"DELETE","")
println "****"
}
def getJobStatus(appName,jobId) {
println "**get Job status**"
def restUrl=planningUrl+"/applications/"+appName+"/jobs/" + jobId
def response
response=openConnection(restUrl,"GET","")
println "****"
return response
}
def response
response=openConnection(restUrl,"POST","")
println "****"
return response
}
def getJobIdFromJSONResponse(response) {
H-27
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def jobId=""
try {
Pattern regex = Pattern.compile("\"jobId\":\\d+");
Matcher matcher = regex.matcher(response);
while (matcher.find()) {
jobId = matcher.group(0).replace("\"jobId\":","");
}
} catch (Exception e) {
println "No jobId found in server response"
}
return jobId
}
def downloadFile(serverFileName,localFolderForStorage) {
println "**Downloading file**"
def restUrl=interopUrl+"/applicationsnapshots/"+serverFileName+ "/
contents"
def response
response=openConnection(restUrl,"GET",localFolderForStorage+"/"+serverFileName
)
println "****"
}
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def executeLCMExport(snapshotName) {
println "**Exporting snapshot**"
def typeExport="{type:export}"
def restUrl=interopUrl+"/applicationsnapshots/"+snapshotName+ "/
migration?q="+typeExport
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def executeLCMImport(snapshotName) {
println "**Importing snapshot**"
def typeImport="{type:import}"
def restUrl=interopUrl+"/applicationsnapshots/"+snapshotName+ "/
migration?q="+typeImport
def response
response=openConnection(restUrl,"POST","")
H-28
Appendix H
Integration of Planning to Business Intelligence Cloud Service
println "****"
}
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def runRuleSet(appName,jobName) {
println "**Running rule set**"
def restUrl=planningUrl+"/applications/"+appName+"/jobs?jobName=" +
jobName + "&jobType=RULESET"
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def cubeRefresh(appName,jobName) {
println "**Refreshing cube**"
def restUrl=planningUrl+"/applications/"+appName+"/jobs?jobName=" +
jobName + "&jobType=CUBE_REFRESH"
def response
response=openConnection(restUrl,"POST","")
println "****"
}
H-29
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def exportFileJSON="{importFileName:$importFileName}"
restUrl=restUrl+"¶meters=" + exportFileJSON
}
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def response
response=openConnection(restUrl,"POST","")
println "****"
}
def uploadFile(localPath,fileName) {
println "**Uploading file**"
def restUrl=interopUrl+"/applicationsnapshots/"+fileName
H-30
Appendix H
Integration of Planning to Business Intelligence Cloud Service
if (status) {
println "\r" + ((100 * totalbytesRead)/
totalFileSize) + "% completed";
} else {
break;
}
packetNo = packetNo + 1;
lastChunk = null;
}
}
} catch (Exception e) {
println "Exception occurred while uploading file";
println e.getMessage()
} finally {
if (null != fis) {
}
}
println "****"
}
def url=restUrl+"/contents?
q={isLast:$isLast,chunkSize:"+lastChunk.length+",isFirst:$isLast}"
println "Opening connection for upload to $url"
int statusCode
setProxyParams()
setSSLParams()
URL newUrl
newUrl=new URL(url)
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
connection.setRequestMethod("POST")
connection.setRequestProperty("Content-Type","application/octet-
stream")
H-31
Appendix H
Integration of Planning to Business Intelligence Cloud Service
InputStream is = connection.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line+"\n");
}
br.close();
String stat = sb.toString();
if (null == stat || stat.isEmpty()) {
return status;
} else {
if (200 == execStatus) {
println stat
}
}
} catch (Exception e) {
println "Exception occurred while uploading file";
println e.getMessage()
} finally {
if (connection != null) {
connection.disconnect();
}
}
}
// Helper functions
H-32
Appendix H
Integration of Planning to Business Intelligence Cloud Service
dest.close();
is.close();
}
} catch (FileNotFoundException fnfe) {
println "Make sure there is not folder in the zip . Zip not
processed"
//fnfe.printStackTrace();
} catch(Exception e) {
println "An error occurred while unzipping."
println e.getMessage()
}
return fileList
println "****"
}
def nbCols
nbCols=0
if (scanner.hasNextLine()) {
String[] vals = scanner.nextLine().split(delimiter);
nbCols=vals.size()
}
scanner.close();
return nbCols
}
return headersList
}
class WaitForCode {
H-33
Appendix H
Integration of Planning to Business Intelligence Cloud Service
import java.net.HttpURLConnection;
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.HttpsURLConnection
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLSession
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
class BicsRestClient {
private HttpURLConnection connection
private bicsUrl
private def proxyHost
private def proxyPort
private def user
private def pwd
private def domain
private def ignoreSSLCertsErrors
def setProxyParams() {
Properties systemProperties = System.getProperties()
systemProperties.setProperty("http.proxyHost",proxyHost)
systemProperties.setProperty("http.proxyPort",proxyPort)
H-34
Appendix H
Integration of Planning to Business Intelligence Cloud Service
systemProperties.setProperty("https.proxyHost",proxyHost)
systemProperties.setProperty("https.proxyPort",proxyPort)
def setSSLParams() {
if (ignoreSSLCertsErrors !=null &&
ignoreSSLCertsErrors.toUpperCase()=="TRUE") {
println "Ignoring SSL certification path errors"
// Disable SSL cert validation
def hostnameVerifier = [
verify: { hostname, session -> true }
]
def trustManager = [
checkServerTrusted: { chain, authType -> },
checkClientTrusted: { chain, authType -> },
getAcceptedIssuers: { null }
]
HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier as
HostnameVerifier)
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory())
}
}
int statusCode
setProxyParams()
setSSLParams()
URL newUrl
newUrl=new URL(restUrl)
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
if (method=="")
connection.setRequestMethod("GET")
else
connection.setRequestMethod(method)
H-35
Appendix H
Integration of Planning to Business Intelligence Cloud Service
if (contentType.toUpperCase()=="FORM") {
connection.setRequestProperty("Content-Type","application/x-www-
form-urlencoded")
}
if (contentType.toUpperCase()=="JSON") {
connection.setRequestProperty("Content-Type","application/json")
}
if (contentType.toUpperCase()=="") {
// add no content type
}
String response=""
try {
statusCode = connection.responseCode
println "Connection status code: $statusCode "
if (statusCode==401 || statusCode==403) {
println "Not authorized"
}
if (statusCode==200) {
println "Authentication succeeded"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
if (statusCode==400 || statusCode==500) {
println "Bad request"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
} catch (Exception e) {
println "Error connecting to the URL"
println e.getMessage()
} finally {
if (connection != null) {
connection.disconnect();
}
H-36
Appendix H
Integration of Planning to Business Intelligence Cloud Service
return response
}
def displayServerResponse(connection) {
InputStream is;
if (connection.getResponseCode()==200) {
is=connection.getInputStream();
} else {
is=connection.getErrorStream();
}
println "Response Content-Type:"+connection.getContentType()
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line+"\n");
}
br.close();
println sb
return sb.toString()
def aboutBics() {
println "**About bics**"
def restUrl=bicsUrl+"/dataload/v1/about"
def response
response=openConnection(restUrl,"GET","FORM","")
println "****"
}
def listAllTables() {
//<URL>/dataload/v1/tables
def response
response=openConnection(restUrl,"GET","FORM","")
println "****"
}
def getTableInfo(tableName) {
println "**Get table info**"
def restUrl=bicsUrl+"/dataload/v1/tables?
name="+tableName.toUpperCase()
def response
response=openConnection(restUrl,"GET","","")
println "****"
H-37
Appendix H
Integration of Planning to Business Intelligence Cloud Service
/*
{
"columnName":"COL_1",
"dataType":"VARCHAR",
"length":300,
"precision":0,
"nullable":true,
"defaultValue":null,
},
* */
def restUrl=bicsUrl+"/dataload/v1/tables/"+tableName.toUpperCase()
def JSONColumns
JSONColumns="["
def i
for (i = 1; i <=numberOfVarCharCols; i++) {
if (i==numberOfVarCharCols) {
JSONColumns=JSONColumns+"{\"columnName\":\""+columnPrefix.toUpperCase()
+""+i+"\",\"dataType\":\"VARCHAR\",\"length\":300,\"precision\":0,\"nullable\"
:true,\"defaultValue\":null}"
} else {
JSONColumns=JSONColumns+"{\"columnName\":\""+columnPrefix.toUpperCase()
+""+i+"\",\"dataType\":\"VARCHAR\",\"length\":300,\"precision\":0,\"nullable\"
:true,\"defaultValue\":null},"
}
}
JSONColumns=JSONColumns+"]"
/*
{
"columnName":"COL_1",
"dataType":"VARCHAR",
"length":300,
"precision":0,
"nullable":true,
"defaultValue":null,
},
H-38
Appendix H
Integration of Planning to Business Intelligence Cloud Service
* */
def restUrl=bicsUrl+"/dataload/v1/tables/"+tableName.toUpperCase()
def JSONColumns
JSONColumns="["
JSONColumns=JSONColumns+"{\"columnName\":\""+headerName.toUpperCase()
+"\",\"dataType\":\"VARCHAR\",\"length\":300,\"precision\":0,\"nullable\":true
,\"defaultValue\":null}"
} else {
JSONColumns=JSONColumns+"{\"columnName\":\""+headerName.toUpperCase()
+"\",\"dataType\":\"VARCHAR\",\"length\":300,\"precision\":0,\"nullable\":true
,\"defaultValue\":null},"
}
}
JSONColumns=JSONColumns+"]"
def restUrl=bicsUrl+"/dataload/v1/tables/"+tableName.toUpperCase()+"/
data"
setProxyParams()
setSSLParams()
URL newUrl
H-39
Appendix H
Integration of Planning to Business Intelligence Cloud Service
newUrl=new URL(restUrl)
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
connection.setRequestMethod("PUT")
//connection.setRequestProperty("X-ID-TENANT-NAME",domain)
String userCredentials = domain +"."+user + ":" + pwd
String basicAuth = "Basic " +
javax.xml.bind.DatatypeConverter.printBase64Binary(userCredentials.getBytes())
connection.setRequestProperty("Authorization", basicAuth)
/*
* The first part is a JSON descriptor (Content-Type: application/
json)
* of the data load. The second part is an input stream
* (Content-Type: application/octet-stream).
* Data in the stream can be text data read
* from comma-separated values (CSV)
* */
// JSON
/*
* {
"columnMaps":[
{
"column":{
"name":"NAME",
"optionalJavaSqlType":null,
"partOfUniqueKey":true,
},
"position":1,
},
{...
}
],
"optionalMaximumErrors":null,
"removeDuplicates":true
"optionalWriteMode":"Insert all",
"delimiter":","
"timestampFormat":"yyyy-MM-dd",
"numberOfLinesToSkip":0
},
*
*
*/
def i
H-40
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def JSONDataLoad
JSONDataLoad="{\"columnMaps\":["
for (i =1; i <=numberOfColumnsInCsv; i++) {
if (i==numberOfColumnsInCsv) {
JSONDataLoad=JSONDataLoad+"{\"column\":
{\"name\":\""+columnPrefixInTable.toUpperCase()
+""+i+"\","+"\"optionalJavaSqlType\":null,\"partOfUniqueKey\":false},"+"\"posi
tion\":"+i+"}"
} else {
JSONDataLoad=JSONDataLoad+"{\"column\":
{\"name\":\""+columnPrefixInTable.toUpperCase()
+""+i+"\","+"\"optionalJavaSqlType\":null,\"partOfUniqueKey\":false},"+"\"posi
tion\":"+i+"},"
}
}
JSONDataLoad=JSONDataLoad+'''],
"optionalMaximumErrors":null,
"removeDuplicates":false,
"optionalWriteMode":"Insert all",
"delimiter":"'''+delimiterInCsv+"\","+'''
"timestampFormat":"",
"numberOfLinesToSkip":''' + numberOfLinesToSkip +'''}
'''
writer.append("--" + boundary).append("\r\n");
writer.append("Content-Type: application/json").append("\r\n");
writer.append("\r\n");
writer.flush();
writer.append(JSONDataLoad)
writer.append("\r\n");
writer.flush();
writer.append("\r\n").flush();
//writer.append("--" + boundary ).append("\r\n");
writer.append("\r\n");
writer.flush();
writer.append("\r\n").flush();
writer.append("--" + boundary + "--").append("\r\n");
H-41
Appendix H
Integration of Planning to Business Intelligence Cloud Service
writer.close();
String response=""
def statusCode
try {
statusCode = connection.responseCode
println "Connection status code: $statusCode "
if (statusCode==401 || statusCode==403) {
println "Not authorized"
}
if (statusCode==200) {
println "Authentication succeeded"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
if (statusCode==400 || statusCode==500) {
println "Bad request"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
} catch (Exception e) {
println "Error connecting to the URL"
println e.getMessage()
} finally {
if (connection != null) {
connection.disconnect();
}
}
println "****"
}
def restUrl=bicsUrl+"/dataload/v1/tables/"+tableName.toUpperCase()+"/
data"
setProxyParams()
setSSLParams()
H-42
Appendix H
Integration of Planning to Business Intelligence Cloud Service
URL newUrl
newUrl=new URL(restUrl)
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
connection.setRequestMethod("PUT")
//connection.setRequestProperty("X-ID-TENANT-NAME",domain)
String userCredentials = domain +"."+user + ":" + pwd
String basicAuth = "Basic " +
javax.xml.bind.DatatypeConverter.printBase64Binary(userCredentials.getBytes())
connection.setRequestProperty("Authorization", basicAuth)
/*
* The first part is a JSON descriptor (Content-Type: application/
json)
* of the data load. The second part is an input stream
* (Content-Type: application/octet-stream).
* Data in the stream can be text data read
* from comma-separated values (CSV)
* */
// JSON
/*
* {
"columnMaps":[
{
"column":{
"name":"NAME",
"optionalJavaSqlType":null,
"partOfUniqueKey":true,
},
"position":1,
},
{...
}
],
"optionalMaximumErrors":null,
"removeDuplicates":true
"optionalWriteMode":"Insert all",
"delimiter":","
"timestampFormat":"yyyy-MM-dd",
"numberOfLinesToSkip":0
},
*
H-43
Appendix H
Integration of Planning to Business Intelligence Cloud Service
*
*/
int i
i=1
def JSONDataLoad
JSONDataLoad="{\"columnMaps\":["
JSONDataLoad=JSONDataLoad+'''],
"optionalMaximumErrors":null,
"removeDuplicates":false,
"optionalWriteMode":"Insert all",
"delimiter":"'''+delimiterInCsv+"\","+'''
"timestampFormat":"",
"numberOfLinesToSkip":''' + numberOfLinesToSkip +'''}
'''
writer.append("--" + boundary).append("\r\n");
writer.append("Content-Type: application/json").append("\r\n");
writer.append("\r\n");
writer.flush();
writer.append(JSONDataLoad)
writer.append("\r\n");
writer.flush();
writer.append("\r\n").flush();
//writer.append("--" + boundary ).append("\r\n");
H-44
Appendix H
Integration of Planning to Business Intelligence Cloud Service
}
outputStream.flush();
inputStream.close();
writer.append("\r\n");
writer.flush();
writer.append("\r\n").flush();
writer.append("--" + boundary + "--").append("\r\n");
writer.close();
String response=""
def statusCode
try {
statusCode = connection.responseCode
println "Connection status code: $statusCode "
if (statusCode==401 || statusCode==403) {
println "Not authorized"
}
if (statusCode==200) {
println "Authentication succeeded"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
if (statusCode==400 || statusCode==500) {
println "Bad request"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
} catch (Exception e) {
println "Error connecting to the URL"
println e.getMessage()
} finally {
if (connection != null) {
connection.disconnect();
}
}
println "****"
}
def deleteTable(tableName) {
println "**Delete table**"
def restUrl=bicsUrl+"/dataload/v1/tables/"+tableName.toUpperCase()
def response
response=openConnection(restUrl,"DELETE","","")
println "****"
}
def deleteDataFromTable(tableName) {
println "**Delete all data from table**"
H-45
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def restUrl=bicsUrl+"/dataload/v1/tables/"+tableName.toUpperCase()+"/
data"
def response
response=openConnection(restUrl,"DELETE","","")
println "****"
}
import java.net.HttpURLConnection;
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.HttpsURLConnection
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLSession
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
class ApexRestClient {
H-46
Appendix H
Integration of Planning to Business Intelligence Cloud Service
def setProxyParams() {
Properties systemProperties = System.getProperties()
systemProperties.setProperty("http.proxyHost",proxyHost)
systemProperties.setProperty("http.proxyPort",proxyPort)
systemProperties.setProperty("https.proxyHost",proxyHost)
systemProperties.setProperty("https.proxyPort",proxyPort)
def setSSLParams() {
if (ignoreSSLCertsErrors !=null &&
ignoreSSLCertsErrors.toUpperCase()=="TRUE") {
println "Ignoring SSL certification path errors"
// Disable SSL cert validation
def hostnameVerifier = [
verify: { hostname, session -> true }
]
def trustManager = [
checkServerTrusted: { chain, authType -> },
checkClientTrusted: { chain, authType -> },
getAcceptedIssuers: { null }
]
HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier as
HostnameVerifier)
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory())
}
}
int statusCode
setProxyParams()
setSSLParams()
URL newUrl
newUrl=new URL(restUrl)
connection.setDoOutput(true)
connection.setDoInput(true)
connection.setUseCaches(false)
if (method=="")
H-47
Appendix H
Integration of Planning to Business Intelligence Cloud Service
connection.setRequestMethod("GET")
else
connection.setRequestMethod(method)
if (contentType.toUpperCase()=="FORM") {
connection.setRequestProperty("Content-Type","application/x-www-
form-urlencoded")
}
if (contentType.toUpperCase()=="JSON") {
connection.setRequestProperty("Content-Type","application/json")
}
if (contentType.toUpperCase()=="") {
// add no content type
}
String response=""
try {
statusCode = connection.responseCode
println "Connection status code: $statusCode "
if (statusCode==401 || statusCode==403) {
println "Not authorized"
}
if (statusCode==200) {
println "Authentication succeeded"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
if (statusCode==400 || statusCode==500) {
println "Bad request"
println "Server response:"
println "-----"
response=displayServerResponse(connection)
println "-----"
}
} catch (Exception e) {
println "Error connecting to the URL"
println e.getMessage()
} finally {
if (connection != null) {
H-48
Appendix H
Integration of Planning to Business Intelligence Cloud Service
connection.disconnect();
}
}
return response
}
def displayServerResponse(connection) {
InputStream is;
if (connection.getResponseCode()==200) {
is=connection.getInputStream();
} else {
is=connection.getErrorStream();
}
println "Response Content-Type:"+connection.getContentType()
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line+"\n");
}
br.close();
println sb
return sb.toString()
}
def launchProcUsingGET(apexUri) {
println "**Launching PL/SQL in apex**"
def restUrl=apexUrl+"/"+apexUri
/*
* Procedure in apex is defined this way
* RESTful Service Module: bics/
URI Template: plsql/
Method: GET
Source Type: PL/SQL
Requires Secure Access: YES
Source:
DECLARE
prevdeptno number;
deptloc varchar2(30);
deptname varchar2(30);
CURSOR getemps IS select * from emp
where ((select job from emp where
ename = :empname) IN ('PRESIDENT', 'MANAGER'))
or deptno = (select deptno from emp
where ename = :empname)
order by deptno, ename;
BEGIN
sys.htp.htmlopen;
sys.htp.headopen;
sys.htp.title('Departments');
sys.htp.headclose;
sys.htp.bodyopen;
H-49
Appendix H
Integration of Planning to Business Intelligence Cloud Service
prevdeptno := emprecs.deptno;
end loop;
sys.htp.print('</ul>');
sys.htp.bodyclose;
sys.htp.htmlclose;
END;
*/
def response
response=openConnection(restUrl,"GET","FORM","")
println "****"
println "****"
}
def launchSQLQueryUsingGETAndVariableOnUrl(apexUri, parameter) {
println "**Launching Sql query in apex**"
/*
* Procedure in apex is defined this way
* RESTful Service Module: bics/
URI Template: test/{ID}
Method: GET
Source Type: Query
Format: JSON
Requires Secure Access: YES
H-50
Appendix H
Integration of Planning to Business Intelligence Cloud Service
Source: select
EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO
from EMP where EMPNO = :ID
*
*/
def restUrl=apexUrl+"/"+apexUri+"/"+parameter
def response
response=openConnection(restUrl,"GET","FORM","")
println "****"
}
}
package com.oracle.ceal
import java.io.File;
import java.util.Properties;
class APEXAutomationParameters {
private Properties props = new Properties()
def apexRestUrl
def APEX_REST_URL='apexRestUrl'
def identityDomain
def APEX_IDENTITY_DOMAIN='apexIdentityDomain'
def username
def APEX_USERNAME='apexUsername'
def password
def APEX_PASSWORD='apexPassword'
def proxyHost
def PROXY_HOST='proxyHost'
def proxyPort
def PROXY_PORT='proxyPort'
def ignoreSSLCertificationPathErrors
def IGNORE_CERT_PATH_ERRORS='ignoreSSLCertificationPathErrors'
public APEXAutomationParameters(propertiesFile) {
def propsFileName=propertiesFile
File propsFile = new File(propsFileName)
try {
props.load(propsFile.newDataInputStream())
} catch ( FileNotFoundException fnfe) {
H-51
Appendix H
Integration of Planning to Business Intelligence Cloud Service
ignoreSSLCertificationPathErrors=props.getProperty(IGNORE_CERT_PATH_ERRORS)
def isConfigValid() {
try {
// Required parameters check
assert apexRestUrl != '' : "$APEX_REST_URL is empty"
assert identityDomain != '' : "$APEX_IDENTITY_DOMAIN is empty"
assert username != '' : "$APEX_USERNAME is empty"
assert password != '' : "$APEX_PASSWORD is empty"
// ssl check
} catch(AssertionError e) {
println e.getMessage()
return false
} catch (MalformedURLException e) {
println "APEX Rest url is incorrect. Current value:$apexRestUrl ,
expected format http|https://"
println e.getMessage()
return false
}
return true
}
package com.oracle.ceal
import java.io.File;
import java.util.Properties;
H-52
Appendix H
Integration of Planning to Business Intelligence Cloud Service
class BICSAutomationParameters {
def bicsRestUrl
def BICS_REST_URL='bicsRestUrl'
def identityDomain
def BICS_IDENTITY_DOMAIN='bicsIdentityDomain'
def username
def BICS_USERNAME='bicsUsername'
def password
def BICS_PASSWORD='bicsPassword'
def proxyHost
def PROXY_HOST='proxyHost'
def proxyPort
def PROXY_PORT='proxyPort'
def ignoreSSLCertificationPathErrors
def IGNORE_CERT_PATH_ERRORS='ignoreSSLCertificationPathErrors'
public BICSAutomationParameters(propertiesFile) {
def propsFileName=propertiesFile
File propsFile = new File(propsFileName)
try {
props.load(propsFile.newDataInputStream())
} catch ( FileNotFoundException fnfe) {
println "$propsFileName BICS properties file not found in the
current directory. Exiting."
System.exit(1);
}
bicsRestUrl=props.getProperty(BICS_REST_URL)
identityDomain=props.getProperty(BICS_IDENTITY_DOMAIN)
username=props.getProperty(BICS_USERNAME)
password=props.getProperty(BICS_PASSWORD)
proxyHost=props.getProperty(PROXY_HOST)
proxyPort=props.getProperty(PROXY_PORT)
ignoreSSLCertificationPathErrors=props.getProperty(IGNORE_CERT_PATH_ERRORS)
def isConfigValid() {
try {
// Required parameters check
assert bicsRestUrl != '' : "$BICS_REST_URL is empty"
assert identityDomain != '' : "$BICS_IDENTITY_DOMAIN is empty"
assert username != '' : "$BICS_USERNAME is empty"
assert password != '' : "$BICS_PASSWORD is empty"
// ssl check
H-53
Appendix H
Integration of Planning to Business Intelligence Cloud Service
} catch(AssertionError e) {
println e.getMessage()
return false
} catch (MalformedURLException e) {
println "BICS Rest url is incorrect. Current value:$bicsRestUrl ,
expected format http|https://"
println e.getMessage()
return false
}
return true
}
package com.oracle.ceal
class PBCSAutomationParameters {
private Properties props = new Properties()
def planningRestUrl
def PBCS_PLANNING_REST_URL='pbcsPlanningRestUrl'
def interopRestUrl
def PBCS_INTEROP_REST_URL='pbcsInteropRestUrl'
def identityDomain
def PBCS_IDENTITY_DOMAIN='pbcsIdentityDomain'
def username
def PBCS_USERNAME='pbcsUsername'
def password
def PBCS_PASSWORD='pbcsPassword'
def proxyHost
def PROXY_HOST='proxyHost'
def proxyPort
def PROXY_PORT='proxyPort'
def ignoreSSLCertificationPathErrors
def IGNORE_CERT_PATH_ERRORS='ignoreSSLCertificationPathErrors'
public PBCSAutomationParameters(propertiesFile) {
def propsFileName=propertiesFile
File propsFile = new File(propsFileName)
try {
props.load(propsFile.newDataInputStream())
} catch ( FileNotFoundException fnfe) {
println "$propsFileName PBCS properties file not found in the
current directory. Exiting."
System.exit(1);
}
H-54
Appendix H
Integration of Planning to Business Intelligence Cloud Service
planningRestUrl=props.getProperty(PBCS_PLANNING_REST_URL)
interopRestUrl=props.getProperty(PBCS_INTEROP_REST_URL)
identityDomain=props.getProperty(PBCS_IDENTITY_DOMAIN)
username=props.getProperty(PBCS_USERNAME)
password=props.getProperty(PBCS_PASSWORD)
proxyHost=props.getProperty(PROXY_HOST)
proxyPort=props.getProperty(PROXY_PORT)
ignoreSSLCertificationPathErrors=props.getProperty(IGNORE_CERT_PATH_ERRORS)
def isConfigValid() {
try {
// Required parameters check
assert planningRestUrl != '' : "$PBCS_PLANNING_REST_URL is empty"
assert interopRestUrl != '' : "$PBCS_INTEROP_REST_URL is empty"
assert identityDomain != '' : "$PBCS_IDENTITY_DOMAIN is empty"
assert username != '' : "$PBCS_USERNAME is empty"
assert password != '' : "$PBCS_PASSWORD is empty"
// ssl check
} catch(AssertionError e) {
println e.getMessage()
return false
} catch (MalformedURLException e) {
println "PBCS Rest urls are incorrect. Current
value:$planningRestUrl and $interopRestUrl, expected format http|https://
<SERVER>/HyperionPlanning/rest/11.1.2.3.xyz http|https://<SERVER>/interop/
rest/11.1.2.3.xyz"
println e.getMessage()
return false
}
return true
}
H-55
Appendix H
Troubleshooting the Integration
H-56