Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,463
Community Members
 
Community Events
177
Community Groups

Date fields in the Bamboo REST API

What is definition of the date fields in the REST API link, because the one returned by the API for example the startedDate is not the same as in the XSD (xs:dateTime) 

Screen Shot 2020-02-26 at 2.45.33 PM.jpg

 

1 answer

1 accepted

0 votes
Answer accepted

Hi Chattan,

Thank you for reaching out to the Atlassian Community!

I appreciate you calling out the discrepancy between the API documentation and the API results.

This REST API does not have an XML result, so the XSD would not be applicable here. That being said, however, the nodes with type="xs:dateTime" in the XSD for these endpoints (example below) are Unix timestamps in milliseconds.

<xs:complexType name="restDeploymentResult">
<xs:sequence>
<xs:element name="deploymentVersion" type="restDeploymentVersion" minOccurs="0"/>
<xs:element name="deploymentVersionName" type="xs:string" minOccurs="0"/>
<xs:element name="id" type="xs:long"/>
<xs:element name="deploymentState" type="buildState" minOccurs="0"/>
<xs:element name="lifeCycleState" type="lifeCycleState" minOccurs="0"/>
<xs:element name="startedDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="queuedDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="executedDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="finishedDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="reasonSummary" type="xs:string" minOccurs="0"/>
<xs:element name="key" type="restDeploymentResultKey" minOccurs="0"/>
<xs:element name="agent" type="restBuildAgent" minOccurs="0"/>
<xs:element ref="operations" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="restDeploymentVersion">
<xs:sequence>
<xs:element name="id" type="xs:long"/>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="creationDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="creatorUserName" type="xs:string" minOccurs="0"/>
<xs:element name="items" type="restDeploymentVersionItem" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="versionStatus" type="restDeploymentVersionStatus" minOccurs="0"/>
<xs:element ref="operations" minOccurs="0"/>
<xs:element name="creatorDisplayName" type="xs:string" minOccurs="0"/>
<xs:element name="creatorGravatarUrl" type="xs:string" minOccurs="0"/>
<xs:element name="planBranchName" type="xs:string" minOccurs="0"/>
<xs:element name="ageZeroPoint" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="restDeploymentVersionItem" abstract="true">
<xs:sequence>
<xs:element name="id" type="xs:long"/>
<xs:element name="name" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

 

For example the startedDate in your screenshot –

startedDate: 1582171641497,

this translates as:

  • Timestamp in milliseconds: 1582171641497
  • GMT: Thursday, February 20, 2020 4:07:21.497 AM
  • Unix Epoch: 1582171641
  • GMT: Thursday, February 20, 2020 4:07:21 AM

 

Please do not hesitate to reach out if you have any additional questions!

Cheers,

Elias | Bamboo Support

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events