GitScrum REST API Introduction

GitScrum is a platform for managing projects and tasks, and it provides a set of APIs to access its resources. These APIs follow the REST architectural pattern, and use the HTTP protocol to expose their functionality over the internet.

REST API Definition

REST stands for Representational State Transfer, which is an architectural pattern that describes how distributed systems can expose a consistent interface. REST APIs are accessed using the HTTP protocol at a predefined set of URLs, and they can return data in various formats, such as JSON, HTML, audio files, or images.

API Resources

In GitScrum, various resources are represented by URLs, and each resource has one or more methods that can be performed on it over HTTP, such as GET, POST, PUT, and DELETE. The action represented by these methods are:

  • GET: retrieve data from a resource
  • POST: create a new resource
  • PUT: update an existing resource
  • DELETE: delete a resource

API Usage

o access the GitScrum REST APIs, you can either use direct HTTP requests or use the GitScrum helper libraries for different programming languages. The API reference documentation can be found throughout the GitScrum product documentation.

Note: It is important to understand the use of POST and PUT methods, as they have specific meanings when working with REST APIs. POST is used to create resources, while PUT is used to update resources.

Getting API Credentials for GitScrum in Project Settings

If you’re the project owner or an administrator, you’re able to retrieve your project’s API credentials by following these simple steps:

  1. Navigate to your project
  2. Select the “Project Settings” option
  3. Click on the “API” tab

With these three steps, you’ll reach the page where you can access and obtain your project’s API credentials.

With the latest GitScrum API, you can now access and manipulate your project’s data effortlessly through programming.

This API opens up endless possibilities for you to enhance GitScrum’s core functionality and develop cutting-edge third-party applications. To ensure secure access to the API, you will require your API ID and Project Key, which serve as your authentication credentials for your API requests.

Here is an example of how to use the endpoint “https://api.gitscrum.com/tasks/?project_key=PROJECT_KEY&api_id=API_ID” in a Python script to retrieve a list of tasks in a specific project:

import requests

# Replace PROJECT_KEY and API_ID with your actual credentials
endpoint = "https://api.gitscrum.com/tasks/?project_key=PROJECT_KEY&api_id=API_ID"

# Make a GET request to the endpoint
response = requests.get(endpoint)

# Check if the request was successful
if response.status_code == 200:
    # Get the JSON data from the response
    data = response.json()

    # Print the list of tasks
    for task in data:
        print("Task:", task['title'], "Status:", task['status'])
else:
    print("Failed to retrieve tasks. Error code:", response.status_code)

This script makes a GET request to the endpoint using the requests library, and retrieves a list of tasks in JSON format. It then prints the title and status of each task.

Query String Parameters

  • API_ID
  • PROJECT_KEY

Response Status Code – 200 OK

{
   "uuid":"49ff4ca2-f441-41fa-8a86-4cc3e3b2a54f",
   "code":"#projd-108",
   "effort":{
      "title":"Template Task Effort 1",
      "effort":"1.00"
   },
   "type":{
      "title":"Template Task Type 1",
      "color":"#38FB07"
   },
   "timer":true,
   "has_sprints":true,
   "has_user_stories":true,
   "workflow":{
      "id":3767,
      "slug":"teste-1-6358dc3b0fb49",
      "state":0,
      "title":"teste-1",
      "color":"#2D0099"
   },
   "parent_id":null,
   "image":null,
   "labels":[],
   "slug":"new-task",
   "state":null,
   "title":"new task",
   "description":"",
   "user":{
      "name":"Renato Marinho de Carvalho",
      "headline":"GitScrum Founder",
      "username":"renato.marinho",
      "avatar":"https://gitscrum-storage-avatars.s3.amazonaws.com/5467e2bdd31886166112fea09debe9f72aae06dd.png"
   },
   "users":[],
   "features":[],
   "completed_user":null,
   "completed_date":[],
   "start_date":[],
   "due_date":[],
   "created_at":{
      "date_for_humans":"1 second ago",
      "timezone":"2023-01-28 9:07:47",
      "timestamp":1674896867
   },
   "settings":{
      "is_blocker":false,
      "is_bug":false,
      "is_draft":false,
      "is_archived":true
   },
   "time_tracker":null,
   "time_tracker_user":null,
   "stats":{
      "votes":0,
      "fields":0,
      "time_trackers":0,
      "comments":0,
      "checklists":0,
      "attachments":0,
      "subtasks":0,
      "videos":0,
      "checklist_percentage":0
   },
   "company":{
      "slug":"gitscrum",
      "name":"GitScrum",
      "logo":"https://gitscrum-storage-avatars.s3.amazonaws.com/37720bcf1e2f3340c54153d4e999c463f27c25c9.png",
      "header_logo":"https://gitscrum-static.s3.amazonaws.com/img/gitscrum-black.png",
      "header_color":"#882A2A",
      "favicon":"https://gitscrum-storage-avatars.s3.amazonaws.com/9575b6c36682f58fd61e981ae843aac6e6e34263.png",
      "owner":{
         "name":"Renato Marinho de Carvalho",
         "headline":"GitScrum Founder",
         "username":"renato.marinho",
         "avatar":"https://gitscrum-storage-avatars.s3.amazonaws.com/5467e2bdd31886166112fea09debe9f72aae06dd.png"
      }
   },
   "project":{
      "slug":"project-name-undefined",
      "name":"Project Name Undefined",
      "pure_name":"Project Name Undefined",
      "logo":"https://site.gitscrum.com/images/avatar.png",
      "visibility":{
         "is_private":true,
         "title":"Public"
      },
      "recurring":{
         "enabled":true,
         "max_used":false,
         "limit":999,
         "active":0
      },
      "owner":{
         "name":"Renato Marinho de Carvalho",
         "headline":"GitScrum Founder",
         "username":"renato.marinho",
         "avatar":"https://gitscrum-storage-avatars.s3.amazonaws.com/5467e2bdd31886166112fea09debe9f72aae06dd.png"
      }
   },
   "sprint":{
      "slug":null,
      "title":null
   },
   "user_story":{
      "slug":null,
      "title":null
   },
   "rating":0,
   "has_recurring":false,
   "is_favorite":false
}

Was this article helpful?

GitScrum REST API Documentation
GitScrum Real-Time Board – Collaborate Seamlessly, Anytime, Anywhere