FAQ

Frequently Asked Questions

The premium version of the extension is currently private in the DevOps marketplace.  To upgrade to the premium version you will need to sign a license agreement which will contain all terms we agree.  When this is done you will be given access with your unique REST API key.

We will do this for you as part of onboarding your license.  Just send us the CSV file downloaded from the free version admin page and we will do the rest.  We will also need you DevOps organisation ID.  It is in the top right corner of the TimeLog admin page. You will need to uninstall or stop updating the free version at this point

The REST API is only available in the premium version of the extension.

The documentation is here:-

Time Log REST API 0.3

This is the REST API URL you will need

https://boznet-timelogapi-test.azurewebsites.net/api/{organisationid}/timelog/query?code={API Key}

{organisationId} is in the top right corner of your Time Log Admin page
{APIKey} for the evaluation version is pfcooS75dcpEekjJvdsOvsY0FIJqrsoWicnyY1GQQVby2PVwVl0KBw==

 

Example:

How to get all time logged for work item id = 1

https://boznet-timelogapi-test.azurewebsites.net/api/{organisationid}/timelog/query?code={API Key}&workitemId=1

You can test this is your web browser.  Just paste it into the addres bar and if its correct you will get the time logs.

Filter passed in the URL separated by &. Date values are all in UTC

  • WorkItemId
  • ProjectId
  • FromDate
  • ToDate
  • CreatedOnFromDate
  • CreatedOnToDate
  • CreatedBy
  • UpdatedOnFromDate
  • UpdatedOnToDate
  • UpdatedBy
  • DeletedOnFromDate
  • DeletedOnToDate
  • DeletedBy
  • TimeTypeDescription
  • Week
  • UserId
  • UserName
  • TeamMembers : An array of GUID user IDs

 

Use PageSize and Page for paging results

  • Page
  • PageSize

 

Note: Deleted records are only returned if one of the following filters is included:-

  • DeletedOnFromDate
  • DeletedOnToDate
  • DeletedBy

You will need to get a DevOps PAT token first (https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page#create-a-pat)

Then add a request header to the DevOps request

“authorization”, “Basic ” + Base64 encoded personal access token. (you can encode it here https://www.base64encode.org/ certain tools like Postman and Power BI applies a Base64 encoding by default. If you are trying the API via such tools, Base64 encoding of the PAT is not required)

You can now use DevOps REST API

https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.1

 C# example

public static async void GetProjects()
{
    try
    {
        var personalaccesstoken = "PAT_FROM_WEBSITE";
        using (HttpClient client = new HttpClient())
        {
            client.DefaultRequestHeaders.Accept.Add(
                new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
                Convert.ToBase64String(
                    System.Text.ASCIIEncoding.ASCII.GetBytes(
                        string.Format("{0}:{1}", "", personalaccesstoken))));
            using (HttpResponseMessage response = await client.GetAsync(
                        "https://dev.azure.com/{organization}/_apis/projects"))
            {
                response.EnsureSuccessStatusCode();
                string responseBody = await response.Content.ReadAsStringAsync();
                Console.WriteLine(responseBody);
            }
        }
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.ToString());
    }
}

Let’s track your next project

TimeLog is ready to track your time on your next development project.

©  2023 TimeLog. All rights reserved. Website Design