REST API - Get Root Artifacts of Project Request
9 min
/api/v1/projects/{projectid}/children?properties={properties}\&status={status}\&comments={comments}\&traces={traces}\&attachments={attachments}\&richtextasplain={richtextasplain}\&inlinecss={inlinecss}\&offset={offset}\&limit={limit}\&content={content} description retrieves the artifact(s) at the root level of the project the response only includes artifacts at the root level of the specified project it does not include all artifacts in the entire project artifacts are only included in the response if the user (that is was authenticated to obtain the token) has view permissions to those artifacts url structure \[blueprint uri]/api/v1/projects/{projectid}/children projectid the id of the project supported methods head docid\ eqnd3zptd6dwf3go3ufox get docid 7hm2r py7e84xk2msf11b request uri parameters properties (optional) defines whether the properties should be loaded for the artifacts this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value status (optional) defines whether or not the status of the artifact should be loaded this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value comments (optional) indicates whether to retreive comments of the artifact this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value traces (optional) indicates whether to retrieve traces of the artifact valid options include none , all , parent , child , manual , reuse and other the default is none if not specified the default is all if the parameter is included in the uri with no given value attachments (optional) indicates whether to retrieve information about the attachments of the artifact this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value richtextasplain (optional) defines whether or not to retrieve all rich text properties as plain text instead of html this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value inlinecss (optional) defines whether or not to retrieve all rich text properties with locally defined or inline styles this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value when this parameter is set to false , rich text properties return internal styles that are defined within the \<head> section of the html offset (optional) defines the paging offset (that is, index) at which the results start offset the default is 0 limit (optional) defines the number of items (projects, artifacts, etc) to retrieve per query this parameter can be set to an integer the default is 100 the minimum value is 1 and the maximum value is 500 content (optional) defines whether or not to retrieve the artifact's content this parameter can be set to true or false the default is false if not specified the default is true if the parameter is included in the uri with no given value http status codes 200 ok 201 successfully created 206 partial content 400 bad request this error can occur for a variety of reasons at least one uri or request body parameter is invalid, such as one of the filter docid\ sv9gjverxczcgqdn28j7u , traces, offset or limit parameters a required value has not been provided if you are submitting a post docid\ hsi lzxs8g rx ydudzkg or patch docid\ rcjvhrlby6de zgkehxui request and have not added the x http method override parameter to your request header 401 unauthorized the blueprint token is missing, invalid or expired 403 forbidden the applicable permissions are needed for example, this error can occur when an author or collaborate license is needed for access comment permissions are needed on the artifact edit permissions are needed on the change summary job 404 notfound item is not found in the project for example, this error can occur when artifact not found artifact type not found project not found alm target not found change summary job not found user does not have edit permissions for this artifact, project or alm target 409 conflict reason for failure can be found in the response body additional information may also be found in the log 411 length required if the content length header is missing in the request 413 request entity too large if the provided file size is larger than allowed 415 unsupported media type if the provided media type is not of mime multipart content "form data " 416 request range not satisfiable if offset points to a part of a collection that is not available 500 internal server error 501 not implemented examples xml example request uri https //production blueprintcloud com/api/v1/projects/220870/children?traces=all\&attachments=true\&status=true response header {'content length' '1413', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'sat, 04 may 2013 14 58 56 gmt', 'expires' ' 1', 'content type' 'application/xml; charset=utf 8', 'server' 'blueprint'} response body \<?xml version="1 0" ?>\<artifacts xmlns="http //www blueprintsys com/blueprint/api/v1" xmlns\ i="http //www w3 org/2001/xmlschema instance"> \<artifact> \<areattachmentsreadonly>true\</areattachmentsreadonly> \<aredocumentreferencesreadonly>true\</aredocumentreferencesreadonly> \<aretracesreadonly>true\</aretracesreadonly> \<artifacttypeid>11544\</artifacttypeid> \<artifacttypename>folder\</artifacttypename> \<attachments> \<attachment> \<filename>editreservations txt\</filename> \<id>103541\</id> \<isreadonly>true\</isreadonly> \<link>http //production blueprintcloud com/api/v1/projects/220870/artifacts/220872/attachments/103541\</link> \</attachment> \</attachments> \<baseartifacttype>primitivefolder\</baseartifacttype> \<blueprinturl>http //production blueprintcloud com?artifactid=220872\</blueprinturl> \<id>220872\</id> \<name>business analysis\</name> \<parentid>220870\</parentid> \<projectid>220870\</projectid> \<traces> \<trace> \<artifactid>4405715\</artifactid> \<artifactpropertyname>edit reservations\</artifactpropertyname> \<blueprinturl>http //production blueprintcloud com?artifactid=4405715\</blueprinturl> \<direction>to\</direction> \<issuspect>true\</issuspect> \<label>4405715 edit reservations\</label> \<link>http //production blueprintcloud com/api/v1/projects/220870/artifacts/4405715\</link> \<projectid>4405707\</projectid> \<type>reuse\</type> \</trace> \</traces> \<status> \<islocked>false\</islocked> \<isreadonly>false\</isreadonly> \</status> \<version>1\</version> \</artifact> \<artifact> \<artifacttypeid>11544\</artifacttypeid> \<artifacttypename>folder\</artifacttypename> \<attachments> \<attachment> \<filename>contract of carriage pdf\</filename> \<id>103544\</id> \<link>http //production blueprintcloud com/api/v1/projects/220870/artifacts/4405717/attachments/103544\</link> \</attachment> \</attachments> \<baseartifacttype>primitivefolder\</baseartifacttype> \<blueprinturl>http //production blueprintcloud com?artifactid=220873\</blueprinturl> \<id>220873\</id> \<name>application\</name> \<parentid>220870\</parentid> \<projectid>220870\</projectid> \<status> \<islocked>false\</islocked> \<isreadonly>false\</isreadonly> \</status> \<traces /> \<version>1\</version> \</artifact> \<artifact> \<artifacttypeid>11544\</artifacttypeid> \<artifacttypename>folder\</artifacttypename> \<attachments /> \<baseartifacttype>primitivefolder\</baseartifacttype> \<blueprinturl>http //production blueprintcloud com?artifactid=220874\</blueprinturl> \<id>220874\</id> \<name>document output\</name> \<parentid>220870\</parentid> \<projectid>220870\</projectid> \<status> \<islocked>false\</islocked> \<isreadonly>false\</isreadonly> \</status> \<traces /> \<version>1\</version> \</artifact>\</artifacts> json example request uri https //production blueprintcloud com/api/v1/projects/4405707/children?attachments=true\&traces=all\&status=true response header {'content length' '1884', 'pragma' 'no cache', 'cache control' 'no cache', 'date' 'sat, 04 may 2013 10 47 35 gmt', 'expires' ' 1', 'content type' 'application/json; charset=utf 8', 'server' 'blueprint'} response body \[ { "id" 4405715, "name" "edit reservations", "projectid" 4405707, "version" 3, "parentid" 4405707, "blueprinturl" "http //production blueprintcloud com?artifactid=4405715", "artifacttypeid" 317929, "artifacttypename" "reuse treq", "baseartifacttype" "textualrequirement", "status" { "islocked" false, "isreadonly" false }, "aretracesreadonly" true, "areattachmentsreadonly" true, "aredocumentreferencesreadonly" true, "traces" \[ { "type" "reuse", "direction" "to", "projectid" 4405707, "artifactid" 4405716, "artifactpropertyname" "cancel reservations", "label" "4405716 cancel reservations", "blueprinturl" "http //production blueprintcloud com?artifactid=4405716", "link" "http //production blueprintcloud com/api/v1/projects/4405707/artifacts/4405716", "issuspect" true } ], "attachments" \[ { "id" 103542, "filename" "editreservations txt", "link" "http //production blueprintcloud com/api/v1/projects/4405707/artifacts/4405715/attachments/103542", "isreadonly" true } ] }, { "id" 4405717, "name" "traveler booking", "projectid" 4405707, "version" 5, "parentid" 4405707, "blueprinturl" "http //production blueprintcloud com?artifactid=4405717", "artifacttypeid" 317881, "artifacttypename" "standard business process", "baseartifacttype" "businessprocess", "status" { "islocked" false, "isreadonly" false }, "traces" \[ { "type" "reuse", "direction" "to", "projectid" 4405707, "artifactid" 4405788, "artifactpropertyname" "traveler booking", "label" "4405788 traveler booking", "blueprinturl" "http //production blueprintcloud com?artifactid=4405788", "link" "http //production blueprintcloud com/api/v1/projects/4405707/artifacts/4405788", "issuspect" false }, ], "attachments" \[ { "id" 103544, "filename" "contract of carriage pdf", "link" "http //production blueprintcloud com/api/v1/projects/4405707/artifacts/4405717/attachments/103544" } ] }]