REST API - Defining an Artifact in the Request Body
4 min
you must define the artifact in the request body when you are adding an artifact you can only define one artifact in a single request parameters the following parameters must be specified within the artifact element artifacttypeid numerically identifies the type of artifact the identifier can be obtained via the rest api get artifact type request docid\ ac1pmq7y4f9ibym0n1kpl and rest api list artifact types request docid vsdaxjklji3tk3sbr7jy requests name identifies the name of the artifact any required properties of the applicable artifact type properties element if you want to specify property values for your artifact, include a properties element within the artifact element if you are defining a property type for your artifact, you must specify values for required elements of the property type among others, the properties element can contain the following elements property (required ) the element of the property specifications propertytypeid the corresponding elements, which can be populated in the rest api get artifact request docid\ wkudb4wm9kw7rqoykf hk call examples addartifact example here is an example of a request body in xml format \<?xml version="1 0" ?> \<artifact xmlns\ i="http //www w3 org/2001/xmlschema instance" xmlns="http //www blueprintsys com/blueprint/api/v1"> \<artifacttypeid>25\</artifacttypeid> \<name>new textual requirement\</name> \<parentid>10\</parentid> \<properties> \<property> \<propertytypeid>235658\</propertytypeid> \<textorchoicevalue>sample description\</textorchoicevalue> \</property> \<property> \<numbervalue>15\</numbervalue> \<propertytypeid>235659\</propertytypeid> \</property> \</properties>\</artifact> here is an example of a request body in json format { "name" "new textual requirement", "parentid" 10, "artifacttypeid" 25, "properties" \[ { "propertytypeid" 235658, "textorchoicevalue" "sample description" }, { "propertytypeid" 235659, "numbervalue" 15 0 } ]}