> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set a user's sharing permissions for a saved report view.

> Independently grants each requested read, write, or share permission when its value is `true` and
removes it when `false`. Omitted Boolean values bind as `false`. The target is matched by email or
username; a value that does not identify a user has no successful outcome. The operation returns no
updated view or permission list.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/ReportQuery/Views/{reportDefinitionId}/{view}/permissions/user
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/ReportQuery/Views/{reportDefinitionId}/{view}/permissions/user:
    post:
      tags:
        - ReportQuery
      summary: Set a user's sharing permissions for a saved report view.
      description: >-
        Independently grants each requested read, write, or share permission
        when its value is `true` and

        removes it when `false`. Omitted Boolean values bind as `false`. The
        target is matched by email or

        username; a value that does not identify a user has no successful
        outcome. The operation returns no

        updated view or permission list.
      operationId: ShareReportViewWithEmail
      parameters:
        - name: reportDefinitionId
          in: path
          description: The opaque report-definition identifier that owns the saved view.
          required: true
          schema:
            type: string
        - name: view
          in: path
          description: The opaque saved-view identifier returned when the view was created.
          required: true
          schema:
            type: string
      requestBody:
        description: >-
          The body containing a non-empty target email or username and the
          `Read`, `Write`, and `Share` values to grant or remove.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ReportViewPermissionRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ReportViewPermissionRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ReportViewPermissionRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ReportViewPermissionRequest'
      responses:
        '200':
          description: >-
            Returns the permission-change outcome in the response envelope; no
            updated view or permission list is included.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareReportViewWithEmailResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ReportViewPermissionRequest:
      required:
        - $type
      type: object
      properties:
        target_user:
          type: string
          description: Email/Username of the target User
          nullable: true
        read:
          type: boolean
          description: Can the user read the view
        write:
          type: boolean
          description: Can the user update the view
        share:
          type: boolean
          description: Can the user Share the view
        $type:
          type: string
          enum:
            - >-
              Derivitec.RiskPortal.Api.Controllers.ReportViewPermissionRequest,
              Derivitec.RiskPortal.Api
      additionalProperties: false
      description: Parameters controlling user's permissions over a view
    ShareReportViewWithEmailResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Core.Mediators.ReportView.ShareReportViewWithEmailResponse,
              Derivitec.Core.Mediators
      additionalProperties: false
      description: >-
        Response returned after changing a user's permissions for a saved report
        view.
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````