cancel
Showing results for 
Search instead for 
Did you mean: 

Creating report using template using Restful

Former Member
0 Kudos

Hi,

Is there a way of creating report by referring to existing report template by using Restful API?

Accepted Solutions (0)

Answers (1)

Answers (1)

daniel_paulsen
Active Contributor
0 Kudos

Hi Vaibhav,

The simplest way to do this would be to make a copy of the template document:

POST     .../biprws/raylight/v1/documents?sourceId=<template Id>

in the body of the post you can specify the name and folder location

    <document>

       <name>newWebiDoc</name>

       <folderId>1234</folderId>

    </document>

Dan

Former Member
0 Kudos

Thanks, I am not sure where do I need to save the template which I can refer for report creation

daniel_paulsen
Active Contributor
0 Kudos

Hi Vaibhav,

Where to put the template reports is entirely up to you.  For me, I would create a folder called "Templates" and put it under Public Folders so that any user logging on to the application would have access to the folder.  I would not store it in my Favorites folder as other logged on users would not have access and would not be able to make a copy of the report through the app.

Dan

Former Member
0 Kudos

Hi Dan,

Please help suggest on how to create template in BO 4.1, I tried to look on it but did not get much details , I want to create template manually , save it and then create manually report based on saved template before I go through restful procedure

Former Member
0 Kudos

Hi Dan,

I am able to create report based on template using restful based on your suggestion, below is the procedure I followed , please check and suggest below procedure is correct or not

1. I exported default style of report in local as css file

2. Applied changes in values of some properties in css file

3. Imported modified css file and applied on document/report

4. Save the document or report (this is the template)

5 Create new document based on your suggestion as per below

POST     .../biprws/raylight/v1/documents?sourceId=<template Id>

body

    <document>

       <name>newWebiDoc</name>

       <folderId>1234</folderId>

    </document>

6. Document created successfully based on template

daniel_paulsen
Active Contributor
0 Kudos

Hi Vaibhav,

Yes, that looks to be the correct workflow.  After making the copy with the REST apis, the response will return the ID of the new copy that you can start to work with.

Dan

Former Member
0 Kudos

Hi Dan,

Sorry I forgot to mention that only 5th step in above mentioned workflow is done via Restful ,rest all four steps are done manually, kindly suggest if this is fine

daniel_paulsen
Active Contributor
0 Kudos

Hi Vaibhav,

Yes, I realized that.  That's fine.  Now that you have your template, you can start using the REST APIs to copy and modify the copy to your needs,

Dan