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

# Set Data Right

> Set one specific data right at the given position.

An exception will be thrown if non existing position is specified.
<para />## Online Restricted: ## The User agent is not available in Online by default. User management is not allowed for partner apps.



## OpenAPI

````yaml /openapi/rest/openapi-v3-Role.json put /api/v1/Role/{roleId}/DataRight/{tableName}/{relationToOwner}
openapi: 3.0.0
info:
  version: v1-REST
  title: SuperOffice REST API v1
  description: SuperOffice REST API - Role
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Role/{roleId}/DataRight/{tableName}/{relationToOwner}:
    put:
      tags:
        - Role
      summary: Set Data Right
      description: "Set one specific data right at the given position.\n\nAn exception will be thrown if non existing position is specified.\r\n<para />## Online Restricted: ## The User agent is not available in Online by default. User management is not allowed for partner apps."
      operationId: v1RoleEntity_SetDataRight
      parameters:
        - name: roleId
          in: path
          description: The role id to set the data right for
          required: true
          schema:
            type: integer
            format: int32
        - name: tableName
          in: path
          description: The name of the entity/table
          required: true
          schema:
            type: string
        - name: relationToOwner
          in: path
          description: The id of the relation to owner
          required: true
          schema:
            type: string
            enum:
              - MyOwn
              - PrimaryGroup
              - OtherAssociates
              - OtherGroups
              - ExternalUser
              - Anonymous
              - MyCompany
              - SameProject
              - CustomObjects
        - name: dataRightValue
          in: query
          description: The data right value to set at the specified position (CRUD)
          required: true
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      responses:
        '204':
          description: No Content
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components: {}

````

## Related topics

- [Set Data Right](/en/api/reference/restful/agent/user_agent/set-data-right.md)
- [Set data rights for a role](/en/admin/user-management/role/set-data-rights-for-role.md)
- [SuperOffice.WebApi.Data.User SetDataRightRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.User_SetDataRightRequest.md)
- [Functional rights in SuperOffice](/en/admin/user-management/role/functional-rights.md)
- [NSDataRights](/en/automation/crmscript/reference/CRMScript.NetServer.NSDataRights.md)
- [NSDataRight](/en/automation/crmscript/reference/CRMScript.NetServer.NSDataRight.md)
