NOTE: Trivore ID Documentation has moved to https://trivoreid.com
The content on this site IS OUT OF DATE!
This space has been archived!
Please go ahead to the new site!
Target Service (python)
Wrapper for '/target' endpoint.
List of all options
- Target management
Target management
from trivoreid.utils.criteria import Filter from trivoreid.models.target import Target # get page with the first 5 targets with the 'examplecode' namespace code f = Filter(Filter.CONTAINS, 'nsCode', 'examplecode') page = api.target_service.get_all(f, start_index=0, count=5) # create new target target = Target() target.name = 'ExampleName' # the function returns target object with the generated id target = api.target_service.create(target) # update target target.contact = 'Example contact' target = api.target_service.update(target) # get target target = api.target_service.get(target.id) # delete target api.target_service.delete(target.id)