Skip to main content

Share reports in a batch

POST https://api.rollstack.com/public/v1/reports/batch-share

Shares up to 50 reports of any type with the same members, with the same permission, as shareReport does for one. Each member gets one email listing the reports newly shared with them. Answers one result per report, each naming its id: a report you may not share fails on its own and the others are still shared, but a member who is not in the organization, or yourself, fails the whole call with nothing shared.

Requires the slide_decks:write scope.

Operation ID: batchShareReports.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • ids (array of string, required): The reports to act on, of any type, by their id from listReports. From 1 to 50 ids; an id listed twice is acted on once.
  • userIds (array of integer, required): The members to share every report with, by their user id from listMembers. Each must be an active member of the organization other than you, or the whole call fails with nothing shared. From 1 to 50 ids.
  • permission (string, required): What the member can do with the report. view lets them open, export and duplicate it. comment also lets them add, reply to and resolve comments on its slides. edit also lets them change its slides, data, schedules, email and other settings, run it, send its email, chat with the slides agent about it, and manage who it's shared with. Neither lets them delete the report or transfer its ownership. If the report is already shared with the member, this replaces their permission and they aren't notified again. On a report that updates a file in Google Drive or OneDrive, Rollstack also shares the file with them, as the app does. One of view, comment, edit.

Response 200

Success

application/json

  • results (array of object, required): One result per report, each naming its id.
    • When status is done
      • id (string, required): The report, by its id from ids.
      • status (done, required): The call succeeded on this report.
      • result (array of object, required): The members the report is now shared with, one for each of userIds.
        • userId (number, required): The member the report is now shared with: the userId from the path.
        • permission (string, required): What the member can now do with the report: the permission you sent. One of view, comment, edit.
    • When status is failed
      • id (string, required): The report, by its id from ids.
      • status (failed, required): The call failed on this report and changed nothing on it. The other reports are unaffected.
      • error (object, required): Why this report failed, as the endpoint for one report would answer. Retry only these reports.
        • code (string, required): A stable, machine-readable code for the error, such as api-key-missing-scope or data-validation-error. Use it, rather than message, to handle specific errors in your code.
        • message (string, required): A human-readable explanation of what went wrong, to log or show to people. When the request's path parameters, query or body are invalid (data-validation-error), it lists each invalid field by its path, with the problem, such as body.emails.0: Invalid email address.
        • statusCode (number, required): The HTTP status the same call on this report alone would answer, such as 404 or 403.