Improve documentation for the /share Rest API function

XMLWordPrintable

      The content share function present in FeCru Rest API allows users to share changesets, repositories, files and reviews via email with other users.

      The documentation currently covers the changeset share scenario, providing a sample representation for it. The suggestion is to improve this documentation, providing sample representations for the other cases. For instance, the representation to share a review would be like (JSON example):

      {
        "url" : "http://localhost:8060/cru/CR-15",
        "note" : "The message from the user",
        "entity1" : "10",
        "entity2" : "",
        "type" : "review",
        "users" : [ "user1, user2" ],
        "emails" : [ "email1@company.com", "email1@company.com" ]
      }
      

      Notice that, for the review case, in entity1 you must pass the actual numeric ID for the review (which is the ID for this review in the database), not the perm ID (which is the one you see in the UI). To check for the actual ID of a review based on the perm ID (project key + number) in the database, execute the following query:

      select cru_review_id from cru_revpermaid where cru_proj_key='<proj_key>' and cru_number=<number>
      

      In the query above replace <proj_key> by the project key and <number> by the review number

              Assignee:
              Unassigned
              Reporter:
              Gustavo Refosco (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: