Skip to main content

resources/segments/view/delete

Delete a segment or a group of segments. Returns a list of the segments that were successfully deleted.

URL

(POST) /resources/segments/view/delete

PARAMETERS

The message body contains a JSON object:

scope

The scope object.

The scope must be of type “DocumentSet” and point to a translation memory or term base.

object, Mandatory

query

The query object.

It selects the segments that will be deleted.

object, Mandatory

usecache

Boolean, default is true.

Fetches access rights from cache for enhanced performance. It is recommended to not include this parameter for its default value.

bool?, Optional


LIMITATIONS

You cannot delete more than 100 segments per API call. If your query returns more than 100 segments then the operation is canceled with an error. It is advised to set the “take” parameter in the query object to constrain the number of segments to delete (see example below).

RESULTS

This methods returns an array with the ids of the deleted segments

EXAMPLE

See this example: It deletes up to three segments (“take”: 3) from the list specified in the query instruction.

CODE
{
	"query":{
		"segments": [ 4356, 2487, 2464, 3451 ],
		"take": 3,
		"skip": 0
	},
	"scope":{
		"type": "DocumentSet",
		"dsid": 144
	}
}

RESULTS EXAMPLE

See this example:

CODE
{
	"result":[
		4356,
		2487,
		2464
	]
}

 

 

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.