AgileZen API Documentation

Attachments

Attachment Endpoints

List attachments within a story

GET https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/attachments

Retrieves the list of attachments from the specified story.

Requires Read access on the project.
Supports: Filters, Pagination

{
  "page": 1,
  "pageSize": 100,
  "totalPages": 1,
  "totalItems": 1,
  "items": [
    {
      "id": 1,
      "fileName": "plans.txt",
      "sizeInBytes": 3142,
      "contentType": "text/plain",
      "token": "22d72579249a4e1693075219e29b80a6"
    }
  ]
}
<?xml version="1.0" encoding="utf-8"?>
<attachments>
  <items>
    <attachment>
      <contentType>text/plain</contentType>
      <fileName>plans.txt</fileName>
      <id>1</id>
      <sizeInBytes>3142</sizeInBytes>
      <token>22d72579249a4e1693075219e29b80a6</token>
    </attachment>
  </items>
  <page>1</page>
  <pageSize>100</pageSize>
  <totalItems>1</totalItems>
  <totalPages>1</totalPages>
</attachments>

Create a new attachment

POST https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/attachments

Creates a new attachment in the specified story.

Requires ReadWrite access on the project.
Supports: Enrichments

The request data should contain one or more files in multipart encoding. File names and content types are inferred from the files themselves. If creating the attachment would cause you to exceed the limit of file storage for your account, AgileZen will return a 402 HTTP response code.

On success, returns the list of attachments created for the specified story.

{
  "page": 1,
  "pageSize": 100,
  "totalPages": 1,
  "totalItems": 1,
  "items": [
    {
      "id": 1,
      "fileName": "plans.txt",
      "sizeInBytes": 3142,
      "contentType": "text/plain",
      "token": "22d72579249a4e1693075219e29b80a6"
    }
  ]
}
<?xml version="1.0" encoding="utf-8"?>
<attachments>
  <items>
    <attachment>
      <contentType>text/plain</contentType>
      <fileName>plans.txt</fileName>
      <id>1</id>
      <sizeInBytes>3142</sizeInBytes>
      <token>22d72579249a4e1693075219e29b80a6</token>
    </attachment>
  </items>
  <page>1</page>
  <pageSize>100</pageSize>
  <totalItems>1</totalItems>
  <totalPages>1</totalPages>
</attachments>

Get an attachment

GET https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/attachments/{attachmentid}

Returns a single attachment.

Requires Read access on the project.
Supports: Enrichments

{
  "id": 1,
  "fileName": "plans.txt",
  "sizeInBytes": 3142,
  "contentType": "text/plain",
  "token": "22d72579249a4e1693075219e29b80a6"
}
<?xml version="1.0" encoding="utf-8"?>
<attachment>
  <contentType>text/plain</contentType>
  <fileName>plans.txt</fileName>
  <id>1</id>
  <sizeInBytes>3142</sizeInBytes>
  <token>22d72579249a4e1693075219e29b80a6</token>
</attachment>

Update an attachment

PUT https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/attachments/{attachmentid}

Updates the filename on a certain attachment.

Requires ReadWrite access on the project.
Supports: Enrichments

The request data should be an object with text property.

PropertyTypeDescription
filenamestringThe filename of the attachment.

On success, returns the updated attachment.

{
  "id": 1,
  "fileName": "plans.txt",
  "sizeInBytes": 3142,
  "contentType": "text/plain",
  "token": "22d72579249a4e1693075219e29b80a6"
}
<?xml version="1.0" encoding="utf-8"?>
<attachment>
  <contentType>text/plain</contentType>
  <fileName>plans.txt</fileName>
  <id>1</id>
  <sizeInBytes>3142</sizeInBytes>
  <token>22d72579249a4e1693075219e29b80a6</token>
</attachment>

Delete an attachment

DELETE https://agilezen.com/api/v1/projects/{projectid}/stories/{storyid}/attachments/{attachmentid}

Deletes the specified attachment.

Requires ReadWrite access on the project.

On success, returns an empty result with a 200 status code.

Filters

There are currently no filters available for attachments.

Enrichments

There are currently no enrichments available for attachments.