REST API - Get Artifact Type Request

Updated by Stefenie Stockbridge

/api/v1/projects/{projectId}/metadata/artifactTypes/{artifactTypeId}?richtextasplain={richtextasplain}&inlinecss={inlinecss}

Description

Retrieves all artifact type objects from a project.

URL Structure

[Blueprint_URI]/api/v1/projects/{ProjectId}/metadata/artifacttypes/{ArtifactTypeId}
  • ProjectId: The ID of the project that contains the artifacts you want to get.
  • ArtifactTypeId: The ID of the artifact types you want to get.

Supported Methods

Request URI Parameters

  • 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.

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/220870/metadata/artifactTypes/11559?

Response Header

{'content-length': '4336', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Sat, 04 May 2013 14:59:14 GMT', 'expires': '-1', 'content-type': 'application/xml; charset=utf-8', 'server': 'Blueprint'}

Response Body

<?xml version="1.0" ?>
<ArtifactType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.blueprintsys.com/blueprint/api/v1">
<BaseArtifactType>TextualRequirement</BaseArtifactType>
<Description>Epic is a large User Story</Description>
<Id>11559</Id>
<IsUsedInThisProject>true</IsUsedInThisProject>
<Name>Epic(Agile Pack)</Name>
<Prefix>EP(Agile Pack)</Prefix>
<PropertyTypes>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>434</Id>
<IsReadOnly>true</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>ID</Name>
<IsMultiLine>false</IsMultiLine>
<IsRichText>false</IsRichText>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>435</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>true</IsRequired>
<Name>Name</Name>
<IsMultiLine>false</IsMultiLine>
<IsRichText>false</IsRichText>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>true</HasDefaultValue>
<Id>436</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Description</Name>
<DefaultValue><html><head></head><body style="padding: 1px 0px 0px; font-family: 'Portable User Interface'; font-size: 10.67px"><div style="padding: 0px"><p style="margin: 0px">&#x200b;</p></div></body></html></DefaultValue>
<IsMultiLine>true</IsMultiLine>
<IsRichText>true</IsRichText>
</PropertyType>
<PropertyType i:type="UserPropertyType">
<BasePropertyType>User</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>474</Id>
<IsReadOnly>true</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Created By</Name>
</PropertyType>
<PropertyType i:type="DatePropertyType">
<BasePropertyType>Date</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>475</Id>
<IsReadOnly>true</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Created On</Name>
<IsValidated>false</IsValidated>
</PropertyType>
<PropertyType i:type="UserPropertyType">
<BasePropertyType>User</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>476</Id>
<IsReadOnly>true</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Last Edited By</Name>
</PropertyType>
<PropertyType i:type="DatePropertyType">
<BasePropertyType>Date</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>477</Id>
<IsReadOnly>true</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Last Edited On</Name>
<IsValidated>false</IsValidated>
</PropertyType>
<PropertyType i:type="ChoicePropertyType">
<BasePropertyType>Choice</BasePropertyType>
<HasDefaultValue>true</HasDefaultValue>
<Id>3881</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Tshirt(Agile Pack)</Name>
<StandardPropertyTypeId>3878</StandardPropertyTypeId>
<AllowMultiple>false</AllowMultiple>
<DefaultValueIndex>0</DefaultValueIndex>
<IsCustomValueAllowed>false</IsCustomValueAllowed>
<ValidValues>
<ValidValue>XS</ValidValue>
<ValidValue>S</ValidValue>
<ValidValue>M</ValidValue>
<ValidValue>L</ValidValue>
<ValidValue>XL</ValidValue>
</ValidValues>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>4875</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>22</Name>
<StandardPropertyTypeId>4872</StandardPropertyTypeId>
<IsMultiLine>true</IsMultiLine>
<IsRichText>true</IsRichText>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>4905</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Standard Property 6</Name>
<StandardPropertyTypeId>4902</StandardPropertyTypeId>
<IsMultiLine>true</IsMultiLine>
<IsRichText>true</IsRichText>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>5036</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Standard Property 7</Name>
<StandardPropertyTypeId>5033</StandardPropertyTypeId>
<IsMultiLine>true</IsMultiLine>
<IsRichText>true</IsRichText>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>5099</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Standard Property 9</Name>
<StandardPropertyTypeId>5096</StandardPropertyTypeId>
<IsMultiLine>true</IsMultiLine>
<IsRichText>true</IsRichText>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>5130</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Standard Property 10</Name>
<StandardPropertyTypeId>5127</StandardPropertyTypeId>
<IsMultiLine>true</IsMultiLine>
<IsRichText>true</IsRichText>
</PropertyType>
<PropertyType i:type="TextPropertyType">
<BasePropertyType>Text</BasePropertyType>
<HasDefaultValue>false</HasDefaultValue>
<Id>5298</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>true</IsRequired>
<Name>Standard Property 12</Name>
<StandardPropertyTypeId>5295</StandardPropertyTypeId>
<IsMultiLine>true</IsMultiLine>
<IsRichText>true</IsRichText>
</PropertyType>
<PropertyType i:type="ChoicePropertyType">
<BasePropertyType>Choice</BasePropertyType>
<HasDefaultValue>true</HasDefaultValue>
<Id>6676</Id>
<IsReadOnly>false</IsReadOnly>
<IsRequired>false</IsRequired>
<Name>Standard Property 13</Name>
<StandardPropertyTypeId>6673</StandardPropertyTypeId>
<AllowMultiple>true</AllowMultiple>
<DefaultValueIndex>0</DefaultValueIndex>
<IsCustomValueAllowed>false</IsCustomValueAllowed>
<ValidValues>
<ValidValue>a</ValidValue>
<ValidValue>b</ValidValue>
</ValidValues>
</PropertyType>
</PropertyTypes>
<StandardArtifactTypeId>4038</StandardArtifactTypeId>
</ArtifactType>
JSON Example

Request URI

https://production.blueprintcloud.com/api/v1/projects/220870/metadata/artifactTypes/11559?

Response Header

{'content-length': '2240', 'pragma': 'no-cache', 'cache-control': 'no-cache', 'date': 'Sat, 04 May 2013 11:42:58 GMT', 'expires': '-1', 'content-type': 'application/json; charset=utf-8', 'server': 'Blueprint'}

Response Body

{
"Id": 11559,
"Name": "Epic(Agile Pack)",
"Description": "Epic is a large User Story",
"Prefix": "EP(Agile Pack)",
"BaseArtifactType": "TextualRequirement",
"StandardArtifactTypeId": 4038,
"IsUsedInThisProject": true,
"PropertyTypes":
[
{
"BasePropertyType": "Text",
"IsRichText": false,
"IsMultiLine": false,
"Id": 434,
"Name": "ID",
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": true
},
{
"BasePropertyType": "Text",
"IsRichText": false,
"IsMultiLine": false,
"Id": 435,
"Name": "Name",
"IsRequired": true,
"HasDefaultValue": false,
"IsReadOnly": false
},
{
"BasePropertyType": "Text",
"IsRichText": true,
"IsMultiLine": true,
"DefaultValue": "?",
"Id": 436,
"Name": "Description",
"IsRequired": false,
"HasDefaultValue": true,
"IsReadOnly": false
},
{
"BasePropertyType": "User",
"Id": 474,
"Name": "Created By",
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": true
},
{
"BasePropertyType": "Date",
"IsValidated": false,
"Id": 475,
"Name": "Created On",
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": true
},
{
"BasePropertyType": "User",
"Id": 476,
"Name": "Last Edited By",
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": true
},
{
"BasePropertyType": "Date",
"IsValidated": false,
"Id": 477,
"Name": "Last Edited On",
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": true
},
{
"BasePropertyType": "Choice",
"IsCustomValueAllowed": false,
"AllowMultiple": false,
"ValidValues":
[
"",
"XS",
"S",
"M",
"L",
"XL"
],
"DefaultValueIndex": 0,
"Id": 3881,
"Name": "Tshirt(Agile Pack)",
"StandardPropertyTypeId": 3878,
"IsRequired": false,
"HasDefaultValue": true,
"IsReadOnly": false
},
{
"BasePropertyType": "Text",
"IsRichText": true,
"IsMultiLine": true,
"Id": 4875,
"Name": "22",
"StandardPropertyTypeId": 4872,
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": false
},
{
"BasePropertyType": "Text",
"IsRichText": true,
"IsMultiLine": true,
"Id": 4905,
"Name": "Standard Property 6",
"StandardPropertyTypeId": 4902,
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": false
},
{
"BasePropertyType": "Text",
"IsRichText": true,
"IsMultiLine": true,
"Id": 5036,
"Name": "Standard Property 7",
"StandardPropertyTypeId": 5033,
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": false
},
{
"BasePropertyType": "Text",
"IsRichText": true,
"IsMultiLine": true,
"Id": 5099,
"Name": "Standard Property 9",
"StandardPropertyTypeId": 5096,
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": false
},
{
"BasePropertyType": "Text",
"IsRichText": true,
"IsMultiLine": true,
"Id": 5130,
"Name": "Standard Property 10",
"StandardPropertyTypeId": 5127,
"IsRequired": false,
"HasDefaultValue": false,
"IsReadOnly": false
},
{
"BasePropertyType": "Text",
"IsRichText": true,
"IsMultiLine": true,
"Id": 5298,
"Name": "Standard Property 12",
"StandardPropertyTypeId": 5295,
"IsRequired": true,
"HasDefaultValue": false,
"IsReadOnly": false
},
{
"BasePropertyType": "Choice",
"IsCustomValueAllowed": false,
"AllowMultiple": true,
"ValidValues":
[
"a",
"b"
],
"DefaultValueIndex": 0,
"Id": 6676,
"Name": "Standard Property 13",
"StandardPropertyTypeId": 6673,
"IsRequired": false,
"HasDefaultValue": true,
"IsReadOnly": false
}
]
}


How did we do?