[rest api] add with template

Hynek Petrak 6 years ago 0

Hi, would it be possible to add object via REST API based on a template or object of a same class? Use of template would be recognized if input contains a valid id.

A sort of (in python):

headers = {'Content-Type': 'application/json',
       "Authorization": "user_token " + user_token, "App-Token": app_token }
data = """{"input": [{ "id" : 2032, "name" : "asset from template",  }]}"""
requests.post(url + sub_url, headers=headers, data=data)