{"swagger":"2.0","info":{"version":"2.1","title":"7pace Timetracker API Reference","description":"## Authorized Access\n Authorized access in Timetracker for DevOps Server/Services has different implementations. Please use proper approach.\n \n ### Authorized Access in Timetracker for DevOps Services\n\n For authorized access to Timetracker's API, we use OAuth 2.0 Authorization Framework. OAuth 2.0 supports the following grants (by grants, we mean ways of retrieving an access token): \n \n 1. Authorization Code Flow is the way that we initially obtain an access token.  \n     For more information on the OAuth 2.0 Authorization Code Flow, see section 4.1 of the OAuth 2.0 specification: https://tools.ietf.org/html/rfc6749#section-4.1.\n 2. RefreshTokens is the way we update expired access tokens.\n     For more information on Refresh Tokens, see section 1.5: https://tools.ietf.org/html/rfc6749#section-1.5. \n \n Note: Please use **OpenApi** as client_id to authorize any external application.\n \n \n ### Authorized Access in Timetracker for DevOps Server\n To use Timetracker REST/SignalR API in DevOps Server environment you don't need tokens. All requests must be authorized with NTLM authorization. Here you can check example for Node.js: https://support.7pace.com/hc/en-us/articles/115002713186#Node. \n \n **To see details on authorizing access to API please see our documentation: https://www.7pace.com/redir/api-auth**\n \n ### Implementation\n \nTimetracker has this set of APIs:\n \n 1. RESTful API \n 2. OData API\n 3. SignalR\n   For an introduction to SignalR , please see: (https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/introduction-to-signalr)\n"},"consumes":[],"produces":[],"paths":{"/api/tracking/client/current/{expand}":{"get":{"tags":["Client"],"description":"Get current state\n","operationId":"Client_CurrentByExpand","consumes":[],"produces":["application/json","application/xml"],"parameters":[{"name":"expand","in":"path","description":"If set to true additional details will be returned","required":true,"type":"boolean"},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/api/tracking/client/selected":{"post":{"tags":["Client"],"description":"Set work item id, remark, activity type as current tracking state and return work item data if exists for this work item id or remark for non-DevOps items","operationId":"Client_Selected","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"model","in":"body","description":"<b>CalculateTotals:</b> If set to true TotalMeLength and TotalTeamLength will be calculated. <br /><b>TfsId:</b> Work item id. <br /><b>Remark:</b> Could be used as comment for track or non-DevOps identifier. <br /><b>ActivityTypeId:</b> Activity type.","required":true,"schema":{"$ref":"#/definitions/selectedParameters"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/track"}}},"deprecated":false}},"/api/tracking/client/latest/{count}":{"get":{"tags":["Client"],"description":"Return a list with latest tracks","operationId":"Client_LatestByCount","consumes":[],"produces":["application/json","application/xml"],"parameters":[{"name":"count","in":"path","description":"Number of tracks to return","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/latestWorkLogsModel"}}},"deprecated":false}},"/api/tracking/client/startTracking":{"post":{"tags":["Client"],"description":"Start new tracking session","operationId":"Client_StartTracking","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"model","in":"body","description":"<b>TimeZone:</b> Time zone offset in minutes. <br /><b>TfsId:</b> Work Item id. <br /><b>Remark:</b> Comment or non-DevOps identifier. <br /><b>ActivityTypeId:</b> Activity type id.","required":true,"schema":{"$ref":"#/definitions/startTrackingParameters"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/api/tracking/client/stopTracking/{reason}":{"post":{"tags":["Client"],"description":"Stop current tracking session","operationId":"Client_StopTrackingByReason","consumes":[],"produces":["application/json","application/xml"],"parameters":[{"name":"reason","in":"path","description":"Use \"0\" for stoped by client reason; Use \"1\" for stoped by PC/Mac/Device lock or other obvious inactive state (if enabled)","required":true,"type":"integer","format":"int32","enum":[0]},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/api/tracking/client/idleCheck/{selectedOption}":{"post":{"tags":["Client"],"description":"Notify system about time of the next idle check","operationId":"Client_IdleCheckBySelectedoption","consumes":[],"produces":["application/json","application/xml"],"parameters":[{"name":"selectedOption","in":"path","description":"Use \"0\" for 1 hour, \"1\" - tomorrow morning and \"2\" - next monday","required":true,"type":"integer","format":"int32","enum":[0,1,2]},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/api/tracking/client/activityCheck":{"post":{"tags":["Client"],"description":"Notify system that you are still active","operationId":"Client_ActivityCheck","consumes":[],"produces":["application/json","application/xml"],"parameters":[{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/api/tracking/client/adjust":{"post":{"tags":["Client"],"description":"Change a remark or activity type for current track","operationId":"Client_Adjust","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"model","in":"body","required":true,"schema":{"$ref":"#/definitions/adjustTrackingParameters"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/api/tracking/client/search":{"post":{"tags":["Client"],"description":"Search for a work item in DevOps Server/Services with suitable id or title","operationId":"Client_Search","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"query","in":"body","description":"String with work item id or title part","required":true,"schema":{"type":"string"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/searchResultModel"}}},"deprecated":false}},"/api/tracking/client/searchByQuery":{"post":{"tags":["Client"],"description":"Search for a work item in DevOps Server/Services with suitable id or title","operationId":"Client_Search","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"model","in":"body","required":true,"schema":{"$ref":"#/definitions/searchParameters"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/searchResultModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:current":{"get":{"tags":["Client (SignalR)"],"description":"This SignalR enpoint equals to REST '/api/tracking/client/current/{expand}', method: current\n","operationId":"SignalR_Client_CurrentByExpand","consumes":[],"produces":["application/json"],"parameters":[{"name":"expand","in":"query","description":"If set to true additional details will be returned","required":true,"type":"boolean"},{"$ref":"#/parameters/collectionName"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:selected":{"get":{"tags":["Client (SignalR)"],"description":"Set work item id, remark, activity type as current tracking state and return work item data if exists for this work item id or remark for non-DevOps items","operationId":"SignalR_Selected","produces":["application/json","application/xml"],"parameters":[{"name":"model","in":"body","description":"<b>CalculateTotals:</b> If set to true TotalMeLength and TotalTeamLength will be calculated. <br /><b>TfsId:</b> Work item id. <br /><b>Remark:</b> Could be used as comment for track or non-DevOps identifier. <br /><b>ActivityTypeId:</b> Activity type.","required":true,"schema":{"$ref":"#/definitions/selectedParameters"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/track"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:latest":{"get":{"tags":["Client (SignalR)"],"description":"This SignalR enpoint equals to REST '/api/tracking/client/latest/{expand}'","operationId":"SignalR_Client_Latest","consumes":[],"produces":["application/json"],"parameters":[{"name":"count","in":"query","description":"Number of tracks to return","required":true,"type":"integer","format":"int32"},{"$ref":"#/parameters/collectionName"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/latestWorkLogsModel"}}}}},"/signalr/trackingHub/v2.1:startTracking":{"get":{"tags":["Client (SignalR)"],"description":"Start new tracking session","operationId":"SignalR_StartTracking","parameters":[{"name":"model","in":"body","description":"<b>TimeZone:</b> Time zone offset in minutes. <br /><b>TfsId:</b> Work item id. <br /><b>Remark:</b> Comment or non-DevOps identifier. <br /><b>ActivityTypeId:</b> Activity type id.","required":true,"schema":{"$ref":"#/definitions/startTrackingParameters"}},{"$ref":"#/parameters/collectionName"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:stopTracking":{"get":{"tags":["Client (SignalR)"],"description":"Stops tracking","operationId":"SignalR_StopTracking","parameters":[{"name":"reason","in":"query","description":"Use \"0\" for stoped by client reason; Use \"1\" for stoped by PC/Mac/Device lock or other obvious inactive state (if enabled)","required":true,"type":"integer","format":"int32","enum":[0]},{"$ref":"#/parameters/collectionName"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:idleCheck":{"get":{"tags":["Client (SignalR)"],"description":"Notify system about time of the next idle check","operationId":"SignalR_idleCheck","parameters":[{"name":"selectedOption","in":"path","description":"Use \"0\" for 1 hour, \"1\" - tomorrow morning and \"2\" - next monday","required":true,"type":"integer","format":"int32","enum":[0,1,2]},{"$ref":"#/parameters/collectionName"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:activityCheck":{"get":{"tags":["Client (SignalR)"],"description":"Notify system that you are still active","operationId":"SignalR_ActivityCheck","parameters":[{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:adjust":{"get":{"tags":["Client (SignalR)"],"description":"Change a remark or activity type for current track","operationId":"SignalR_Adjust","parameters":[{"name":"model","in":"body","required":true,"schema":{"$ref":"#/definitions/adjustTrackingParameters"}},{"$ref":"#/parameters/collectionName"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:ping":{"get":{"tags":["Client (SignalR)"],"summary":"Heartbeat, if needed","operationId":"SignalR_Ping","parameters":[{"$ref":"#/parameters/collectionName"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/trackingStateModel"}}},"deprecated":false}},"/signalr/trackingHub/v2.1:search":{"get":{"tags":["Client (SignalR)"],"description":"Search for a work item in DevOps Server/Services with suitable id or title","operationId":"SignalR_search","parameters":[{"name":"query","in":"body","description":"String with work item id or title part","required":true,"schema":{"type":"string"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/searchResultModel"}}},"deprecated":false}},"/api/pin/create":{"post":{"tags":["Pin"],"description":"Creates new pairing PIN and Secret. See https://www.7pace.com/redir/api-auth for details\n","operationId":"Pin_Create","consumes":[],"produces":["application/json","application/xml"],"parameters":[{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pinContext"}}},"deprecated":false}},"/api/pin/status":{"post":{"tags":["Pin"],"description":"Returns state of PIN","operationId":"Pin_StatusBySecret","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","application/xml"],"parameters":[{"name":"secret","in":"body","description":"String with 'secret' value","required":true,"schema":{"type":"string"}},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pinStatus"}}},"deprecated":false}},"/api/odata/TimeExport(StartDate={startDate},EndDate={endDate},PopulateTopParentColumns={populateTopParentColumns},GroupTimeByDateByUser={groupTimeByDateByUser},IncludeBillable={includeBillable})":{"get":{"tags":["TimeEntryExport"],"description":"Export function to extract data from 7pace Timetracker for selected timeframe\n","operationId":"TimeEntryExport_TimeExportByStartdateAndEnddateAndPopulatetopparentcolumnsAndGrouptimebydatebyuserAndIncludebillable","consumes":[],"produces":["application/json","application/xml"],"parameters":[{"name":"startDate","in":"path","description":"Should be in format \"yyyy-MM-dd\". Beginning of export timeframe","required":true,"type":"string"},{"name":"endDate","in":"path","description":"Should be in format \"yyyy-MM-dd\". End of export timeframe","required":true,"type":"string"},{"name":"populateTopParentColumns","in":"path","description":"If set to true, for each time entry calculates top parent work item and it's values (Work Item ID, Title and Effort). Default: false","required":true,"type":"boolean"},{"name":"groupTimeByDateByUser","in":"path","description":"If set to true, time tracked for the same Work Item ID in one day, by the same user, is grouped as a single export entry","required":true,"type":"boolean"},{"name":"includeBillable","in":"path","description":"If set to true, additional billable columns and grouping criteria are filled. Default: true","required":true,"type":"boolean"},{"$ref":"#/parameters/api-version"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/List[ExportItemViewModelApi]"}}},"deprecated":false}}},"definitions":{"trackingStateModel":{"type":"object","properties":{"track":{"$ref":"#/definitions/track"},"trackSettings":{"$ref":"#/definitions/trackSettings"},"settings":{"$ref":"#/definitions/settings"},"timestamp":{"format":"int64","type":"integer","description":"If timestamp of new state is older then current, new state should be rejected"}}},"track":{"type":"object","properties":{"tfsId":{"format":"int32","type":"integer","description":"nullable"},"remark":{"type":"string"},"activityTypeId":{"type":"string","format":"guid"},"workItem":{"$ref":"#/definitions/workItem"},"trackingState":{"format":"string","enum":["tracking","idle","idleCheck","activityCheck","clientInputRequired"],"type":"string","description":"state\n   * `tracking` (0) - currently tracking\n   * `idle` (1) - idle\n   * `idleCheck` (2) - checking if user is idle right now (not implemented)\n   * `activityCheck` (3) - checking if user still tracking\n   * `clientInputRequired` (4) - track was stopped by the server and user should react to it (use with \"stoppedTrackType\")\n"},"stoppedTrackType":{"format":"int32","enum":["Tracking = 0","StoppedByActivityCheck = 1","StoppedByPing = 2","StoppedByClientCondition = 3","StoppedByMaxSingleTrackLengthExceeded = 4","Idle = 5","StoppedByConcurency = 6"],"type":"integer"},"activityCheck":{"$ref":"#/definitions/activityCheckState"},"currentTrackLength":{"format":"int32","type":"integer","description":"(nullable) Length of current track in seconds\n"},"totalMeTodayLength":{"format":"int32","type":"integer","description":"nullable"},"totalMeLength":{"format":"int32","type":"integer","description":"nullable"},"totalTeamLength":{"format":"int32","type":"integer"},"trackAdjustmentLength":{"format":"int32","type":"integer","description":"nullable"},"currentTrackStartedDateTime":{"format":"date-time","type":"string","description":"nullable"},"trackStatusChangeDate":{"format":"date-time","type":"string"},"trackTimeZone":{"format":"int32","type":"integer","description":"nullable"}}},"trackSettings":{"type":"object","properties":{"isTrackingStartAllowed":{"type":"boolean"},"responseState":{"format":"string","enum":["OK","Warning","Error","AuthError"],"type":"integer"},"responseMessage":{"type":"string"}},"description":"Each response with \"trackingStateModel\" contains this object where status is kept. In case of \"Warning\" or \"Error\" message is set to \"responseMessage\". This message should be displayed to the user"},"settings":{"type":"object","properties":{"activityType":{"$ref":"#/definitions/activityTypeSettings"},"userInfo":{"$ref":"#/definitions/userInfo"}},"description":"When not null, should override existing values. When null existing values should be kept"},"activityCheckState":{"type":"object","properties":{"isRunning":{"type":"boolean"},"secondsLeft":{"format":"int32","type":"integer"}},"description":"Represents if activity check is initiated by the server and amount of seconds left. Null should overwrite existing value"},"activityTypeSettings":{"type":"object","properties":{"isEnabled":{"type":"boolean"},"defaultActivity":{"type":"string"},"activityTypes":{"type":"array","items":{"$ref":"#/definitions/activityTypeSetting"}}}},"activityTypeSetting":{"type":"object","properties":{"id":{"type":"string"},"color":{"type":"string"},"name":{"type":"string"},"isDefault":{"type":"boolean"},"isNotSet":{"type":"boolean"}}},"userInfo":{"type":"object","properties":{"userId":{"type":"string"},"userName":{"type":"string"},"userUniqueName":{"type":"string","description":"Email for DevOps Services, Domain/login for DevOps Server"},"encodedImage":{"type":"string","description":"Image only avialable for DevOps Services version. Image encoded in base64 string"},"applicationVersion":{"type":"string"},"teamServicesUrl":{"type":"string"}}},"searchResultModel":{"type":"object","properties":{"query":{"type":"string"},"workItems":{"type":"array","items":{"$ref":"#/definitions/workItemSearch"}},"count":{"format":"int32","type":"integer","readOnly":true}}},"workItem":{"type":"object","properties":{"id":{"format":"int32","type":"integer"},"title":{"type":"string"},"color":{"type":"string"},"teamProject":{"type":"string"},"type":{"type":"string"},"workItemLink":{"type":"string"},"effort":{"format":"float","type":"number"},"parent":{"$ref":"#/definitions/workItem"}}},"workItemSearch":{"type":"object","properties":{"groupName":{"type":"string"},"workItem":{"$ref":"#/definitions/workItem"}}},"latestWorkLogsModel":{"type":"object","properties":{"count":{"format":"int32","type":"integer"},"workLogs":{"type":"array","items":{"$ref":"#/definitions/workLog"}}}},"workLog":{"type":"object","properties":{"id":{"type":"string"},"remark":{"type":"string"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"periodLength":{"format":"double","type":"number"},"activityTypeId":{"type":"string"},"workItem":{"$ref":"#/definitions/workItem"}}},"startTrackingParameters":{"type":"object","properties":{"timeZone":{"format":"int32","type":"integer"},"tfsId":{"format":"int32","type":"integer","description":"nullable"},"remark":{"type":"string"},"activityTypeId":{"type":"string"}}},"adjustTrackingParameters":{"type":"object","properties":{"remark":{"type":"string"},"activityTypeId":{"type":"string"}}},"searchParameters":{"type":"object","properties":{"query":{"type":"string"}}},"selectedParameters":{"type":"object","properties":{"tfsId":{"format":"int32","type":"integer","description":"nullable"},"remark":{"type":"string"},"activityTypeId":{"type":"string"},"calculateTotals":{"type":"boolean"}}},"pinContext":{"type":"object","properties":{"pin":{"type":"string"},"secret":{"type":"string"}}},"pinStatus":{"type":"object","properties":{"status":{"type":"string","enum":["WrongOrExpired","Validated","Validating"]}}},"List[ExportItemViewModelApi]":{"type":"object","properties":{"@odata.context":{"type":"string"},"value":{"type":"array","items":{"$ref":"#/definitions/ExportItemViewModelApi"}}}},"ExportItemViewModelApi":{"type":"object","properties":{"RowID":{"type":"string"},"UserID":{"type":"string"},"UserEmail":{"type":"string"},"TeamMember":{"type":"string"},"TFSID":{"format":"int32","type":"integer"},"TFSTitle":{"type":"string"},"Comment":{"type":"string"},"RecordDate":{"format":"date-time","type":"string"},"RecordDateStop":{"format":"date-time","type":"string"},"TimeTracked":{"format":"double","type":"number"},"ActivityType":{"type":"string"},"TrackedTimeType":{"type":"string"},"WorkItemType":{"type":"string"},"TeamProject":{"type":"string"},"Effort":{"format":"double","type":"number"},"StoryPoints":{"format":"double","type":"number"},"OriginalEstimate":{"format":"double","type":"number"},"CompletedWork":{"format":"double","type":"number"},"Budget":{"type":"string"},"BudgetID":{"type":"string"},"InheritedBudget":{"type":"boolean"},"BudgetHours":{"format":"int32","type":"integer"},"BudgetClosed":{"type":"boolean"},"BudgetClosedDate":{"format":"date-time","type":"string"},"ProjectID":{"type":"string"},"IterationID":{"format":"int32","type":"integer"},"IterationPath":{"type":"string"},"AreaPath":{"type":"string"},"TopTFSID":{"format":"int32","type":"integer"},"TopTFSTitle":{"type":"string"},"TopTFSStoryPoint":{"format":"double","type":"number"},"ParentTFSID":{"format":"int32","type":"integer"},"ParentTFSTitle":{"type":"string"},"ParentTFSStoryPoint":{"format":"double","type":"number"},"WorkItemState":{"type":"string"},"DurationInSeconds":{"format":"double","type":"number"},"IsBillable":{"type":"boolean"},"BillablePeriodLength":{"format":"double","type":"number"},"ApprovalState":{"type":"string"},"ApprovedByUserName":{"type":"string"},"ApprovedByUserEmail":{"type":"string"},"AssignedApproverUserName":{"type":"string"},"AssignedApproverUserEmail":{"type":"string"},"ApprovalDate":{"format":"date-time","type":"string"}}}},"parameters":{"api-version":{"name":"api-version","in":"query","description":"Timetracker API version. <b>2.1</b> for this document","required":true,"type":"string"},"collectionName":{"name":"collectionName","in":"query","description":"Collection name in Timetracker for DevOps Server,  can be replaced with DefaultCollection in DevOps Services\n","required":true,"type":"string"}},"responses":{},"securityDefinitions":{},"security":[],"tags":[{"name":"Client","description":"API for tracking\n"},{"name":"Client (SignalR)","description":"Mirrored API for SignalR from REST Client API\n"},{"name":"Pin","description":"Pairing API for clients\n"},{"name":"TimeEntryExport","description":"OData Reporting API"}]}