Simplton API

Creating a new issue

Resource:[POST] https://simplton.com/list/{list-name}/new/issue.xml

Example: PHP client

    
$data = array(
  'comment' => 'New Issue',
  'status' => 1, // Optional: Status can be either 0 (closed) or 1 (active). Defaults to 1 if not provided. 
  'user_id' => 1, // Optional: User id must be numeric. If not provided if defaults to your user id. 
  'created_at' => '2010-04-20 09:12:35' // Optional: Created at must a valid datetime stamp. If not provided it defaults to now
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
// Substitute your list name with "label-app"
$resource = "https://simplton.com/list/label-app/new/issue.xml"; 

curl_setopt($ch,CURLOPT_URL,$resource);

$result = curl_exec($ch);	
$xml = new SimpleXMLElement($result);
$info = curl_getinfo($ch);
if($info['http_code'] == 201){
  // Success example returns the reference 
  /*
  <?xml version="1.0" encoding="UTF-8"?>
  <hash>
    <reference type="integer">81</reference>
  </hash>
  */

  
}else{
  // Failed $info['http_code'] == 500
  /* Example of a possible error or errors
  <?xml version="1.0" encoding="UTF-8"?>
  <errors>
    <error>Comment is required</error>
    <error>Status must be 0 (closed) or 1 (active)</error>
  </errors>
  */
}
curl_close($ch);

    

Revising a issue

Resource:[POST] https://simplton.com/list/{list-name}/revise/{reference number}.xml

Example: Ruby client

    require 'net/http'
    require 'net/https'

    url = URI.parse("https://simplton.com/list/{list-name}/revise/{reference}.xml")
    req = Net::HTTP::Post.new(url.path)
    req.basic_auth username,password

    req.set_form_data({
      'comment' => 'Revising the issue I just created', #Required
      'status'  => '1', #Optional. Defaults to 1 active if not provided.
      'user_id' => '1', #Optional. Defaults to API user id if not provided.
      'created_at' => '2010-04-20 09:12:35' #Optional. Defaults to current time stamp if not provided.
    })

    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    resp = http.start {|http| http.request(req) }
    if resp.code == 201
      p resp.body
    else
      # Otherwise status is 500
      p resp.body
    end
    
    

Remove a issue. (Admin only)

Resource:[GET] https://simplton.com/admin/{list-name}/delete/issue/{reference number}.xml

Example: Curl command line

      curl -u username:password https://simplton.com/admin/{list-name}/delete/issue/{reference}.xml
    

Remove all issues from a list. (Admin only and must be enabled per user)

Resource:[GET] https://simplton.com/admin/{list-name}/wipe/all/issues.xml

Example: Curl command line

      curl -u username:password https://simplton.com/admin/{list-name}/wipe/all/issues.xml
    

What is Simplton? Let's start with what it is not.

 
 
Terms & PrivacyCopyright ©