# Can I access to the reports repository via API?

**URL:** <https://faq.inetsoftware.de/t/can-i-access-to-the-reports-repository-via-api/39>\
**Category:** Remote Interface\
**Created:** [March 10, 2016, 8:03am UTC](https://faq.inetsoftware.de/t/can-i-access-to-the-reports-repository-via-api/39 "2016-03-10T08:03:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VolkerBerlin](https://faq.inetsoftware.de/user_avatar/faq.inetsoftware.de/volkerberlin/32/15_2.png) [@VolkerBerlin](https://faq.inetsoftware.de/u/VolkerBerlin)\
**Post date:** [March 10, 2016, 8:03am UTC](https://faq.inetsoftware.de/t/can-i-access-to-the-reports-repository-via-api/39/1 "2016-03-10T08:03:59Z")

</div>

I want to access the Reports Repository like the i-net Designer from my own client. How can I do it?

**Note** the repository is obsolete as of version 24.4. It is migrated into the Drive and you can use the Drive Web API to access reports.

---

<div class="post-metadata">

**Author:** ![VolkerBerlin](https://faq.inetsoftware.de/user_avatar/faq.inetsoftware.de/volkerberlin/32/15_2.png) [@VolkerBerlin](https://faq.inetsoftware.de/u/VolkerBerlin)\
**Post date:** [March 10, 2016, 8:22am UTC](https://faq.inetsoftware.de/t/can-i-access-to-the-reports-repository-via-api/39/2 "2016-03-10T08:22:53Z")

</div>

Since version 14.x the designer use a **JSON-RPC** API to access the remote repository. See the [Wikipedia](https://en.wikipedia.org/wiki/JSON-RPC) for details to JSON-RPC.  
The same API is used in version 15.x and 16.x. There is no warranty that this will work in future versions. Currently there is no plan to change this in the future.

**System requirments:**

- You need the plugins repository.zip and jsonrepository.zip in your server.
- The user need the system permission rights for “Remote Designer” **or** “Repository”. The names can vary between different versions.

**URL:** \<server base url\>/jsonrpc/repository

**Structures:**

- FolderDescription
- String name
- int rights
- int foldertype
- FileDescription
- String name
- long size
- long lastModified
- int rights

**Methods:**  
All available methods of your version can be found in the enum com.inet.report.plugins.json.repository.shared.RepositoryMethods in the jsonrepository plugin.

The follow method documentation use a Java method declarartion like it will be used with a wrapper.

- **Root**

> FolderDescription = Root()

- **Folders**

> ```
> List<FolderDescription> = Folders(String parent)
> 
> ```

- **Folder**

> FolderDescription = Folder(String parent, String name)

- **Files**

> List = Files(String parent)

- **File**

> FileDescription = File(String parent, String name)

- **CreateFolder**

> FolderDescription = CreateFolder(String parent, String name)

- **CreateFile**

> FileDescription = CreateFile(String parent, String name)

- **Rename**

> FileDescription/FolderDescription = Rename(String parent, String name)

- **Delete**

> Boolean = Delete(String element)

- **Exists**

- **Thumbnail**

> ASCII-String = Thumbnail(String name)

- **Keywords**

> List = Keywords(String name)

- **SetKeywords**

> Boolean = SetKeywords(String name, String… keywords)

- **Search**

> List = Search(String phrase)

- **ServerVersion**

> String = ServerVersion()

- **Save**

> Boolean = Save(String name, ASCII-String data)

- **Load**

> ASCII-String = Load(String name)

**Protocol Sample:**

→ {“jsonrpc”: “2.0”, “method”: “Root”, “id”: 3}  
 ← {“jsonrpc”: “2.0”, “result”: {“name”:“foo.rpt”,“rights”:0,“foldertype”:0}, “id”: 3}

---

<div class="post-metadata">

**Author:** ![VolkerBerlin](https://faq.inetsoftware.de/user_avatar/faq.inetsoftware.de/volkerberlin/32/15_2.png) [@VolkerBerlin](https://faq.inetsoftware.de/u/VolkerBerlin)\
**Post date:** [March 17, 2016, 11:44am UTC](https://faq.inetsoftware.de/t/can-i-access-to-the-reports-repository-via-api/39/3 "2016-03-17T11:44:32Z")

</div>

**Usage with JSON-RPC 2.0 library** [JSON-RPC 2.0 : Java Client Library](http://software.dzhuvinov.com/json-rpc-2.0-client.html)

This library is very strict. You need the patched version 14.1.660 or higher.

**Sample code:**

> import java.net.URL;

> import com.thetransactioncompany.jsonrpc2.JSONRPC2Request;  
> import com.thetransactioncompany.jsonrpc2.JSONRPC2Response;  
> import com.thetransactioncompany.jsonrpc2.client.JSONRPC2Session;

> public class JsonRpcTest {

> ```
> public static void main( String[] args ) throws Exception {
> URL serverURL = new URL( "http://localhost:9000/jsonrpc/repository" );
> 
> ```

> ```
> JSONRPC2Session session = new JSONRPC2Session( serverURL );
> JSONRPC2Request request = new JSONRPC2Request("Root", null);
> String[] contentTypes = {"application/binary-json", "application/error-json", "application/clearreport-json"};
> session.getOptions().setAllowedResponseContentTypes(contentTypes);
> JSONRPC2Response response = session.send(request);
> 
> ```

> ```
> if (response.indicatesSuccess()) {
> System.out.println(response.getResult());
> } else {
> System.out.println(response.getError().getMessage());
> System.out.println(response.getError().getCode());
> }
> }
> 
> ```
> 
> }

---

<div class="post-metadata">

**Author:** ![GerryWeissbach](https://faq.inetsoftware.de/user_avatar/faq.inetsoftware.de/gerryweissbach/32/90_2.png) [@GerryWeissbach](https://faq.inetsoftware.de/u/GerryWeissbach)\
**Post date:** [August 2, 2024, 7:32am UTC](https://faq.inetsoftware.de/t/can-i-access-to-the-reports-repository-via-api/39/4 "2024-08-02T07:32:07Z")

</div>


