Jump to content
We've recently updated our Privacy Statement, available here ×

Prasad B

Jaspersoft Staff
  • Posts

    42
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Prasad B's Achievements

Explorer

Explorer (4/14)

  • Dedicated Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Question: How do we add resources to favourites using REST API? Answer: Use the following method to add the resources to Favorites. Method: POST, URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/favorites The content type for this request is usually a JSON object that contains the list of resource URIs to be added to Favorites. The Return values for this request is as below: a) For Success: 201 Created - The request was successful. b) For Failure: i) 400 Bad Request - Invalid request syntax. ii) 403 Forbidden - When the logged-in user does not have permission to access the resource. iii) 404 Not Found - When the resource specified in the request does not exist. The following is an example of a sample payload. 1) { "favorites":[ { "uri":"/public/audit/datasources/AuditDataSource_1" }, { "uri":"/public/audit/datasources/AuditVirtualDataSource_1" } ] } 2) { "favorites":[ { "uri":"/public/audit/datasources/AuditDataSource_1" }, { "uri":"/public/audit/datasources/AuditVirtualDataSource_1" } ] } If a user adds a resource to the Favorites and later an admin removes the user's access to resources, the entry stays in the jifavoriteresource table, but the user will not be able to view or remove the resources from the Favorites. Note: Local resources cannot be added to Favorites.
  2. Question: How do remove resources from favourites using REST API? Answer: The following method is used to remove the starred resources from the Favorites. Method: POST URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/favorites/delete The content type for this request is usually a JSON object that contains the list of resource URIs to be deleted from Favorites. The Return values for this request is as below: a) For Success: 204 No Content - The request was successful. b) For Failure: i) 400 Bad Request - Invalid request syntax. ii) 403 Forbidden - When the logged-in user does not have permission to access the resource. iii) 404 Not Found - When the resource specified in the request does not exist.
  3. Question: How do access resources in favourites using REST API? Answer: Use the following method to get the list of favorites. By default, favorites is false. Please find below Method and URL used for this request: Method: GET, URL:http://<host>:<port>/jasperserver[-pro]/rest_v2/resources?favorites=true The content type for this request is usually a JSON object that lists the resources added to Favorites. The Return values for this request is as below: a) For Success: 200 OK - The body contains a list of Favorites representing the results of the search. b) For Failure: i) 404 Not Found - When the resource specified in the request does not exist. ii) 204 No content - When the resources added to Favorites are not found.
  4. Question: How do we delete multiple permission for resource using REST API? Answer: The DELETE method removes all assigned permissions from the designated resource. After returning successfully, all effective permissions for the resource are inherited. Please find below Method and URL used for this request: Method: DELETE, URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/permissions/path/to/resource The Return values for this request is as below: a) For Success: 204 No Content - The request was successful. b) For Failure: 404 Not Found - If the resource or the recipient in the URL is invalid.
  5. Question: How do we delete single permission for resource using REST API? Answer: To delete the single permission of the resource, we need to specify a recipient in the URL of the DELETE method to remove only that permission. Please find below Method and URL used for this request: Method: DELETE URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/permissions/path/to/resource;recipient=<recipient> The arguments used for this request is as below: 1) recipient Type/Value: string required, Description: The recipient format specifies the user or role, the organization if necessary, and the object ID. The slash characters must be encoded, for example: user:%2Forganization_1%2Fjoeuser The Return values for this request is as below: a) For Success: 204 No Content - The request was successful. b) For Failure: 404 Not Found - If the resource or the recipient in the URL is invalid..
  6. 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 • Administer: 1 • Read-only: 2 • Read-write: 6 • Read-delete: 18 • Read-write-delete: 30 • Execute-only: 32
  7. Question: How do we set single permissions for resources using the REST API? Answer: The POST method accepts a single permission descriptor. Please find below Method and URL used to set the single permission of resource: Method: POST, URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/permissions The content for this request need to be passed in JSON format. The content of the JSON object would usually describe the single permission. eg. { "uri":"/properties", "recipient":"role:/ROLE_USER", "mask":"1" } The Return values for this request is as below: a) For Success: 201 Created - The request was successful. b) For Failure: 204 No Content - 400 Bad Request - The permission is already assigned or the given mask is invalid.
  8. Question: How do users view single permissions for resources using the REST API? Answer: We have to specify the recipient in the URL to see a specific assigned permission. Please find below Method and URL used to view the single permission of resource: Method: GET URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/permissions/path/to/resource;recipient=<recipient> The arguments used for this request is as below: 1) recipient Type/Value: string required,Description: The recipient format specifies the user or role, the object ID, and the organization ID if necessary. The slash character must be encoded, for example: user:%2Forganization_1%2Fjoeuser It is accepting the option values in both XML and JSON formats. The Return values for this request is as below: a) For Success: 200 OK - The body describes the requested permission. b) For Failure: 204 No Content - 404 Not Found - When the specified resource URI or recipient is invalid, or when the recipient does not have any assigned permission (only inherited).
  9. Question: How do we move the resource using REST API? Answer: Moving a resource uses the PUT method, whereas copying it uses the POST method. Please find below Method and URL used to copy the resource: Method: PUT URL:http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/folder?<arguments> The arguments used for this request is as below: 1) createFolders Type/Value: true|false, Description: True by default, and the service will create all parent folders if they do not already exist. When set to false, the folders specified in the URL must all exist; otherwise, the service returns an error. 2) overwrite Type/Value: true|false, Description: When true, the target resource given in the URL is overwritten, even if it is a different type than the resource descriptor in the content. The default is false. The options used for this request is as below: Content-Location: {resourceSourceUri} - Specifies the resource to be moved. The Return values for this request is as below: a) For Success: 201 Created - The request was successful and, for confirmation, the response contains the full descriptor of the resource that was just moved. b) For Failure: 204 No Content - 404 Not Found - When the {resourceSourceUri} is not valid.
  10. Question: How do we copy the resource using REST API? Answer: Copying a resource uses the Content-Location HTTP header to specify the source of the copy operation. If any resource descriptor is sent in the request, it is ignored. Please find below Method and URL used to copy the resource: Method: POST URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/folder?<arguments> The arguments used for this request is as below: 1) createFolders Type/Value: true|false, Description: True by default, and the service will create all parent folders if they do not already exist. When set to false, the folders specified in the URL must all exist, otherwise the service returns an error. 2) overwrite Type/Value: true|false, Description: When true, the target resource given in the URL is overwritten even if it is a different type than the resource descriptor in the content. The default is false. The options used for this request is as below: 1) Content-Location: {resourceSourceUri} - Specifies the resource to be copied. The Return values for this request is as below: a) For Success: 201 Created - The request was successful and, for confirmation, the response contains the full descriptor of the resource that was just copied. b) For Failure: 204 No Content - 404 Not Found - When the {resourceSourceUri} is not valid.
  11. Question: How do we delete the resource using REST API? Answer: The DELETE method has two forms, one for single resources and one for multiple resources. Method: DELETE URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/resource The Return values for this request is as below: a) For Success: 204 No Content - The request always returns 204. The resources with valid URIs are deleted.mes. b) For Failure: 204 No Content - The request always returns 204. No action is taken for invalid URIs.
  12. Question: How do we create the resource using REST API? Answer: The POST and PUT methods offer alternative ways to create resources. Both take a resource descriptor but each handles the URL differently. With the POST method, specify a folder in the URL, and the new resource ID is created automatically from the label attribute in its descriptor. Please find below Method and URL used to create the resource: Method: POST URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/folder?<argument> The arguments used to define it is as below: 1) createFolders Type/Value: true|false Description: By default, this is true, and the service will create all parent folders if they do not already exist. When set to false, the folders specified in the URL must all exist, otherwise, the service returns an error. The Content Type required for this request is as below: 1) application/repository.--> <resourceType>+json 2) application/repository. --> <resourceType>+xml
  13. Question: How do we delete an Exclusion Calendar for a specific schedule? Answer: Use the following method to delete a calendar by name:. Method: DELETE URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/jobs/calendars/<calendarName>/ The Return values for this request is as below: a) For Success: 200 OK – Body contains a list of calendar names. b) For Failure: 404 Not Found – When the specified calendar name does not exist.
  14. Question: How do we list all calendar names for a specific schedule? Answer: The following method returns the list of all calendar names that were added to the scheduler. Method: GET URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/jobs/calendars/?<argument> The arguments required for this API is as below: Argument: calendar Type, Type/Value: optional string, Description: A type of calendar to return: annual, cron, daily, holiday, monthly, or weekly. You may specify only one calendarType parameter. When calendarType isn't specified, all calendars names are returned. If calendarType has an invalid value, an empty collection is returned. The Return values for this request is as below: a) For Success: 200 OK – Body contains a list of calendar names. b) For Failure: 401 Unauthorized The list of calendar names in the result has the following format in XML: <calendarNameList> <calendarName>name1</calendarName> <calendarName>name2</calendarName> </calendarNameList>
  15. Prasad B

    Error in binary installation

    Question: I am getting error while installing jasperserver 9.0.0 on windows 2016 server. please review the screenshot and let me know if you need any other details Answer: This is a known issue (JS-69551), which was a regression and it started occurring in JRS 8.1.0. The workaround for this issue is to install JDK (either 8 or 11) explicitly and then proceed with the installation.
×
×
  • Create New...