Query a viewpoint and write results to file
post
/epm/rest/v1/viewpoints/query/writeToFile
Request
Supported Media Types
- application/json
Specifies the parameters to use for querying a viewpoint and writing to staging area
Root Schema : Parameters to run a Viewpoint Query Profile
Type:
Show Source
object
-
fileName(required):
string
Name of the file containing the query results. This file is written to the staging area.
-
queryCode:
string
Code of the query to be run. Either the query code or query name are required.
-
queryName:
string
Name of the query to be run. Either the query code or query name are required.
-
requestNumber:
integer(int32)
Request number to perform query in the context of a request
-
viewName(required):
string
Name of the view for the query
-
viewpointLabel:
string
Label of the viewpoint for the query. Either the viewpoint name or viewpoint label are required.
-
viewpointName:
string
Name of the viewpoint for the query. Either the viewpoint name or viewpoint label are required.
Response
Supported Media Types
- application/json
202 Response
Created job, Query processing
400 Response
Error in body
404 Response
Not found
Examples
The following example shows how to run a Viewpoint Query Profile and export the results by submitting a post request on the REST resource using cURL.
cURL Command
curl --user epm_cloud_user -X POST -H 'Content-Type: application/json' -d
@example_request_payload.json https://servername.fa.us2.oraclecloud.com/epm/rest/v1/viewpoints/query/writeToFile
Example of Request Body
The following shows an example of the request body in JSON format.
{ "viewName": "General Ledger" "viewpointName": "Account", "queryName": "Balance Sheet Accounts", "fileName": "Balance_Sheet_Accounts.xlsx" }
Example of Response Body
The following shows an example of the response body in JSON format.
{ "links": [ { "rel": "results", "href": "https://servername.fa.us2.oraclecloud.com/epm/rest/v1/jobRuns/acdaea6f-1ba6-4efd-bb35-4b51c3e11708" } ] }