Documentation forSolarWinds Service Desk

Time Tracks

All time track examples are shown in the context of an incident, but can be applied for all objects that have time tracks.

Create a new time track:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X POST https://api.samanage.com/incidents/INCIDENT_ID/time_tracks.xml

XML Example:

<time_track>

  <name>TIME_TRACK_NAME</name>

  <minutes_parsed>ELAPSED_TIME_TO_RECORD</minutes_parsed>

</time_track>

JSON Example:

{

  "time_track": {

    "name": "TIME_TRACK_NAME",

    "minutes_parsed": ELAPSED_TIME_TO_RECORD

  }

}

Show list of time tracks:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X GET https://api.samanage.com/incidents/INCIDENT_ID/time_tracks.xml

Update a time track:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -d 'INPUT_XML' -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X PUT https://api.samanage.com/incidents/INCIDENT_ID/time_tracks/TIME_TRACK_ID.xml

Delete a time track:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X DELETE https://api.samanage.com/incidents/INCIDENT_ID/time_tracks/TIME_TRACK_ID.xml