Scope (Object)
Most of the API methods for resources, segments and related data ask for a "scope". The scope both delimits the set of data you need to access as well as the access rights to these data. For example the "job" scope gives access to segments and files for one specific job.
A scope is a JSON object with the properties described below.
Job scope
This scope delimits data to segments and files of one specific job.
Property | Value | Type |
---|---|---|
type | Job | string |
jobid | The Standard or Codyt job ID. | int |
jobcdyt | True: Codyt job False: Standard job | bool |
Example:
{ "type": "Job", "jobid": 9927, "jobcdyt": true }
Project scope
This scope delimits data to segments and files of a specific project.
Property | Value | Type |
---|---|---|
type | Project | string |
projectid | The project ID. | int |
Example:
{ "type": "Project", "projectid": 229 }
Memory/Term base scope
This scope delimits data to segments and files of resources, which are translation memories, term bases or project memories. In internal tech-speak at Wordbee, we call them "document sets".
Property | Value | Type |
---|---|---|
type | DocumentSet | string |
dsid | The resource ID. | int |
Note: You can access segments of a project using both the "Project" and the "Resource" scope. The difference is in terms of the access rights and the kind of operations you will be allowed to perform. For example, deliverables are not accessible with the "Resource" scope (resources do not have deliverables).
Example:
{ "type": "DocumentSet", "dsid": 157 }
Resource scope
This scope is specifically used in conjunction with translation memory searches. The "translation finder" tool in the translation editor permits to search memories/term bases.
The "translation finder" also exposes tools to look into these attached resources and to view details for hits (source, translation, status, etc.). For all the latter operations you would use a "Resource" scope and not a "DocumentSet" scope. The reason simply is that non-managers are usually not authorized for "DocumentSet" scopes but are usually authorized for "Resource" scopes. Whereas a "DocumentSet" scope gives advanced access to a resource including making changes, the "Resource" scope generally strongly restricts what the user can do.
Property | Value | Type |
---|---|---|
type | Resource | string |
dsid | The resource ID, such as a memory attached in the translation finder. | int |
psc | The parent scope. The parent scope is required by the system. For example, if the translation finder is used in the framework of a job, then the parent scope is for this job. The parent scope permits to validate if the resource "dsid" is authorized within the parent scope and also influences various access rights. | object<scope> |
Example:
{ "type": "Resource", "dsid": 992, "psc": { "type": "Job", "jobid": 9927, "jobcdyt": true } }
Multi-resource scope
This scope permits to query ALL segments in the platform.
The authenticated user's user profile must have access rights R600 and R602 enabled. See Settings > Access Rights in Wordbee Translator.
The scope does NOT allow any update operations. It is for retrieval only.
Property | Value | Type |
---|---|---|
type | Resources | string |
locs | The list of locales that the scope shall give access to. This list must contain at least one locale. | string[] |
Example:
{ "type": "Resources", "locs": ["en", "fr", "de"] }
Global Search scope
This scope gives access to all the segments in the platform: All projects, resources, jobs.
The authenticated user's user profile must have access rights R699 or R700 enabled. See Settings > Access Rights in Wordbee Translator. In addition, the "Global Search" feature must be active in the platform.
Please note that configuration parameters influence what is accessible: Global Search can enabled/disabled, Resources can be enabled/disabled for global search access and so on.
Property | Value | Type |
---|---|---|
type | GlobalSearch | string |
Example:
{ "type": "GlobalSearch" }
Copyright Wordbee - Buzzin' Outside the Box since 2008