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

Version 1 Next »

Provides ratings given to the person in the current year or a specific date range.

All ratings will be aggregated and the average values will be returned.

Note: This method works with inhouse suppliers only. For external suppliers use this method:  

URL

(GET) /ba/suppliers

PARAMETERS

The URL parameters are:

uid

The person ID

int, Mandatory
 Optional range of data to aggregate. 
fromyearAggregate analytical data starting with this year (2016, 2017....). If not specified then set to the current year.int, Optional
frommonthAggregate analytical data starting with this month of the year (1, 2...12). If not specified then set to 1.int, Optional
toyearAggregate analytical data up to and including this year (2016, 2017....). If not specified then same as "fromyear".int, Optional
tomonthAggregate analytical data up to and including this month of the year (1, 2...12). If not specified then set to 12.int, Optional

 

Examples:

Get analytical for the current year (January to current month):

/persons/{uid}/ba/ratings

Get analytical data for March to April:

/persons/{uid}/ba/ratings?fromyear=2017&frommonth=3&tomonth=12

RESULTS

A JSON with these properties:

comments

An array of all comments of the segment, sorted by descending date.

It includes comments in all the scope languages to which the user has access.

See Comment (Object) for details.

object[]
history

An array of all text and flag changes of the segment, sorted by descending date.

These are notably changes of the texts by different workers over time.

See Segment Change (Object) for details.

object[]
persons

An object containing the persons referred to by comments or revisions. Note:

  • Excludes persons contained in parameter knownpersons.
  • Excludes persons that the user cannot see. There is an access right to prevent a user from viewing user and company names.

 

The object has keys where the key is the person id.

"persons": {
    "_7": {
      "id": 7,
      "nm": "Stephan",
      "cid": 1,
      "cnm": "Tradubee"
    },
    "_3": {
      "id": 3,
      "nm": "Thierry",
      "cid": 1,
      "cnm": "Freelancebee"
    }

 

  • nm: Full name of person
  • id: Id of person
  • cnm: Company of person
  • cid: Company id

 

object
locales

A list of all locales available for this segment and which are within the scope. You can use these in a comments/revisions language filter.

string[]
rights

A few access rights that are specifically useful when working with the results:

  • canSendEmail: When a user adds/edits a comment, this boolean tells if the user can notify the comment by email or not.
  • canAdd: Tells if the user can add a new comment in one of the locales.

Note: When using the APIs to add/edit/delete comments, you may obtain a not authorized information even when the edit, canAdd or canSendEmail properties are true. The reason for this is that further detailed access rights check are done upon those advanced operations.

object

 

ACCESS RIGHTS

When working with the timeline of a segment, you should always read out these properties:

  • comments.[].edit: Tells if a comment can be edited or deleted.
  • rights.canAdd: Tells if a new comment can be added to the segment.
  • rights.canSendEmail: Tells if a newly added comment can be notified by email to people involved with this segment.

 

EXAMPLE

Here we get details for a target document with 

{
  "comments": [
    {
      "cty": "s",
      "cmid": "s823850-122",
      "sid": 823850,
      "did": 1908,
      "txt": "The French original text is flawed. It cannot be translated!",
      "tsk": "TR",
      "dt": "2017-04-07T14:22:38.080706Z",
      "cat": 0,
      "fpd": false,
      "fro": false,
      "loc": "en",
      "uid": null,
      "edit": true
    },
    {
      "cty": "s",
      "cmid": "s823850-115",
      "sid": 823850,
      "did": 1908,
      "txt": "I corrected the translation",
      "tsk": null,
      "dt": "2017-04-07T07:44:42.6006221Z",
      "cat": 3,
      "fpd": false,
      "fro": false,
      "loc": "en",
      "uid": null,
      "edit": true
    }
  ],
  "history": [
		{
			"ty": "text",
			"current": true,
			"val": "Corrected translation",
			"tsk": null,
			"ed": 1,
			"dt": "2017-04-07T07:39:11.2253404Z",
			"uid": null,
			"loc": "en"
		},
		{
			"ty": "flags",
			"current": true,
			"tsk": null,
			"dt": "2017-02-14T09:42:50.0220044Z",
			"uid": 7,
			"loc": "en",
			"st": 1,
			"bk": 0
		}
  ],
  "rights": {
    "canSendEmail": true,
    "canAdd": true
  },
  "locales": [
    "fr",
    "en"
  ],
  "persons": {
    "_7": {
      "id": 7,
      "nm": "Bohmig Stephan",
      "cid": 1,
      "cnm": "Pons"
    },
    "_3": {
      "id": 3,
      "nm": "Hund Thierry",
      "cid": 1,
      "cnm": "Pons"
    }
  }
}

 

 

 

 

  • No labels