Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Elias Zeidan Atlassian Team Mar 10, 2020

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
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

50 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you