Search for existing answers to your product and support questions.
Familiarize yourself with our support site and learn best practices in working with our team.
Manage Service Requests, View and update service requests submitted by you and others in your organization.
Submit a new issue to our technical support team.
Oracle B2C Service insights from our Technical Support team subject matter experts
Browse resources to assist you in launching your implementation and ensure a successful go-live.
Access your OCI account.
Find product documentation for supported versions of B2C and documentation libraries for related service solutions.
You will have the tools to improve your customers' experience when you learn about all the things our products can do.
Find links for API documentation, Custom Processes, Customer Portal, and Agent Browser UI Extensibility Framework.
Explore how accelerators are designed to demonstrate how an integration scenario could be built using the public integration and extension capabilities of the Oracle B2C Service.
Prepare for a successful transition by reviewing upcoming release changes and enhancements.
Explore webinars, events, and feature kits to learn about B2C Service features, functionality, and best practices from the technical experts.
Oracle MyLearn offers a portfolio of free and paid subscription-based learning resources to help you gain valuable skills, accelerate cloud adoption, increase productivity, and transform your business.
Empower your team with the skills to implement, configure, manage, and use your applications with Customer Experience Cloud Training.
Our goal is to facilitate a friendly, supportive environment where members can easily collaborate with each other on solutions and best practices.
Ask and answer questions specific to B2C.
This is an exciting resource intended to help with your Oracle Service Cloud Analytics.
Share product improvement ideas and enhancement requests with Oracle Development, while collaborating with other Oracle customers and partners.
Update your phone number, email notification preferences, and severity 1 and severity 2 contact preferences.
View the contact managers within your organization.
Find contact information of the Technical Account Manager (TAM) and Client Success Manager (CSM) for your organization.
How to use Element Manager REST APIs?
Environment:
Element Manager, REST APIs
Issue:
We want to start consuming the Element Manager REST APIs to automate the transport of Oracle B2C Service configurations across sites/interfaces.
Resolution:.
Element Manager provides REST APIs to programmatically automate transport of configurations across Oracle B2C Service sites/interfaces. All Element-Manager APIs are now exposed as public REST endpoints so that users can invoke them in a sequence to achieve the export/import functionality.
The REST APIs swagger documentation can be accessed via URL like this: https://<siteurl>/AgentWeb/elementManager/swaggerUI.
The APIs can be categorized as following:
A) Authentication APIs A public API authorization token is required to invoke the Element-Manager export/import public APIs that can be generated using the following two authentication endpoints:
Expand this section for more information and examples.
1. POST /securityservice/authentication/authToken This API is used to authenticate the user to element manager and the response will be an authentication token. The endpoint for authToken API requires username, password and an interfaceUrl to be passed as request body JSON. The response will contain a token field that has the required public API authorization token. The endpoint is deprecated and its encouraged to use the new JWT based authentication endpoint for token generation.
Click here to expand example.
Request Headers: interfaceUrl: <<interfaceUrl>> (eg. http://<site-name>/cgi-bin/<interface>.cfg)
Request body: {"username": "username", "password": "password", "interfaceUrl": "http://<site-name>/cgi-bin/<interface>.cfg"}
Response body: { "description":"Authorization token", "token":"eyJ0aW1lc3RhbXAiOjE1Njg3MDc1MDg3NTMsInNpZ25hdHVyZSI6IlhZcFNNZ2JoeTROcjVzRmJ0MTEvS1Z3ejkxST0iLCJk=" }
2. POST /elementmanager/authentication/authToken This API is used to authenticate the user to element manager based on JWT and the response will be an authentication token. The endpoint requires JWT token as Authorization header. The response will contain a token field that has the required public API authorization token.
Request Headers: Authorization: Bearer JwtToken interfaceUrl: interfaceUrl (http://<site-name>/cgi-bin/<interface>.cfg)
B) Search and Export APIs To perform an element-manager export action using element-manager public APIs, an authToken should be first generated using an authentication endpoint. Once authToken is generated, export endpoints can be hit with the generated authToken added as a request header named USERSESSION. An element-manager import action can be done using the following APIs:
1. Search Items POST /elementmanager/search/EMElements This API is used to execute search based on search criteria and the response will be a list of matching items. The endpoint request body can contain the following attributes:
A simple contains search can be made using the searchString attribute. eg. See request body example (i). It shows a simple search based on a searchString and searchType. The search response will contain item(s) that matches the given name and type.
The filter attribute is a complex type that contains a filterTerm and a filterOperator. The filterTerm field represents a search condition. The field can have three sub fields named name, condition and value. The supported filterTerm-name field values are Id, ParentId, label and typeId. And the supported filterTerm-condition field values are isNotNull, isNull, isEqual, isNotEqual, isIn, isNotIn and isGreater. When using filterTerm, the value of filterOperator attribute should be "none". See request body example (ii).
The filterOperator can be used to combine multiple search conditions. The supported filterOperator field values are none, and, or. See request body example (iii). In this example, the search response will contain an item that exactly matches the name Basic Report and also has the parent id 104227.
The search response will contain the required item-id that is required by the create package export endpoint.
Request Headers: USERSESSION: eyJ0aW1lc3RhbXAiOjE1Njg3MDc1MDg3NTMsInNpZ25hdHVyZSI6IlhZcFNNZ2JoeTROcjVzRmJ0MTEvS1Z3ejkxST0iLCJk= (the sample token used here should be replaced by an actual token that could be generated using one of the element-manager provided authentication endpoints)
Request body: example (i) Simple contains search using searchString field {
"limit":100, "searchTypes":[ "Report" ], "searchString":"Custom2Reports" } example (ii) Single condition search using filterTerm { "searchTypes":[ "Report" ], "filter":{ "filterOperator":"none", "filterTerm":{ "name":"Id", "condition":"isGreater", "value":101970 } } }
example (iii) Complex search combining multiple conditions using filterOperator { "limit":100, "searchTypes":[ "Report" ], "startingIndex":0, "filter":{ "filterOperator":"and", "children":[ { "filterOperator":"none", "filterTerm":{ "name":"Id", "condition":"isGreater", "value":101970 } }, { "filterOperator":"none", "filterTerm":{ "name":"label", "condition":"isEqual", "value":"Custom2Reports" } } ] } }
Response body: { "description":"Search results", "resultSet":[ { "type":"Report", "hasMoreItems":false, "items":[ { "id":104227, "type":{ "id":142, "name":"AnalyticsFolder" }, "name":"AgentBrowser", "level":1, "hasMoreChildren":true, "sequence":0, "children":[ { "id":101974, "type":{ "id":1, "name":"Report" }, "name":"Custom2Reports", "level":2, "hasMoreChildren":false, "sequence":30, "children":[
], "isParent":false } ], "isParent":true } ] } ] }
2. Create Package POST /elementmanager/export/EMPackages This API is used to select items for export. The endpoint for Create Package API requires a package name and an array of items in which each item entry should contain an item-id and an item-type. The element-manager supported item types as of now are:
The item-id of an item can be identified using the search API. The create package action is asynchronous and thus the response will contain an initial status and a package-id that can be later used to track the status of the export or download the package.
Request Headers: USERSESSION: eyJ0aW1lc3RhbXAiOjE1Njg3MDc1MDg3NTMsInNpZ25hdHVyZSI6IlhZcFNNZ2JoeTROcjVzRmJ0MTEvS1Z3ejkxST0iLCJk=
Request body: { "name":"SamplePackage", "items":[ { "id":"101974", "type":"Report" } ] }
Response body: { "description":"Prepare package for export", "id":100170, "name":"SamplePackage", "status":{ "code":"1", "description":"Export prepare start" }, "href":"http://abc.com/AgentWeb/api/elementmanager/export/EMPackages/100168" }
3. Get Export Status GET /elementmanager/export/EMPackages/{id} This API is used to get the status of an export action. The endpoint for Get Export Status API requires the package-id as a path parameter. The response will contain a package status. The package status can be any of the following:
The package will be ready for download once the package status becomes Export complete. In case of any errors during export, the status will be shown as Export prepare failed or Export failed. The Export prepare failed error occurs when element-manager fails to properly identify dependencies of selected items. The Export failed error occurs when element-manager fails to generate the required zip file.
Response body: { "description":"Prepare package for export", "id":100170, "name":"SamplePackage", "status":{ "code":"1", "description":"Export prepare start" }, "href":"http://abc.com/AgentWeb/api/elementmanager/export/EMPackages/100170" }
In addition to the package specific Get Export Status, element-manager also provides another endpoint which just gives the status of the last 100 export actions: Get All Package Status: GET /elementmanager/export/EMPackages
This API is used to get the status of the last hundred available export actions. The endpoint does not require any input parameters. The endpoint response will contain an array of items in which each item represents an export action and its status.
Response body: { "description":"Collection of packages", "items":[ { "id":100170, "name":"SamplePackage", "status":{ "code":"3", "description":"Export prepare complete" }, "href":"http://abc.com/AgentWeb/api/elementmanager/export/EMPackages/100170" }, { "id":100169, "name":"SamplePackage", "status":{ "code":"7", "description":"Export complete" }, "href":"http://abc.com/AgentWeb/api/elementmanager/export/EMPackages/100169" } ] }
4. Download Package GET /elementmanager/export/EMPackages/download/{id} This API is used to download a package. The endpoint for Download Package requires package-id as a path parameter. Once the package status is Export Complete, the package can be downloaded using the endpoint.
C) Import APIs To perform an element-manager import action using element-manager public APIs, an authToken should be first generated using an authentication endpoint. Once authToken is generated, import endpoints can be hit with the generated authToken added as a request header named USERSESSION. An element-manager import action can be done using the following APIs:
1. Initiate Import POST /elementmanager/import/EMPackages This API is used to create an import package. The endpoint for Initiate Import requires packageContent and name to be passed as request body JSON. The base64 encoded form of the required zip package should be used as the packageContent value and the name field should have some value just for identifying the specific import. The Initiate Import action is asynchronous and the response will contain an import package-id and a getStatus URL with which the status of the same import can be tracked.
Request body: { "packageContent":"UEsDBBQACAgIAFVbek4AAAAA...BBDwAAAAA=", "name":"SampleImportName" }
Response body: { "description":"Prepare package for import", "id":100002, "href":"http://abc.com/AgentWeb/api/elementmanager/import/EMPackages/100002" }
2. Get Import Status GET /elementmanager/import/EMPackages/{id} This API is used to get the status of an import action. The endpoint for Get Import Status API requires the package-id as a path parameter. The response will contain a package status and also item-level status if available. The package status can be any of the following:
The item-level information contains item-stage that can be any of the following:
Apart from the artifact creation/live/rollback status, other three item stages belongs to the PreScan phase. The preScan phase is the stage at which all the items associated with an import action will be validated. In case of validation is success, the package-level status will be set to PreScan complete and the individual item-level stage will be set to verification success. The verification success status can occur even with item-level warnings:
Likewise, in case of preScan failure, the package-level status would be PreScan failed and the item-level stage would be verification failed. The verification failure reason for every individual item will be shown as validationError. The possible known validation errors are listed below:
Response body: { "description":"State of the import package", "id":100002, "name":"SampleImportName", "status":{ "code":"5", "description":"Prescan Complete" }, "items":[ { "id":1000089, "elementId":12, "name":"CUSTOM_CFG_TEXT_intf", "type":"ConfigurationSettings", "stage":{ "code":"2", "description":"Verification Success" }, "folderPath":"Custom" }, { "id":1000088, "elementId":13, "name":"CUSTOM_CFG_SITE", "type":"ConfigurationSettings", "stage":{ "code":"2", "description":"Verification Success" }, "folderPath":"Custom" } ] }
In addition to the package specific Get Import Status, element-manager also provides another endpoint which just gives the status of the last 100 export actions: Get All Package Status: GET /elementmanager/import/EMPackages
This API is used to get the status of the last hundred available import actions. The endpoint does not require any input parameters. The endpoint response will contain an array of items in which each item represents an import action and its status.
Request Headers: USERSESSION: eyJ0aW1lc3RhbXAiOjE1Njg3MDc1MDg3NTMsInNpZ25hdHVyZSI6IlhZcFNNZ2JoeTROcjVzRmJ0MTEvS1Z3ejkxST0iLCJk= Response body: { "description":"Collection of packages", "items":[ { "id":100004, "name":"incident_report", "status":{ "code":"15", "description":"Prescan failed" }, "href":"http://abc.com/AgentWeb/api/elementmanager/import/EMPackages/100004" }, { "id":100003, "name":"incident_report", "status":{ "code":"20", "description":"Canceled" }, "href":"http://abc.com/AgentWeb/api/elementmanager/import/EMPackages/100003" } ] }
3. Import\Rollback PATCH /elementmanager/import/EMPackages This API is used to either import a package that has already passed the preScan stage(ie. in PreScan Success state) or to rollback an already deployed package that should be in Import Complete state. The endpoint for Import\Rollback requires package-id, action and a permissions array to be passed as request body JSON.
The action field can be either Import or Rollback. The permissions array can be either left empty or used to assign profile/interface permissions to reports, add-ins and variables.
Request body example (i) represents a sample import action that will use just the default permissions. To override the default permissions from the exported package, the permissions array can be properly populated. The permissions override option is available for reports, add-ins and standardText.
For reports, corresponding to each elementId (elementId can be identified from the getStatus response), an array of profilePermissions can be set. Each profilePermissions entry should contain an array of profileIds and a permission value. The supported permission values are:
For add-ins, the profile/interface permission-ing can be done using the same profilePermissions array. Here, each profilePermissions entry should contain an array of profileIds and another array of interfaceIds.
For standard-texts. instead of profilePermissions, interfacePermission array can be used to set the required interface visibility flags.
e.g. { "action":"import", "id":"100098", "permissions":[ { "elementIds":[ 12 //report elementId ], "profilePermissions":[ //report profile permission { "profileIds":[ 7 ], "permission":"edit" } ] }, { "elementIds":[ 13 //add-in elementId ], "profilePermissions":[ //add-in profile/interface permission { "profileIds":[ 7, 9 ], "interfaceIds":[ 1 ] } ] }, { "elementIds":[ 14 //standard-text elementId ], "interfacePermission":[ //interface visibility 1, 2 ] } ] }
Note: As in the above example, the assignment of permissions require IDs of profiles and interfaces. The search API can be used to identify the required IDs.
The getStatus API should be used to track the status of import/rollback actions.
Request body: example (i): import action { "action":"import", "id":"100002", "permissions":[ ] }
example (ii): rollback action { "action":"rollback", "id":"100002", }
Response body: example (i): import action response { "description":"Import the package", "id":100005, "name":"SampleImportName", "href":"http://abc.com/AgentWeb/api/elementmanager/import/EMPackages/100005" }
example (ii): rollback action response { "description":"Rollback the import package", "id":100005, "name":"SampleImportName", "href":"http://abc.com/AgentWeb/api/elementmanager/import/EMPackages/100005" }
3. Cancel Import DELETE /elementmanager/import/EMPackages/{id} This API is used to delete or cancel an existing incomplete import action. The endpoint for Cancel Import requires a package-id as the path parameter. The response will contain the status of cancel action.
Response body: { "description":"Deleting the EM Package", "status":{ "code":"19", "description":"Deleted" } }
D) Public API Exceptions The available element-manager public API exception codes are listed below:
Expand this section to see the exceptions list.
Additional Information:
Element-Manager Public API authentication