JASPERREPORTS SERVER WEB SERVICES GUIDE

Size: px
Start display at page:

Download "JASPERREPORTS SERVER WEB SERVICES GUIDE"

Transcription

1 JASPERREPORTS SERVER WEB SERVICES GUIDE RELEASE 5.0

2 JasperReports Server Web Services Guide Copyright 2012 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft logo, Jaspersoft ireport Designer, JasperReports Library, JasperReports Server, Jaspersoft OLAP, and Jaspersoft ETL are trademarks and/or registered trademarks of Jaspersoft Corporation in the United States and in jurisdictions throughout the world. All other company and product names are or may be trade names or trademarks of their respective owners. This is version 1112-JSP50-18 of the JasperReports Server Web Services Guide. 2

3 TABLE OF CONTENTS Chapter 1 Introduction REST Web Services Overview REST Authentication Login Encryption Login Service REST Server Information SOAP Web Services Overview SOAP Authentication Syntax of resourcedescriptor Overview wstype Attribute isnew Attribute Resource Descriptor Parameters Examples of resourcedescriptor Chapter 2 REST - Repository Web Services The resources Service The resource Service Requesting the Contents of a JasperReport Requesting the Contents of a File Resource Requesting the Values of a Query-Based Input Control Creating a Resource Modifying a Resource Deleting a Resource Working with Dashboards The permission Service Viewing Permissions Setting Permissions The v2/export Service Checking the Export State

4 JasperReports Server Web Services Guide Fetching the Export Output The v2/import Service Chapter 3 REST - Report Web Services The report Service Running a Report Downloading Report Output Regenerating Report Output The v2/reports Service Running a Report Finding Running Reports Terminate Running Report The v2/inputcontrols Service Listing Input Control Structure Listing Input Control Values Setting Input Control Values The v2/options Service Listing Report Options Creating Report Options Updating Report Options Deleting Report Options The jobsummary Service The job Service Viewing a Job Definition Scheduling a Report Editing a Job Definition Deleting a Job Definition The v2/jobs Service Listing Report Jobs Viewing a Job Definition Extended Job Search Scheduling a Report Viewing Job Status Editing a Job Definition Updating Jobs in Bulk Pausing Jobs Resuming Jobs Restarting Failed Jobs Specifying FTP Output Calendar Exclusion for the Scheduler Chapter 4 REST - Web Services for Administration The organization Service Creating an Organization Updating an Organization

5 4.1.3 Deleting an Organization The user Service Creating a User Editing a User Deleting a User The attribute Service The role Service Creating a New Role Editing a Role Deleting a Role Chapter 5 SOAP - Repository Web Service Request and Operation Result List Operation Get Operation Put Operation Delete Operation Move Operation Copy Operation runreport Operation Report Output Report Locales Errors Implementation Suggestions Chapter 6 SOAP - Report Scheduling Web Service Types Defined in the WSDL Operations in the Scheduling Service Operation Descriptions Example Request and Operation Result Java Client Classes Chapter 7 SOAP - Domain Web Service Types Defined in the WSDL Operations in the Domain Service The getdomainmetadata Operation The executedomainquery Operation Java Client Classes Chapter 8 SOAP - Web Services for Administration Types Defined in the WSDL Users and Roles findusers putuser deleteuser

6 JasperReports Server Web Services Guide findroles putrole updaterolename deleterole Organizations/Tenants gettenant getsubtenantlist puttenant deletetenant Permissions getpermissionsforobject putpermission deletepermission Related Files Appendix A ResourceDescriptor API Constants Glossary

7 Introduction CHAPTER 1 INTRODUCTION JasperReports Server is a component of both a community project and commercial offerings. Each integrates the standard features such as security, scheduling, a web services interface, and much more for running and sharing reports. This guide discusses all editions. Sections of the guide that apply only to the commercial editions are indicated with a special note. This document describes the JasperReports Server s web services that allow client applications to interact with the server programmatically. There are two different Application Programming Interfaces (APIs): REST (REpresentational State Transfer) The RESTful interface depends on the standard methods provided by HTTP: GET, PUT, POST, and DELETE. This interface is new and the API is still expanding. SOAP (Simple Object Access Protocol) The SOAP interface sends and receives XML documents to process requests and provide results. This interface is still supported but is not enhanced with new features. In order to describe the contents of resources in the repository, both REST and SOAP web services use a custom XML format called a resourcedescriptor. When the client requests information about resources, the server responds with lists of resource descriptors, and when the client creates or modifies a resource, it must send a well-formed resourcedescriptor that describes the resource. Newer RESTful APIs also support JSON (JavaScript Object Notation) objects. This chapter contains the following sections: REST Web Services Overview REST Authentication REST Server Information SOAP Web Services Overview SOAP Authentication Syntax of resourcedescriptor 1.1 REST Web Services Overview The RESTful interface of JasperReports Server responds to HTTP requests from client applications, in particular: GET to list, search and acquire information about repository resources. PUT to create new resources and execute reports. POST to modify resources. DELETE to remove resources. 7

8 JasperReports Server Web Services Guide In order to introduce new features and keep backwards compatibility, Jaspersoft has introduced a second RESTful API using the rest_v2 URL. By default, the REST web services are available at the following URLs, where <host> is the name of the computer hosting JasperReports Server and <port> is the port you specified during installation: Table 1-1 REST - Web Services and URLs Edition Web Service URLs Community Project Commercial Editions Login (optional) Repository Reports Administration Login (optional) Repository Reports Administration The context name (by default jasperserver or jasperserver-pro) may also depend on the specific installation of JasperReports Server. As with any RESTful service, the URLs usually include a path to the resource being acted upon, as well as any arguments that are accepted by the method. For example, to search for input control resources in the /datatypes folder, your application would send the following HTTP request: GET The reference chapters in this book give the full description of the methods supported by each URL, the path or resource expected for each method, and the arguments that are required or optional. The description of each method includes a sample of the return value. 8

9 Introduction JasperReports Server REST services return standard HTTP status codes. In case of an error, a detailed message may be present in the body in form of plain text. Client error codes are of type 4xx, while server errors are of type 5xx. The following table lists all the standard HTTP codes. Table 1-2 REST - HTTP Return Codes Success Messages Client Error Server Errors Code Message Code Message Code Message 100 Continue 400 Bad Request 500 Internal Server Error 101 Switching Protocols 401 Unauthorized 501 Not Implemented 200 OK 402 Payment Required 502 Bad Gateway 201 Created 403 Forbidden 503 Service Unavailable 202 Accepted 404 Not Found 504 Gateway Time-out 203 Non-Authoritative Information 405 Method Not Allowed 505 HTTP Version Not Supported 204 No Content 406 Not Acceptable 205 Reset Content 407 Proxy Authentication Required 206 Partial Content 408 Request Time-out 300 Multiple Choices 409 Conflict 301 Moved Permanently 410 Gone 302 Found 411 Length Required 303 See Other 412 Precondition Failed 304 Not Modified 413 Request Entity Too Large 305 Use Proxy 414 Request-URI Too Large 307 Temporary Redirect 415 Unsupported Media Type 416 Requested Range Not Satisfiable 417 Expectation Failed 1.2 REST Authentication When using web services, the calling application must provide a valid user ID and password to JasperReports Server. The REST web services in JasperReports Server support two types of authentication: HTTP Basic Authentication, where the user ID and password are sent in the header with every request. Basic Authentication with REST is the same as described in section 1.5, SOAP Authentication, on page 13. The special login service that allows authentication using a POST request to create a session and return a session ID that is used with subsequent requests. Use of the login service is optional, and it is useful only when HTTP Basic Authentication does not work. One example where you may need to use the login service is when the username or password contain UTF-8 characters that may be corrupted by the basic authentication mechanism. Normally, RESTful implementations do not rely on the use of persistent sessions, such as the login service. However, the JasperReports Server architecture automatically creates user sessions internally, and the login service takes advantage of this. 9

10 JasperReports Server Web Services Guide By using the login service, you can avoid making the server verify user credentials for each API call. If your server is configured with external authentication, repeatedly verifying credentials may be a performance issue you can avoid with the login service Login Encryption JasperReports Server 4.7 introduced the ability to encrypt plain-text passwords over non-secure HTTP. Encryption does not make passwords more secure, it only prevents them from being readable to humans. For more information about security and how to enable login encryption, see the JasperReports Server Administrator Guide. When login encryption is enabled, passwords in both HTTP Basic Authentication and using the login service must be encrypted by the client. Login encryption has two modes: Static key encryption The server only uses one key that never changes. The client only needs to encrypt the password once and can use it for every web service call. Dynamic key encryption The server changes the encryption key for every session. The client must request the new key and re-encrypt the password before every call using HTTP Basic Authentication or every session using the login service. The GetEncryptionKey service does not take any arguments or content input. Method GET URL Return Value on Success 200 OK Body contains a JSON representation of public key { "maxdigits":"131", "e":"10001", "n":"9f8a2dc4baa260a5835fa33ef94c..." } Typical Return Values on Failure 200 OK Body contains {Error: Key generation is off} To encrypt a password with the server s public key, use the Bouncy Castle provider with the RSA/NONE/NoPadding algorithm Login Service When making a login request, the user ID and password can be pass as URL arguments or as content in the request body: Method POST GET URL Argument Type/Value Description j_username Text The user ID. In commercial editions of the server that implement multiple organizations, the argument must specify the organization ID or alias in the following format: j_username%7organization_id j_password? Text The user s password. If the server has login encryption enabled, the password must be encrypted as explained in section The argument is optional but authentication will fail without the password. Content-Type application/x-www-formurlencoded Content j_username=<userid>[%7<organization_id>]&j_password=<password> Example: j_username=jasperadmin&j_password=jasperadmin or j_username=jasperadmin%7organization_1&j_password=jasperadmin 10

11 Introduction Return Value on Success 200 OK Session ID in cookie (POST only), empty body. Typical Return Values on Failure 401 Unauthorized Empty body. 302 License expired or otherwise not valid. The login service has several uses: POST method Applications should use the POST method, because it returns the session cookie to use in future requests. GET method Developers can test the login service and the user credentials from a browser, which uses the GET method. Credentials in arguments When testing the login service in a browser, credentials are passed as arguments in the URL: &j_password=<password> Credentials in content When using the POST method, credentials can either be sent in the URL arguments as shown above, or sent in the content of the request, as shown in the second example below. The following example shows the HTTP request and response when testing the login service in a browser. In this case, the user credentials are passed as arguments and the browser sends a GET request. Because the GET request is meant only for testing, it does not return a cookie with the session ID. GET /jasperserver/rest/login?j_username=jasperadmin&j_password=jasperadmin HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:5.0) Gecko/ Firefox/5.0 Connection: keep-alive HTTP/ OK Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache Expires: Wed, 31 Dec :00:00 PST Content-Length: 0 Date: Fri, 19 Aug :52:48 GMT The following example shows the content of a POST request where the credentials are passed in the content. POST /jasperserver/rest/login HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Host: localhost:8080 Content-Length: 45 Content-Type: application/x-www-form-urlencoded j_username=jasperadmin&j_password=jasperadmin HTTP/ OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=52E79BCEE51381DF32637EC69AD698AE; Path=/jasperserver Content-Length: 0 Date: Fri, 19 Aug :52:48 GMT For optimal performance, the session ID from the cookie should be used to keep the session open. To do this, include the cookie in future requests to the other RESTful services. For example, given the response to the POST request above, future requests to the repository services should include the following line in the header: Cookie: $Version=0; JSESSIONID=52E79BCEE51381DF32637EC69AD698AE; $Path=/jasperserver However, maintaining a session with cookies is not mandatory, and your application can use any combination of session cookie, HTTP Basic Authentication, or both. 11

12 JasperReports Server Web Services Guide 1.3 REST Server Information Use the following service to verify the server information, the same as the About JasperReports Server link in the user interface. Method GET URL Options accept: application/xml accept: application/json Return Value on Success Typical Return Values on Failure 200 OK Body described below. This request should always succeed when the server is running. The server returns a structure containing the information in the requested format, XML or JSON: <serverinfo> <build> _1532</build> <edition>pro</edition> <editionname>enterprise</editionname> <expiration/> <features>fusion AHD EXP DB AUD ANA MT</features> <licensetype>commercial</licensetype> <version>5.0.0</version> </serverinfo> { } "version" : "5.0.0", "edition" : "PRO", "editionname" : "Enterprise", "licensetype" : "Commercial", "build" : " _1532", "expiration" : "", "features" : "Fusion AHD EXP DB AUD ANA MT " You can access each value separately with the following URIs: Method GET URL Return Value on Success Typical Return Values on Failure 200 OK The requested value. This request should always succeed when the server is running. 12

13 Introduction 1.4 SOAP Web Services Overview By default, the SOAP web services are available at the following URLs, where <host> is the name of the computer hosting JasperReports Server and <port> is the port you specified during installation: Table 1-3 SOAP - Web Services and URLs Edition Web Service URL Community Project Commercial Editions Repository Scheduling Administration Repository Scheduling Domains Administration UserAndRoleManagementService The context name (by default jasperserver or jasperserver-pro) may also depend on the specific installation of JasperReports Server. The web services take as input an XML document (the request) and return another XML document (the operation result). Because they use XML, the web services provide easy, natural integration with the most common programming languages and environments. Jaspersoft provides two complete sample applications that demonstrate the SOAP web service: a simple J2EE (Java 2 Enterprise Edition) web application and the same application written in PHP (PHP Hypertext Preprocessor). 1.5 SOAP Authentication The calling application must supply a valid user and password with HTTP Basic Authentication to access the web services. In basic authentication, the user ID and password are concatenated with a colon (:) and Base64 encoded in the HTTP request header. Usually, your client library does this for you. For example, the administrator s default credentials are jasperadmin:jasperadmin, which is encoded as follows: Authorization: Basic amfzcgvyywrtaw46amfzcgvyywrtaw4= The web services accept the same accounts and credentials as the JasperReports Server user interface. If there is only one organization, such as in the JasperReports Server default installation, you should specify the user name only: WSUser. For example, jasperadmin. In deployments with multiple organizations, the organization ID or alias must be added, in the form WSUser TenantId or WSUser TenantAlias. For example, you could use jasperadmin organization_1 (WSUser TenantId) or jasperadmin CanadaBranch (WSUser TenantAlias). See section 8.3, Organizations/Tenants, on page 113, for explanations of WSUser, TenantId, and TenantAlias. If login encryption in enabled in your server, you must encrypt the password before base64-encoding it with the username. To encode the password, see section 1.2.1, Login Encryption, on page 10. To simplify the development of web services in Java, Jaspersoft provides a set of helper classes, including a ready-to-use client that can make it easier to integrate an external application with JasperReports Server, be it web- or desktop-based. These classes include an object model that represents resources and creates requests and operation results, along with a Marshaller and an Unmarshaller class to quickly move between XML and the Java object model. The presentation of each service includes code samples that show how to use these classes. 13

14 JasperReports Server Web Services Guide 1.6 Syntax of resourcedescriptor Resources (such as reports, images, queries, and content resources) are stored in a repository, which is organized like a file system, with a root and a hierarchical set of folders. Each object in the repository is considered a resource: a folder is a resource of type folder, a JRXML resource is a resource of type file, just as images and JAR files are of type file. Some resources are more abstract, such as connection definitions and an input controls. The repository web services operates on all resources Overview A resource is identified by: A name. A label. A unique Uniform Resource Identifier (URI) that defines the location of the resource in the repository. A URI is similar to a Unix path (for example, /reports/samples/allaccounts). A resource can have a set of properties (depending on its type) and a set of children resources. The resource descriptor is a complex structure that transfers data regarding a specific resource between the server and the client. A request can include only one resource descriptor. Often, the request only includes a small portion of the entire resource descriptor definition: the part that describes the specific details of the resource in question. For example, when a resourcedescriptor is used as an input parameter in a request document (for example, to specify a folder to list or a file to download), the descriptor includes only a small portion of the entire resource descriptor definition: the part that describes the specific resource details in question. In many cases, the only information required to identify a resource in the repository is its wstype, name, and URI. The resource descriptors that the server sends are completely populated with all the data about the resources being described. A resourcedescriptor tag is defined by the following DTD (Document Type Definition): <!ELEMENT resourcedescriptor (label, description?, resourceproperty*, resourcedescriptor*, parameter*)> <!ATTLIST resourcedescriptor name CDATA #REQUIRED wstype CDATA #REQUIRED uristring CDATA #REQUIRED isnew ( true false ) false > <!ELEMENT resourceproperty (value?, resourceproperty*)> <!ATTLIST resourceproperty name CDATA #REQUIRED > <!ELEMENT value (#PCDATA)> <!ELEMENT parameter (#PCDATA)> <!ATTLIST parameter name CDATA #REQUIRED islistitem ( true false ) false > The following sections describe the DTD: wstype Attribute isnew Attribute Resource Descriptor Parameters Examples of resourcedescriptor 14

15 Introduction wstype Attribute The wstype attribute defines the nature of the resource. The possible values for this attribute are: Table 1-4 Values for wstype wstype Value bean contentresource datasource datatype folder font img inputcontrol jar jdbc jndi jrxml lov olapmondriancon olapmondrianschema olapxmlacon prop query reference reportunit xmlaconnection Description Data source of type Spring bean. The output of a report. Generic data source. This type is normally used for a data source ReportUnit child resource when it is not defined locally to the ReportUnit. Datatype (used with the input controls) Folder Font file (normally a True Type font) Image file Input control JAR file Data source of type JDBC Data source of type JNDI JRXML source file List of values (used with input controls) OLAP Mondrian connection. A direct connection to an OLAP source. OLAP Mondrian Schema OLAP XMLA connection. A remote connection to an OLAP source. Resource bundle file (ending with.properties) for specific reports Query used to retrieve data from a data source Reference to another resource. References are only present in report units A complete report that can be run in JasperReports Server XML/A Connection For all the other resource types found in the repository, the repository web service sets the attribute wstype to UNKNOWN isnew Attribute The isnew attribute is used with the put operation to indicate whether the resource being uploaded is new or replaces an existing resource in the repository Resource Descriptor Parameters A resource descriptor can contain one or more parameters: they do not describe the resource; they store the values users select when the runreport service is invoked. A resourceproperty is normally a simple pair of a name and a value. The Java class com.jaspersoft.jasperserver. api.metadata.xml.domain.impl.resourcedescriptor contains constants for each property name. For a list of parameter names, see Appendix A, ResourceDescriptor API Constants, on page 117. Jaspersoft may add further constants in future releases. 15

16 JasperReports Server Web Services Guide Examples of resourcedescriptor The following resourcedescriptor sample contains a set of simple properties that describe a JDBC connection resource: <resourcedescriptor name="jserverjdbcds" wstype="jdbc" uristring="/datasources/jserverjdbcds" isnew="false"> <label>jserver Jdbc data source</label> <description>jserver Jdbc data source</description> <resourceproperty name="prop_parent_folder"> <value>/datasources</value> <resourceproperty name="prop_version"> <value>0</value> <resourceproperty name="prop_datasource_driver_class"> <value>com.mysql.jdbc.driver</value> <resourceproperty name="prop_datasource_connection_url"> <value>jdbc:mysql://localhost/test?autoreconnect=true</value> <resourceproperty name="prop_datasource_username"> <value>username</value> <resourceproperty name="prop_datasource_password"> <value>password</value> </resourcedescriptor> Some properties cannot be represented by a simple value. To accommodate more complicated properties, a resourceproperty can recursively contain other resourceproperties. This is the case for a List of Values type resource (used to define input controls for report parameters); the list values are contained in the resourceproperty named PROP_LOV and are represented by sub-resourceproperties. For example: <resourcedescriptor name="samplelov" wstype="lov" uristring="/datatypes/samplelov" isnew="false"> <label>sample List of Values</label> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.listofvalues </value> <resourceproperty name="prop_parent_folder"> <value>/datatypes</value> <resourceproperty name="prop_version"> <value>-1</value> <resourceproperty name="prop_has_data"> <value>false</value> <resourceproperty name="prop_is_reference"> <value>false</value> 16

17 Introduction <resourceproperty name="prop_lov"> <resourceproperty name="us"> <value>united States</value> <resourceproperty name="ca"> <value>canada</value> <resourceproperty name="in"> <value>india</value> <resourceproperty name="it"> <value>italy</value> <resourceproperty name="de"> <value>germany</value> <resourceproperty name="ro"> <value>romania</value> </resourcedescriptor> This example defined a list of countries. Notice that, for each list item, the resourceproperty name represents the item value, and the resourceproperty value contains the item label. 17

18 JasperReports Server Web Services Guide 18

19 REST - Repository Web Services CHAPTER 2 REST - REPOSITORY WEB SERVICES The RESTful API to access the repository includes URLs for the following services: resources For listing and searching for resources in the repository. resource For getting detailed information about a resource, creating a resource, modifying it or deleting it, depending on the HTTP method used. permission For viewing and setting access permissions on repository objects. This chapter documents the HTTP methods (sometimes called verbs) and parameters for each of these requests. In every case, you specify the folder, resource, or report to be acted up by adding its repository URI to the request URL. This chapter uses the following notation: Arguments are passed in the URL with the conventional syntax: The documentation for each method gives the list of arguments it supports. Optional arguments are listed with a question mark after the name, for example <arg2>?. Arguments that are not marked optional are mandatory and must be included in the URL with a valid value. For authentication using the REST web services, see section 1.2, REST Authentication, on page 9. The RESTful repository services gives responses that contain the same XML data structure that are used in the SOAP repository web service. These data structures are shown as examples throughout the chapter and documented in section 1.6, Syntax of resourcedescriptor, on page 14, with reference material in Appendix A, ResourceDescriptor API Constants, on page 117. This chapter includes the following sections: The resources Service The resource Service Working with Dashboards The permission Service The v2/export Service The v2/import Service 19

20 JasperReports Server Web Services Guide 2.1 The resources Service The resources service lets you browse or search the repository. When used without arguments, it gives the list of resources in the folder specified in the URL. With the arguments, you can search for terms in the resource names or descriptions, search for all resources of a given type, and specify whether to search in subfolders. This service is similar to the list operation in the SOAP web services. The resources service is a read only service. Requests for PUT, POST, and DELETE operations receive the error 405, method not allowed. Method GET URL Argument Type/Value Description q? String Match only resources having the specified text in the name or description type? wstype Match only resources of the given type. Valid types are listed in Table 1-4, Values for wstype, on page 15, for example: datasource, reportunit, img, folder. recursive? 0 1 Search for resources recursively and not only in the specified folder. This parameter is used only when a search criteria is specified (either q or type). When not specified, the default is 0, meaning only in the specified folder. Note that searching recursively in the whole repository may cause performance issues, because the number of resources returned may be huge. limit? Integer >= 0 Maximum number of items returned to the client. The default is 0, meaning no limit. Return Value on Success 200 OK The body is XML containing the list of resourcedescriptors. Typical Return Values on Failure 404 Not Found The specified URI is not found in the repository. The XML content in the result consists of resourcedescriptors described in section 1.6, Syntax of resourcedescriptor, on page 14. However, the list may be empty in the following conditions: If the specified URI is a resource instead of a folder. If the folder is empty or the search returns no results. The following example shows the request to list the resources in the /reports folder: GET /jasperserver/rest/resources/reports HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Authorization: Basic amfzcgvyywrtaw46amfzcgvyywrtaw4= Host: localhost:8080 Cookie: $Version=0; JSESSIONID=6854BF45EC89F3D3CE3E6F4FD6FF1BBD; $Path=/jasperserver Because the example is not a recursive search, it simply returns the contents of the folder, in this case a subfolder and a report: HTTP/ OK Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache Expires: Thu, 01 Jan :00:00 CET Content-Length: 1518 Date: Fri, 24 Jun :09:45 GMT 20

21 REST - Repository Web Services <resourcedescriptors> <resourcedescriptor name="samples" wstype="folder" uristring="/reports/samples" isnew="false"> <label>samples</label> <description>samples</description> <creationdate> </creationdate> <resourceproperty name="prop_has_data"><value>false</value> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.folder</value> <resourceproperty name="prop_parent_folder"><value>/reports</value> <resourceproperty name="prop_security_permission_mask"><value>31</value> <resourceproperty name="prop_version"><value>0</value> </resourcedescriptor> <resourcedescriptor name="test" wstype="reportunit" uristring="/reports/test" isnew="false"> <label>a test</label> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.jasperreports.domain. ReportUnit</value> <resourceproperty name="prop_parent_folder"><value>/reports</value> <resourceproperty name="prop_security_permission_mask"><value>31</value> <resourceproperty name="prop_version"><value>19</value> <resourceproperty name="prop_ru_always_propmt_controls"><value>true</value> <resourceproperty name="prop_ru_controls_layout"><value>1</value> </resourcedescriptor> </resourcedescriptors> The following sample request is intended to list all the reports available in the /reports folder and subfolders. The result, not shown, is a long list of resourcedescriptors for reports in the designated folders. GET /jasperserver/rest/resources/reports?type=reportunit&recursive=1 HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Authorization: Basic amfzcgvyywrtaw46amfzcgvyywrtaw4= Host: localhost:8080 Cookie: $Version=0; JSESSIONID=60B573BDC47098E6379FC867B24C5C0E; $Path=/jasperserver 2.2 The resource Service The resource service supports several HTTP methods to view, create, and modify resources in the repository. 21

22 JasperReports Server Web Services Guide GET is used to show the information about a specific resource. Getting a resource can serve several purposes: In the case of JasperReports, also known as report units, this service returns the structure of the JasperReport, including resourcedescriptors for any linked resources. Specifying a JasperReport and a file identifier returns the file itself. Specifying a query-based input control with arguments for running the query returns the dynamic values for the control. A new service is also available to interact with report options. See section 3.4, The v2/options Service, on page 49. Method GET URL Argument Type/Value Description file? String Specify a file identifier of this resource; the response will be the file. IC_GET_QUE RY_DATA? P_<param name>? PL_<param name>? String String String Used to get the items to fill an input control which subtend a query resource. The value of this parameter must be the URI of the data source to use to execute the query. Set the null string to use the default data source. If the IC_GET_QUERY_DATA is specified, one or more parameters can be specified to be used in the query: Use the "P_" prefix for single values. Use the "PL_" prefix for list of values. Return Value on Success 200 OK The body is either: XML giving the resourcedescriptors that make up the resource, including nested descriptors. The native content of the specified file. Typical Return Values on Failure 404 Not Found When the specified resource URI is not found in the repository The GET method returns the structure and definition of resources in the repository, and using that information can be used to download any files attached to the resources. Resources are defined through resourcedescriptor tags in XML. The following example shows the resource descriptor of a folder: <resourcedescriptor name="datasources" wstype="folder" uristring="/datasources" isnew="false"> <label>data Sources</label> <description>data Sources used by reports</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.folder</value> <resourceproperty name="prop_parent_folder"><value>/</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_has_data"><value>false</value> </resourcedescriptor> 22

23 REST - Repository Web Services The following example shows the resource descriptor of a data source. The various resourceproperty tags define the properties of the data source, specific to the JNDI type: <resourcedescriptor name="sugarcrmdatasourcejndi" wstype="jndi" uristring="/analysis/datasources/sugarcrmdatasourcejndi" isnew="false"> <label>sugarcrm Data Source JNDI</label> <description>sugarcrm Data Source JNDI</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.jasperreports.domain. JndiJdbcReportDataSource</value> <resourceproperty name="prop_parent_folder"><value>/analysis/datasources</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_datasource_jndi_name"><value>jdbc/sugarcrm</value> </resourcedescriptor> The following example shows the resource descriptor of a query resource, with properties for the query string and query language: <resourcedescriptor name="customercityquery" wstype="query" uristring="/datatypes/customercityquery" isnew="false"> <label>customer City Query</label> <description>retrieves names of all customers' home cities</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.query</value> <resourceproperty name="prop_parent_folder"> <value>/junit_new_folder</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_has_data"><value>false</value> <resourceproperty name="prop_is_reference"><value>false</value> <resourceproperty name="prop_query"> <value>select distinct customer.city from customer</value> <resourceproperty name="prop_query_language"><value>sql</value> </resourcedescriptor> Requesting the Contents of a JasperReport A JasperReport is a complex resource that contains many parts such as a data source, input controls, and file resources. These can be either references to other resources in the repository or resources that are fully defined internally to the report. In the following example, a simple request gives the contents of a JasperReport: GET The following response in this example shows the content of the AllAccounts report: The reportunit, which is the container for all the resources of the report. The data source, which is an external link to a data source in the repository. The main JRXML, which is a file defined internally to this resource. Two image files, one of which is defined internally to this resource, the other references a file resource in the repository. 23

24 JasperReports Server Web Services Guide The structure of the JasperReport is defined through nested resourcedescriptor tags in XML. In the nested descriptor for each file that is part of the JasperReport, we can find its URI and ID to use for the retrieving that file: <resourcedescriptor name="allaccounts" wstype="reportunit" uristring="/reports/samples/allaccounts" isnew="false"> <label>accounts Report</label> <description>all Accounts Report</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.jasperreports.domain. ReportUnit</value> <resourceproperty name="prop_parent_folder"><value>/reports/samples</value> <resourceproperty name="prop_version"><value>2</value> <resourceproperty name="prop_ru_always_propmt_controls"><value>false</value> <resourceproperty name="prop_ru_controls_layout"><value>1</value> <resourcedescriptor name="" wstype="datasource" uristring="" isnew="false"> <label>null</label> <resourceproperty name="prop_reference_uri"> <value>/datasources/jserverjndids</value> <resourceproperty name="prop_is_reference"><value>true</value> </resourcedescriptor> <resourcedescriptor name="allaccountsreport" wstype="jrxml" uristring="/reports/ samples/allaccounts_files/allaccountsreport" isnew="false"> <label>all Accounts Jasper Report</label> <description>all Accounts Jasper Report</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.fileresource </value> <resourceproperty name="prop_parent_folder"> <value>/reports/samples/allaccounts_files</value> <resourceproperty name="prop_version"><value>2</value> <resourceproperty name="prop_is_reference"><value>false</value> <resourceproperty name="prop_has_data"><value>true</value> <resourceproperty name="prop_attachment_id"><value>attachment</value> <resourceproperty name="prop_ru_is_main_report"><value>true</value> </resourcedescriptor> 24

25 REST - Repository Web Services <resourcedescriptor name="allaccounts_res2" wstype="img" uristring="/reports/ samples/allaccounts_files/allaccounts_res2" isnew="false"> <label>allaccounts_res2</label> <description>allaccounts_res2</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.fileresource </value> <resourceproperty name="prop_parent_folder"> <value>/reports/samples/allaccounts_files</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_is_reference"><value>false</value> <resourceproperty name="prop_has_data"><value>true</value> <resourceproperty name="prop_attachment_id"><value>attachment</value> </resourcedescriptor> <resourcedescriptor name="allaccounts_res3" wstype="img" uristring="/reports/ samples/allaccounts_files/allaccounts_res3" isnew="false"> <label>allaccounts_res3</label> <description>allaccounts_res3</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.fileresource </value> <resourceproperty name="prop_parent_folder"> <value>/reports/samples/allaccounts_files</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_is_reference"><value>false</value> <resourceproperty name="prop_has_data"><value>true</value> <resourceproperty name="prop_attachment_id"><value>attachment</value> </resourcedescriptor> <resourcedescriptor name="logolink" wstype="reference" uristring="/reports/ samples/allaccounts_files/logolink" isnew="false"> <label>logolink_label</label> <description>logolink description</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.fileresource </value> <resourceproperty name="prop_parent_folder"> <value>/reports/samples/allaccounts_files</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_is_reference"><value>true</value> <resourceproperty name="prop_reference_uri"><value>/images/jrlogo</value> 25

26 JasperReports Server Web Services Guide <resourceproperty name="prop_has_data"><value>true</value> <resourceproperty name="prop_attachment_id"><value>attachment</value> </resourcedescriptor> </resourcedescriptor> Requesting the Contents of a File Resource In order to retrieve the contents of a file, first retrieve the descriptor of its enclosing resource to find the file ID. The file ID is usually attachment, but the exact ID of files attached to a resource is given by the PROP_ATTACHMENT_ID attribute. To obtain the file, send another request to the file s URI with the value of the PROP_ATTACHMENT_ID attribute in the file argument. In the example of a JasperReport above, you can retrieve one of its file resources with the following request: GET /jasperserver/rest/resource/reports/samples/allaccounts_files/allaccounts_res3? filedata=true HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Authorization: Basic amfzcgvyywrtaw46amfzcgvyywrtaw4= Host: localhost:8080 Cookie: $Version=0; JSESSIONID=6854BF45EC89F3D3CE3E6F4FD6FF1BBD; $Path=/jasperserver Notice that the URI to the file includes the path AllAccounts_files. This is a local path that exists to access the local resources of the report, not a folder that exists in the repository. In the case of a file resource, you can download the contents of the file in the same way. First, call the resource service with the URI of a file resource, for example the JRLogo file: GET /jasperserver-pro/rest/resource/images/jrlogo HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Authorization: Basic amfzcgvyywrtaw46amfzcgvyywrtaw4= Host: localhost:8080 Cookie: $Version=0; JSESSIONID=6854BF45EC89F3D3CE3E6F4FD6FF1BBD; $Path=/jasperserver The response contains the resourcedescriptor of the file resource: <resourcedescriptor name="jrlogo" wstype="img" uristring="/images/jrlogo" isnew="false"> <label>jr logo</label> <description>jr logo</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.fileresource </value> <resourceproperty name="prop_parent_folder"> <value>/images</value>... 26

27 REST - Repository Web Services <resourceproperty name="prop_has_data"> <value>true</value> <resourceproperty name="prop_attachment_id"> <value>attachment</value> </resourcedescriptor> Now you can request the contents of the file using the value of the PROP_ATTACHMENT_ID with the file argument: GET /jasperserver-pro/rest/resource/images/jrlogo?filedata=true HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Authorization: Basic amfzcgvyywrtaw46amfzcgvyywrtaw4= Host: localhost:8080 Cookie: $Version=0; JSESSIONID=6854BF45EC89F3D3CE3E6F4FD6FF1BBD; $Path=/jasperserver In both cases, the response contains the binary contents of the file. The response header contains the information to decode it: Content-Disposition: attachment; filename=jrlogo Content-Type: application/octet-stream Content-Length: 1491 The filename in the Content-Disposition is the resource ID of the file. Jaspersoft recommends using the filename with the file extension as the resource ID when creating file resources so that the extension is available when downloading the file Requesting the Values of a Query-Based Input Control A newer service is available to interact with input controls, including query-based input controls. See section 3.3, The v2/inputcontrols Service, on page 46. The following sample request specifies a resource that is a query-based input control, and by specifying the appropriate parameters, we can receive the current values. In this case, one of the parameters to the query is a list of two values, USA and Mexico: GET Cascading_state_multi_select?IC_GET_QUERY_DATA=/datasources/JServerJNDIDS& PL_Country_multi_select=USA&PL_Country_multi_select=Mexico The following response shows the resource descriptor for the requested input control, and it contains extra properties that give all the values that are the results of the query. You can see they are from Mexico and USA. The resource descriptor also includes the nested descriptor for the query that is part of the input control. If a selection-type input control has a null value, it is given as ~NULL~. If no selection is made, its value is given as ~NOTHING~. 27

28 JasperReports Server Web Services Guide <resourcedescriptor name="cascading_state_multi_select" wstype="inputcontrol" uristring="/reports/samples/cascading_multi_select_report_files/ Cascading_state_multi_select" isnew="false"> <label>cascading state multi select control</label> <description>cascading state multi select control</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.inputcontrol </value> <resourceproperty name="prop_parent_folder"> <value>/reports/samples/cascading_multi_select_report_files</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_has_data"><value>false</value> <resourceproperty name="prop_is_reference"><value>false</value> <resourceproperty name="prop_inputcontrol_is_mandatory"><value>true</value> <resourceproperty name="prop_inputcontrol_is_readonly"><value>false</value> <resourceproperty name="prop_inputcontrol_is_visible"><value>true</value> <resourceproperty name="prop_inputcontrol_type"><value>7</value> <resourceproperty name="prop_query_value_column"> <value>billing_address_state</value> <resourceproperty name="prop_query_visible_columns"> <resourceproperty name="prop_query_visible_column_name"> <value>billing_address_country</value> <resourceproperty name="prop_query_visible_column_name"> <value>billing_address_state</value> <resourceproperty name="prop_query_data"> <resourceproperty name="prop_query_data_row"><value>df</value> <resourceproperty name="prop_query_data_row_column"> <value>mexico</value> <resourceproperty name="prop_query_data_row_column"> <value>df</value>... <resourceproperty name="prop_query_data_row"><value>zacatecas</value> <resourceproperty name="prop_query_data_row_column"> <value>mexico</value> 28

29 REST - Repository Web Services <resourceproperty name="prop_query_data_row_column"> <value>zacatecas</value> <resourceproperty name="prop_query_data_row"><value>ca</value> <resourceproperty name="prop_query_data_row_column"> <value>usa</value> <resourceproperty name="prop_query_data_row_column"> <value>ca</value>... <resourceproperty name="prop_query_data_row"><value>wa</value> <resourceproperty name="prop_query_data_row_column"> <value>usa</value> <resourceproperty name="prop_query_data_row_column"> <value>wa</value> <resourcedescriptor name="cascading_state_query" wstype="query" uristring="/ reports/samples/cascading_multi_select_report_files/ Cascading_state_multi_select_files/Cascading_state_query" isnew="false"> <label>cascading state query</label> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.query</value> <resourceproperty name="prop_parent_folder"> <value>/reports/samples/cascading_multi_select_report_files/ Cascading_state_multi_select_files</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_has_data"><value>false</value> <resourceproperty name="prop_is_reference"><value>false</value> <resourceproperty name="prop_query"> <value>select distinct billing_address_state, billing_address_country from accounts where $X{IN, billing_address_country, Country_multi_select} order by billing_address_country, billing_address_state</value> <resourceproperty name="prop_query_language"><value>sql</value> <resourcedescriptor name="" wstype="datasource" uristring="" isnew="false"> <label>null</label> <resourceproperty name="prop_reference_uri"> <value>/datasources/jserverjndids</value> <resourceproperty name="prop_is_reference"><value>true</value> </resourcedescriptor> </resourcedescriptor> </resourcedescriptor> 29

30 JasperReports Server Web Services Guide Creating a Resource The PUT method on the resource service is used to create a new resource. If the resource has one or more file resources, they must be provided using a multipart request. Method PUT URL Argument Type/Value Description Resource Descriptor Content-Type String This parameter identifies the part with an XML resource descriptor in a multipart request. This is a required argument when using multipart requests. Content multipart/form-data text/plain (in the first part) application/octet-stream (for files) Return Value on Success A well-formed XML resourcedescriptor that fully describes the resource, including any locally defined resources. File resources are uploaded in separate parts. Typical Return Values on Failure 201 Created The body is XML containing the resourcedescriptor of the resource just created. An error if the resource cannot be created for some reason. In the following sample request, the URI is the location where we want to create the resource, in this case / (the root), and the content includes the resource descriptor for a new folder called myfolder. PUT /jasperserver/rest/resource/ HTTP/1.1 Content-Length: 473 Content-Type: multipart/form-data; boundary=1afdzzmuqlfsomu0pgb2f-nmentwwupf3 Host: localhost:8080 Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) Cookie: JSESSIONID=3370EC843B09363C0A8DD09A2D1F21E3 Cookie2: $Version=1 --1afdzzMUQLfSOmu0Pgb2F-nmEnTwWuPf3 Content-Disposition: form-data; name="resourcedescriptor" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit <resourcedescriptor name="myfolder" wstype="folder" uristring="/myfolder" isnew="false"> <label>rest created folder</label> <resourceproperty name="prop_parent_folder"> <value>/</value> </resourcedescriptor> --1afdzzMUQLfSOmu0Pgb2F-nmEnTwWuPf3-- When the ResourceDescriptor contains the ResourceProperty PROP_PARENT_FOLDER, that property overrides the path/to/resource given as the URL and determines the location of the new resource. 30

31 REST - Repository Web Services The response to the PUT request is the complete resource descriptor for the new folder: HTTP/ Created Server: Apache-Coyote/1.1 Cache-Control: no-cache Content-Length: 648 Date: Mon, 01 Aug :44:05 GMT <resourcedescriptor name="myfolder" wstype="folder" uristring="/myfolder" isnew="false"> <label>rest created folder</label> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.folder</value> <resourceproperty name="prop_parent_folder"> <value>/</value> <resourceproperty name="prop_version"> <value>0</value> <resourceproperty name="prop_has_data"> <value>false</value> </resourcedescriptor> Modifying a Resource The POST method on the resource service is used to modify a resource. If the resource has one or more file resources, they must be provided using a multipart request. Method POST URL Argument Type/Value Description Resource Descriptor Content-Type String This parameter identifies the part with an XML resource descriptor in a multipart request. This is a required argument when using multipart requests. Content multipart/form-data text/plain (in the first part) application/octet-stream (for files) Return Value on Success A well-formed XML resourcedescriptor that fully describes the modified resource, including any locally defined resources. File resources are uploaded in separate parts. Typical Return Values on Failure 201 Created The body is XML containing the resourcedescriptor of the resource just modified. An error if the resource cannot be modified for some reason. A POST operates on the URL of an existing resource, otherwise it is identical to the PUT method for a new resource. 31

32 JasperReports Server Web Services Guide Deleting a Resource The DELETE method can be used with either a folder or a resource. For the delete to succeed: The logged in user must have read-delete, read-write-delete, or administer permission on the folder or resource. The resource must not be a dependency of any other resource, for example the data source of a JasperReport. In this case, you must modify or delete the other resource first. If the target is a folder, the above requirements must be satisfied for every resource and folder it contains, including any those contained recursively in subfolders to any level. Method DELETE URL Return Value on Success Typical Return Values on Failure 200 OK The resource was deleted. 404 Not Found When the specified resource URI is not found in the repository 2.3 Working with Dashboards This section describes functionality that can be restricted by the software license for JasperReports Server. If you don t see some of the options described in this section, your license may prohibit you from using them. To find out what you're licensed to use, or to upgrade your license, contact Jaspersoft. The resource service also gives access to dashboard resources in commercial editions of JasperReports Server. Dashboards are managed as normal resources whose descriptors can be created, viewed, modified, or deleted with the resource service. However, dashboards can be viewed only through the web interface of JasperReports Server because they do not have any output format that can be generated or transmitted through the REST API. Therefore, an application using the REST API can only manipulate the definition of the dashboard, that is the selection of reports to display and their layout. In order to work with a dashboard, your application must parse its resource descriptor, make changes, and generate a new, valid descriptor to send back to the server. The general structure of a dashboard descriptor contains: Typical descriptor properties such as label, description, and PROP_PARENT_FOLDER. The dashboardstate descriptor containing: The ADHOC_FRAMES property that lists the reports, labels, and buttons, and gives their coordinates in the dashboard. The ADHOC_PROPERTIES property that gives the overall dashboard layout properties. reference descriptors for each of the reports included in the ADHOC_FRAMES property. These references ensure that the reports can t be deleted from the repository as long as they are used in this dashboard. The following example shows the contents of a dashboard s resource descriptor: <resourcedescriptor name="sampledashboard" wstype="dashboard" uristring="/dashboards/sampledashboard" isnew="false"> <label>sample Dashboard</label> <description>created in Dashboard Designer, viewed through REST.</description> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.ji.adhoc.dashboardresource</value> <resourceproperty name="prop_parent_folder"><value>/dashboards</value> <resourceproperty name="prop_version"><value>0</value> <resourceproperty name="prop_has_data"><value>false</value> 32

33 REST - Repository Web Services <resourcedescriptor name="" wstype="dashboardstate" uristring="" isnew="false"> <label>null</label> <creationdate> </creationdate> <resourceproperty name="prop_resource_type"><value>dashboardstate</value> <resourceproperty name="prop_parent_folder"> <value>/dashboards/sampledashboard</value> <resourceproperty name="adhoc_paper_size"><value>content</value> <resourceproperty name="adhoc_frames"> <value>frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeleft=0; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframetop=0; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframewidth=246; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeheight=405; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcetype= com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.reportunit; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcename= Top Fives Report; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframesource=%2fflow.html %3F_flowId%3DviewReportFlow%26viewAsDashboardFrame%3Dtrue%26reportUnit%3D; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashresourceindex=0; frame_1,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframescrollbars=false; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeleft=254; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframetop=0; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframewidth=450; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeheight=418; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcetype= com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.reportunit; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcename= Sales By Month Report; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframesource=%2fflow.html %3F_flowId%3DviewReportFlow%26viewAsDashboardFrame%3Dtrue%26reportUnit%3D; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashresourceindex=1; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframescrollbars=false; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcetype= com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.reportunit; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcename= Sales By Month Report; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframesource=%2fflow.html %3F_flowId%3DviewReportFlow%26viewAsDashboardFrame%3Dtrue%26reportUnit%3D; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashresourceindex=1; frame_2,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframescrollbars=false; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeleft=712; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframetop=0; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframewidth=200; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeheight=350; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcetype= com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.reportunit; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframeresourcename= Sales Gauges Report; 33

34 JasperReports Server Web Services Guide frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframesource=%2fflow.html %3F_flowId%3DviewReportFlow%26viewAsDashboardFrame%3Dtrue%26reportUnit%3D; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashresourceindex=2; frame_3,com.jaspersoft.ji.adhoc.dashboardcontentframe,dashframescrollbars=false; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframeleft=736; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframetop=352; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframewidth=66; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframeheight=16; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,dashtextframelabel=start Month; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,fontresizes=false; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,dashtextframefontsize=11; text_2,com.jaspersoft.ji.adhoc.dashboardtextframe,maxfontsize=11; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframeleft=816; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframetop=352; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframewidth=85; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframeheight=16; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframeparamname= startmonth; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframeparamvalue= 1; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframedefaultparam Value=1; control_2,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframedatatype= String; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframeleft=744; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframetop=376; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframewidth=59; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,dashframeheight=16; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,dashtextframelabel=end Month; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,fontresizes=false; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,dashtextframefontsize=11; text_3,com.jaspersoft.ji.adhoc.dashboardtextframe,maxfontsize=11; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframeleft=816; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframetop=376; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframewidth=85; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashframeheight=16; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframeparamname= endmonth; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframeparamvalue= 12; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframedefaultparam Value=12; control_3,com.jaspersoft.ji.adhoc.dashboardcontrolframe,dashcontrolframedatatype= String; button_1,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframeleft=832; button_1,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframetop=400; button_1,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframewidth=72; button_1,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframeheight=24; 34

35 REST - Repository Web Services button_1,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashclickableframeid= submit; button_1,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashclickableframetype= button; button_2,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframeleft=744; button_2,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframetop=400; button_2,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframewidth=72; button_2,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashframeheight=24; button_2,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashclickableframeid=reset; button_2,com.jaspersoft.ji.adhoc.dashboardclickableframe,dashclickableframetype= button; </value> <resourceproperty name="adhoc_properties"> <value>layoutsize=1024x768; useabsolutesizing=true; papersize=content; LayoutLeft=286; paramvalueschanged=true; LayoutTop=176; localdatepattern=mm-dd-yyyy; </value> </resourcedescriptor> <resourcedescriptor name="" wstype="reference" uristring="" isnew="false"> <label>null</label> <resourceproperty name="prop_reference_uri"> <value>/supermart/details/topfivesreport</value> </resourcedescriptor> <resourcedescriptor name="" wstype="reference" uristring="" isnew="false"> <label>null</label> <resourceproperty name="prop_reference_uri"> <value>/supermart/salesbymonth/salesbymonthreport</value> </resourcedescriptor> <resourcedescriptor name="" wstype="reference" uristring="" isnew="false"> <label>null</label> <resourceproperty name="prop_reference_uri"> <value>/supermart/revenueandprofit/salesgaugesreport</value> </resourcedescriptor> </resourcedescriptor> 2.4 The permission Service The permission service lets you view and set access permission on repository folders and resources. Only administrative users and users granted the Administer permission may view and set permissions. 35

36 JasperReports Server Web Services Guide As it is implemented, the permission service returns and sets only explicit permissions on resources. The lack of an explicit permission for a given role or user means that the permission is inherited from its parent folder. To find the value of inherited permissions on a given resource, you must obtain the permissions of all of its parent folders Viewing Permissions The GET method retrieves the permissions defined on a resource, including both user-based and role-based permissions. Method GET URL Return Value on Success 200 OK The body is XML that describes all permissions for the resource. Typical Return Values on Failure 404 Not Found When the specified resource URI is not found in the repository. The permissions for each user and each role are indicated by the following values. These values are not a true mask; they should be treated as constants: No access: 0 Read-delete: 18 Administer: 1 Read-write-delete: 30 Read-only: 2 Execute-only: 32 The response to the GET request is an entityresource that defines each permission on the resource. Permissions for roles or users that are not specified are inherited from their parent folder: <entityresource> <Item xsi:type="objectpermissionimpl" xmlns:xsi=" <permissionmask>2</permissionmask> <permissionrecipient xsi:type="roleimpl"> <externallydefined>false</externallydefined> <rolename>role_user</rolename> </permissionrecipient> <URI>repo:/path/to/resource</URI> </Item> <Item xsi:type="objectpermissionimpl" xmlns:xsi=" <permissionmask>30</permissionmask> <permissionrecipient xsi:type="roleimpl"> <externallydefined>false</externallydefined> <rolename>role_demo</rolename> </permissionrecipient> <URI>repo:/path/to/resource</URI> </Item> <Item xsi:type="objectpermissionimpl" xmlns:xsi=" <permissionmask>30</permissionmask> <permissionrecipient xsi:type="userimpl"> <externallydefined>false</externallydefined> <fullname>california User</fullName> <tenantid>organization_1</tenantid> <username>californiauser</username> 36

37 REST - Repository Web Services </permissionrecipient> <URI>repo:/path/to/resource</URI> </Item> <Item xsi:type="objectpermissionimpl" xmlns:xsi=" <permissionmask>30</permissionmask> <permissionrecipient xsi:type="userimpl"> <externallydefined>false</externallydefined> <fullname>joe User</fullName> <tenantid>organization_1</tenantid> <username>joeuser</username> </permissionrecipient> <URI>repo:/path/to/resource</URI> </Item> </entityresource> Setting Permissions PUT is implemented as a synonym of POST for the permission service. Both will create an explicit permission for a given role or user on a resource, overriding the previous explicit permission for the same role or user. To set a permission use either method and include the permission descriptors (objectpermissionimpl) such as those returned by the GET method. Method PUT or POST Content-Type text/plain URL Content A well-formed XML entityresource that defines the permissions you want to set. Return Value on Success Typical Return Value on Failure 200 OK 404 Not Found When the specified resource URI is not found in the repository. Setting a permission creates an explicit permission for the given user or role. To reset the inherited permission value, remove the explicit permission with the DELETE method. This method does not take a permission descriptor, instead specify the roles and users to reset to the inherited permission as parameters. Method DELETE URL Argument Type/Value Description roles String A comma-separated list of role names. The access permission for the specified roles will revert to the resource s inherited permission for those roles. users String A comma-separated list of user IDs. The access permission for the specified users will revert to the resource s inherited permission for those users. Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified resource URI is not found in the repository. 37

38 JasperReports Server Web Services Guide 2.5 The v2/export Service The export service works asynchronously: first you request the export with the desired options, then you monitor the state of the export, and finally you request the output file. Each step requires a different service call. You must be authenticated as the system admin (superuser) for the export services. Method POST Content-Type application/json URL Content A JSON object that describes the export options. Return Value on Success 200 OK Returns a JSON object that gives the ID of the started export operation. Typical Return Values on Failure 401 Unauthorized Export is available only to the system admin user (superuser). The content to send describes the export options, for example: { } roles: ["ROLE_USER","organization_1 ROLE_MANAGER"], users: ["jasperadmin","organization_1 joe"], uris: ["path/to/resource/1", "organizations/organization_1/path/to/resource/2"] parameters: ["role-users", "repository-permissions"] As shown above, commercial editions must use the organization syntax for all roles, users, and URIs. The following table describes the export parameters: Export Options everything role-users repository-permissions include-access-events include-audit-events include-monitoring-events Export everything except audit and monitoring: all repository resources, permissions, report jobs, users, roles, and server settings. When this option is present, each role export triggers the export of all users belonging to the role. This option should only be used if roles are specified When this option is present, repository permissions are exported along with each exported folder and resource. This option should only be used if uris are specified. When this option is present, access events (date, time, and user name of last modification) are exported along with each exported folder and resource. This option should only be used if uris are specified. Include audit data for all resources and users in the export. The audit feature must be enabled in the server configuration. Include monitoring events. The monitoring feature must be enabled in the server configuration. 38

39 REST - Repository Web Services The body of the response contains the ID of the export operation needed to check its status and later download the file: { } id: "njkhfs8374", state: { phase: "inprogress", message: "Progress..." } Checking the Export State After receiving the export ID, you can check the state of the export operation. Method GET URL Return Value on Success 200 OK Returns a JSON object that gives the current state of the export operation. Typical Return Values on Failure 404 Not Found When the specified export ID is not found. The body of the response contains the current state of the export operation: { } phase: "inprogress", message: "Progress..." { } phase: "ready", message: "Ready!" { } phase: "failure", message: "Not enough space on disk" Fetching the Export Output When the export state is ready, you can download the zip file containing the export catalog. Method GET URL Return Value on Success 200 OK Returns the exported catalog as a zip file with the given <filename>. Typical Return Values on Failure 404 Not Found When the specified export ID is not found. 2.6 The v2/import Service Use the following service to upload a catalog as a zip file and import it with the given options. Specify options as arguments in the format <argument>=true. Arguments that are omitted are assumed to be false. You must be authenticated as the system admin (superuser) for the import service. Jaspersoft does not recommend uploading files greater than 2 gigabytes. 39

40 JasperReports Server Web Services Guide Method POST URL Argument Value Description update? true Resources in the catalog replace those in the repository if their URIs and types match. skip-user-update? true When used with update=true, users in the catalog are not imported or updated. Use this option to import catalogs without overwriting currently defined users. include-access-events? true Restores the date, time, and user name of last modification if they are included in the catalog to import. include-audit-events? true Imports audit events if they are included in the catalog. include-monitoringevents? true Imports audit events if they are included in the catalog. include-server-setting? true Imports server settings if they are included in the catalog. Content-Type application/zip Return Value on Success Content The catalog file to import. Typical Return Values on Failure 200 OK Returns a JSON object that indicates the import was a success. 401 Unauthorized Import is available only to the system admin user (superuser). The body of the response indicates the success of the import: { } phase: "ready", message: "Ready!" 40

41 REST - Report Web Services CHAPTER 3 REST - REPORT WEB SERVICES The RESTful APIs to handle reports includes the following services: report For running a report, specifying an export format, and downloading the report output. v2/reports An updated service for accessing reports, report options, and input controls. v2/inputcontrols A new service to manipulate the input controls of a report. v2/options A new service to manipulate report options in the repository. jobsummary For listing all the jobs scheduled for a report. job For creating, viewing, modifying, and deleting scheduled jobs. v2/jobs An updated service for specifying jobs and job calendars. For authentication using the REST web services, see section 1.2, REST Authentication, on page 9. The RESTful report services gives responses that contain the same XML data structure that are used in the SOAP repository web service. These data structures are documented in section 1.6, Syntax of resourcedescriptor, on page 14, with reference material in Appendix A, ResourceDescriptor API Constants, on page 117. This chapter includes the following sections: The report Service The v2/reports Service The v2/inputcontrols Service The v2/options Service The jobsummary Service The job Service The v2/jobs Service 3.1 The report Service The report service uses a combination of the PUT, GET, and POST methods to run reports and make them available in multiple ways through the API: The PUT method generates the report in any number of formats, stores the output in the session, and returns an identifier. The GET method with the identifier and file ID downloads any one of the file outputs. The POST method can be used to regenerate the report, for example in different formats, and supports page-by-page downloading of the PDF output. 41

42 JasperReports Server Web Services Guide The report service relies on the user session to store the report output in memory. While this does not follow the stateless nature of REST implementations, it reflects the performance optimization strategies in the JasperReports Server architecture. Filling and generating a report is resource intensive, so it is better to fill and generate once and store multiple output files temporarily than to generate the report from scratch for every output type that is requested Running a Report The PUT request for the report service runs the report and generates the specified output. The response contains the ID of the saved output for downloading later with a GET request. Method PUT URL Argument Type/Value Description RUN_OUTPUT_ FORMAT? Resource Descriptor IMAGES_ URI? X-Method- Override? OutputType String String POST The format of the report output. Possible values: PDF, HTML, XLS, RTF, CSV, XML, JRPRINT. The Default is PDF. Argument used to pass a transformer key to be used when running a report using JRPRINT as output format. The transformer key will be used to transform generic elements in the generated report as per net.sf.jasperreports.engine. export.genericelementreporttransformer. This is a required argument when using multipart requests. The uri prefix used for images when exporting in HTML. The default is images. This method can be used to perform a POST instead of a PUT. PAGE? Integer > 0 An integer value used to export a specific page ignore Pagination onepageper Sheet true / false true / false When true, the report output will be generated on a single page in all export formats. When false or omitted, all export formats will be paginated. Valid only for the XLS format. When true, each page of the report is on a separate spreadsheet. When false or omitted, the entire report is on a single spreadsheet. If your reports are very long, set this argument to true, otherwise the report will not fit on a single spreadsheet and cause an error. Return Value on Success 200 OK The body is XML containing a summary of the report execution (UUID, pages, generated files, etc...). See sample return below. Typical Return Values on Failure 404 Not Found When the specified report URI is not found in the repository. The body of the PUT request should contain a resource descriptor of type reportunit with the URI of the report unit to run. The resource descriptor can contain one or more parameter tags to specify parameters. Lists can be passed using parameters with the same name and the islistvalue attribute set to true. The arguments can be placed in the URL of the request or by encoding them in the multipart request. However, some application servers such as Apache Tomcat do not process arguments that are www-url-encoded in the request when sent to a PUT method, so be sure you are using a multipart request or you are using the GET style parameters when using this method. 42

43 REST - Report Web Services The return value of the PUT request provides the UUID of the report output in this session and the ID of the files. <report> <uuid>d7bf6c f7-a2d4-8682e74b637e</uuid> <originaluri>/reports/samples/allaccounts</originaluri> <totalpages>43</totalpages> <startpage>1</startpage> <endpage>43</endpage> <file type="image/png">img_0_0_0</file> <file type="image/gif">px</file> <file type="text/html">report</file> <file type="image/jpeg">img_0_42_27</file> <file type="image/png">img_0_42_26</file> </report> Downloading Report Output Once a report has been generated with the PUT request, it is possible to download its files using a GET request. Method GET URL (see example below) Argument Type/Value Description file? String One of the files specified in the report xml. If the file parameter is not specified, the service returns the report descriptor. Return Value on Success Typical Return Values on Failure 200 OK The content is the requested file. 404 Not Found When the specified UUID is not found in the user s session. For example, the URL to download the HTML of the report generated in the previous example is: As a side effect of storing the report output in the user session, the UUID in the URL is visible only to the currently logged user. Other applications using different user IDs cannot access this report output Regenerating Report Output To export a report in a different format after its first execution, or to export a specific page, use the POST method of the report service. For example, it is possible to download the report one page at a time by repeatedly sending the appropriate POST and GET requests. 43

44 JasperReports Server Web Services Guide Method POST URL (see example below) Argument Type/Value Description RUN_OUTPUT_ FORMAT? IMAGES_ URI? OutputType String The format of the report output. Possible values: PDF, HTML, XLS, RTF, CSV, XML, JRPRINT. The Default is PDF. The uri prefix used for images when exporting in HTML. The default is images. PAGE? Integer > 0 An integer value used to export a specific page. Return Value on Success 200 OK The new details of the report. The old files produces are discarded and replaced with new ones. Typical Return Values on Failure 404 Not Found When the specified UUID is not found in the user s session. For example, the following request exports page 10 of the PDF report: POST You then need to take the file name from the return value and create a GET request for it. 3.2 The v2/reports Service The rest_v2/reports service reimplements the functionality of the rest/report service. The new service simplifies the API for obtaining report output, such as PDF and XLS. The new service also provides more functionality to interact with running reports, report options, and input controls Running a Report The new v2/reports service allows clients to receive report output in a single request-response. The output format is specified in the URL as a file extension to the report URI. Method GET URL where <format> is one of the following: html, pdf, xls, rtf, csv, xml, jrprint Argument Type/Value Description page? Integer > 0 An integer value used to export a specific page <inputcontrol> Value Any input control that is defined for the report. Input controls that are multiselect may appear more than once. See examples below. attachments Prefix onepageper Sheet relative URI true / false Allows the caller to specify a URL prefix for report attachments. For example, all images associated with a report will use the prefix. If this parameter isn't specified, then the server generates a root-relative URL for attachments. Valid only for the XLS format. When true, each page of the report is on a separate spreadsheet. When false or omitted, the entire report is on a single spreadsheet. If your reports are very long, set this argument to true, otherwise the report will not fit on a single spreadsheet and cause an error. Return Value on Success Typical Return Values on Failure 200 OK The content is the requested file. 404 Not Found When the specified report URI is not found in the repository. 44

45 REST - Report Web Services The follow examples show various combinations of formats, arguments, and input controls: (all pages) (all pages) Country_multi_select=USA&Cascading_state_multi_select=WA&Cascading_state_multi_select=CA Finding Running Reports The new v2/reports service provides functionality to stop reports that are running. Reports can be running from user interaction, web service calls, or scheduling. The following method provides several ways to find reports that are currently running, in case the client wants to stop them. Method GET URL Argument Type/Value Description reporturi? /path/to/report Gives the repository URI of a report to find if it is running. jobid? value Find the running report based on its jobid in the scheduler. joblabel? value Find the running report based on its joblabel in the scheduler. username? value Name of user who has scheduled a report, in the format <username>%7<organizationid>. The <organizationid> is required for all users except system admins (superuser). firetime From? firetimeto? date/time pattern date/time pattern Date and time in the following pattern: yyyy-mm-dd't'hh:mmz. Together, these arguments create a time range to find when the running report was started. Both of the range limits are inclusive. Either argument may be null to signify an open-ended range. Return Value on Success 200 OK The content is a list of execution IDs that can be used for cancellation. Typical Return Values on Failure 404 Not Found When the specified report URI is not found in the repository Terminate Running Report Use the following method to stop a running report, as found with the previous method. Method PUT Content-Type application/xml URL Content Either an empty instance of the ReportExecutionCancellation class or <status>cancelled</status>. Return Value on Success 200 OK The content also contains: <status>cancelled</status>. Typical Return Values on Failure 204 No Content When the specified execution ID is not found on the server, and the response body is empty. 45

46 JasperReports Server Web Services Guide 3.3 The v2/inputcontrols Service The v2/reports service includes methods for reading and setting input controls. The inputcontrols methods return an XML descriptor by default, but you can optionally specify the JSON format. The example in this section use the JSON format Listing Input Control Structure The following method returns a description of the structure of the input controls for a given report. Method GET URL Options accept: application/json Return Value on Success 200 OK The content is a JSON object that describes the input control structure. See example below. Typical Return Values on Failure 404 Not Found When the specified report URI is not found in the repository. The body of the response contains the structure of the input controls for the report. This structure contains the information needed by your application to display the input controls to your users and allow them to make a selection. In particular, this includes any cascading structure as a set of dependencies between input controls. The following example shows a response in the JSON format: { "inputcontrol" : [ { "id":"cascading_name_single_select", "label":"cascading name single select", "mandatory":"true", "readonly":"false", "type":"singleselect", "uri":"repo:/reports/samples/cascading_multi_select_report_files/ Cascading_name_single_select", "visible":"true", "masterdependencies":{"controlid":["country_multi_select","cascading_state_multi_ select"]}, "slavedependencies":null, "validationrules": [{... }] "state": { "uri": "/reports/samples/cascading_multi_select_report_files/ Cascading_name_single_select", "id": "Cascading_name_single_select", "value": null, "options": [{ "selected": false, "label": "A & U Jaramillo Telecommunications, Inc", "value": "A & U Jaramillo Telecommunications, Inc" },... ]} } },... ]} 46

47 REST - Report Web Services The stucture includes a set of validation rules for each input control. These rules indicate what type of validation your app should perform on input control values it receives from your users, and if the validation fails, the message to display. Depending on the type of the input control, the following validations are possible: mandatoryvalidationrule This input is required and your app should ensure the user enters a value. datetimeformatvalidation This input must have a data time format and your app should ensure the user enters a valid date and time. The following sample shows the structure of these two possible validation rules. "validationrules": [{ "mandatoryvalidationrule" : { "errormessage" : "This field is mandatory so you must enter data." }, "datetimeformatvalidationrule" : { "errormessage" : "Specify a valid date value.", "format" : "yyyy-mm-dd" } }] Listing Input Control Values The following method returns a description of the possible values of all input controls for the report. Among these choices, it shows which ones are selected. Method GET URL Options accept: application/json Return Value on Success 200 OK The content is a JSON object that describes the input control values and selection. Typical Return Values on Failure 404 Not Found When the specified report URI is not found in the repository. The body of the response contains the structure of the input controls for the report. The following example shows a response in the JSON format: { "inputcontrolstate" : [ { "uri" : "/reports/samples/.../country_multi_select", "value" : "", "options" : { "option" : [ { "label" : "Canada", "selected" : "false", "value" : "Canada" }, { "label" : "Mexico", "selected" : "false", "value" : "Mexico" }, { 47

48 JasperReports Server Web Services Guide } } },... ] "label" : "USA", "selected" : "true", "value" : "USA" } ] If a selection-type input control has a null value, it is given as ~NULL~. If no selection is made, its value is given as ~NOTHING~ Setting Input Control Values The following method updates the state of current input control values, so they are set for the next run of the report. Method POST Content-Type application/json URL <ic2>;.../values/ Content A JSON object that lists the new selected values. See example below. Options accept: application/json Return Value on Success 200 OK The content is a JSON object that describes the new selection of input control values. Typical Return Values on Failure 404 Not Found When the specified report URI is not found in the repository. Assuming the client receives the response given in section 3.3.2, Listing Input Control Values, on page 47, it can send the following request body: { } "Country_multi_select":["Mexico"], "Cascading_state_multi_select":["Guerrero", "Sinaloa"] When specifying the option for the JSON format, the server s response is: { "inputcontrolstate" : [ { "uri" : "/reports/samples/.../country_multi_select", "value" : "", "options" : { "option" : [ { "label" : "Canada", "selected" : "false", "value" : "Canada" }, { 48

49 REST - Report Web Services } } },... ] "label" : "Mexico", "selected" : "true", "value" : "Mexico" }, { "label" : "USA", "selected" : "false", "value" : "USA" } ] 3.4 The v2/options Service Report options are sets of input control values that are saved in the repository. A report option is always associated with a report Listing Report Options The following method retrieves a list of report options summaries. The summaries give the name of the report options, but not the input control values that are associated with it. Method GET URL Options accept: application/json Return Value on Success 200 OK The content is a JSON object that lists the names of the report options for the given report. Typical Return Values on Failure 404 Not Found When the specified report URI is not found in the repository. The body of the response contains the labels of the report options, for example: { } "reportoptionssummary": [{ "uri": "/reports/samples/options", "id": "Options", "label": "Options" }, { "uri": "/reports/samples/options_2", "id": "Options_2", "label": "Options 2" }] 49

50 JasperReports Server Web Services Guide Creating Report Options The following method creates a new report option for a given report. A report option is defined by a set of values for all of the report s input controls. Method POST URL Argument Type/Value Description label string The name to give the new report option. overwrite? true / false If true, any report option that has the same label is replaced. If false or omitted, any report option with the same label will not be replaced. Content-Type application/json Content A JSON object that lists the input control selections. See example below. Options accept: application/json Return Value on Success 200 OK The content is a JSON object that describes the new selection of input control values. Typical Return Values on Failure 404 Not Found When the specified report URI is not found in the repository. In this example, we create new options for the sample report named Cascading_multi_select_report. We send the following header: options?label=myreportoption With the following request body: { } "Country_multi_select":["Mexico"], "Cascading_state_multi_select":["Guerrero", "Sinaloa"] When successful, the server responds with a JSON object that describes the new report options, for example: { } "uri":"/reports/samples/myreportoption", "id":"myreportoption", "label":"myreportoption" Updating Report Options Use the following method to modify the values in a given report option. 50

51 REST - Report Web Services Method PUT Content-Type application/json URL Content A JSON object that lists the input control selections. See example below. Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified report URI is not found in the repository. For example, we change the report option we created in section 3.4.2, Creating Report Options, on page 50 with the following header: MyReportOption And the following request body: { } "Country_multi_select":["USA"], "Cascading_state_multi_select":["CA", "WA"] Deleting Report Options Use the following method to delete a given report option. Method DELETE URL Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified report URI is not found in the repository. 3.5 The jobsummary Service The rest/jobsummary service is superseded by The v2/jobs Service on page 55. In order to schedule reports and interact with jobs that are created to run a report at a later time, the REST API provides two services: The jobsummary service lists all currently defined jobs on a given report. The job service lets you create, modify, and delete a specific job. The jobsummary service is a read only service. Requests for PUT, POST, and DELETE operations receive the error 405, method not allowed. 51

52 JasperReports Server Web Services Guide Method GET URL Return Value on Success 200 OK The body contains XML that describes all the active jobs Typical Return Values on Failure 404 Not Found When the specified report is not found in the server. The jobs are described in jobsummary elements such as the following example: <jobs> <jobsummary> <id>22164</id> <label>myjob</label> <nextfiretime> t11:11:11-08:00</nextfiretime> <reportunituri>/organizations/organization_1/reports/samples/allaccounts </reportunituri> <state> <value>normal</value> </state> <version>0</version> </jobsummary> <jobsummary>... </jobsummary> </jobs> The job summary gives the ID of the job that you need to interact with it using the job service. It also gives the next occurrence ( fire time ) of the job, and its status that would indicate any errors. 3.6 The job Service The rest/job service is superseded by the rest_v2/jobs service. The job service lets you view details of a job, edit them, create new jobs, and delete existing ones. For interacting with existing jobs, use the jobid that you obtained from the jobsummary service Viewing a Job Definition The GET method for the job service retrieves the information about a scheduled job. Method GET URL Return Value on Success 200 OK The body contains XML that describes all the job properties Typical Return Values on Failure 404 Not Found When the specified job is not found in the server. 52

53 REST - Report Web Services The GET method returns a job element that gives the output, scheduling, and parameter details, if any, for the job: <job> <baseoutputfilename>allaccounts</baseoutputfilename> <description>sample job</description> <id>22164</id> <label>myjob</label> <mailnotification> <id>22163</id> <messagetext></messagetext> <resultsendtype><value>send</value></resultsendtype> <skipemptyreports>false</skipemptyreports> <subject>scheduled AllAccounts report</subject> <toaddresses>example@example.com</toaddresses> <version>2</version> </mailnotification> <outputformats>pdf</outputformats> <outputformats>html</outputformats> <outputlocale></outputlocale> <reportunituri>/reports/samples/allaccounts</reportunituri> <repositorydestination> <folderuri>/reports/samples</folderuri> <id>22162</id> <outputdescription></outputdescription> <overwritefiles>false</overwritefiles> <sequentialfilenames>false</sequentialfilenames> <version>0</version> </repositorydestination> <simpletrigger> <id>22161</id> <startdate> t11:11:11-08:00</startdate> <timezone>america/los_angeles</timezone> <version>0</version> <occurrencecount>1</occurrencecount> </simpletrigger> <version>0</version> </job> Scheduling a Report To schedule a report, create its job descriptor and use the PUT method of the job service. Specify the report being scheduled inside the job descriptor. You do not need to specify any job IDs in the descriptor, because the server will assign them. 53

54 JasperReports Server Web Services Guide Method PUT Content-Type text/plain URL Content A well-formed XML job descriptor. Return Value on Success 201 Created The body contains XML Job descriptor. This is the only case where a descriptor returns for a put request and that id due to the fact that the job id (the job handle) is created in the server. Typical Return Values on Failure 404 Not Found When the report specified in the job descriptor is not found in the server. The output formats are those supported by JasperReports server, as given by the following values: PDF XLS DOCX HTML XLS_NOPAG RTF CSV XLSX ODT ODS XLSX_NOPAG The recurrence can be defined as follows: No recurrence (single run), for example: <simpletrigger> <startdate> t11:11:11-08:00</startdate> <timezone>america/los_angeles</timezone> <version>0</version> <occurrencecount>1</occurrencecount> </simpletrigger> Simple recurrence, for example every day until a given date: <simpletrigger> <enddate> t11:11:11-08:00</enddate> <startdate> t12:12:12-08:00</startdate> <timezone>america/los_angeles</timezone> <version>0</version> <occurrencecount>-1</occurrencecount> <recurrenceinterval>1</recurrenceinterval> <recurrenceintervalunit> <value>day</value> </recurrenceintervalunit> </simpletrigger> 54

55 REST - Report Web Services Calendar recurrence, for example every Tuesday and Thursday in February, April, and June until next year: < <calendartrigger> <enddate> t12:12:12-08:00</enddate> <timezone>america/los_angeles</timezone> <version>0</version> <daystype><value>week</value></daystype> <hours>0</hours> <minutes>0</minutes> <monthdays></monthdays> <months>2</months> <months>4</months> <months>6</months> <weekdays>3</weekdays> <weekdays>5</weekdays> </calendartrigger> Editing a Job Definition To modify an existing job definition, use the GET method to read its job descriptor, modify the descriptor as required, and use the POST method of the job service. The POST method replaces the definition of the job with the given job ID. Method POST Content-Type text/plain URL Content A well-formed XML job descriptor. Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified job is not found in the server Deleting a Job Definition Use the DELETE method to delete a job identified by its jobid. Use the jobsummary service to see the job IDs for a given report. Method DELETE URL Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified job is not found in the server. 3.7 The v2/jobs Service The rest_v2/jobs service reimplements the functionality of the jobsummary and job services. In addition, the new service provides an API to scheduler features that were introduced in JasperReports Server 4.7, such as bulk updates, pausing jobs, FTP output and exclusion calendars. 55

56 JasperReports Server Web Services Guide Listing Report Jobs Use the following method to list jobs, either all jobs managed by the scheduler or the jobs for a specific report: Method GET URL Argument Type/Value Description reportunit URI? /path/to/report Gives the repository URI of a report to list all jobs. When this argument is omitted, this method returns all jobs for all reports. Return Value on Success 200 OK The body contains XML that describes jobs in the scheduler. Typical Return Values on Failure 404 Not Found When no job is not found in the server. The jobs are described in the jobsummary element such as the following example: The jobsummary XML element returned by the rest_v2/jobs service has a different structure than the element with the same name returned by the rest/jobsummary service. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <jobs> <jobsummary> <id>2042</id> <label>junit_job_new</label> <reportunituri>/organizations/organization_1/reports/samples/allaccounts </reportunituri> <state> <nextfiretime> t13:47:00+02:00</nextfiretime> <value>normal</value> </state> <version>1</version> </jobsummary> </jobs> Viewing a Job Definition The GET method retrieves the information about a scheduled job. Method GET URL Return Value on Success 200 OK The body contains XML that describes all the job properties. Typical Return Values on Failure 404 Not Found When the specified job is not found in the server. The GET method returns a job element that gives the output, scheduling, and parameter details, if any, for the job. 56

57 REST - Report Web Services The job XML element returned by the rest_v2/jobs service has a different structure than the element with the same name returned by the rest/job service. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <job> <baseoutputfilename>allaccounts</baseoutputfilename> <repositorydestination> <folderuri>/reports/samples</folderuri> <id>2041</id> <outputdescription/> <overwritefiles>false</overwritefiles> <sequentialfilenames>false</sequentialfilenames> <version>0</version> </repositorydestination> <description/> <id>2042</id> <label>mynewjob</label> <mailnotification> <bccaddresses/> <ccaddresses/> <id>2007</id> <includingstacktracewhenjobfails>false</includingstacktracewhenjobfails> <messagetext>body of message</messagetext>< resultsendtype>send_attachment</resultsendtype> <skipemptyreports>true</skipemptyreports> <skipnotificationwhenjobfails>false</skipnotificationwhenjobfails> <subject>subject of message</subject> <toaddresses><address>name@example.com</address></toaddresses> <version>0</version> </mailnotification> <outputformats> <outputformat>xls</outputformat> <outputformat>csv</outputformat> <outputformat>pdf</outputformat> <outputformat>html</outputformat> <outputformat>docx</outputformat> </outputformats> <outputlocale/> <reportunituri>/reports/samples/allaccounts</reportunituri> <simpletrigger> <id>2040</id> <startdate> t03:47:00+02:00</startdate> <timezone>america/los_angeles</timezone> <version>0</version> <occurrencecount>1</occurrencecount> </simpletrigger> <version>1</version> </job> 57

58 JasperReports Server Web Services Guide Extended Job Search The GET method is also used for more advanced job searches. Some field of the jobsummary descriptor can be used directly as parameters, and fields of the job descriptor can also be used as search criteria. You can also control the pagination and sorting order of the reply. Method GET URL Argument Type/Value Description label string The name of the report job. owner string The username of the report job creator; the user who scheduled the report. reportunit URI? example? numberof Rows /path/to/report JSON jobmodel integer Gives the repository URI of a report to list all jobs. When this argument is omitted, this method returns all jobs for all reports. Searches for jobs that match the JSON jobmodel. The jobmodel is a fragment of a job descriptor containing one or more fields to be matched. Turns on pagination of the result by specifying the number of jobsummary descriptors per results page. startindex integer Determines the page number in paginated results by specifying the index of the first jobsummary to be returned. sorttype Possible values are: NONE, SORTBY_JOBID, SORTBY_JOBNAME, SORTBY_REPORTURI, SORTBY_REPORTNAME, SORTBY_REPORTFOLDER, SORTBY_OWNER, SORTBY_STATUS, SORTBY_LASTRUN, SORTBY_NEXTRUN isascending true / false Determines the sort order: ascending if true, descending if false or omitted. Return Value on Success 200 OK The body contains XML that describes jobs in the scheduler that match the search criteria. Typical Return Values on Failure 404 Not Found When the specified report is not found in the server. The body of the return value is an XML jobs descriptor containing jobsummary descriptors, as shown in section 3.7.1, Listing Report Jobs, on page 56. The example parameter lets you specify a search on fields in the job descriptor, such as output formats. Some fields may be specified in both the example parameter and in a dedicated parameter, for example label. In that case, the search specified in the example parameter takes precedence. For example, you can search for all jobs that specify and output format of PDF. The JSON string to specify this field is: {"outputformat":"pdf"} And the corresponding URI, with proper encoding, is: Scheduling a Report To schedule a report, create its job descriptor similar to the one returned by the GET method, and use the PUT method of the V2/jobs service. Specify the report being scheduled inside the job descriptor. You do not need to specify any job IDs in the descriptor, because the server will assign them. 58

59 REST - Report Web Services Method PUT Content-Type application/xml application/json URL Content A well-formed XML or JSON job descriptor. Return Value on Success 201 Created The body contains the XML job descriptor of the newly created job. It is similar to the one that was sent but now contains the jobid for the new job. Typical Return Values on Failure 404 Not Found When the report specified in the job descriptor is not found in the server Viewing Job Status The following method returns the current runtime state of a job: Method GET URL Return Value on Success Typical Return Values on Failure 200 OK Body contains the status descriptor. 404 Not Found When the specified <jobid> does not exist Editing a Job Definition To modify an existing job definition, use the GET method to read its job descriptor, modify the descriptor as required, and use the POST method of the v2/jobs service. The POST method replaces the definition of the job with the given job ID. Method POST Content-Type application/xml application/json URL Content A well-formed XML or JSON job descriptor. Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified job is not found in the server Updating Jobs in Bulk The POST method also supports other parameters to perform bulk updates on scheduled jobs. 59

60 JasperReports Server Web Services Guide Method POST URL Argument Type/Value Description id? jobid string Can be used multiple times to create a list of jobids to update replace Trigger IgnoreType Content-Type application/xml true / false When true, the trigger is replaced from the content being sent and the trigger type is ignored. When false or omitted, the trigger is updated automatically by the scheduler. Content A well-formed XML jobmodel descriptor. The jobmodel is a fragment of a job descriptor containing only the fields to be updated. See example below. Return Value on Success Typical Return Values on Failure 200 OK Body empty. 404 Not Found When the specified job is not found in the server. For example, the following request will update the job description in several jobs: POST request: And the body of the request contains: <jobmodel> <description>this description updated in bulk</description> </jobmodel> Pausing Jobs The following method pauses currently scheduled job execution. Pausing keeps the job schedule and all other details but prevents the job from running. It does not delete the job. Method POST Content-Type application/xml URL Content A well-formed XML jobidlist descriptor that specifies the IDs of the jobs. See example below. If the body of the request is empty, or the list is empty, all jobs in the scheduler will be paused. Return Value on Success Typical Return Values on Failure 200 OK The following example shows a list of jobs sent in the body of the request. <jobidlist> <jobid>1236</jobid> <jobid>1237</jobid> <jobid>1238</jobid> <jobid>1239</jobid> </jobidlist> 60

61 3.7.9 Resuming Jobs REST - Report Web Services Use the following method to resume any or all paused jobs in the scheduler. Resuming a job means that any defined trigger after the time it is resumed will Method POST Content-Type application/xml URL Content A well-formed XML jobidlist descriptor that specifies the IDs of the jobs. See example below. If the body of the request is empty, or the list is empty, all paused jobs in the scheduler will resume. Return Value on Success Typical Return Values on Failure 200 OK The XML format of the jobidlist descriptor in the request body is identical to the one used when pausing jobs: <jobidlist> <jobid>1236</jobid> <jobid>1237</jobid> </jobidlist> Restarting Failed Jobs Use the following method to rerun failed jobs in the scheduler. For each job to be restarted, the scheduler creates an immediate single-run copy of job, to replace the one that failed. Therefore, all jobs listed in the request body will run once immediately after issuing this command. The single-run copies have a misfire policy set so that they do not trigger any further failures (MISFIRE_ INSTRUCTION_IGNORE_MISFIRE_POLICY). If the single-run copies fail themselves, no further attempts are made automatically. Method POST Content-Type application/xml URL Content A well-formed XML jobidlist descriptor that specifies the IDs of the jobs. See example below. Return Value on Success Typical Return Values on Failure 200 OK The XML format of the jobidlist descriptor in the request body is identical to the one used when pausing jobs: <jobidlist> <jobid>8321</jobid> <jobid>8322</jobid> </jobidlist> 61

62 JasperReports Server Web Services Guide Specifying FTP Output The REST service allows a job to specify output to remote files through FTP (File Transfer Protocol). In addition to the repository location, you can specify an FTP server and path where JasperReports Server will write the output files when the job runs. You also need to provide a username and password to access the FTP server. To specify these parameters, add the outputftpinfo element to the XML job descriptor, as shown in the following example: <job> <reportunituri>/reports/samples/allaccounts</reportunituri> <label>myjob</label> <description>myjob description</description> <baseoutputfilename>weeklyaccountsreport</baseoutputfilename> <repositorydestination> <folderuri>/reports/samples</folderuri> <outputdescription/> <overwritefiles>true</overwritefiles> <sequentialfilenames>false</sequentialfilenames> <outputftpinfo> <servername>ftpserver.example.com</servername> <username>ftpuser</username> <password>ftppassword</password> <folderpath>/shared/users/ftpuser</folderpath> </outputftpinfo> </repositorydestination> <outputformats> <outputformat>xls</outputformat> <outputformat>pdf</outputformat> </outputformats>... </job> FTP output is always specified in addition to repository output, and the output will be written to both the repository and the FTP location. You cannot specify FTP output alone. The file names to be written are the same ones that are generated by the job output, as specified by the baseoutputfilename, sequential pattern if any, and format extensions such as.pdf. Similarly, the file overwrite and sequential filename behavior specified for repository output also apply to FTP output Calendar Exclusion for the Scheduler The scheduler allows a job to be defined with a list of excluded days or times when you do not want the job to run. For example, if you have a report scheduled to run every business day, you want to exclude holidays that change every year. The list for excluded days and times is defined as a calendar, and there are various ways to define the calendar. The scheduler stores any number of exclusion calendars that you can reference by name. When scheduling a report, reference the name of the calendar to exclude, and the scheduler automatically calculates the correct days to trigger the report. The scheduler also allows you to update an exclusion calendar and update all of the report jobs that used it. Therefore, you can update the calendar of excluded holidays every year and not need to modify any report jobs. 62

63 REST - Report Web Services Listing All Registered Calendar Names The following method returns the list of all calendar names that were added to the scheduler. Method GET URL Return Value on Success 200 OK Body is XML that contains a list of calendar names. Typical Return Values on Failure 401 Unauthorized The list of calendar names in the result has the following XML format: <calendarnamelist> <calendarname>name1</calendarname> <calendarname>name2</calendarname> </calendarnamelist> Viewing an Exclusion Calendar The following method takes the name of an exclusion calendar and returns the definition of the calendar: Method GET URL Return Value on Success 200 OK Body is XML that contains the requested calendar. Typical Return Values on Failure 404 Not Found When the specified calendar name does not exist. The calendar descriptor in the result has the following XML format: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <basecalendar> <calendartype>base</calendartype> <excludedates/> <description>base calendar description</description> <excludedays/> <timezone>gmt+03:00</timezone> </basecalendar> <calendartype>daily</calendartype> <excludedates/> <description>main calendar description</description> <excludedays/> <inverttimerange>false</inverttimerange> <rangeendingcalendar > T14:44: :00</rangeEndingCalendar> <rangestartingcalendar> t14:43: :00</rangestartingcalendar> <timezone>gmt+03:00</timezone> </reportjobcalendar> 63

64 JasperReports Server Web Services Guide Deleting an Exclusion Calendar Use the following method to delete a calendar by name. Method DELETE URL Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified calendar name does not exist Adding or Updating an Exclusion Calendar This method creates a named exclusion calendar that you can use when scheduling reports. If the calendar already exists, you have the option of replacing it and updating all the jobs that used it. Method PUT URL Argument Type/Value Description replace? true / false If true, any calendar existing in the JobStore with the same name is overwritten. When this argument is omitted, it is false by default. update Triggers? Content-Type application/xml true / false Whether or not to update existing triggers that referenced the already existing calendar so that they are based on the new trigger. Content A well-formed XML calendar descriptor (see examples below). Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified The following examples show the types of exclusion calendars that you can add to the scheduler: Base calendar <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <calendartype>base</calendartype> <description>base calendar description</description> <timezone>gmt+03:00</timezone> </reportjobcalendar> 64

65 REST - Report Web Services Annual calendar A list of days that you want to exclude every year. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <calendartype>annual</calendartype> <description>annual calendar description</description> <excludedays> <excludeday> </excludeday> <excludeday> </excludeday> <excludeday> </excludeday> </excludedays> <timezone>gmt+03:00</timezone> </reportjobcalendar> Cron calendar Defines the days and times to exclude as a cron expression. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <calendartype>cron</calendartype> <description>cron format description</description> <cronexpression> ? * WED,FRI</cronExpression> <timezone>gmt+03:00</timezone> </reportjobcalendar> Daily calendar Defines a time range to exclude every day. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <calendartype>daily</calendartype> <description>daily calendar description</description> <inverttimerange>false</inverttimerange> <rangeendingcalendar> t14:44: :00</rangeendingcalendar> <rangestartingcalendar> t14:43: :00</rangestartingcalendar> <timezone>gmt+03:00</timezone> </reportjobcalendar> 65

66 JasperReports Server Web Services Guide Holiday calendar Defines a set of days to exclude that can be updated every year. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <calendartype>holiday</calendartype> <description>holiday calendar description</description> <excludedays> <excludeday> </excludeday> <excludeday> </excludeday> <excludeday> </excludeday> </excludedays> <timezone>gmt+03:00</timezone> </reportjobcalendar> Weekly calendar Defines a set of days to be excluded each week. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <calendartype>weekly</calendartype> <description>test description</description> <excludedaysflags> <excludedayflag>false</excludedayflag> <!--SUNDAY---> <excludedayflag>true</excludedayflag> <!--MONDAY---> <excludedayflag>false</excludedayflag> <!--TUESDAY---> <excludedayflag>true</excludedayflag> <!--WEDNESDAY---> <excludedayflag>false</excludedayflag> <!--THURSDAY---> <excludedayflag>true</excludedayflag> <!--FRIDAY---> <excludedayflag>false</excludedayflag> <!--SATURDAY---> </excludedaysflags> <timezone>gmt+03:00</timezone> </reportjobcalendar> 66

67 REST - Report Web Services Monthly calendar Defines the dates to exclude every month. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <reportjobcalendar> <calendartype>monthly</calendartype> <description>monthly calendar description</description> <excludedaysflags> <excludedayflag>true</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>true</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>true</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>true</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>true</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>true</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>true</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > <excludedayflag>false</excludedayflag> <! > </excludedaysflags> <timezone>gmt+03:00</timezone> </reportjobcalendar> 67

68 JasperReports Server Web Services Guide 68

69 REST - Web Services for Administration CHAPTER 4 REST - WEB SERVICES FOR ADMINISTRATION The RESTful API to administer JasperReports Server consists of the following services: organization In commercial editions, for viewing, editing, and creating organizations. user For viewing, editing, and creating users and their properties. attribute For viewing and editing user attributes. role For viewing, editing, and creating roles and role membership Only administrative users may access these REST services. For authentication using the REST web services, see section 1.2, REST Authentication, on page 9. The RESTful repository services gives responses that contain the same XML data structure that are used in the SOAP repository web service. These data structures are documented in section 1.6, Syntax of resourcedescriptor, on page 14, with reference material in Appendix A, ResourceDescriptor API Constants, on page 117. This chapter includes the following sections: The organization Service The user Service The attribute Service The role Service 4.1 The organization Service This section describes functionality that can be restricted by the software license for JasperReports Server. If you don t see some of the options described in this section, your license may prohibit you from using them. To find out what you're licensed to use, or to upgrade your license, contact Jaspersoft. In commercial editions of JasperReports Server, the organization server lets you view, create, modify, and delete organizations (also known as tenants). The GET method retrieves information about an organization and optionally its child organizations. To specify an organization, use its ID, not its path. 69

70 JasperReports Server Web Services Guide Method GET URL Argument Type/Value Description listsuborgs? Boolean When this argument is omitted or is false, only the specified organization is returned. When true only the suborganizations are returned. Return Value on Success 200 OK The content is a descriptor for the organization or its suborganizations. Typical Return Values on Failure 404 Not Found When the specified organization ID is not found in the server. When the listsuborgs argument is omitted or false, the GET method returns a single tenant descriptor for the given organization: <tenant> <alias>organization_1</alias> <id>organization_1</id> <parentid>organizations</parentid> <tenantdesc> </tenantdesc> <tenantfolderuri>/organizations/organization_1</tenantfolderuri> <tenantname>organization</tenantname> <tenantnote> </tenantnote> <tenanturi>/organization_1</tenanturi> <theme>default</theme> </tenant> The tenantfolderuri is always relative to the user ID that authenticated the request. In these two examples, the user ID is superuser. When the listsuborgs argument is true, the GET method returns a list of tenant descriptors. If the given organization has no suborganizations, the list is empty. <tenantslist> <tenant> <alias>suborganization</alias> <id>suborganization</id> <parentid>organization_1</parentid> <tenantdesc>my SubOrganization</tenantDesc> <tenantfolderuri>/organizations/organization_1/organizations/suborganization </tenantfolderuri> <tenantname>suborganization</tenantname> <tenanturi>/organization_1/suborganization</tenanturi> <theme>default</theme> </tenant> </tenantslist> 70

71 REST - Web Services for Administration Creating an Organization Use the PUT method of the organization service to create a new organization. Method PUT Content-Type text/plain URL Content A well-formed tenant descriptor that accurately describes the desired organization. Return Value on Success Typical Return Values on Failure 201 Created 404 Not Found When the parent organization ID in the descriptor is not found in the server Updating an Organization Use the POST method of the organization service to update the properties of an existing organization. Method POST Content-Type text/plain URL Content A well-formed tenant descriptor with updated property values for the desired organization. Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the organization ID is not found in the server. As with organizations managed in the user interface, only certain fields may be modified in the tenant descriptor: alias Can be used for logging in, but must be unique among all organization aliases. tenantdesc Description of the organization, visible only to administrators. tenantname Display name of the organization, appearing to users on the organization s root folder. theme The user interface theme that is active for all organization users Deleting an Organization Use the DELETE method of the organization service to remove an existing organization. Method DELETE URL Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the organization ID is not found in the server. Deleting an organization removes all of its users, roles, and all of its suborganizations recursively. 71

72 JasperReports Server Web Services Guide 4.2 The user Service The GET method for the user service returns descriptors for all users that match the search string. In commercial editions, the scope of the search is the administrator s organization and all suborganizations. In the community project, there are no organizations, and the scope is all users defined in the server. If no search string is specified, all users are returned. If no users match the search string, the method returns an empty list. Method GET URL Return Value on Success Typical Return Values on Failure 200 OK The content is a descriptor for each of the users that match the search. The following example shows the descriptors for users that match the search string joe : <users> <user> <enabled>true</enabled> <externallydefined>false</externallydefined> <fullname>joe User</fullName> <previouspasswordchangetime> t10:18: :00 </previouspasswordchangetime> <roles> <externallydefined>false</externallydefined> <rolename>role_user</rolename> </roles> <tenantid>organization_1</tenantid> <username>joeuser</username> </user> <user> < address></ address> <enabled>true</enabled> <externallydefined>false</externallydefined> <fullname>joeuser</fullname> <previouspasswordchangetime> t15:52: :00 </previouspasswordchangetime> <roles> <externallydefined>false</externallydefined> <rolename>role_user</rolename> </roles> <tenantid>suborganization</tenantid> <username>joeuser</username> </user> </users> The descriptor above is from a commercial edition, and each user has a tenantid element to indicate which organization the user belongs to. The community project does not have organizations and thus does not specify the tenantid element. 72

73 4.2.1 Creating a User REST - Web Services for Administration Use the PUT method of the user service to create a new user. In commercial editions, specify the user s organization in the tenantid element of the user descriptor. Method PUT Content-Type text/plain URL Content A well-formed user descriptor that describes the properties of the desired user. Return Value on Success Typical Return Values on Failure 201 Created 404 Not Found When the organization ID in the descriptor is not found in the server Editing a User Use the POST method of the user service to update the properties of an existing user. Method POST Content-Type text/plain URL Content A well-formed user descriptor that describes the properties of the desired user. Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the user ID is not found in the server Deleting a User Use the DELETE method of the user service to remove an existing user. Method DELETE URL Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified user ID is not found in the server. 4.3 The attribute Service The attribute service lets you view and update profile attributes, which are custom properties associated with a user. This service does not delete attributes in this release. 73

74 JasperReports Server Web Services Guide Method GET URL Return Value on Success 200 OK The content is a descriptor for the user attributes. Typical Return Values on Failure 404 Not Found When the specified user ID is not found in the server. The following example show the user attributes specified in an entityresource element: <entityresource> <Item xsi:type="profileattributeimpl" xmlns:xsi=" <attrname>state</attrname> <attrvalue>ca</attrvalue> </Item> <Item xsi:type="profileattributeimpl" xmlns:xsi=" <attrname>cities</attrname> <attrvalue>san Francisco, Oakland, San Jose</attrValue> </Item> </entityresource> Use the PUT or POST methods of the attribute service to add attributes to a user. For this service, these methods are synonyms. Method PUT or POST Content-Type text/plain URL Content A well-formed descriptor that contains the attributes to add to the given user. Return Value on Success Typical Return Values on Failure 201 Created 404 Not Found When the user ID is not found in the server. The DELETE on the attribute service is not implemented in this release. 4.4 The role Service The role service allows administrators to view, create, edit, and delete role definitions. However, the role service does not define role membership. To add users to a role, edit the user s properties, as described in 4.2.2, Editing a User, on page 73. The GET method of the role service returns descriptors for all roles that match the search string. In commercial editions, the scope of the search is the administrator s organization and all suborganizations. In the community project, there are no organizations, and the scope is all roles defined in the server. If no search string is specified, all roles are returned. If no roles match the search string, the method returns an empty list. 74

75 REST - Web Services for Administration Method GET URL Return Value on Success Typical Return Values on Failure 200 OK The content is a descriptor for each of the roles that match the search. In commercial editions, roles defined in an organization specify its ID in the tenantid element. System roles that appear in every organization are listed without a tenantid property. The community project does not have organizations and thus does not specify the tenantid element on any roles. <roles> <role> <externallydefined>false</externallydefined> <rolename>role_administrator</rolename> </role> <role> <externallydefined>false</externallydefined> <rolename>role_anonymous</rolename> </role> <role> <externallydefined>false</externallydefined> <rolename>role_demo</rolename> </role> <role> <externallydefined>false</externallydefined> <rolename>role_supermart_manager</rolename> </role> <role> <externallydefined>false</externallydefined> <rolename>role_user</rolename> </role> <role> <externallydefined>false</externallydefined> <rolename>role_sample</rolename> <tenantid>organization_1</tenantid> </role> </roles> 75

76 JasperReports Server Web Services Guide Creating a New Role Use the PUT method of the role service to create a new role. In commercial editions, specify the role s organization in the tenantid element of the role descriptor. Method PUT Content-Type text/plain URL Content A well-formed role descriptor that describes the properties of the desired role. Return Value on Success Typical Return Values on Failure 201 Created 404 Not Found When the organization ID in the descriptor is not found in the server Editing a Role Use the POST method of the role service to update the properties of an existing role. Method POST Content-Type text/plain URL Content A well-formed role descriptor that describes the properties of the desired role. Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the rolename is not found in the server Deleting a Role Use the DELETE method of the role service to remove an existing role. Method DELETE URL Return Value on Success Typical Return Values on Failure 200 OK 404 Not Found When the specified role is not found in the server. 76

77 SOAP - Repository Web Service CHAPTER 5 SOAP - REPOSITORY WEB SERVICE The repository web service is comprised of seven methods: list, get, put, move, copy, delete, and runreport. You can retrieve the WSDL (Web Services Description Language) document that describes the repository service by invoking the URL of the service and appending the string?wsdl. For example: This chapter contains the following sections: Request and Operation Result List Operation Get Operation Put Operation Delete Operation Move Operation Copy Operation runreport Operation Errors Implementation Suggestions 5.1 Request and Operation Result The repository web services operation takes a single input parameter of type String. This XML document represents the request. The following shows its DTD: <!ELEMENT request (argument*, resourcedescriptor?)> <!ATTLIST request operationname (get list put runreport) "list" locale #IMPLIED > <!ELEMENT argument (#PCDATA)> <!ATTLIST argument name CDATA #REQUIRED > 77

78 JasperReports Server Web Services Guide A request is a very simple document that contains: The operation to execute (list, get, put, delete, or runreport). A set of optional arguments. Each argument is a pair of a key and a value that is used to achieve very particular results; arguments are only used rarely. A resource descriptor. The operation name is redundant, since the operation to execute is intrinsic in the invoked service. However, including the name can clarify the request document. The services act on a single resource at time. The resource that is the subject of the request is described by a resourcedescriptor. To get error messages in a particular locale supported by the server, specify the locale code with the locale attribute. Locale codes are in the form <language code>[_<country>[_<variant>]. Valid examples include en_us, it_it, fr_fr, de_de, ja_jp, and es_es. For a list of Java-compliant locales, refer to Sun s Java web site. The following sample request lists the repository root: <?xml version="1.0" encoding="utf-8"?> <request operationname="list" locale="en"> <resourcedescriptor name="" wstype="folder" uristring="/"> <label>null</label> </resourcedescriptor> </request> Executing a service produces the operationresult in the form of a new XML document. The DTD is very simple: <!ELEMENT operationresult (code, message?, resourcedescriptor*)> <!ATTLIST operationresult version NMTOKEN #REQUIRED > <!ELEMENT code (#PCDATA)> <!ELEMENT message (#PCDATA)> The operation result contains a return code, an optional return message, and zero or more resource descriptors. A return code other than 0 indicates an error, which is normally described in the message tag. The operation result always includes the version attribute: it can be used to detect the server version. For example, you can list the repository root and read the version set by the server in the response. In this case, we aren t interested in the root folder s content. We just want the version information from the response object itself. The operation result of such a request is: <operationresult version="1.2.1"> <returncode>0</returncode>... several resource descriptors </operationresult> 78

79 5.2 List Operation SOAP - Repository Web Service This service lists the contents of the specified folder or report unit. The following sample request lists the contents of the /ContentFiles folder in the repository: <request operationname="list" locale="en"> <resourcedescriptor name="" wstype="folder" uristring="/contentfiles" isnew= "false"> <label>null</label> </resourcedescriptor> </request> Sample response: <operationresult version="1.2.0"> <returncode>0</returncode> <resourcedescriptor name="html" wstype="folder" uristring="/contentfiles/html" isnew="false"> <label>html</label> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.folder</value> <resourceproperty name="prop_parent_folder"> <value>/contentfiles</value> <resourceproperty name="prop_version"> <value>0</value> </resourcedescriptor> <resourcedescriptor name="pdf" wstype="folder" uristring="/contentfiles/pdf" isnew="false"> <label>pdf</label> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.folder</value> <resourceproperty name="prop_parent_folder"> <value>/contentfiles</value> <resourceproperty name="prop_version"> <value>0</value> </resourcedescriptor> <resourcedescriptor name="xls" wstype="folder" uristring="/contentfiles/xls" isnew="false"> <label>xls</label> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.folder</value> <resourceproperty name="prop_parent_folder"> <value>/contentfiles</value> 79

80 JasperReports Server Web Services Guide <resourceproperty name="prop_version"> <value>0</value> </resourcedescriptor> </operationresult> When it lists a folder, the repository web service returns a set of resource descriptors: one for each resource that resides in the specified folder. Use / as the URI of the root folder. Similarly, when it lists a report unit, the repository web service returns a set of resource descriptors that contain (at a minimum) the main JRXML source file. Since a resource in a report unit can be either a local resource or a reference to another repository resource, you should keep a few details in mind: If a report unit data source is not defined locally, its wstype is set to datasource, which does not indicate the exact nature of the resource. Its type should simply be reference, but since the data source used by the report unit is a special child resource, it s easy to recognize. The URI of the referenced resource is available in the PROP_REFERENCE_URI property. The main JRXML resource s wstype is always set to jrxml, even if it s a reference to an external JRXML resource. By looking at the PROP_IS_REFERENCE and PROP_REFERENCE_URI properties, you can determine where the resource is actually stored. The PROP_RU_IS_MAIN_REPORT property identifies the main JRXML source file of the report unit, even if the order of its children is altered. The purpose of listing a report unit is to get the list of the resources contained in the report unit. To retrieve the entire report unit (report unit resource as well as its children) at the same time, use the get service. The following Java sample illustrates wsclient as an instance of com.jaspersoft.jasperserver.irplugin.wsclient.wsclient: ResourceDescriptor rd = new ResourceDescriptor(); rd.setwstype( ResourceDescriptor.TYPE_FOLDER ); rd.seturistring("/"); List lst = wsclient.list(rd); PHP sample: $result = ws_list("/"); if (get_class($result) == 'SOAP_Fault') { $errormessage = $result->getfault()->faultstring; } else { $folders = getresourcedescriptors($result); } This PHP sample uses the client.php file found in the PHP sample provided with JasperReports Server. This file defines the most important constants you may find useful when integrating with the JasperReports Server web services, as well as useful functions that wrap the list, get, and the runreport operations. The list operation also provides a shortcut to get the list of all resources of a given type in the repository, for example all the reports. This use of the list operation has the following syntax: <request operationname="list"> <argument name="list_resources"/> <argument name="resource_type">reportunit</argument> <argument name="parent_directory">/reports</argument> </request> 80

81 SOAP - Repository Web Service or <request operationname="list"> <argument name="list_resources"/> <argument name="resource_type">reportunit</argument> <argument name="start_from_directory">/reports</argument> </request> No value is needed for the LIST_RESOURCES argument. The value of the RESOURCE_TYPE argument can be any value of wstype except folder. The PARENT_DIRECTORY argument is the name of folder in which you want to look for resources. If you want to look for the resources in a branch of the repository, use the START_FROM_DIRECTORY argument. Using LIST_RESOURCES is the only case in which a request doesn t require a resource descriptor. Several Java methods in com.jaspersoft.jasperserver.irplugin.wsclient.wsclient use LIST_RESOURCES: list(string xmlrequest) - Sends any custom request, including one using LIST_RESOURCES as shown above. listresources(string type) - Lists all resources of the given type in the repository visible to the logged in user. listresourcesinfolder(string type, String parentfolder) - Lists resources of the given type in the folder. listresourcesunderfolder(string type, String ancestorfolder) - Lists resources of the given type in the folder and the entire tree beneath that folder. 5.3 Get Operation The get operation is used to obtain information about a resource. In the case of file resources, such as images, fonts, JRXML files, and JAR files, the resource file is attached to the response message. This method s behavior differs according to the type of object specified: Generally, a simple resource descriptor is returned. If you get a resource file, the file content is attached to the response; if you do not want the server to attach files to the response, set the request s NO_ATTACHMENT argument to true. If you get a report unit, all the related resources are added as child resource descriptors to the report unit descriptor. To get an input control that is based on a query, you must set the IC_GET_QUERY_DATA argument to the valid URI of a datasource for the control, or you can handle the NONE condition as in the sample code java-webapp-sample. If you set the datasource in the input control, that datasource is used to execute the query and populate the resource descriptor. This can be useful when the input control must be rendered (for example, on a web page) in order to capture a value to pass when executing a report. You can use parameters in the input control to select query values, including the datasource. See the examples starting on page 89. The following sample request gets a file resource: <request operationname="get" locale="en"> <resourcedescriptor name="jrlogo" wstype="img" uristring="/images/jrlogo" isnew="false"> <label>jr logo</label> <description>jr logo</description> </resourcedescriptor> </request> The service only uses the uristring to identify the resource to get and check for access permissions. This means that other information present in the resource description (such as resource properties, label, and description) are not actually used or required. 81

82 JasperReports Server Web Services Guide If a file is attached to the response, the returned resource descriptor has the PROP_HAS_DATA property set to true. By default, the attachments format is MIME. You can use DIME attachments by specifying the USE_DIME_ATTACHMENTS argument in the request. A get call always returns a resource descriptor. If the specified resource is not found, or the specified user cannot access it, an error with code 2 is returned. Java sample: String imguri = "/images/jrlogo"; ResourceDescriptor rdis = new ResourceDescriptor(); rdis.setparentfolder("/images"); rdis.seturistring(imguri); ResourceDescriptor result = wsclient.get(rdis, null); PHP sample: $result = ws_get($someinputcontroluri, array( IC_GET_QUERY_DATA => $somedatasourceuri ) ); The resource descriptor of an input control that includes data obtained by setting the IC_GET_QUERY_DATA argument to true would be similar to the following XML: <resourcedescriptor name="test_list" wstype="inputcontrol" uristring= "/MyInputControls/TEST_LIST" isnew="false"> <label>my test list</label> <description>my test list</description> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.inputcontrol</ value> <resourceproperty name="prop_parent_folder"> <value>/myinputcontrols</value> <resourceproperty name="prop_version"> <value>6</value> <resourceproperty name="prop_has_data"> <value>false</value> <resourceproperty name="prop_is_reference"> <value>false</value> <resourceproperty name="prop_inputcontrol_is_mandatory"> <value>true</value> <resourceproperty name="prop_inputcontrol_is_readonly"> <value>false</value> <resourceproperty name="prop_inputcontrol_type"> <value>7</value> 82

83 SOAP - Repository Web Service <resourceproperty name="prop_query_value_column"> <value>name</value> <resourceproperty name="prop_query_visible_columns"> <resourceproperty name="prop_query_visible_column_name"> <value>name</value> <resourceproperty name="prop_query_visible_column_name"> <value>phone_office</value> <resourceproperty name="prop_query_visible_column_name"> <value>billing_address_city</value> <resourceproperty name="prop_query_data"> <resourceproperty name="prop_query_data_row"> <value>a & L Powers Engineering, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value>a & L Powers Engineering, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value> </value> <resourceproperty name="prop_query_data_row_column"> <value>haney</value> <resourceproperty name="prop_query_data_row"> <value>a & U Jaramillo Telecommunications, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value>a & U Jaramillo Telecommunications, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value> </value> <resourceproperty name="prop_query_data_row_column"> <value>walla Walla</value> <resourceproperty name="prop_query_data_row"> <value>a & U Stalker Telecommunications, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value>a & U Stalker Telecommunications, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value> </value> <resourceproperty name="prop_query_data_row_column"> <value>mill Valley</value> 83

84 JasperReports Server Web Services Guide <resourceproperty name="prop_query_data_row"> <value>a & X Caravello Engineering, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value>a & X Caravello Engineering, Inc</value> <resourceproperty name="prop_query_data_row_column"> <value> </value> <resourceproperty name="prop_query_data_row_column"> <value>tlaxiaco</value> <resourcedescriptor name="query" wstype="query" uristring="/myinputcontrols/ TEST_LIST_files/query" isnew="false"> <label>query</label> <description>query</description> <resourceproperty name="prop_resource_type"> <value>com.jaspersoft.jasperserver.api.metadata.common.domain.query</value> <resourceproperty name="prop_parent_folder"> <value>/myinputcontrols/test_list_files</value> <resourceproperty name="prop_version"> <value>1</value> <resourceproperty name="prop_has_data"> <value>false</value> <resourceproperty name="prop_is_reference"> <value>false</value> <resourceproperty name="prop_query"> <value>select name, phone_office, billing_address_city FROM accounts order by name</value> <resourceproperty name="prop_query_language"> <value>sql</value> <resourcedescriptor name="" wstype="datasource" uristring="" isnew="false"> <label>null</label> <resourceproperty name="prop_reference_uri"> <value>/datasources/jserverjdbcds</value> <resourceproperty name="prop_is_reference"> <value>true</value> </resourcedescriptor> </resourcedescriptor> </resourcedescriptor> 84

85 SOAP - Repository Web Service The query result is a set of rows that represents the full set of possible values for the input control. For each row, the repository web service returns the value that runreport expects for that particular option in the input control. Each row also includes the column values that should be displayed in the input control when prompting users. Figure 5-1 Query Results This figure shows input controls based on queries, as they are rendered by the ireport Designer plugin for JasperReports Server. When the web services run report units, the rendering of input controls is left to the client application. The best way to proceed is: Get the report unit. Check for query-based input controls by looking at the PROP_INPUTCONTROL_TYPE resource property or each child resource descriptor where wstype is equal to inputcontrol. Get each query-based input control by setting the IC_GET_QUERY_DATA argument to true. Render the input controls (if used in the report unit), being mindful of the input control properties (such as read only and mandatory). Call the runreport service and pass the user-selected values. The rows are stored in the PROP_QUERY_DATA resource property: for each row, a child resource property named PROP_QUERY_DATA_ROW contains the value and a set of children that contain the column values; these last resource properties are named PROP_QUERY_DATA_ROW_COLUMN. The following schema may elucidate the whole data structure: PROP_QUERY_DATA ( PROP_QUERY_DATA_ROW, value ( PROP_QUERY_DATA_ROW_COLUMN, value PROP_QUERY_DATA_ROW_COLUMN, value... ) PROP_QUERY_DATA_ROW, value ( PROP_QUERY_DATA_ROW_COLUMN, value PROP_QUERY_DATA_ROW_COLUMN, value... ) 85

TIBCO JASPERREPORTS SERVER WEB SERVICES GUIDE

TIBCO JASPERREPORTS SERVER WEB SERVICES GUIDE TIBCO JASPERREPORTS SERVER WEB SERVICES GUIDE RELEASE 6.1 http://www.jaspersoft.com Copyright 2005-2015, TIBCO Software Inc. All rights reserved. Printed in the U.S.A. TIBCO, the TIBCO logo, TIBCO Jaspersoft,

More information

HTTP Protocol. Bartosz Walter <Bartek.Walter@man.poznan.pl>

HTTP Protocol. Bartosz Walter <Bartek.Walter@man.poznan.pl> HTTP Protocol Bartosz Walter Agenda Basics Methods Headers Response Codes Cookies Authentication Advanced Features of HTTP 1.1 Internationalization HTTP Basics defined in

More information

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3 Open-Xchange Authentication & Session Handling Table of Contents 1.Introduction...3 2.System overview/implementation...4 2.1.Overview... 4 2.1.1.Access to IMAP back end services...4 2.1.2.Basic Implementation

More information

Fairsail REST API: Guide for Developers

Fairsail REST API: Guide for Developers Fairsail REST API: Guide for Developers Version 1.02 FS-API-REST-PG-201509--R001.02 Fairsail 2015. All rights reserved. This document contains information proprietary to Fairsail and may not be reproduced,

More information

Copyright 2014 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft

Copyright 2014 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft 5.6 Copyright 2014 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft logo, Jaspersoft ireport Designer, JasperReports Library, JasperReports Server, Jaspersoft

More information

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002) 1 cse879-03 2010-03-29 17:23 Kyung-Goo Doh Chapter 3. Web Application Technologies reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002) 1. The HTTP Protocol. HTTP = HyperText

More information

Description of Microsoft Internet Information Services (IIS) 5.0 and

Description of Microsoft Internet Information Services (IIS) 5.0 and Page 1 of 10 Article ID: 318380 - Last Review: July 7, 2008 - Revision: 8.1 Description of Microsoft Internet Information Services (IIS) 5.0 and 6.0 status codes This article was previously published under

More information

HireDesk API V1.0 Developer s Guide

HireDesk API V1.0 Developer s Guide HireDesk API V1.0 Developer s Guide Revision 1.4 Talent Technology Corporation Page 1 Audience This document is intended for anyone who wants to understand, and use the Hiredesk API. If you just want to

More information

Nuance Mobile Developer Program. HTTP Services for Nuance Mobile Developer Program Clients

Nuance Mobile Developer Program. HTTP Services for Nuance Mobile Developer Program Clients Nuance Mobile Developer Program HTTP Services for Nuance Mobile Developer Program Clients Notice Nuance Mobile Developer Program HTTP Services for Nuance Mobile Developer Program Clients Copyright 2011

More information

JasperServer Localization Guide Version 3.5

JasperServer Localization Guide Version 3.5 Version 3.5 2008 JasperSoft Corporation. All rights reserved. Printed in the U.S.A. JasperSoft, the JasperSoft logo, JasperAnalysis, JasperServer, JasperETL, JasperReports, JasperStudio, ireport, and Jasper4

More information

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT) Internet Technologies World Wide Web (WWW) Proxy Server Network Address Translator (NAT) What is WWW? System of interlinked Hypertext documents Text, Images, Videos, and other multimedia documents navigate

More information

JASPERREPORTS SERVER ADMINISTRATOR GUIDE

JASPERREPORTS SERVER ADMINISTRATOR GUIDE JASPERREPORTS SERVER ADMINISTRATOR GUIDE RELEASE 5.6.1 http://www.jaspersoft.com Copyright 2005-2014, TIBCO Software Inc. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft logo, Jaspersoft

More information

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview Web and HTTP Protocolo HTTP Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file, Web page consists of base HTML-file which includes several referenced objects Each

More information

Remote Access API 2.0

Remote Access API 2.0 VYATTA A BROCADE COMPANY Vyatta System Remote Access API 2.0 REFERENCE GUIDE Vyatta A Brocade Company 130 Holger Way San Jose, CA 95134 www.brocade.com 408 333 8400 COPYRIGHT Copyright 2005 2015 Vyatta,

More information

Manual. Netumo NETUMO HELP MANUAL WWW.NETUMO.COM. Copyright Netumo 2014 All Rights Reserved

Manual. Netumo NETUMO HELP MANUAL WWW.NETUMO.COM. Copyright Netumo 2014 All Rights Reserved Manual Netumo NETUMO HELP MANUAL WWW.NETUMO.COM Copyright Netumo 2014 All Rights Reserved Table of Contents 1 Introduction... 0 2 Creating an Account... 0 2.1 Additional services Login... 1 3 Adding a

More information

Title page. Alcatel-Lucent 5620 SERVICE AWARE MANAGER 13.0 R7

Title page. Alcatel-Lucent 5620 SERVICE AWARE MANAGER 13.0 R7 Title page Alcatel-Lucent 5620 SERVICE AWARE MANAGER 13.0 R7 APPLICATION API DEVELOPER GUIDE 3HE-10590-AAAA-TQZZA Issue 1 December 2015 Legal notice Legal notice Alcatel, Lucent, Alcatel-Lucent and the

More information

vcloud Air Platform Programmer's Guide

vcloud Air Platform Programmer's Guide vcloud Air Platform Programmer's Guide vcloud Air OnDemand 5.7 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition.

More information

WIRIS quizzes web services Getting started with PHP and Java

WIRIS quizzes web services Getting started with PHP and Java WIRIS quizzes web services Getting started with PHP and Java Document Release: 1.3 2011 march, Maths for More www.wiris.com Summary This document provides client examples for PHP and Java. Contents WIRIS

More information

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6 The Proxy Server THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6 2 1 Purpose The proxy server acts as an intermediate server that relays requests between

More information

By Bardia, Patit, and Rozheh

By Bardia, Patit, and Rozheh HTTP By Bardia, Patit, and Rozheh HTTP - Introduction - Hyper Text Transfer Protocol -uses the TCP/IP technology -has had the most impact on the World Wide Web (WWW) - specs in RFC 2616 (RFC2616) HTTP

More information

Working With Virtual Hosts on Pramati Server

Working With Virtual Hosts on Pramati Server Working With Virtual Hosts on Pramati Server 13 Overview Virtual hosting allows a single machine to be addressed by different names. There are two ways for configuring Virtual Hosts. They are: Domain Name

More information

AIRTEL INDIA OPEN API. Application Developer Guide for OAuth2 Authentication and Authorization. Document Version 1.1

AIRTEL INDIA OPEN API. Application Developer Guide for OAuth2 Authentication and Authorization. Document Version 1.1 AIRTEL INDIA OPEN API Application Developer Guide for OAuth2 Authentication and Authorization Document Version 1.1 This Application Developer Guide has been prepared for Airtel India. Copyright Intel Corporation

More information

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007 WWW World Wide Web Aka The Internet dr. C. P. J. Koymans Informatics Institute Universiteit van Amsterdam November 30, 2007 dr. C. P. J. Koymans (UvA) WWW November 30, 2007 1 / 36 WWW history (1) 1968

More information

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław Computer Networks Lecture 7: Application layer: FTP and Marcin Bieńkowski Institute of Computer Science University of Wrocław Computer networks (II UWr) Lecture 7 1 / 23 Reminder: Internet reference model

More information

IBM Cloud Manager with OpenStack. REST API Reference, version 4.1

IBM Cloud Manager with OpenStack. REST API Reference, version 4.1 IBM Cloud Manager with OpenStack REST API Reference, version 4.1 IBM Cloud Manager with OpenStack REST API Reference, version 4.1 Note Before using this information and the product it supports, read the

More information

OAuth 2.0 Developers Guide. Ping Identity, Inc. 1001 17th Street, Suite 100, Denver, CO 80202 303.468.2900

OAuth 2.0 Developers Guide. Ping Identity, Inc. 1001 17th Street, Suite 100, Denver, CO 80202 303.468.2900 OAuth 2.0 Developers Guide Ping Identity, Inc. 1001 17th Street, Suite 100, Denver, CO 80202 303.468.2900 Table of Contents Contents TABLE OF CONTENTS... 2 ABOUT THIS DOCUMENT... 3 GETTING STARTED... 4

More information

DEPLOYMENT GUIDE Version 1.1. Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5

DEPLOYMENT GUIDE Version 1.1. Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5 DEPLOYMENT GUIDE Version 1.1 Deploying the BIG-IP LTM v10 with Citrix Presentation Server 4.5 Table of Contents Table of Contents Deploying the BIG-IP system v10 with Citrix Presentation Server Prerequisites

More information

HTTP. Internet Engineering. Fall 2015. Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

HTTP. Internet Engineering. Fall 2015. Bahador Bakhshi CE & IT Department, Amirkabir University of Technology HTTP Internet Engineering Fall 2015 Bahador Bakhshi CE & IT Department, Amirkabir University of Technology Questions Q1) How do web server and client browser talk to each other? Q1.1) What is the common

More information

SDK Code Examples Version 2.4.2

SDK Code Examples Version 2.4.2 Version 2.4.2 This edition of SDK Code Examples refers to version 2.4.2 of. This document created or updated on February 27, 2014. Please send your comments and suggestions to: Black Duck Software, Incorporated

More information

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Cloud Elements! Marketing Hub Provisioning and Usage Guide! Cloud Elements Marketing Hub Provisioning and Usage Guide API Version 2.0 Page 1 Introduction The Cloud Elements Marketing Hub is the first API that unifies marketing automation across the industry s leading

More information

PHP Integration Kit. Version 2.5.1. User Guide

PHP Integration Kit. Version 2.5.1. User Guide PHP Integration Kit Version 2.5.1 User Guide 2012 Ping Identity Corporation. All rights reserved. PingFederate PHP Integration Kit User Guide Version 2.5.1 December, 2012 Ping Identity Corporation 1001

More information

Contents About the Contract Management Post Installation Administrator's Guide... 5 Viewing and Modifying Contract Management Settings...

Contents About the Contract Management Post Installation Administrator's Guide... 5 Viewing and Modifying Contract Management Settings... Post Installation Guide for Primavera Contract Management 14.1 July 2014 Contents About the Contract Management Post Installation Administrator's Guide... 5 Viewing and Modifying Contract Management Settings...

More information

FileMaker Server 9. Custom Web Publishing with PHP

FileMaker Server 9. Custom Web Publishing with PHP FileMaker Server 9 Custom Web Publishing with PHP 2007 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker is a trademark of FileMaker,

More information

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh Web applications Web security: web basics Myrto Arapinis School of Informatics University of Edinburgh HTTP March 19, 2015 Client Server Database (HTML, JavaScript) (PHP) (SQL) 1 / 24 2 / 24 URLs HTTP

More information

DNS Update API November 15, 2006 Version 2.0.3

DNS Update API November 15, 2006 Version 2.0.3 DNS Update API November 15, 2006 Version 2.0.3 Dynamic Network Services, Inc. phone: +1-603-668-4998 1230 Elm Street, Fifth Floor fax: +1-603-668-6474 Manchester, NH 03101 www.dyndns.com Table of Contents

More information

Qualys API Limits. July 10, 2014. Overview. API Control Settings. Implementation

Qualys API Limits. July 10, 2014. Overview. API Control Settings. Implementation Qualys API Limits July 10, 2014 Overview The Qualys API enforces limits on the API calls a customer can make based on their subscription settings, starting with Qualys version 6.5. The limits apply to

More information

Message Containers and API Framework

Message Containers and API Framework Message Containers and API Framework Notices Copyright 2009-2010 Motion Picture Laboratories, Inc. This work is licensed under the Creative Commons Attribution-No Derivative Works 3.0 United States License.

More information

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture #3 2008 3 Apache.

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture #3 2008 3 Apache. JSP, and JSP, and JSP, and 1 2 Lecture #3 2008 3 JSP, and JSP, and Markup & presentation (HTML, XHTML, CSS etc) Data storage & access (JDBC, XML etc) Network & application protocols (, etc) Programming

More information

Common definitions and specifications for OMA REST interfaces

Common definitions and specifications for OMA REST interfaces Common definitions and specifications for OMA REST interfaces Candidate Version 1.0 11 Jan 2011 Open Mobile Alliance OMA-TS-REST_Common-V1_0-20110111-C OMA-TS-REST_Common-V1_0-20110111-C Page 2 (20) Use

More information

SOA Software API Gateway Appliance 7.1.x Administration Guide

SOA Software API Gateway Appliance 7.1.x Administration Guide SOA Software API Gateway Appliance 7.1.x Administration Guide Trademarks SOA Software and the SOA Software logo are either trademarks or registered trademarks of SOA Software, Inc. Other product names,

More information

Jaspersoft APIs. Integrating BI with your Applications. Community and Professional Editions

Jaspersoft APIs. Integrating BI with your Applications. Community and Professional Editions Jaspersoft s Integrating BI with your Applications Community and Professional Editions Jaspersoft Headquarters: 539 Bryant Street, Suite 100 San Francisco, CA 94107, USA www.jaspersoft.com Email: sales@jaspersoft.com

More information

000-284. Easy CramBible Lab DEMO ONLY VERSION 000-284. Test284,IBM WbS.DataPower SOA Appliances, Firmware V3.6.0

000-284. Easy CramBible Lab DEMO ONLY VERSION 000-284. Test284,IBM WbS.DataPower SOA Appliances, Firmware V3.6.0 Easy CramBible Lab 000-284 Test284,IBM WbS.DataPower SOA Appliances, Firmware V3.6.0 ** Single-user License ** This copy can be only used by yourself for educational purposes Web: http://www.crambible.com/

More information

Appendix. Web Command Error Codes. Web Command Error Codes

Appendix. Web Command Error Codes. Web Command Error Codes Appendix Web Command s Error codes marked with * are received in responses from the FTP server, and then returned as the result of FTP command execution. -501 Incorrect parameter type -502 Error getting

More information

02267: Software Development of Web Services

02267: Software Development of Web Services 02267: Software Development of Web Services Week 8 Hubert Baumeister huba@dtu.dk Department of Applied Mathematics and Computer Science Technical University of Denmark Fall 2015 1 Recap I BPEL: I Doing

More information

Accessing Data with ADOBE FLEX 4.6

Accessing Data with ADOBE FLEX 4.6 Accessing Data with ADOBE FLEX 4.6 Legal notices Legal notices For legal notices, see http://help.adobe.com/en_us/legalnotices/index.html. iii Contents Chapter 1: Accessing data services overview Data

More information

FileMaker Server 14. Custom Web Publishing Guide

FileMaker Server 14. Custom Web Publishing Guide FileMaker Server 14 Custom Web Publishing Guide 2004 2015 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and FileMaker Go are trademarks

More information

APACHE WEB SERVER. Andri Mirzal, PhD N28-439-03

APACHE WEB SERVER. Andri Mirzal, PhD N28-439-03 APACHE WEB SERVER Andri Mirzal, PhD N28-439-03 Introduction The Apache is an open source web server software program notable for playing a key role in the initial growth of the World Wide Web Typically

More information

www.novell.com/documentation Policy Guide Access Manager 3.1 SP5 January 2013

www.novell.com/documentation Policy Guide Access Manager 3.1 SP5 January 2013 www.novell.com/documentation Policy Guide Access Manager 3.1 SP5 January 2013 Legal Notices Novell, Inc., makes no representations or warranties with respect to the contents or use of this documentation,

More information

How To Use Kiteworks On A Microsoft Webmail Account On A Pc Or Macbook Or Ipad (For A Webmail Password) On A Webcomposer (For An Ipad) On An Ipa Or Ipa (For

How To Use Kiteworks On A Microsoft Webmail Account On A Pc Or Macbook Or Ipad (For A Webmail Password) On A Webcomposer (For An Ipad) On An Ipa Or Ipa (For GETTING STARTED WITH KITEWORKS DEVELOPER GUIDE Version 1.0 Version 1.0 Copyright 2014 Accellion, Inc. All rights reserved. These products, documents, and materials are protected by copyright law and distributed

More information

Internet Technologies Internet Protocols and Services

Internet Technologies Internet Protocols and Services QAFQAZ UNIVERSITY Computer Engineering Department Internet Technologies Internet Protocols and Services Dr. Abzetdin ADAMOV Chair of Computer Engineering Department aadamov@qu.edu.az http://ce.qu.edu.az/~aadamov

More information

Microsoft Active Directory Oracle Enterprise Gateway Integration Guide

Microsoft Active Directory Oracle Enterprise Gateway Integration Guide An Oracle White Paper May 2011 Microsoft Active Directory Oracle Enterprise Gateway Integration Guide 1/33 Disclaimer The following is intended to outline our general product direction. It is intended

More information

Using SAML for Single Sign-On in the SOA Software Platform

Using SAML for Single Sign-On in the SOA Software Platform Using SAML for Single Sign-On in the SOA Software Platform SOA Software Community Manager: Using SAML on the Platform 1 Policy Manager / Community Manager Using SAML for Single Sign-On in the SOA Software

More information

RealPresence Platform Director

RealPresence Platform Director RealPresence CloudAXIS Suite Administrators Guide Software 1.3.1 GETTING STARTED GUIDE Software 2.0 June 2015 3725-66012-001B RealPresence Platform Director Polycom, Inc. 1 RealPresence Platform Director

More information

sessionx Desarrollo de Aplicaciones en Red Web Applications History (1) Content History (2) History (3)

sessionx Desarrollo de Aplicaciones en Red Web Applications History (1) Content History (2) History (3) sessionx Desarrollo de Aplicaciones en Red José Rafael Rojano Cáceres http://www.uv.mx/rrojano Web Applications 1 2 Content History (1) History Http CGI Web Tiers ARPANet Email, Ftp, IRC, news Explosive

More information

Developer Guide: REST API Applications. SAP Mobile Platform 2.3 SP03

Developer Guide: REST API Applications. SAP Mobile Platform 2.3 SP03 Developer Guide: REST API Applications SAP Mobile Platform 2.3 SP03 DOCUMENT ID: DC01926-01-0233-01 LAST REVISED: September 2013 Copyright 2013 by Sybase, Inc. All rights reserved. This publication pertains

More information

TIBCO JASPERREPORTS SERVER SECURITY GUIDE

TIBCO JASPERREPORTS SERVER SECURITY GUIDE TIBCO JASPERREPORTS SERVER SECURITY GUIDE RELEASE 6.1 http://www.jaspersoft.com Copyright 2005-2015, TIBCO Software Inc. All rights reserved. Printed in the U.S.A. TIBCO, the TIBCO logo, TIBCO Jaspersoft,

More information

EMC ViPR Controller. ViPR Controller REST API Virtual Data Center Configuration Guide. Version 2.3.0.0 302-002-070 01

EMC ViPR Controller. ViPR Controller REST API Virtual Data Center Configuration Guide. Version 2.3.0.0 302-002-070 01 EMC ViPR Controller Version 2.3.0.0 ViPR Controller REST API Virtual Data Center Configuration Guide 302-002-070 01 Copyright 2013-2015 EMC Corporation. All rights reserved. Published in USA. Published

More information

FileMaker Server 13. Custom Web Publishing with XML

FileMaker Server 13. Custom Web Publishing with XML FileMaker Server 13 Custom Web Publishing with XML 2004 2013 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks

More information

IBM SPSS Collaboration and Deployment Services Version 6 Release 0. Single Sign-On Services Developer's Guide

IBM SPSS Collaboration and Deployment Services Version 6 Release 0. Single Sign-On Services Developer's Guide IBM SPSS Collaboration and Deployment Services Version 6 Release 0 Single Sign-On Services Developer's Guide Note Before using this information and the product it supports, read the information in Notices

More information

DEPLOYMENT GUIDE DEPLOYING THE BIG-IP LTM SYSTEM WITH CITRIX PRESENTATION SERVER 3.0 AND 4.5

DEPLOYMENT GUIDE DEPLOYING THE BIG-IP LTM SYSTEM WITH CITRIX PRESENTATION SERVER 3.0 AND 4.5 DEPLOYMENT GUIDE DEPLOYING THE BIG-IP LTM SYSTEM WITH CITRIX PRESENTATION SERVER 3.0 AND 4.5 Deploying F5 BIG-IP Local Traffic Manager with Citrix Presentation Server Welcome to the F5 BIG-IP Deployment

More information

CONTRACT MODEL IPONZ DESIGN SERVICE VERSION 2. Author: Foster Moore Date: 20 September 2011 Document Version: 1.7

CONTRACT MODEL IPONZ DESIGN SERVICE VERSION 2. Author: Foster Moore Date: 20 September 2011 Document Version: 1.7 CONTRACT MODEL IPONZ DESIGN SERVICE VERSION 2 Author: Foster Moore Date: 20 September 2011 Document Version: 1.7 Level 6, Durham House, 22 Durham Street West PO Box 106857, Auckland City Post Shop, Auckland

More information

Integrating VoltDB with Hadoop

Integrating VoltDB with Hadoop The NewSQL database you ll never outgrow Integrating with Hadoop Hadoop is an open source framework for managing and manipulating massive volumes of data. is an database for handling high velocity data.

More information

UpCloud API Documentation. API version 1.1.1 Updated Aug 13, 2013

UpCloud API Documentation. API version 1.1.1 Updated Aug 13, 2013 UpCloud API Documentation API version 1.1.1 Updated Aug 13, 2013 INTRODUCTION 4 Version history... 4 ARCHITECTURE OVERVIEW 5 API overview... 5 API versioning... 5 Authentication... 5 Resource identifiers...

More information

Force.com REST API Developer's Guide

Force.com REST API Developer's Guide Force.com REST API Developer's Guide Version 35.0, Winter 16 @salesforcedocs Last updated: December 10, 2015 Copyright 2000 2015 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark

More information

FileMaker Server 13. Custom Web Publishing with PHP

FileMaker Server 13. Custom Web Publishing with PHP FileMaker Server 13 Custom Web Publishing with PHP 2007 2013 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks

More information

Network Technologies

Network Technologies Network Technologies Glenn Strong Department of Computer Science School of Computer Science and Statistics Trinity College, Dublin January 28, 2014 What Happens When Browser Contacts Server I Top view:

More information

Sentinel EMS v7.1 Web Services Guide

Sentinel EMS v7.1 Web Services Guide Sentinel EMS v7.1 Web Services Guide ii Sentinel EMS Web Services Guide Document Revision History Part Number 007-011157-001, Revision E. Software versions 7.1 and later. Revision Action/Change Date A

More information

TIBCO Spotfire Web Player 6.0. Installation and Configuration Manual

TIBCO Spotfire Web Player 6.0. Installation and Configuration Manual TIBCO Spotfire Web Player 6.0 Installation and Configuration Manual Revision date: 12 November 2013 Important Information SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED

More information

EMC Clinical Archiving

EMC Clinical Archiving EMC Clinical Archiving Version 1.7 Installation Guide EMC Corporation Corporate Headquarters Hopkinton, MA 01748-9103 1-508-435-1000 www.emc.com Legal Notice Copyright 2014-2015 EMC Corporation. All Rights

More information

JBoss SOAP Web Services User Guide. Version: 3.3.0.M5

JBoss SOAP Web Services User Guide. Version: 3.3.0.M5 JBoss SOAP Web Services User Guide Version: 3.3.0.M5 1. JBoss SOAP Web Services Runtime and Tools support Overview... 1 1.1. Key Features of JBossWS... 1 2. Creating a Simple Web Service... 3 2.1. Generation...

More information

URLs and HTTP. ICW Lecture 10 Tom Chothia

URLs and HTTP. ICW Lecture 10 Tom Chothia URLs and HTTP ICW Lecture 10 Tom Chothia This Lecture The two basic building blocks of the web: URLs: Uniform Resource Locators HTTP: HyperText Transfer Protocol Uniform Resource Locators Many Internet

More information

Enabling SSL and Client Certificates on the SAP J2EE Engine

Enabling SSL and Client Certificates on the SAP J2EE Engine Enabling SSL and Client Certificates on the SAP J2EE Engine Angel Dichev RIG, SAP Labs SAP AG 1 Learning Objectives As a result of this session, you will be able to: Understand the different SAP J2EE Engine

More information

A Java proxy for MS SQL Server Reporting Services

A Java proxy for MS SQL Server Reporting Services 1 of 5 1/10/2005 9:37 PM Advertisement: Support JavaWorld, click here! January 2005 HOME FEATURED TUTORIALS COLUMNS NEWS & REVIEWS FORUM JW RESOURCES ABOUT JW A Java proxy for MS SQL Server Reporting Services

More information

10. Java Servelet. Introduction

10. Java Servelet. Introduction Chapter 10 Java Servlets 227 10. Java Servelet Introduction Java TM Servlet provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing

More information

Contents. 2 Alfresco API Version 1.0

Contents. 2 Alfresco API Version 1.0 The Alfresco API Contents The Alfresco API... 3 How does an application do work on behalf of a user?... 4 Registering your application... 4 Authorization... 4 Refreshing an access token...7 Alfresco CMIS

More information

FileMaker Server 12. Custom Web Publishing with XML

FileMaker Server 12. Custom Web Publishing with XML FileMaker Server 12 Custom Web Publishing with XML 2007 2012 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks

More information

Cloud Portal for imagerunner ADVANCE

Cloud Portal for imagerunner ADVANCE Cloud Portal for imagerunner ADVANCE User's Guide Please read this guide before operating this product. After you finish reading this guide, store it in a safe place for future reference. ENG How This

More information

Enhanced Connector Applications SupportPac VP01 for IBM WebSphere Business Events 3.0.0

Enhanced Connector Applications SupportPac VP01 for IBM WebSphere Business Events 3.0.0 Enhanced Connector Applications SupportPac VP01 for IBM WebSphere Business Events 3.0.0 Third edition (May 2012). Copyright International Business Machines Corporation 2012. US Government Users Restricted

More information

Copyright Pivotal Software Inc, 2013-2015 1 of 10

Copyright Pivotal Software Inc, 2013-2015 1 of 10 Table of Contents Table of Contents Getting Started with Pivotal Single Sign-On Adding Users to a Single Sign-On Service Plan Administering Pivotal Single Sign-On Choosing an Application Type 1 2 5 7 10

More information

FileMaker Server 15. Custom Web Publishing Guide

FileMaker Server 15. Custom Web Publishing Guide FileMaker Server 15 Custom Web Publishing Guide 2004 2016 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and FileMaker Go are trademarks

More information

Spectrum Technology Platform. Version 9.0. Administration Guide

Spectrum Technology Platform. Version 9.0. Administration Guide Spectrum Technology Platform Version 9.0 Administration Guide Contents Chapter 1: Getting Started...7 Starting and Stopping the Server...8 Installing the Client Tools...8 Starting the Client Tools...9

More information

02267: Software Development of Web Services

02267: Software Development of Web Services 02267: Software Development of Web Services Week 8 Hubert Baumeister huba@dtu.dk Department of Applied Mathematics and Computer Science Technical University of Denmark Fall 2013 Contents RESTful Services

More information

Configuring Single Sign-on for WebVPN

Configuring Single Sign-on for WebVPN CHAPTER 8 This chapter presents example procedures for configuring SSO for WebVPN users. It includes the following sections: Using Single Sign-on with WebVPN, page 8-1 Configuring SSO Authentication Using

More information

Service for checking whether an email is operative or not. Validate email ids in your databases.

Service for checking whether an email is operative or not. Validate email ids in your databases. MailStatus API Service for checking whether an email is operative or not. Validate email ids in your databases. Overview Lleida.net MailStatus API allows you to consult the validity of an email address.

More information

Secure Messaging Server Console... 2

Secure Messaging Server Console... 2 Secure Messaging Server Console... 2 Upgrading your PEN Server Console:... 2 Server Console Installation Guide... 2 Prerequisites:... 2 General preparation:... 2 Installing the Server Console... 2 Activating

More information

Migration Guide Software, Database and Version Migration

Migration Guide Software, Database and Version Migration Migration Guide Software, Database and Version Migration Release 6.0 February 2012 Yellowfin Release 6.0 Migration Guide Under international copyright laws, neither the documentation nor the software may

More information

EMC Documentum Content Services for SAP Repository Manager

EMC Documentum Content Services for SAP Repository Manager EMC Documentum Content Services for SAP Repository Manager Version 6.0 Installation Guide P/N 300 005 500 Rev A01 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748 9103 1 508 435 1000 www.emc.com

More information

Perceptive Integration Server

Perceptive Integration Server Perceptive Integration Server Getting Started Guide ImageNow Version: 6.7. x Written by: Product Documentation, R&D Date: October 2013 2013 Perceptive Software. All rights reserved CaptureNow, ImageNow,

More information

Course Name: Course in JSP Course Code: P5

Course Name: Course in JSP Course Code: P5 Course Name: Course in JSP Course Code: P5 Address: Sh No BSH 1,2,3 Almedia residency, Xetia Waddo Duler Mapusa Goa E-mail Id: ITKP@3i-infotech.com Tel: (0832) 2465556 (0832) 6454066 Course Code: P5 3i

More information

FileMaker Server 12. Custom Web Publishing with PHP

FileMaker Server 12. Custom Web Publishing with PHP FileMaker Server 12 Custom Web Publishing with PHP 2007 2012 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker and Bento are trademarks

More information

McAfee One Time Password

McAfee One Time Password McAfee One Time Password Integration Module Outlook Web App 2010 Module version: 1.3.1 Document revision: 1.3.1 Date: Feb 12, 2014 Table of Contents Integration Module Overview... 3 Prerequisites and System

More information

API documentation - 1 -

API documentation - 1 - API documentation - 1 - Table of Contents 1. Introduction 1.1. What is an API 2. API Functions 2.1. Purge list of files 2.1.1 Description 2.1.2 Implementation 2.2. Purge of whole cache (all files on all

More information

Setting Up Resources in VMware Identity Manager

Setting Up Resources in VMware Identity Manager Setting Up Resources in VMware Identity Manager VMware Identity Manager 2.4 This document supports the version of each product listed and supports all subsequent versions until the document is replaced

More information

IBM Endpoint Manager Version 9.2. Patch Management for SUSE Linux Enterprise User's Guide

IBM Endpoint Manager Version 9.2. Patch Management for SUSE Linux Enterprise User's Guide IBM Endpoint Manager Version 9.2 Patch Management for SUSE Linux Enterprise User's Guide IBM Endpoint Manager Version 9.2 Patch Management for SUSE Linux Enterprise User's Guide Note Before using this

More information

An Oracle White Paper June 2014. RESTful Web Services for the Oracle Database Cloud - Multitenant Edition

An Oracle White Paper June 2014. RESTful Web Services for the Oracle Database Cloud - Multitenant Edition An Oracle White Paper June 2014 RESTful Web Services for the Oracle Database Cloud - Multitenant Edition 1 Table of Contents Introduction to RESTful Web Services... 3 Architecture of Oracle Database Cloud

More information

PingFederate. Windows Live Cloud Identity Connector. User Guide. Version 1.0

PingFederate. Windows Live Cloud Identity Connector. User Guide. Version 1.0 Windows Live Cloud Identity Connector Version 1.0 User Guide 2011 Ping Identity Corporation. All rights reserved. Windows Live Cloud Identity Connector User Guide Version 1.0 April, 2011 Ping Identity

More information

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2

Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2 Configuration Guide Configuring Apache HTTP Server as a Reverse Proxy Server for SAS 9.2 Web Applications Deployed on BEA WebLogic Server 9.2 This document describes how to configure Apache HTTP Server

More information

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol CS640: Introduction to Computer Networks Aditya Akella Lecture 4 - Application Protocols, Performance Applications FTP: The File Transfer Protocol user at host FTP FTP user client interface local file

More information

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip Load testing with WAPT: Quick Start Guide This document describes step by step how to create a simple typical test for a web application, execute it and interpret the results. A brief insight is provided

More information

2015-11-30. Web Based Single Sign-On and Access Control

2015-11-30. Web Based Single Sign-On and Access Control 0--0 Web Based Single Sign-On and Access Control Different username and password for each website Typically, passwords will be reused will be weak will be written down Many websites to attack when looking

More information