How Orangescrum API Works?

Creating a new task is as easy as posting to the create_task endpoint with a data block containing the fields you'ld like to set on the task.

Steps below will guide you how Orangescrum API Works.

  1. Step 1:

    CREATE NEW API KEY

    Open API settings page and click on "Generate API Key" button to generate new API key. It will open a API create form popup. Select Project and Resource and click on Add button.

    http://demo.orangescrum.org/api-settings

    You can check the API by clicking test icon in action buttons. It will show a test form, where user can enter details to test the API.

  1. Step 2:

    CREATE TASK

    POST /create_task

    Creating a new task is as easy as POSTing to the /create_task endpoint with a data block containing the fields you’d like to set on the task. Any unspecified fields will take on default values.

    Every task is required to be created in a specific project, and this project cannot be changed once set. The project need be set explicitly with user to which task will be assigned.

  2. Step 3:

    Create a task (Uing API in PHP)

    $curl_post_data = array(
    'api' => text < api_key >,
    'title' => text < task title>,
    'description' => text < task description>,
    'due_date' => datetime < due_date >,
    'estimated_hour' => float ,
    );
    $counter = 1;
    if (is_array($_FILES) && count($_FILES) > 0) {
    foreach ($_FILES as $key => $value) {
    if ($value['name'] != '') {
    $tmp_name = $value['tmp_name'];
    $name = str_replace(" ", "_", basename($value['name']));
    $curl_post_data[ 'file'.$counter] = '@'.realpath($tmp_name)
    .";filename=" . $name;
    $counter++;
    }
    }
    }
    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,"< domain >/api/v1.0/create_task.json");
    curl_setopt($ch, CURLOPT_POST, 1)
    curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_arr);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $server_output = curl_exec($ch);
    $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
    $header = substr($server_output, 0, $header_size);
    $body = substr($server_output, $header_size);
    $info = curl_getinfo($ch);
    curl_close($ch);
  3. Step 4:

    Response Headers:

    404 : unauthorises
    601 : key missing
    602 : title missing
    603 : server error
    604 : empty request

24×7,We are there for you

Free Forum support is provided by the Orangescrum Community.

If you require any urgent or professional help, contact Orangescrum Professional Services team!