REST API - Get Child Artifacts of Artifact Request
/api/v1/projects/{projectId}/artifacts/{artifactId}/children?properties={properties}&status={status}&comments={comments}&traces={traces}&attachments={attachments}&richtextasplain={richtextasplain}&inlinecss={inlinecss}&content={content}&offset={offset}&limit={limit}
Description
Retrieves the child artifact(s) of the specified artifact.
The response only includes direct children of the specified artifact. It does not include all descendents, such as grandchildren.
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}/artifacts/{ArtifactId}/children
ProjectId
: The ID of the project that contains the artifact with the attachment you want to retrieve.ArtifactId
: The ID of the artifact containing the attachment you want to retrieve.
Supported Methods
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: - 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.
- The applicable permissions are needed. For example, this error can occur when:
- 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.
- Item is not found in the project. For example, this error can occur when:
- 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.
- If
- 500: Internal Server Error
- 501: Not Implemented
Examples
XML Example
Request URI
https://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405715/children?comments=true&traces=all&properties=true&attachments=true
Response Header
{'content-length': '4101', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Sat, 04 May 2013 14:58:59 GMT', 'expires': '-1', 'content-type': 'application/xml; charset=utf-8', 'server': 'Blueprint'}
Response Body
<?xml version="1.0" ?>
<Artifacts xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.blueprintsys.com/blueprint/api/v1">
<Artifact>
<AreAttachmentsReadOnly>true</AreAttachmentsReadOnly>
<AreDocumentReferencesReadOnly>true</AreDocumentReferencesReadOnly>
<AreTracesReadOnly>true</AreTracesReadOnly>
<ArtifactTypeId>317929</ArtifactTypeId>
<ArtifactTypeName>ReUse_TReq</ArtifactTypeName>
<Attachments>
<Attachment>
<FileName>EditReservations.txt</FileName>
<Id>103543</Id>
<IsReadOnly>true</IsReadOnly>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405716/attachments/103543</Link>
</Attachment>
</Attachments>
<BaseArtifactType>TextualRequirement</BaseArtifactType>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405716</BlueprintUrl>
<Comments />
<Id>4405716</Id>
<Name>Cancel Reservations</Name>
<ParentId>4405715</ParentId>
<ProjectId>4405707</ProjectId>
<Properties>
<Property>
<BasePropertyType>Text</BasePropertyType>
<IsReadOnly>true</IsReadOnly>
<IsRichText>false</IsRichText>
<Name>ID</Name>
<PropertyTypeId>304155</PropertyTypeId>
<TextOrChoiceValue>TR_RU4405716</TextOrChoiceValue>
</Property>
<Property>
<BasePropertyType>Text</BasePropertyType>
<IsRichText>false</IsRichText>
<Name>Name</Name>
<PropertyTypeId>304156</PropertyTypeId>
<TextOrChoiceValue>Cancel Reservations</TextOrChoiceValue>
</Property>
<Property>
<BasePropertyType>Text</BasePropertyType>
<IsRichText>true</IsRichText>
<Name>Description</Name>
<PropertyTypeId>304157</PropertyTypeId>
<TextOrChoiceValue><html><head><style type="text/css">.c0 { padding: 1px 0px 0px; font-size: 10.6700000762939px } .c1 { font-size: 10.6700000762939px } .c2 { margin: 0px; font-size: 10.6700000762939px } .c3 { font-size: 10.6700000762939px; line-height: 1.45000004768372 } </style></head><body class="c0"><div class="c1"><p class="c2"><span class="c3"><span class="c1">BP Air needs to allow customers to cancel their reservations online.</span></span></p></div></body></html></TextOrChoiceValue>
</Property>
<Property>
<BasePropertyType>User</BasePropertyType>
<Name>ApprovedBy</Name>
<PropertyTypeId>304320</PropertyTypeId>
<UsersAndGroups />
</Property>
<Property>
<BasePropertyType>Choice</BasePropertyType>
<Choices />
<Name>ItemType</Name>
<PropertyTypeId>304323</PropertyTypeId>
</Property>
<Property>
<BasePropertyType>User</BasePropertyType>
<IsReadOnly>true</IsReadOnly>
<Name>Created By</Name>
<PropertyTypeId>304195</PropertyTypeId>
<UsersAndGroups>
<UserGroup i:type="User">
<DisplayName>Greg Curtis</DisplayName>
<Id>572</Id>
</UserGroup>
</UsersAndGroups>
</Property>
<Property>
<BasePropertyType>Date</BasePropertyType>
<DateValue>2014-12-22T20:39:50.5100000Z</DateValue>
<IsReadOnly>true</IsReadOnly>
<Name>Created On</Name>
<PropertyTypeId>304196</PropertyTypeId>
</Property>
<Property>
<BasePropertyType>User</BasePropertyType>
<IsReadOnly>true</IsReadOnly>
<Name>Last Edited By</Name>
<PropertyTypeId>304197</PropertyTypeId>
<UsersAndGroups>
<UserGroup i:type="User">
<DisplayName>Greg Curtis</DisplayName>
<Id>572</Id>
</UserGroup>
</UsersAndGroups>
</Property>
<Property>
<BasePropertyType>Date</BasePropertyType>
<DateValue>2014-12-22T20:40:09.1400000Z</DateValue>
<IsReadOnly>true</IsReadOnly>
<Name>Last Edited On</Name>
<PropertyTypeId>304198</PropertyTypeId>
</Property>
</Properties>
<Traces>
<Trace>
<ArtifactId>4405715</ArtifactId>
<ArtifactPropertyName>Edit Reservations</ArtifactPropertyName>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405715</BlueprintUrl>
<Direction>From</Direction>
<IsSuspect>false</IsSuspect>
<Label>4405715: Edit Reservations</Label>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405715</Link>
<ProjectId>4405707</ProjectId>
<Type>Parent</Type>
</Trace>
<Trace>
<ArtifactId>4405715</ArtifactId>
<ArtifactPropertyName>Edit Reservations</ArtifactPropertyName>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405715</BlueprintUrl>
<Direction>From</Direction>
<IsSuspect>true</IsSuspect>
<Label>4405715: Edit Reservations</Label>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405715</Link>
<ProjectId>4405707</ProjectId>
<Type>Reuse</Type>
</Trace>
</Traces>
<Version>2</Version>
</Artifact>
</Artifacts>
JSON Example
Request URI
https://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405715/children?comments=true&traces=all&properties=true&attachments=true
Response Header
{'content-length': '2743', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Sat, 04 May 2013 10:47:37 GMT', 'expires': '-1', 'content-type': 'application/json; charset=utf-8', 'server': 'Blueprint'}
Response Body
[
{
"Id": 4405716,
"Name": "Cancel Reservations",
"ProjectId": 4405707,
"Version": 2,
"ParentId": 4405715,
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405716",
"ArtifactTypeId": 317929,
"ArtifactTypeName": "ReUse_TReq",
"BaseArtifactType": "TextualRequirement",
"AreTracesReadOnly": true,
"AreAttachmentsReadOnly": true,
"AreDocumentReferencesReadOnly": true,
"Properties": [
{
"PropertyTypeId": 304155,
"Name": "ID",
"BasePropertyType": "Text",
"TextOrChoiceValue": "TR_RU4405716",
"IsRichText": false,
"IsReadOnly": true
},
{
"PropertyTypeId": 304156,
"Name": "Name",
"BasePropertyType": "Text",
"TextOrChoiceValue": "Cancel Reservations",
"IsRichText": false
},
{
"PropertyTypeId": 304157,
"Name": "Description",
"BasePropertyType": "Text",
"TextOrChoiceValue": "<html><head><style type=\"text/css\">.c0 { padding: 1px 0px 0px; font-size: 10.6700000762939px } .c1 { font-size: 10.6700000762939px } .c2 { margin: 0px; font-size: 10.6700000762939px } .c3 { font-size: 10.6700000762939px; line-height: 1.45000004768372 } </style></head><body class=\"c0\"><div class=\"c1\"><p class=\"c2\"><span class=\"c3\"><span class=\"c1\">BP Air needs to allow customers to cancel their reservations online.</span></span></p></div></body></html>",
"IsRichText": true
},
{
"PropertyTypeId": 304320,
"Name": "ApprovedBy",
"BasePropertyType": "User",
"UsersAndGroups": []
},
{
"PropertyTypeId": 304323,
"Name": "ItemType",
"BasePropertyType": "Choice",
"Choices": []
},
{
"PropertyTypeId": 304195,
"Name": "Created By",
"BasePropertyType": "User",
"UsersAndGroups": [
{
"Type": "User",
"Id": 572,
"DisplayName": "Greg Curtis"
}
],
"IsReadOnly": true
},
{
"DateValue": "2014-12-22T20:39:50.5100000Z",
"PropertyTypeId": 304196,
"Name": "Created On",
"BasePropertyType": "Date",
"IsReadOnly": true
},
{
"PropertyTypeId": 304197,
"Name": "Last Edited By",
"BasePropertyType": "User",
"UsersAndGroups": [
{
"Type": "User",
"Id": 572,
"DisplayName": "Greg Curtis"
}
],
"IsReadOnly": true
},
{
"DateValue": "2014-12-22T20:40:09.1400000Z",
"PropertyTypeId": 304198,
"Name": "Last Edited On",
"BasePropertyType": "Date",
"IsReadOnly": true
}
],
"Comments": [],
"Traces": [
{
"Type": "Parent",
"Direction": "From",
"ProjectId": 4405707,
"ArtifactId": 4405715,
"ArtifactPropertyName": "Edit Reservations",
"Label": "4405715: Edit Reservations",
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405715",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405715",
"IsSuspect": false
},
{
"Type": "Reuse",
"Direction": "From",
"ProjectId": 4405707,
"ArtifactId": 4405715,
"ArtifactPropertyName": "Edit Reservations",
"Label": "4405715: Edit Reservations",
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405715",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405715",
"IsSuspect": true
}
],
"Attachments": [
{
"Id": 103543,
"FileName": "EditReservations.txt",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405716/attachments/103543",
"IsReadOnly": true
}
]
}
]