Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Starting with a scope, you can obtain the "rights" object. It includes a vast amount of information on the scope and the data you can access and manipulate:

  • Scope information: Print title, Hyperlink to job/project/resource/global search pages, etc.
  • Information on languages: For example, the source and target language of a job.
  • Information on documents: Does the scope have source/target documents. How many?
  • General access rights: Can you edit segments? Can you add or delete segments? Can you lock/unlock segments? And so on.
  • Configuration details: Available custom fields and labels.

 

Note: You do not need to fetch this object in order to call API methods since each API method will validate the access rights related to the scope.

 

PROPERTIES

The JSON object has these properties:

 

scopeThe scope object. It delimits the total range of segments and related resources that can be accessed.object
properties

Additional information on the scope, such as title and hyperlinks:

  • name: The print name of the scope type. For example: "Project", "Job"...
  • title: The print title of the scope: A project reference, a job reference, a resource name and so on.
  • url: A hyperlink to access the Wordbee Translator page for the scope. For example, the project details page, the job details page, the global search page and so on.
  • parent: With "Resource" scopes only. See chapter in Scope (Object)

 

"Project" scopes include these additional properties:

  • dsid: The resource ID that contains the segments of the scope.

 

"Job" scopes include these additional properties:

  • dsid: The resource ID that contains the segments of the scope.
  • pid: The project id.
  • pname: The project reference.
  • branchLocale: The branch locale. Typically the target language except in workflows where there are intermediary workflow steps from/into other languages (example: back translation workflows)

 

object

hasFiles

True if the scope has documents (source files and translated files). It is true for "Project" and "Job" scopes only.

bool
hasSingleFileTrue if the scope has documents and there is just a single source file. For example, with Codyt jobs this property will always be true.bool
 locales

An array of all locales (languages) available in the scope and for the user. Each item has these properties:

  • loc: The language code aka locale
  • name: The language name
  • issrc: True if the language is a source language. Note that there can be multiple source languages (e.g. in resources).
  • istrg: True if the language is a target language. Note that a language can be both source and target language (in Codyt projects).
  • canEdit: True: Content of this language is "in principle" qualified for edits. This is a global access right and can be revoked individually per segment. If the value is false, no write access will be given by any API method.
  • loc_rtl: True if the language is written right-to-left.

 

 object[]
labelsContains all segment related labels accessible to the user. See Label (Object)object[] 
cfContains all segment related custom fields accessible to the user. See Custom Field (Object)object[]
comments

Describes generic access rights for manipulating segment and document level comments in the scope:

  • canDeleteCommentsOfOtherUsers: The user can delete comments written by other users.
  • canSendEmails: The user can notify comments by email to other users (that have access to the same scope)
  • canAddComments: The user can add comments in this scope.
  • canEditComments: The user can edit comments in this scope.

 

object
general

Describes other access rights useful to know with the scope:

  • canSeeWorkerFullName: The user can see the names of other users in the scope: User who added comments, made revisions, etc.
  • canLockUnlockSegments: If true then the user can "in principle" lock/unlock segments. However, each segment may individually revoke this right.
  • canSetMinMax: If true then the user can "in principle" set minimum and maximum length constraints for segments. However, each segment may individually revoke this right.
  • canAddSegment: If true, then the user can add new segments to the scope. This can be true for specific scopes "DocumentSet" and "Resource" only.
  • canDeleteSegment: If true, then the user can delete segments from the scope. This can be true for specific scopes "DocumentSet" and "Resource" only.
  • canViewBA: If true then the user can see business analytical information for the scope: Statistics on number of edits, post-edits, fixes, etc.
  • canViewRefMat: If true then the user has access to reference material that may have been included with the scope. This applies to scopes "Project" and "Job" only.
  • canEditRefMat: If true then the user can add/rename/delete reference material. Typically this requires advanced project management access rights.

 

 

 

 

EXAMPLE

 

{
  "scope": {
    "type": "Project",
    "projectid": 363
  },
  "properties": {
    "title": "◀Project▶",
    "name": "test termino thu",
    "url": "http://localhost:4242/a/devel/Codyt/Project/Details.aspx?x=szy5HWMdYvn5lKFvbUw8Mq1qUVH7RIiHqXj6N%2fj%2brp0%3d",
    "parent": null,
    "dsid": 386
  },
  "hasFiles": true,
  "hasSingleFile": false,
  "locales": [
    {
      "loc": "fr",
      "name": "Français",
      "issrc": true,
      "istrg": true,
      "isadd": false,
      "canEdit": true,
      "loc_rtl": false
    },
    {
      "loc": "en",
      "name": "Anglais",
      "issrc": false,
      "istrg": true,
      "isadd": false,
      "canEdit": true,
      "loc_rtl": false
    }
  ],
  "labels": {
    "canView": true,
    "canEdit": true,
    "labels": [
      {
        "id": 2,
        "name": "Usefulness",
        "isSticky": false,
        "isStickyInLists": false,
        "options": [
          {
            "name": "High quality",
            "value": 4,
            "htmlColor": "#92D050"
          },
          {
            "name": "Medium quality",
            "value": 1,
            "htmlColor": "#FFCC00"
          },
          {
            "name": "Low quality",
            "value": 2,
            "htmlColor": "#CC6600"
          },
          {
            "name": "Do not use",
            "value": 3,
            "htmlColor": "#FF4F4F"
          }
        ]
      },
      {
        "id": 1,
        "name": "Validated",
        "isSticky": false,
        "isStickyInLists": false,
        "options": [
          {
            "name": "Validated",
            "value": 0,
            "htmlColor": "#92D050"
          },
          {
            "name": "Validated",
            "value": 1,
            "htmlColor": "#d0d0d0"
          }
        ]
      }
    ]
  },
  "cf": [
    {
      "customFieldId": 1,
      "type": "String",
      "title": "String",
      "desc": "String field",
      "domain": "Segment",
      "tmx": "x-wb-customstr1",
      "enabled": true,
      "mandatory": false,
      "options": null,
      "max": 100,
      "rows": 1,
      "canEdit": true
    },
    {
      "customFieldId": 2,
      "type": "Combo",
      "title": "Pick list field",
      "desc": "Pick list field",
      "domain": "Segment",
      "tmx": "x-wb-customstr2",
      "enabled": true,
      "mandatory": false,
      "options": [
        "CATEGORY",
        "Character Name (Primary)",
        "Character Name (Secondary)",
        "Episode Title",
        "Location (Primary)",
        "Location (Secondary)",
        "Option 1",
        "Option 2",
        "Option 3",
        "Option 4",
        "Option 5",
        "Prop",
        "Property",
        "Quotation",
        "Song",
        "test"
      ],
      "max": 1000,
      "rows": 1,
      "canEdit": true
    }
  ],
  "comments": {
    "canDeleteCommentsOfOtherUsers": true,
    "canSendEmails": true,
    "canAddComments": true,
    "canEditComments": true
  },
  "general": {
    "canSeeWorkerFullName": true,
    "canLockUnlockSegments": true,
    "canSetMinMax": true,
    "canAddSegment": false,
    "canDeleteSegment": false,
    "canViewBA": true,
    "canViewRefMat": true,
    "canEditRefMat": true
  }
}
 

 

 

 

  • No labels