REST API - List Artifacts Request

/api/v1/projects/{projectId}/artifacts?properties={properties}&status={status}&comments={comments}&traces={traces}&attachments={attachments}&richtextasplain={richtextasplain}&inlinecss={inlinecss}&offset={offset}&limit={limit}&content={content}

Description

Retrieves a list of artifacts. It is also possible to filter requested artifacts.

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
  • ProjectId: The ID of the project.

Supported Methods

  • HEAD
  • GET
  • POST: If you want to filter the results, you must use override the GET method and use the POST method instead.

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: NoneAllParentChildManualReuse 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, Traces, Offset or Limit parameters.
      • A required value has not been provided.
      • If you are submitting a POST or PATCH 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/4405707/artifacts?traces=all&attachments=true

Request Body

filter={artifact-type eq 'Business Process Diagram';}

Response Header

{'content-length': '2889', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Sat, 04 May 2013 14:58:54 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>
<ArtifactTypeId>317881</ArtifactTypeId>
<ArtifactTypeName>Business Process Diagram</ArtifactTypeName>
<Attachments>
<Attachment>
<FileName>Contract_of_Carriage.pdf</FileName>
<Id>103544</Id>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405717/attachments/103544</Link>
</Attachment>
</Attachments>
<BaseArtifactType>BusinessProcess</BaseArtifactType>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405717</BlueprintUrl>
<Id>4405717</Id>
<Name>Traveler Booking</Name>
<ParentId>4405707</ParentId>
<ProjectId>4405707</ProjectId>
<Traces>
<Trace>
<ArtifactId>4405788</ArtifactId>
<ArtifactPropertyName>Traveler Booking</ArtifactPropertyName>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405788</BlueprintUrl>
<Direction>To</Direction>
<IsSuspect>false</IsSuspect>
<Label>4405788: Traveler Booking</Label>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405788</Link>
<ProjectId>4405707</ProjectId>
<Type>Reuse</Type>
</Trace>
<Trace>
<ArtifactId>4405707</ArtifactId>
<ArtifactPropertyName>BP Airways 3.0</ArtifactPropertyName>
<BlueprintUrl>http://today?ArtifactId=4405707</BlueprintUrl>
<Direction>From</Direction>
<IsSuspect>false</IsSuspect>
<Label>4405707: BP Airways 3.0</Label>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707</Link>
<ProjectId>4405707</ProjectId>
<Type>Parent</Type>
</Trace>
</Traces>
<Version>5</Version>
</Artifact>
<Artifact>
<AreAttachmentsReadOnly>true</AreAttachmentsReadOnly>
<AreDocumentReferencesReadOnly>true</AreDocumentReferencesReadOnly>
<ArtifactTypeId>317881</ArtifactTypeId>
<ArtifactTypeName>Business Process Diagram</ArtifactTypeName>
<Attachments>
<Attachment>
<FileName>Contract_of_Carriage.pdf</FileName>
<Id>103545</Id>
<IsReadOnly>true</IsReadOnly>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405788/attachments/103545</Link>
</Attachment>
</Attachments>
<BaseArtifactType>BusinessProcess</BaseArtifactType>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405788</BlueprintUrl>
<Id>4405788</Id>
<Name>Traveler Booking</Name>
<ParentId>4405707</ParentId>
<ProjectId>4405707</ProjectId>
<Traces>
<Trace>
<ArtifactId>4405717</ArtifactId>
<ArtifactPropertyName>Traveler Booking</ArtifactPropertyName>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405717</BlueprintUrl>
<Direction>From</Direction>
<IsSuspect>false</IsSuspect>
<Label>4405717: Traveler Booking</Label>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405717</Link>
<ProjectId>4405707</ProjectId>
<Type>Reuse</Type>
</Trace>
<Trace>
<ArtifactId>4405707</ArtifactId>
<ArtifactPropertyName>BP Airways 3.0</ArtifactPropertyName>
<BlueprintUrl>http://production.blueprintcloud.com?ArtifactId=4405707</BlueprintUrl>
<Direction>From</Direction>
<IsSuspect>false</IsSuspect>
<Label>4405707: BP Airways 3.0</Label>
<Link>http://production.blueprintcloud.com/api/v1/projects/4405707</Link>
<ProjectId>4405707</ProjectId>
<Type>Parent</Type>
</Trace>
</Traces>
<Version>1</Version>
</Artifact>
</Artifacts>
JSON Example

Request URI

https://production.blueprintcloud.com/api/v1/projects/4405707/artifacts?traces=all&attachments=true

Request Body

filter={artifact-type eq 'Business Process Diagram';}

Response Header

{'content-length': '2008', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Sat, 04 May 2013 10:47:33 GMT', 'expires': '-1', 'content-type': 'application/json; charset=utf-8', 'server': 'Blueprint'}

Response Body

[
{
"Id": 4405717,
"Name": "Traveler Booking",
"ProjectId": 4405707,
"Version": 5,
"ParentId": 4405707,
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405717",
"ArtifactTypeId": 317881,
"ArtifactTypeName": "Business Process Diagram",
"BaseArtifactType": "BusinessProcess",
"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
},
{
"Type": "Parent",
"Direction": "From",
"ProjectId": 4405707,
"ArtifactId": 4405707,
"ArtifactPropertyName": "BP Airways 3.0",
"Label": "4405707: BP Airways 3.0",
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405707",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707",
"IsSuspect": false
}
],
"Attachments": [
{
"Id": 103544,
"FileName": "Contract_of_Carriage.pdf",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405717/attachments/103544"
}
]
},
{
"Id": 4405788,
"Name": "Traveler Booking",
"ProjectId": 4405707,
"Version": 1,
"ParentId": 4405707,
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405788",
"ArtifactTypeId": 317881,
"ArtifactTypeName": "Business Process Diagram",
"BaseArtifactType": "BusinessProcess",
"AreAttachmentsReadOnly": true,
"AreDocumentReferencesReadOnly": true,
"Traces": [
{
"Type": "Reuse",
"Direction": "From",
"ProjectId": 4405707,
"ArtifactId": 4405717,
"ArtifactPropertyName": "Traveler Booking",
"Label": "4405717: Traveler Booking",
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405717",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405717",
"IsSuspect": false
},
{
"Type": "Parent",
"Direction": "From",
"ProjectId": 4405707,
"ArtifactId": 4405707,
"ArtifactPropertyName": "BP Airways 3.0",
"Label": "4405707: BP Airways 3.0",
"BlueprintUrl": "http://production.blueprintcloud.com?ArtifactId=4405707",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707",
"IsSuspect": false
}
],
"Attachments": [
{
"Id": 103545,
"FileName": "Contract_of_Carriage.pdf",
"Link": "http://production.blueprintcloud.com/api/v1/projects/4405707/artifacts/4405788/attachments/103545",
"IsReadOnly": true
}
]
}
]