API Endpoint Reference

Cytobank API Endpoint Reference

The Cytobank API is a RESTful JSON web API that extends use of basic and advanced functionality of the Cytobank Cloud to any software application. Learn more about the Cytobank API.

This v1 API endpoint reference documentation provides information and low-level instructions for access to each API endpoint via HTTP request. Higher level wrappers in programming languages such as R will be available in the near future.

If an endpoint can't be found on this page it doesn't exist yet. The Cytobank API is under continuous development. Look for exciting releases in the near future. Get in contact with Cytobank Support to request additional endpoints or get beta access to new API functionality.

Documentation Overview

Cytobank API endpoints are divided into different groups in this reference guide. These groups logically separate the different functionalities of Cytobank and the API endpoints that serve them. In order to find a functionality of interest, first consult the groups on the left for relevance. Click to expand a group in order to see the API endpoints inside it. Make sure to start with the Authentication section.

View an endpoint in this documentation for directions on how to access it via HTTP request and to read useful supporting information. The HTTP method (e.g. POST, GET, etc.), headers, example body, and example responses are shown where relevant.

Code Snippets

Code snippets in a variety of programming languages are shown for each request. The language shown can be adjusted at the top right of this page. Copy the snippets and execute them in the desired language in order to try the API in a simple context. Please note that code snippets are automatically generated and it's possible that not every snippet will work in every language. The exception to this are requests in cURL, which are all expected to work.

Replacing Bracketed Variables

Capitalized variables in double brackets, {{LIKE_THIS}}, should be replaced with actual values if examples from this documentation are being used directly. These bracketed variables appear throughout the documentation. For example:

https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate
...would become...
https://YourCytobank.cytobank.org/cytobank/api/v1/authenticate

"username": "{{user_name}}", "password": "{{userpassword}}"
...would become...
"username": "YourUsername", "password": "YourPassword"

Rate Limiting

Currently the Cytobank API has a default rate limit of 100 requests per 1 minute. If this rate is exceeded the server will respond with a 429 status code and an error message about the rate limits. Requests are binned per minute according to the clock on the server.

Error Codes and Messages

The Cytobank API will respond to requests with a HTTP status code and return content via JSON. In the case of an error, a status code will be accompanied by a useful message where possible. A variety of status codes are used and not all will be listed here. However, at a high level, anything in the 200 range indicates success, 400 range indicates a client-side error such as a malformatted request or disallowed operation, and 500 range indicates a server-side error. Keep in mind that Cytobank has a permissions framework that the API adheres to. If an error message of Not Authorized To Access Resource is encountered, double check the accessing account has proper access levels for the desired operation, or clone the experiment in question to make an accessible copy.





Attachments

Only FCS files can be analyzed in Cytobank, but any file can be uploaded as an attachment. Exported PDFs, statistics, and files also automatically attach themselves to the Experiment they are exported from. Interact with attachments using these endpoints. Learn more about attachments in Cytobank

GET List Attachments for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments

List the attachments in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Attachments for Experiment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show Attachment Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}

Show details for an attachment in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Attachment Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Upload Attachment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload

Upload an attachment to an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}
BODY

file
@{{FILE_NAME}}


Sample Request
Upload Attachment
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form 'file=@{{FILE_NAME}}'
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/upload"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Download Attachment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download

Download an attachment from an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Attachment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}/download"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Download All Attachments From Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip

Download a ZIP file of all attachments from an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download All Attachments From Experiment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/download_zip"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE Delete Attachment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}

Delete an attachment from an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Delete Attachment
curl --request DELETE \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  "method": "DELETE",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT Update Attachment Description
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}

Update an attachment description.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "attachments":
  {
    "description": "Description goes here..."
  }
}


Sample Request
Update Attachment Description
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"attachments\":\n  {\n    \"description\": \"Description goes here...\"\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"attachments\":\n  {\n    \"description\": \"Description goes here...\"\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}"

payload = "{\n  \"attachments\":\n  {\n    \"description\": \"Description goes here...\"\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ attachments: { description: 'Description goes here...' } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"attachments\":\n  {\n    \"description\": \"Description goes here...\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{ATTACHMENT_ID}}"

	payload := strings.NewReader("{\n  \"attachments\":\n  {\n    \"description\": \"Description goes here...\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Authentication

Every call to the Cytobank API must be accompanied by an authentication token. Tokens are generated from the Authenticate API endpoint with a username and password, or on a user profile page within Cytobank. Tokens should be kept secure as they confer access to the data and analyses of an account.

Tokens expire after 8 hours by default. If a request is attempted with an expired token the server will respond with a 419 status code and an error message about authentication timeout. Token time to expiration can be configured to a custom global value on Enterprise Cytobanks. Permanent API keys that do not expire cannot currently be generated except on Enterprise Cytobanks configured for this.

Use the Logout / Revoke API endpoints to invalidate one or all tokens for a user account. All issued tokens can be invalidated from the user profile page within Cytobank as well.

Accounts configured to login via SSO / SAML will need to generate an API access token from the user profile page within Cytobank after logging in. Tokens cannot be generated through the API by submitting username and password as is the case for normal username/password users.

POST Authenticate
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate

Post username and password to receive an authentication token. The token comes embedded in an object that describes the user that requested it.

HEADERS

Accept
application/json

charset
UTF-8

Content-Type
application/json
BODY

{
    "username": "{{USERNAME}}",
    "password": "{{PASSWORD}}"
}


Sample Request
Authenticate
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "charset": "UTF-8",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n    \"username\": \"{{USERNAME}}\",\n    \"password\": \"{{PASSWORD}}\"\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["charset"] = 'UTF-8'
request["content-type"] = 'application/json'
request.body = "{\n    \"username\": \"{{USERNAME}}\",\n    \"password\": \"{{PASSWORD}}\"\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate"

payload = "{\n    \"username\": \"{{USERNAME}}\",\n    \"password\": \"{{PASSWORD}}\"\n}"
headers = {
    'accept': "application/json",
    'charset': "UTF-8",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate",
  "headers": {
    "accept": "application/json",
    "charset": "UTF-8",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ username: '{{USERNAME}}', password: '{{PASSWORD}}' }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n    \"username\": \"{{USERNAME}}\",\n    \"password\": \"{{PASSWORD}}\"\n}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "charset: UTF-8",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/authenticate"

	payload := strings.NewReader("{\n    \"username\": \"{{USERNAME}}\",\n    \"password\": \"{{PASSWORD}}\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("charset", "UTF-8")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "user": {
    "id": 56,
    "username": "ChrisCicc",
    "location": "Mountain View",
    "organization": "Cytobank",
    "twitter": "",
    "bio": "Cytobanker",
    "firstName": "Chris",
    "lastName": "Ciccolella",
    "email": "redacted",
    "principalInvestigatorId": 56,
    "hideEmail": true,
    "createdAt": "2013-11-07T21:45:29Z",
    "updatedAt": "2016-07-26T21:42:23Z",
    "lastLoginAt": "2016-03-23T09:31:35Z",
    "lastLoginIp": "121.211.83.17",
    "admin": true,
    "invisible": false,
    "validated": true,
    "inactive": false,
    "emailVerified": true,
    "billingAdmin": true,
    "authToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIwM2IwOGIyODY5OGRmZWY5MzE5ZjkzZGU2NzRmNTkyNiIsImV4cCI6MTQ2OTU5ODE0MywiYXVkIjoiY3l0b2JhbmtfYXBpX3YxX3VzZXJzIiwidXNlcl9pZCI6NTYsImlhdCI6MTQ2OTU2OTM0MywiaXNzIjoiaHR0cHM6Ly91Y3NmLmN5dG9iYW5rLm9yZy8iLCJuYmYiOjE0Njk1NjkzNDMsInN1YiI6ImN5dG9iYW5rX2FwaV92MSJ9.77kk4eOl-G8AcXfM15B8Zm5uWQY4EcT9jEFMpIQyQIU"
  }
}
POST Logout
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout

Invalidate the token used in the call to this endpoint.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Logout
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/logout"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Revoke All Tokens
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens

Invalidate all existing tokens for the user making this call.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Revoke All Tokens
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_tokens"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Revoke all Tokens for any User (Admin only)
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens

Revoke all tokens for a given user. This endpoint only works for admins of the Cytobank being accessed.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{"user_id": {{USER_ID}}}


Sample Request
Revoke all Tokens for any User (Admin only)
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: application/json' \
  --data '{"user_id": {{USER_ID}}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\"user_id\": {{USER_ID}}}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\"user_id\": {{USER_ID}}}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens"

payload = "{\"user_id\": {{USER_ID}}}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\"user_id\": {{USER_ID}}}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"user_id\": {{USER_ID}}}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/revoke_user_tokens"

	payload := strings.NewReader("{\"user_id\": {{USER_ID}}}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

CITRUS

CITRUS is an algorithm designed for the fully automated discovery of statistically significant stratifying biological signatures within single cell datasets containing numerous samples across multiple known endpoints. Learn more about CITRUS in Cytobank.

GET List CITRUS Analyses
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus

List all CITRUS analyses in an experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List CITRUS Analyses
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show CITRUS Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}?include_settings=1

Show a specific CITRUS analysis in an experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show CITRUS Details
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}?include_settings=1' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}?include_settings=1",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}?include_settings=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}"

querystring = {"include_settings":"1"}

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}?include_settings=1",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}?include_settings=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}?include_settings=1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Create CITRUS
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/

Create a new CITRUS analysis with default settings.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{ 
  "name": "API CITRUS Experiment"
} 


Sample Request
Create CITRUS
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/ \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: application/json' \
  --data '{ 
  "name": "API CITRUS Experiment"
} '
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{ \n  \"name\": \"API CITRUS Experiment\"\n} "
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{ \n  \"name\": \"API CITRUS Experiment\"\n} "

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/"

payload = "{ \n  \"name\": \"API CITRUS Experiment\"\n} "
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ name: 'API CITRUS Experiment' }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{ \n  \"name\": \"API CITRUS Experiment\"\n} ",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/"

	payload := strings.NewReader("{ \n  \"name\": \"API CITRUS Experiment\"\n} ")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Update CITRUS Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}

Update CITRUS settings. Updates can only be made before running the CITRUS analysis. Learn more about CITRUS settings.

CHANNEL_ID is the normalizedShortNameId of the channel. This information is available from the Panels endpoints.

The integers in the fileGrouping attribute reference the respective {{FILE_GROUP}} from the fileGroupNames attribute in the order in which they appear starting from 0.

POPULATION.GATE_SET_ID parameter in the gateSetId attribute is the gateSetId attribute value of the population on which to run CITRUS. Note that this argument is the gateSetId attribute of a population object and not the ID of the object itself. This secondary ID is experiment-specific and will be a smaller number. An argument of 0 corresponds to the ungated population, i.e., the raw data with no filtering applied. Another term for a population is a "gate set" because it's a set of gates (learn more).

The clusteringCharacterization attribute can have a value of "medians" or "abundances".

The plotTheme attribute can have a value of "white" or "black". This corresponds to the values of "light" and "dark" in the Cytobank web interface.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
	"name": "API CITRUS Experiment - Update",
	"options":
	{
		"clusteringChannels": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],
		"statisticsChannels": [{{CHANNEL_ID_3}}],
		"fileGrouping": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],
		"fileGroupNames": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],
		"gateSetId": {{POPULATION.GATE_SET_ID}},
		"compensationId": {{COMP_ID}},
		"eventsPerFile": 2064,
		"minimumClusterSize": 5,
		"crossValidationFolds": 1,
		"falseDiscoveryRate": 1,
		"associationModels": ["sam","pamr","glmnet"],
		"clusteringCharacterization": "medians",
		"eventSamplingMethod": "equal",
		"normalizeScales": false,
		"plotTheme": "white"
	}
}


Sample Request
Update CITRUS Details
curl --request PUT \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: application/json' \
  --data '{

	"name": "API CITRUS Experiment - Update",

	"options":

	{

		"clusteringChannels": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],

		"statisticsChannels": [{{CHANNEL_ID_3}}],

		"fileGrouping": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],

		"fileGroupNames": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],

		"gateSetId": {{POPULATION.GATE_SET_ID}},

		"compensationId": {{COMP_ID}},

		"eventsPerFile": 2064,

		"minimumClusterSize": 5,

		"crossValidationFolds": 1,

		"falseDiscoveryRate": 1,

		"associationModels": ["sam","pamr","glmnet"],

		"clusteringCharacterization": "medians",

		"eventSamplingMethod": "equal",

		"normalizeScales": false,

		"plotTheme": "white"

	}

}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\r\n\t\"name\": \"API CITRUS Experiment - Update\",\r\n\t\"options\":\r\n\t{\r\n\t\t\"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r\n\t\t\"statisticsChannels\": [{{CHANNEL_ID_3}}],\r\n\t\t\"fileGrouping\": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r\n\t\t\"fileGroupNames\": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r\n\t\t\"gateSetId\": {{POPULATION.GATE_SET_ID}},\r\n\t\t\"compensationId\": {{COMP_ID}},\r\n\t\t\"eventsPerFile\": 2064,\r\n\t\t\"minimumClusterSize\": 5,\r\n\t\t\"crossValidationFolds\": 1,\r\n\t\t\"falseDiscoveryRate\": 1,\r\n\t\t\"associationModels\": [\"sam\",\"pamr\",\"glmnet\"],\r\n\t\t\"clusteringCharacterization\": \"medians\",\r\n\t\t\"eventSamplingMethod\": \"equal\",\r\n\t\t\"normalizeScales\": false,\r\n\t\t\"plotTheme\": \"white\"\r\n\t}\r\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\r\n\t\"name\": \"API CITRUS Experiment - Update\",\r\n\t\"options\":\r\n\t{\r\n\t\t\"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r\n\t\t\"statisticsChannels\": [{{CHANNEL_ID_3}}],\r\n\t\t\"fileGrouping\": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r\n\t\t\"fileGroupNames\": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r\n\t\t\"gateSetId\": {{POPULATION.GATE_SET_ID}},\r\n\t\t\"compensationId\": {{COMP_ID}},\r\n\t\t\"eventsPerFile\": 2064,\r\n\t\t\"minimumClusterSize\": 5,\r\n\t\t\"crossValidationFolds\": 1,\r\n\t\t\"falseDiscoveryRate\": 1,\r\n\t\t\"associationModels\": [\"sam\",\"pamr\",\"glmnet\"],\r\n\t\t\"clusteringCharacterization\": \"medians\",\r\n\t\t\"eventSamplingMethod\": \"equal\",\r\n\t\t\"normalizeScales\": false,\r\n\t\t\"plotTheme\": \"white\"\r\n\t}\r\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}"

payload = "{\r\n\t\"name\": \"API CITRUS Experiment - Update\",\r\n\t\"options\":\r\n\t{\r\n\t\t\"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r\n\t\t\"statisticsChannels\": [{{CHANNEL_ID_3}}],\r\n\t\t\"fileGrouping\": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r\n\t\t\"fileGroupNames\": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r\n\t\t\"gateSetId\": {{POPULATION.GATE_SET_ID}},\r\n\t\t\"compensationId\": {{COMP_ID}},\r\n\t\t\"eventsPerFile\": 2064,\r\n\t\t\"minimumClusterSize\": 5,\r\n\t\t\"crossValidationFolds\": 1,\r\n\t\t\"falseDiscoveryRate\": 1,\r\n\t\t\"associationModels\": [\"sam\",\"pamr\",\"glmnet\"],\r\n\t\t\"clusteringCharacterization\": \"medians\",\r\n\t\t\"eventSamplingMethod\": \"equal\",\r\n\t\t\"normalizeScales\": false,\r\n\t\t\"plotTheme\": \"white\"\r\n\t}\r\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\r\n\t\"name\": \"API CITRUS Experiment - Update\",\r\n\t\"options\":\r\n\t{\r\n\t\t\"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r\n\t\t\"statisticsChannels\": [{{CHANNEL_ID_3}}],\r\n\t\t\"fileGrouping\": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r\n\t\t\"fileGroupNames\": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r\n\t\t\"gateSetId\": {{POPULATION.GATE_SET_ID}},\r\n\t\t\"compensationId\": {{COMP_ID}},\r\n\t\t\"eventsPerFile\": 2064,\r\n\t\t\"minimumClusterSize\": 5,\r\n\t\t\"crossValidationFolds\": 1,\r\n\t\t\"falseDiscoveryRate\": 1,\r\n\t\t\"associationModels\": [\"sam\",\"pamr\",\"glmnet\"],\r\n\t\t\"clusteringCharacterization\": \"medians\",\r\n\t\t\"eventSamplingMethod\": \"equal\",\r\n\t\t\"normalizeScales\": false,\r\n\t\t\"plotTheme\": \"white\"\r\n\t}\r\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\r\n\t\"name\": \"API CITRUS Experiment - Update\",\r\n\t\"options\":\r\n\t{\r\n\t\t\"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r\n\t\t\"statisticsChannels\": [{{CHANNEL_ID_3}}],\r\n\t\t\"fileGrouping\": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r\n\t\t\"fileGroupNames\": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r\n\t\t\"gateSetId\": {{POPULATION.GATE_SET_ID}},\r\n\t\t\"compensationId\": {{COMP_ID}},\r\n\t\t\"eventsPerFile\": 2064,\r\n\t\t\"minimumClusterSize\": 5,\r\n\t\t\"crossValidationFolds\": 1,\r\n\t\t\"falseDiscoveryRate\": 1,\r\n\t\t\"associationModels\": [\"sam\",\"pamr\",\"glmnet\"],\r\n\t\t\"clusteringCharacterization\": \"medians\",\r\n\t\t\"eventSamplingMethod\": \"equal\",\r\n\t\t\"normalizeScales\": false,\r\n\t\t\"plotTheme\": \"white\"\r\n\t}\r\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}"

	payload := strings.NewReader("{\r\n\t\"name\": \"API CITRUS Experiment - Update\",\r\n\t\"options\":\r\n\t{\r\n\t\t\"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r\n\t\t\"statisticsChannels\": [{{CHANNEL_ID_3}}],\r\n\t\t\"fileGrouping\": [[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0], [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r\n\t\t\"fileGroupNames\": [{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r\n\t\t\"gateSetId\": {{POPULATION.GATE_SET_ID}},\r\n\t\t\"compensationId\": {{COMP_ID}},\r\n\t\t\"eventsPerFile\": 2064,\r\n\t\t\"minimumClusterSize\": 5,\r\n\t\t\"crossValidationFolds\": 1,\r\n\t\t\"falseDiscoveryRate\": 1,\r\n\t\t\"associationModels\": [\"sam\",\"pamr\",\"glmnet\"],\r\n\t\t\"clusteringCharacterization\": \"medians\",\r\n\t\t\"eventSamplingMethod\": \"equal\",\r\n\t\t\"normalizeScales\": false,\r\n\t\t\"plotTheme\": \"white\"\r\n\t}\r\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
DELETE Delete CITRUS
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}

Delete a CITRUS analysis permanently.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Delete CITRUS
curl --request DELETE \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}",
  "method": "DELETE",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Copy CITRUS Settings
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings

Copy an existing CITRUS analysis to create a new CITRUS analysis with the same settings.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Copy CITRUS Settings
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/copy_settings"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Rename CITRUS
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/rename

Rename a CITRUS analysis. This is useful for post-run modifications of CITRUS analysis name, since the update command is not allowed after the run is started.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY


  {
      "name": "API CITRUS Experiment - Rename"
  }


Sample Request
Rename CITRUS
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/rename",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "\n  {\n      \"name\": \"API CITRUS Experiment - Rename\"\n  }\n"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/rename")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "\n  {\n      \"name\": \"API CITRUS Experiment - Rename\"\n  }\n"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/rename"

payload = "\n  {\n      \"name\": \"API CITRUS Experiment - Rename\"\n  }\n"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/rename",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ name: 'API CITRUS Experiment - Rename' }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/rename",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "\n  {\n      \"name\": \"API CITRUS Experiment - Rename\"\n  }\n",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/rename"

	payload := strings.NewReader("\n  {\n      \"name\": \"API CITRUS Experiment - Rename\"\n  }\n")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Run CITRUS
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run

Run a CITRUS analysis.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Run CITRUS
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/run"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show CITRUS Status
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status

Show CITRUS analysis execution status.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show CITRUS Status
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/citrus/{{CITRUS_ID}}/status"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Download CITRUS Results
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download

Download the results for a successful CITRUS analysis.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download CITRUS Results
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/attachments/{{CITRUS_ATTACHMENT_ID}}/download"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Compensations

Get information about compensations stored in Cytobank with these endpoints. For information about file-internal compensation for an individual FCS file, consult the FCS Files endpoints. Learn more about compensation in Cytobank.

GET List Compensations for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations

List compensations in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Compensations for Experiment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show Compensation Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}}

Show details for a compensation.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Compensation Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/compensations/{{COMP_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Upload Compensation CSV
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix

Upload a compensation CSV to an Experiment. Learn more about uploading compensation.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}
BODY

file
@{{FILE_NAME}}


Sample Request
Upload Compensation CSV
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form 'file=@{{FILE_NAME}}'
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_compensation_matrix"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "message": "Successfully imported compensation from uploaded file test_comp.csv"
}

Experiments

An Experiment is a container for data and analyses in Cytobank. If data are on Cytobank, they must be within an Experiment. Configurations such as gates, compensations, scales, Sample Tags, and illustrations are also linked to an individual Experiment. Within the Cytobank interface, the Experiment Summary Page is a useful integration point for information about an Experiment.

GET List Experiments
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments

List all accessible Experiments.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Experiments
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Show Experiment Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}

Show details for an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Experiment Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "experiment": {
    "id": 10559,
    "version": 23,
    "purpose": "Stimulate PBMC with IL6, IL10, and LPS. Measure phosphorylation of Stat3 and p38 after 15 minutes of stimulation. Stain for CD4+ T cells, CD4- T cells, monocytes, and B cells.",
    "comments": null,
    "public": false,
    "deleted": false,
    "sources": "",
    "experimentName": "PBMC Experiment (fluorescence) (Clone)",
    "gateVersion": 1,
    "createdAt": "2016-07-26T22:02:06Z",
    "updatedAt": "2016-07-26T22:02:18Z",
    "primaryResearcherId": 56,
    "principalInvestigatorId": 56,
    "uploaderId": 56,
    "projectId": null,
    "clonedFrom": 421,
    "createdFrom": null,
    "childType": null,
    "createdFromUrl": null,
    "publishedReportId": null
  }
}
POST Create Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments

Create a new Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY



Sample Request
CreateExperiment
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"These become the comments in the Experiment\"\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"These become the comments in the Experiment\"\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments"

payload = "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"These become the comments in the Experiment\"\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"These become the comments in the Experiment\"\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"These become the comments in the Experiment\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments"

	payload := strings.NewReader("{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"These become the comments in the Experiment\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Update Experiment Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}

Update details for an Experiment. To update only certain attributes for an Experiment, pass only those attributes in the update request.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY



Sample Request
Update Experiment Details
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment - updated\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"This becomes the comments in the Experiment\"\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment - updated\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"This becomes the comments in the Experiment\"\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

payload = "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment - updated\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"This becomes the comments in the Experiment\"\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment - updated\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"This becomes the comments in the Experiment\"\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment - updated\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"This becomes the comments in the Experiment\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

	payload := strings.NewReader("{\n  \"experiment\":\n  {\n    \"experimentName\": \"API Experiment - updated\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"projectId\": {{PROJECT_ID}},\n    \"purpose\": \"Trying out the Cytobank API\",\n    \"comments\": \"This becomes the comments in the Experiment\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Clone Experiment (Full Clone)
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone
HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Clone Experiment (Full Clone)
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/clone"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Clone Experiment (Selective Clone)
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/selective_clone

Selectively clone an Experiment. Learn more about the selective clone functionality.

To include all files in the selective clone without passing all the IDs, simply put -1 as the only element in the fcsFileIds array. I.e.: "fcsFileIds": [-1]

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY



Sample Request
Clone Experiment (Selective Clone)
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/selective_clone",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"experiment\":\n  {\n    \"experimentName\": \"selectively cloned Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"cloneGates\": true,\n    \"cloneAnnotations\": true,\n    \"cloneAttachments\": true,\n    \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}]\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/selective_clone")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"experiment\":\n  {\n    \"experimentName\": \"selectively cloned Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"cloneGates\": true,\n    \"cloneAnnotations\": true,\n    \"cloneAttachments\": true,\n    \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}]\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/selective_clone"

payload = "{\n  \"experiment\":\n  {\n    \"experimentName\": \"selectively cloned Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"cloneGates\": true,\n    \"cloneAnnotations\": true,\n    \"cloneAttachments\": true,\n    \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}]\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/selective_clone",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"experiment\":\n  {\n    \"experimentName\": \"selectively cloned Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"cloneGates\": true,\n    \"cloneAnnotations\": true,\n    \"cloneAttachments\": true,\n    \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}]\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/selective_clone",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"experiment\":\n  {\n    \"experimentName\": \"selectively cloned Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"cloneGates\": true,\n    \"cloneAnnotations\": true,\n    \"cloneAttachments\": true,\n    \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}]\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/selective_clone"

	payload := strings.NewReader("{\n  \"experiment\":\n  {\n    \"experimentName\": \"selectively cloned Experiment\",\n    \"primaryResearcherId\": {{USER_ID}},\n    \"principalInvestigatorId\": {{PI_ID}},\n    \"cloneGates\": true,\n    \"cloneAnnotations\": true,\n    \"cloneAttachments\": true,\n    \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT Trash Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}

Set the deleted attribute of this Experiment to true, which moves it to the trash. This is reversible and not to be confused with permanent deletion.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "experiment":
  {
    "deleted": {{TRUEFALSE}}
  }
}


Sample Request
Trash Experiment
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"experiment\":\n  {\n    \"deleted\": {{TRUEFALSE}}\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"experiment\":\n  {\n    \"deleted\": {{TRUEFALSE}}\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

payload = "{\n  \"experiment\":\n  {\n    \"deleted\": {{TRUEFALSE}}\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"experiment\":\n  {\n    \"deleted\": {{TRUEFALSE}}\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"experiment\":\n  {\n    \"deleted\": {{TRUEFALSE}}\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

	payload := strings.NewReader("{\n  \"experiment\":\n  {\n    \"deleted\": {{TRUEFALSE}}\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "experiment": {
    "id": 10559,
    "version": 23,
    "purpose": "Stimulate PBMC with IL6, IL10, and LPS. Measure phosphorylation of Stat3 and p38 after 15 minutes of stimulation. Stain for CD4+ T cells, CD4- T cells, monocytes, and B cells.",
    "comments": null,
    "public": false,
    "deleted": true,
    "sources": "",
    "experimentName": "PBMC Experiment (fluorescence) (Clone)",
    "gateVersion": 1,
    "createdAt": "2016-07-26T22:02:06Z",
    "updatedAt": "2016-07-27T00:04:27Z",
    "primaryResearcherId": 56,
    "principalInvestigatorId": 56,
    "uploaderId": 56,
    "projectId": null,
    "clonedFrom": 421,
    "createdFrom": null,
    "childType": null,
    "createdFromUrl": null,
    "publishedReportId": null
  }
}
DELETE Delete Experiment Permanently
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}

Delete the Experiment and all analyses (including SPADE, viSNE, etc.) permanently. This is not reversible.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Delete Experiment Permanently
curl --request DELETE \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "method": "DELETE",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

FCS Files

GET List FCS Files for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files

List all FCS files in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List FCS Files in Experiment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show FCS File Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}

Show details for an FCS file in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show FCS File Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show File-Internal Compensation Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation

Show File-Internal Compensation (aka spillover matrix, spill matrix, spill string) details for an FCS file in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show File-Internal Compensation Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/compensation"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Download Single FCS File
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download

Download a specific FCS file from an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Single FCS File
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/{{FCS_FILE_ID_1}}/download"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Zip & Download Specific FCS Files
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip?fcs_file_ids={{FCS_FILE_ID_1}},{{FCS_FILE_ID_2}},{{FCS_FILE_ID_3}}

Download a group of FCS files from an Experiment as a ZIP file. The files to be downloaded are specified by ID in the URL.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Zip & Download Specific FCS Files
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip?fcs_file_ids={{FCS_FILE_ID_1}}%2C{{FCS_FILE_ID_2}}%2C{{FCS_FILE_ID_3}}' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip?fcs_file_ids={{FCS_FILE_ID_1}}%2C{{FCS_FILE_ID_2}}%2C{{FCS_FILE_ID_3}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip?fcs_file_ids={{FCS_FILE_ID_1}}%2C{{FCS_FILE_ID_2}}%2C{{FCS_FILE_ID_3}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip"

querystring = {"fcs_file_ids":"{{FCS_FILE_ID_1}},{{FCS_FILE_ID_2}},{{FCS_FILE_ID_3}}"}

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip?fcs_file_ids={{FCS_FILE_ID_1}}%2C{{FCS_FILE_ID_2}}%2C{{FCS_FILE_ID_3}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip?fcs_file_ids={{FCS_FILE_ID_1}}%2C{{FCS_FILE_ID_2}}%2C{{FCS_FILE_ID_3}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip?fcs_file_ids={{FCS_FILE_ID_1}}%2C{{FCS_FILE_ID_2}}%2C{{FCS_FILE_ID_3}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Zip & Download All FCS Files
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip

Zip & Download all FCS Files from an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Zip & Download All FCS Files
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/download_zip"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Upload FCS File to Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload

Upload an FCS file to an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}
BODY

file
@{{FILE_NAME}}


Sample Request
Upload FCS File to Experiment
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form 'file=@{{FILE_NAME}}'
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Upload Zip of FCS Files to Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip

Upload one or more FCS files to an Experiment as a ZIP file.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}
BODY

file
@{{FILE_NAME}}


Sample Request
Upload Zip of FCS Files to Experiment
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form 'file=@{{FILE_NAME}}'
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/fcs_files/upload_zip"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Gates and Populations

In Cytobank there is a distinction between gates and populations. A gate is simply a shape drawn on a plot. A population is a set of gates and can have parents and children. Learn more about gates and populations.

Currently gate and population information can only be read and not written to Cytobank via the JSON API. To write gates and populations to Cytobank via the API, the Upload Gating-ML endpoint should be used.

GET List Gates for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates

List gates for an Experiment. Currently only the Scratch Gates from the gating interface are returned. These have a version of -1. This is to be contrasted with Experiment Gates, which will have a version number that is a positive integer equal to the number of times the version has been incremented in the gating interface. Learn more about gate versioning in Cytobank.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Gates for Experiment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show Gate Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}}

Show details for a gate in an Experiment. The gate ID passed in the request is the value of the id attribute of the gate and not the gate_id attribute.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Gate Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/gates/{{GATE_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET List Populations for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations

List populations (aka gate sets) for an Experiment. Currently only the Scratch Populations from the gating interface are returned. These have a version of -1. This is to be contrasted with Experiment Populations, which will have a version number that is a positive integer equal to the number of times the version has been incremented in the gating interface. Learn more about gate versioning in Cytobank. The same principle applies to populations.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Populations
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show Population Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}}

Show details for a population (aka gate set) in an Experiment. Pass the value for the id attribute of the population and not the gateSetId attribute.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Population Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/populations/{{POPULATION_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Download Gating-ML
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml

Download gates via Gating-ML for an Experiment. Learn more about Gating-ML.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Gating-ML
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_gatingml"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Upload Gating-ML
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml

Upload gates to an Experiment via a Gating-ML file. Learn more about Gating-ML.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}
BODY

file
@{{FILE_NAME}}


Sample Request
Upload Gating-ML
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form 'file=@{{FILE_NAME}}'
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_gatingml"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Panels

A collection of channels, the markers being studied on them, and the FCS files this applies to form a panel. Learn more about panels in Cytobank.

GET List Panels for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels

List panels in an Experiment and associated details.

The object returned is an array of panels. Each panel has an id, name, array of channels, array of files that are in the panel, and a panelChannelMappings object. Each file will only appear in one (or zero) panels. The panelChannelMappings object gives information about the order that the channels appear within files within panels, because groups of files within the same panel could have channels in different orders. While potentially critical for index-based operations on features within FCS files on a local computer, no operations via the Cytobank API will rely on this ordering information and thus this nested object can be ignored.

Various functions of the Cytobank API will require a mastery of using the list of panels and nested arrays of channels and files. Many Cytobank API endpoints take an argument of normalizedShortNameId (a numeric proxy for the shortName), which is an attribute of a channel, and describes unambiguously which column of data to operate on for a given file. The longName of the channel is not guaranteed to be unique within a panel, although it usually is. Typically the longName is the starting point for analysis. Consider fetching statistics, for example. The objective might be to fetch median intensity of CD8+ T cells on the pSTAT3 channel in a particular named file. The Statistics endpoint requires id attributes for all these components to return statistics. The Gates and Populations and FCS Files endpoints would be used to get the id and gateSetId attribute for their respective components. Next, the normalizedShortNameId is needed for pSTAT3. This is obtained by first fetching panel information from this endpoint. Next, the arrays of file ids are searched to establish which panel the file is in. When the panel is found, its list of channels is searched by longName for pSTAT3. This gives a normalizedShortNameId and the key to submitting the statistics request.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Panels
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show Panel Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}}

Show details for a panel in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Panel Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/panels/{{PANEL_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response

SPADE

SPADE is an algorithm available in Cytobank that takes multi-parameter data, performs clustering, and represents the clustered data as a two-dimensional minimum spanning tree of connected clusters. Learn more about SPADE in Cytobank.

GET List SPADE Analyses
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade

List all SPADE analyses in an experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List SPADE Analyses
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show SPADE Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}?include_settings=1

Show a specific SPADE analysis in an experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show SPADE Details
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}?include_settings=1' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}?include_settings=1",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}?include_settings=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}"

querystring = {"include_settings":"1"}

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}?include_settings=1",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}?include_settings=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}?include_settings=1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Create SPADE
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/

Create a new SPADE analysis with default settings.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "spade":
  {
    "name":  "new API SPADE"
  }
}


Sample Request
Create SPADE
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"spade\":\n  {\n    \"name\":  \"new API SPADE\"\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"spade\":\n  {\n    \"name\":  \"new API SPADE\"\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/"

payload = "{\n  \"spade\":\n  {\n    \"name\":  \"new API SPADE\"\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ spade: { name: 'new API SPADE' } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"spade\":\n  {\n    \"name\":  \"new API SPADE\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/"

	payload := strings.NewReader("{\n  \"spade\":\n  {\n    \"name\":  \"new API SPADE\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Update SPADE Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/

Update SPADE settings. Updates can only be made before running the SPADE analysis. Learn more about SPADE settings.

POPULATION.GATE_SET_ID parameter is the gateSetId attribute value of the population on which to run SPADE. Note that this argument is the gateSetId attribute of a population object and not the ID of the object itself. This secondary ID is experiment-specific and will be a smaller number. An argument of 0 corresponds to the ungated population, i.e., the raw data with no filtering applied. Another term for a population is a "gate set" because it's a set of gates (learn more).

CHANNEL_ID parameters are the normalizedShortNameId attribute of the channels to run SPADE on. This information can be retrieved from the Panels endpoints.

downSampledEventsTarget attribute can have a value of either "percent" or "absoluteNumber" with a corollary numeric argument.

For analyses using fold change, all files in the experiment must be represented within a fold change group, and only within one group. Learn more about fold change setup.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY



Sample Request
Update SPADE
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"spade\":\n  {\n    \"name\": \"new API SPADE - Updated\",\n    \"compensationId\": {{COMP_ID}},\n    \"targetNumberOfNodes\": 200,\n    \"population\": {{POPULATION.GATE_SET_ID}},\n    \"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"downSampledEventsTarget\": {\n    \"percent\": 20\n    },\n    \"foldChangeGroups\": [\n      {\n        \"name\": \"FC Group 1\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}},\n            \"baseline\": true\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}},\n            \"baseline\": false\n          }\n    ]\n    },\n    {\n        \"name\": \"FC Group 2\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_3}},\n            \"baseline\": false\n          }\n        ]\n      }\n    ]\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"spade\":\n  {\n    \"name\": \"new API SPADE - Updated\",\n    \"compensationId\": {{COMP_ID}},\n    \"targetNumberOfNodes\": 200,\n    \"population\": {{POPULATION.GATE_SET_ID}},\n    \"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"downSampledEventsTarget\": {\n    \"percent\": 20\n    },\n    \"foldChangeGroups\": [\n      {\n        \"name\": \"FC Group 1\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}},\n            \"baseline\": true\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}},\n            \"baseline\": false\n          }\n    ]\n    },\n    {\n        \"name\": \"FC Group 2\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_3}},\n            \"baseline\": false\n          }\n        ]\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/"

payload = "{\n  \"spade\":\n  {\n    \"name\": \"new API SPADE - Updated\",\n    \"compensationId\": {{COMP_ID}},\n    \"targetNumberOfNodes\": 200,\n    \"population\": {{POPULATION.GATE_SET_ID}},\n    \"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"downSampledEventsTarget\": {\n    \"percent\": 20\n    },\n    \"foldChangeGroups\": [\n      {\n        \"name\": \"FC Group 1\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}},\n            \"baseline\": true\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}},\n            \"baseline\": false\n          }\n    ]\n    },\n    {\n        \"name\": \"FC Group 2\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_3}},\n            \"baseline\": false\n          }\n        ]\n      }\n    ]\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"spade\":\n  {\n    \"name\": \"new API SPADE - Updated\",\n    \"compensationId\": {{COMP_ID}},\n    \"targetNumberOfNodes\": 200,\n    \"population\": {{POPULATION.GATE_SET_ID}},\n    \"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"downSampledEventsTarget\": {\n    \"percent\": 20\n    },\n    \"foldChangeGroups\": [\n      {\n        \"name\": \"FC Group 1\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}},\n            \"baseline\": true\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}},\n            \"baseline\": false\n          }\n    ]\n    },\n    {\n        \"name\": \"FC Group 2\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_3}},\n            \"baseline\": false\n          }\n        ]\n      }\n    ]\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"spade\":\n  {\n    \"name\": \"new API SPADE - Updated\",\n    \"compensationId\": {{COMP_ID}},\n    \"targetNumberOfNodes\": 200,\n    \"population\": {{POPULATION.GATE_SET_ID}},\n    \"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"downSampledEventsTarget\": {\n    \"percent\": 20\n    },\n    \"foldChangeGroups\": [\n      {\n        \"name\": \"FC Group 1\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}},\n            \"baseline\": true\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}},\n            \"baseline\": false\n          }\n    ]\n    },\n    {\n        \"name\": \"FC Group 2\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_3}},\n            \"baseline\": false\n          }\n        ]\n      }\n    ]\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/"

	payload := strings.NewReader("{\n  \"spade\":\n  {\n    \"name\": \"new API SPADE - Updated\",\n    \"compensationId\": {{COMP_ID}},\n    \"targetNumberOfNodes\": 200,\n    \"population\": {{POPULATION.GATE_SET_ID}},\n    \"clusteringChannels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"downSampledEventsTarget\": {\n    \"percent\": 20\n    },\n    \"foldChangeGroups\": [\n      {\n        \"name\": \"FC Group 1\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}},\n            \"baseline\": true\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}},\n            \"baseline\": false\n          }\n    ]\n    },\n    {\n        \"name\": \"FC Group 2\",\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_3}},\n            \"baseline\": false\n          }\n        ]\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
DELETE Delete SPADE
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}

Delete a SPADE analysis permanently.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Delete SPADE
curl --request DELETE \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}",
  "method": "DELETE",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Copy SPADE Settings
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings

Copy an existing SPADE analysis to create a new SPADE analysis with the same settings.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Copy SPADE Settings
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_settings"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Rename SPADE
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/rename

Rename a SPADE analysis. This is useful for post-run modifications of SPADE analysis name, since the update command is not allowed after the run is started.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "spade":
  {
      "name": "new API SPADE - Rename"
  }
}


Sample Request
Rename SPADE
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/rename",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"spade\":\n  {\n      \"name\": \"new API SPADE - Rename\"\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/rename")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"spade\":\n  {\n      \"name\": \"new API SPADE - Rename\"\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/rename"

payload = "{\n  \"spade\":\n  {\n      \"name\": \"new API SPADE - Rename\"\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/rename",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ spade: { name: 'new API SPADE - Rename' } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/rename",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"spade\":\n  {\n      \"name\": \"new API SPADE - Rename\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/rename"

	payload := strings.NewReader("{\n  \"spade\":\n  {\n      \"name\": \"new API SPADE - Rename\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "name": "new API SPADE - Rename"
}
POST Run SPADE
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run

Run a SPADE analysis.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Run SPADE
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/run"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show SPADE Status
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status

Show SPADE analysis execution status.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show SPADE Status
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/status"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Download Complete Results Package
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=full_data

Download the complete results package for a successful SPADE run. Includes all the components that can be downloaded seperately, and more.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Complete Results Package
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=full_data' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=full_data",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=full_data")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download"

querystring = {"item":"full_data"}

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=full_data",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=full_data",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=full_data"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Download GML Files
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=gml

Download GML files for a successful SPADE run. The GML files represent the SPADE tree graph structure with nodes and edges. Each node object in this file also contains all statistical information.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download GML Files
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=gml' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=gml",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=gml")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download"

querystring = {"item":"gml"}

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=gml",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=gml",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=gml"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Download Global Boundaries Table
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=global_boundaries_table

Download Global Boundaries table for a successful SPADE run.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Global Boundaries Table
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=global_boundaries_table' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=global_boundaries_table",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=global_boundaries_table")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download"

querystring = {"item":"global_boundaries_table"}

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=global_boundaries_table",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=global_boundaries_table",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=global_boundaries_table"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Download Layout Table
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=layout_table

Download Layout table for a successful SPADE run.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Layout Table
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=layout_table' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=layout_table",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=layout_table")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download"

querystring = {"item":"layout_table"}

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=layout_table",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=layout_table",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=layout_table"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Download Statistics Tables
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=statistics_table

Download Statistics tables for a successful SPADE run.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Statistics Tables
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=statistics_table' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=statistics_table",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=statistics_table")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download"

querystring = {"item":"statistics_table"}

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=statistics_table",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=statistics_table",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=statistics_table"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Download Clusters Table
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=clusters_table

Download Clusters table for a successful SPADE run.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Clusters Table
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=clusters_table' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=clusters_table",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=clusters_table")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download"

querystring = {"item":"clusters_table"}

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=clusters_table",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=clusters_table",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/download?item=clusters_table"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Show SPADE Bubbles
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles

Show current node:bubble relationships for a SPADE analysis.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show SPADE Bubbles
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/show_bubbles"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Set SPADE Bubbles
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/set_bubbles

Set node:bubble relationships for a SPADE analysis. This will overwrite existing information.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY



Sample Request
Set SPADE Bubbles
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/set_bubbles",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n    \"spade\": {\n        \"bubbles\": [\n            {\n                \"name\": \"CD8+\",\n                \"nodes\": [\n                    101,\n                    105,\n                    108,\n                    117,\n                    118,\n                    131,\n                    133\n                ]\n            },\n            {\n                \"name\": \"CD4+\",\n                \"nodes\": [\n                    110,\n                    111,\n                    121,\n                    124,\n                    125,\n                    128,\n                    134,\n                    140,\n                    141,\n                    155,\n                    161\n                ]\n            },\n            {\n                \"name\": \"CD20+\",\n                \"nodes\": [\n                    10,\n                    107,\n                    19,\n                    193,\n                    39\n                ]\n            }\n        ]\n    }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/set_bubbles")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n    \"spade\": {\n        \"bubbles\": [\n            {\n                \"name\": \"CD8+\",\n                \"nodes\": [\n                    101,\n                    105,\n                    108,\n                    117,\n                    118,\n                    131,\n                    133\n                ]\n            },\n            {\n                \"name\": \"CD4+\",\n                \"nodes\": [\n                    110,\n                    111,\n                    121,\n                    124,\n                    125,\n                    128,\n                    134,\n                    140,\n                    141,\n                    155,\n                    161\n                ]\n            },\n            {\n                \"name\": \"CD20+\",\n                \"nodes\": [\n                    10,\n                    107,\n                    19,\n                    193,\n                    39\n                ]\n            }\n        ]\n    }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/set_bubbles"

payload = "{\n    \"spade\": {\n        \"bubbles\": [\n            {\n                \"name\": \"CD8+\",\n                \"nodes\": [\n                    101,\n                    105,\n                    108,\n                    117,\n                    118,\n                    131,\n                    133\n                ]\n            },\n            {\n                \"name\": \"CD4+\",\n                \"nodes\": [\n                    110,\n                    111,\n                    121,\n                    124,\n                    125,\n                    128,\n                    134,\n                    140,\n                    141,\n                    155,\n                    161\n                ]\n            },\n            {\n                \"name\": \"CD20+\",\n                \"nodes\": [\n                    10,\n                    107,\n                    19,\n                    193,\n                    39\n                ]\n            }\n        ]\n    }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/set_bubbles",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ spade: 
   { bubbles: 
      [ { name: 'CD8+', nodes: [ 101, 105, 108, 117, 118, 131, 133 ] },
        { name: 'CD4+',
          nodes: [ 110, 111, 121, 124, 125, 128, 134, 140, 141, 155, 161 ] },
        { name: 'CD20+', nodes: [ 10, 107, 19, 193, 39 ] } ] } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/set_bubbles",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n    \"spade\": {\n        \"bubbles\": [\n            {\n                \"name\": \"CD8+\",\n                \"nodes\": [\n                    101,\n                    105,\n                    108,\n                    117,\n                    118,\n                    131,\n                    133\n                ]\n            },\n            {\n                \"name\": \"CD4+\",\n                \"nodes\": [\n                    110,\n                    111,\n                    121,\n                    124,\n                    125,\n                    128,\n                    134,\n                    140,\n                    141,\n                    155,\n                    161\n                ]\n            },\n            {\n                \"name\": \"CD20+\",\n                \"nodes\": [\n                    10,\n                    107,\n                    19,\n                    193,\n                    39\n                ]\n            }\n        ]\n    }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/set_bubbles"

	payload := strings.NewReader("{\n    \"spade\": {\n        \"bubbles\": [\n            {\n                \"name\": \"CD8+\",\n                \"nodes\": [\n                    101,\n                    105,\n                    108,\n                    117,\n                    118,\n                    131,\n                    133\n                ]\n            },\n            {\n                \"name\": \"CD4+\",\n                \"nodes\": [\n                    110,\n                    111,\n                    121,\n                    124,\n                    125,\n                    128,\n                    134,\n                    140,\n                    141,\n                    155,\n                    161\n                ]\n            },\n            {\n                \"name\": \"CD20+\",\n                \"nodes\": [\n                    10,\n                    107,\n                    19,\n                    193,\n                    39\n                ]\n            }\n        ]\n    }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Export SPADE Bubbles to New Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/export_bubbles_to_new_experiment

Export the given SPADE bubbles as FCS files into a new experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
"spade":
{
  "bubbles": ["CD8+", "CD4+"] }

}


Sample Request
Export SPADE Bubbles
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/export_bubbles_to_new_experiment",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\r\n\"spade\":\r\n{\r\n  \"bubbles\": [\"CD8+\", \"CD4+\"] }\r\n\r\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/export_bubbles_to_new_experiment")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\r\n\"spade\":\r\n{\r\n  \"bubbles\": [\"CD8+\", \"CD4+\"] }\r\n\r\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/export_bubbles_to_new_experiment"

payload = "{\r\n\"spade\":\r\n{\r\n  \"bubbles\": [\"CD8+\", \"CD4+\"] }\r\n\r\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/export_bubbles_to_new_experiment",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ spade: { bubbles: [ 'CD8+', 'CD4+' ] } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/export_bubbles_to_new_experiment",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n\"spade\":\r\n{\r\n  \"bubbles\": [\"CD8+\", \"CD4+\"] }\r\n\r\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/export_bubbles_to_new_experiment"

	payload := strings.NewReader("{\r\n\"spade\":\r\n{\r\n  \"bubbles\": [\"CD8+\", \"CD4+\"] }\r\n\r\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Copy SPADE Results
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results

Clone a successful completed SPADE analysis. Creates a copy in the same experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json


Sample Request
Copy SPADE Results
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: application/json'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": ""
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results"

payload = ""
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/spade/{{SPADE_ID}}/copy_results"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response

Sample Tags

GET Download Sample Tags
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags

Download sample tags from an Experiment as a TSV (tab separated values) table file. Learn more about exporting and importing sample tags.

Currently there is no JSON support for Sample Tags and the information can only be exchanged via file.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Download Sample Tags
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/download_sample_tags"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Upload Sample Tags
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags

Upload sample tags to an Experiment. Sample tags should be in the form of a TSV (tab separated values) table file, which can be sourced from the Download Sample Tags endpoint. Learn more about importing and exporting sample tags.

Currently there is no JSON support for Sample Tags and the information can only be exchanged via file.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}
BODY

file
@{{FILE_NAME}}


Sample Request
Upload Sample Tags
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags \
  --header 'authorization: Bearer {{AUTH_TOKEN}}' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form 'file=@{{FILE_NAME}}'
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--"
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/upload_sample_tags"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@{{FILE_NAME}}\r\n-----011000010111000001101001--")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "message": "Successfully imported the sample tags annotated in the uploaded file 'test_annotations.tsv'!"
}

Scales

Data are rarely presented exactly as they were acquired on the instrument. Learn more about data scaling.

A scale type of 1 is linear. 2 is log. 4 is arcsinh.

GET List Scales for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales

List scale settings for an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Scales for Experiment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show Scale Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}

Show details for a scale in an Experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Scale Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Update Scale
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}

Update settings for a single scale in an Experiment. To update only certain attributes for a scale, pass only those attributes in the update request.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "scale": {
    "minimum": -200.5,
    "maximum": 10000,
    "cofactor": 10,
    "scaleType": 4
  }
}


Sample Request
Update Scale
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"scale\": {\n    \"minimum\": -200.5,\n    \"maximum\": 10000,\n    \"cofactor\": 10,\n    \"scaleType\": 4\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"scale\": {\n    \"minimum\": -200.5,\n    \"maximum\": 10000,\n    \"cofactor\": 10,\n    \"scaleType\": 4\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}"

payload = "{\n  \"scale\": {\n    \"minimum\": -200.5,\n    \"maximum\": 10000,\n    \"cofactor\": 10,\n    \"scaleType\": 4\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ scale: { minimum: -200.5, maximum: 10000, cofactor: 10, scaleType: 4 } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"scale\": {\n    \"minimum\": -200.5,\n    \"maximum\": 10000,\n    \"cofactor\": 10,\n    \"scaleType\": 4\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/scales/{{SCALE_ID}}"

	payload := strings.NewReader("{\n  \"scale\": {\n    \"minimum\": -200.5,\n    \"maximum\": 10000,\n    \"cofactor\": 10,\n    \"scaleType\": 4\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Sharing

One should never analyze alone... Learn more about sharing and collaboration in Cytobank.

GET List Full Access Users for Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users

List all full access users in an experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Full Access Users for Experiment
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/full_access_users"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Add Full Access User to Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/add_full_access_user

Add a full access user to an experiment.

Users can be added by using one of the following fields:

  • userId
  • userName
  • userEmail
HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "experiment":
  {
    "userId": {{FULL_ACCESS_USER}}
  }
}


Sample Request
Add Full Access User to Experiment
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/add_full_access_user",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"experiment\":\n  {\n    \"userId\": {{FULL_ACCESS_USER}}\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/add_full_access_user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"experiment\":\n  {\n    \"userId\": {{FULL_ACCESS_USER}}\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/add_full_access_user"

payload = "{\n  \"experiment\":\n  {\n    \"userId\": {{FULL_ACCESS_USER}}\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/add_full_access_user",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"experiment\":\n  {\n    \"userId\": {{FULL_ACCESS_USER}}\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/add_full_access_user",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"experiment\":\n  {\n    \"userId\": {{FULL_ACCESS_USER}}\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/add_full_access_user"

	payload := strings.NewReader("{\n  \"experiment\":\n  {\n    \"userId\": {{FULL_ACCESS_USER}}\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "message": "Chris Ciccolella has been given full access to this experiment."
}
POST Remove Full Access User From Experiment
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/remove_full_access_user

Remove a full access user from an experiment.

Users can be removed by using one of the following fields:

  • userId
  • userName
  • userEmail
HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "experiment":
  {
    "userName": {{FULL_ACCESS_USER}}
  }
}


Sample Request
Remove Full Access User From Experiment
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/remove_full_access_user",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"experiment\":\n  {\n    \"userName\": {{FULL_ACCESS_USER}}\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/remove_full_access_user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"experiment\":\n  {\n    \"userName\": {{FULL_ACCESS_USER}}\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/remove_full_access_user"

payload = "{\n  \"experiment\":\n  {\n    \"userName\": {{FULL_ACCESS_USER}}\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/remove_full_access_user",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"experiment\":\n  {\n    \"userName\": {{FULL_ACCESS_USER}}\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/remove_full_access_user",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"experiment\":\n  {\n    \"userName\": {{FULL_ACCESS_USER}}\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/remove_full_access_user"

	payload := strings.NewReader("{\n  \"experiment\":\n  {\n    \"userName\": {{FULL_ACCESS_USER}}\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
{
  "message": "Preston Ng was successfully removed from the full access list."
}

Statistics

GET Show General Statistics
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&channelIds={{CHANNEL_ID_1}}&channelIds={{CHANNEL_ID_2}}&gateSetIds={{POPULATION.GATE_SET_ID_1}}&gateSetIds={{POPULATION.GATE_SET_ID_2}}

Retrieve a batch of common statistics for an Experiment.

Parameter Details:

  • EXPT_VERSION must be set to the current version of the Experiment, which can be seen as the version attribute returned from a call to the Show Experiment Details endpoint.
  • GATE_VERSION of -1 corresponds to the state of gates and populations in the gating interface. Faster performance can be achieved by using the maximum gate version from the experiment (learn more about gate versions). Maximum gate version can be seen as the gateVersion attribute returned from a call to the Show Experiment Details endpoint.
  • COMP_ID is the ID of the compensation to apply to the statistics. Use -2 for file-internal compensation. Use -1 for uncompensated.
  • FCS_FILE_ID parameters are the IDs of FCS files to calculate statistics on. Multiple are permitted.
  • CHANNEL_ID parameters are the normalizedShortNameId attribute of the channels to calculate statistics on. This information can be retrieved from the Panels endpoints.
  • POPULATION.GATE_SET_ID parameters are the gateSetId attribute values of the populations to calculate statistics for. Multiple are permitted. Note that this argument is the gateSetId attribute of a population object and not the ID of the object itself. This secondary ID is experiment-specific and will be a smaller number. An argument of 0 corresponds to the ungated population, i.e., the raw data with no filtering applied. Another term for a population is a "gate set" because it's a set of gates (learn more).

The minimum parameters to receive a response are EXPT_VERSION, GATE_VERSION, COMP_ID, EXPT_ID, and FCS_FILE_ID. Without POPULATION.GATE_SET_ID then statistics will be returned for all populations. Without CHANNEL_ID then only event counts will be returned.

When submitting a single request with multiple files and channels, make sure that all the channels appear within all the files. An error will result otherwise.

Returned data:

Statistics returned include event count, minimum, maximum, mean, median, variance, standard deviation, and 2nd/98th percentile.

Results objects will be returned for each file by each population in the Experiment. Within each results object, results for multiple channels are keyed on the normalizedShortNameId attribute within each statistic type. The short name and long name that correspond to this ID can be deciphered using panel information from the Panels API endoints.

Performance note:

While this endpoint accepts multiple parameters at once, for large datasets it may be necessary to send multiple requests to avoid client timeouts. Also note that if only event counts are being fetched then optimizations can be made for a faster request (see Show Event Count Statistics endpoint below).

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show General Statistics
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&channelIds={{CHANNEL_ID_1}}&channelIds={{CHANNEL_ID_2}}&gateSetIds={{POPULATION.GATE_SET_ID_1}}&gateSetIds={{POPULATION.GATE_SET_ID_2}}' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&channelIds={{CHANNEL_ID_1}}&channelIds={{CHANNEL_ID_2}}&gateSetIds={{POPULATION.GATE_SET_ID_1}}&gateSetIds={{POPULATION.GATE_SET_ID_2}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&channelIds={{CHANNEL_ID_1}}&channelIds={{CHANNEL_ID_2}}&gateSetIds={{POPULATION.GATE_SET_ID_1}}&gateSetIds={{POPULATION.GATE_SET_ID_2}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics"

querystring = {"experimentId":"{{EXPT_ID}}","gateVersion":"{{GATE_VERSION}}","experimentVersion":"{{EXPT_VERSION}}","compensationId":"{{COMP_ID}}","fcsFileIds":["{{FCS_FILE_ID_1}}","{{FCS_FILE_ID_2}}"],"channelIds":["{{CHANNEL_ID_1}}","{{CHANNEL_ID_2}}"],"gateSetIds":["{{POPULATION.GATE_SET_ID_1}}","{{POPULATION.GATE_SET_ID_2}}"]}

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&channelIds={{CHANNEL_ID_1}}&channelIds={{CHANNEL_ID_2}}&gateSetIds={{POPULATION.GATE_SET_ID_1}}&gateSetIds={{POPULATION.GATE_SET_ID_2}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&channelIds={{CHANNEL_ID_1}}&channelIds={{CHANNEL_ID_2}}&gateSetIds={{POPULATION.GATE_SET_ID_1}}&gateSetIds={{POPULATION.GATE_SET_ID_2}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&channelIds={{CHANNEL_ID_1}}&channelIds={{CHANNEL_ID_2}}&gateSetIds={{POPULATION.GATE_SET_ID_1}}&gateSetIds={{POPULATION.GATE_SET_ID_2}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show Event Count Statistics
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&gateSetIds={{POPULATION_ID_1}}&gateSetIds={{POPULATION_ID_2}}

This is just another take on the general statistics endpoint. It works the same but excludes channel parameters. In the absence of channel information only event count data are returned. If only event count data are needed, this approach can be faster than retrieving all statistics by avoiding unnecessary computation.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show Event Count Statistics
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&gateSetIds={{POPULATION_ID_1}}&gateSetIds={{POPULATION_ID_2}}' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&gateSetIds={{POPULATION_ID_1}}&gateSetIds={{POPULATION_ID_2}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&gateSetIds={{POPULATION_ID_1}}&gateSetIds={{POPULATION_ID_2}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics"

querystring = {"experimentId":"{{EXPT_ID}}","gateVersion":"{{GATE_VERSION}}","experimentVersion":"{{EXPT_VERSION}}","compensationId":"{{COMP_ID}}","fcsFileIds":["{{FCS_FILE_ID_1}}","{{FCS_FILE_ID_2}}"],"gateSetIds":["{{POPULATION_ID_1}}","{{POPULATION_ID_2}}"]}

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&gateSetIds={{POPULATION_ID_1}}&gateSetIds={{POPULATION_ID_2}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&gateSetIds={{POPULATION_ID_1}}&gateSetIds={{POPULATION_ID_2}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/statistics?experimentId={{EXPT_ID}}&gateVersion={{GATE_VERSION}}&experimentVersion={{EXPT_VERSION}}&compensationId={{COMP_ID}}&fcsFileIds={{FCS_FILE_ID_1}}&fcsFileIds={{FCS_FILE_ID_2}}&gateSetIds={{POPULATION_ID_1}}&gateSetIds={{POPULATION_ID_2}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response

Users

GET List Users
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users

List all users on this Cytobank. This endpoint is for admins only and will respond with an authorization error if accessed by a non-admin.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List Users
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET Show User Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}}

Show details for a user. This endpoint is for admins only and will respond with an authorization error if accessed by a non-admin.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show User Details
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}}",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}}"

headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/users/{{USER_ID}}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

viSNE

viSNE is a powerful algorithm for reducing dimensionality and finding patterns within data. Learn more about viSNE in Cytobank.

GET List viSNE Analyses
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne

List viSNE analyses in an experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
List viSNE Analyses
curl --request GET \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
GET Show viSNE Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}?include_settings=1

Show a specific viSNE analysis in an experiment.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Show viSNE Details
curl --request GET \
  --url 'https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}?include_settings=1' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}?include_settings=1",
  "method": "GET",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}?include_settings=1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}"

querystring = {"include_settings":"1"}

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}?include_settings=1",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}?include_settings=1",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}?include_settings=1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
POST Create viSNE
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/

Create a new viSNE analysis with default settings.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "visne":
  {
    "name":  "new API viSNE"
  }
}


Sample Request
Create viSNE
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"visne\":\n  {\n    \"name\":  \"new API viSNE\"\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"visne\":\n  {\n    \"name\":  \"new API viSNE\"\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/"

payload = "{\n  \"visne\":\n  {\n    \"name\":  \"new API viSNE\"\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ visne: { name: 'new API viSNE' } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"visne\":\n  {\n    \"name\":  \"new API viSNE\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/"

	payload := strings.NewReader("{\n  \"visne\":\n  {\n    \"name\":  \"new API viSNE\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Update viSNE Details
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}

Update viSNE settings. Updates can only be made before running the viSNE analysis. Learn more about viSNE settings.

CHANNEL_ID parameters are the normalizedShortNameId attribute of the channels on which to run viSNE. This information can be retrieved from the Panels endpoints.

SAMPLING_METHOD parameter can have a value of either "proportional" or "equal".

Within the populationSelections nested object, the POPULATION.GATE_SET_ID parameters are the gateSetId attribute value of the populations on which to run viSNE. Note that this argument is the gateSetId attribute of a population object and not the ID of the object itself. This secondary ID is experiment-specific and will be a smaller number. An argument of 0 corresponds to the ungated population, i.e., the raw data with no filtering applied. Another term for a population is a "gate set" because it's a set of gates (learn more). Multiple populations can be selected for a single viSNE run and FCS files can appear redundantly among different population selections.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY



Sample Request
Update viSNE Details
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "data": "{\n  \"visne\":\n  {\n    \"name\": \"viSNE analysis - Updated\",\n    \"channels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"compensationId\": {{COMP_ID}},\n    \"samplingTotalCount\": {{TOTAL_EVENTS_IN_RUN}},\n    \"samplingTargetType\": \"{{SAMPLING_METHOD}}\",\n    \"iterations\": {{ITERATIONS}},\n    \"perplexity\": {{PERPLEXITY}},\n    \"theta\": {{THETA}},\n    \"populationSelections\": [\n      {\n        \"id\": {{POPULATION.GATE_SET_ID}},\n        \"selected\": true,\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}}\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}}\n         },\n         {\n           \"id\": {{FCS_FILE_ID_3}}\n         }\n       ]\n      }\n    ]\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"visne\":\n  {\n    \"name\": \"viSNE analysis - Updated\",\n    \"channels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"compensationId\": {{COMP_ID}},\n    \"samplingTotalCount\": {{TOTAL_EVENTS_IN_RUN}},\n    \"samplingTargetType\": \"{{SAMPLING_METHOD}}\",\n    \"iterations\": {{ITERATIONS}},\n    \"perplexity\": {{PERPLEXITY}},\n    \"theta\": {{THETA}},\n    \"populationSelections\": [\n      {\n        \"id\": {{POPULATION.GATE_SET_ID}},\n        \"selected\": true,\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}}\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}}\n         },\n         {\n           \"id\": {{FCS_FILE_ID_3}}\n         }\n       ]\n      }\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}"

payload = "{\n  \"visne\":\n  {\n    \"name\": \"viSNE analysis - Updated\",\n    \"channels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"compensationId\": {{COMP_ID}},\n    \"samplingTotalCount\": {{TOTAL_EVENTS_IN_RUN}},\n    \"samplingTargetType\": \"{{SAMPLING_METHOD}}\",\n    \"iterations\": {{ITERATIONS}},\n    \"perplexity\": {{PERPLEXITY}},\n    \"theta\": {{THETA}},\n    \"populationSelections\": [\n      {\n        \"id\": {{POPULATION.GATE_SET_ID}},\n        \"selected\": true,\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}}\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}}\n         },\n         {\n           \"id\": {{FCS_FILE_ID_3}}\n         }\n       ]\n      }\n    ]\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("{\n  \"visne\":\n  {\n    \"name\": \"viSNE analysis - Updated\",\n    \"channels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"compensationId\": {{COMP_ID}},\n    \"samplingTotalCount\": {{TOTAL_EVENTS_IN_RUN}},\n    \"samplingTargetType\": \"{{SAMPLING_METHOD}}\",\n    \"iterations\": {{ITERATIONS}},\n    \"perplexity\": {{PERPLEXITY}},\n    \"theta\": {{THETA}},\n    \"populationSelections\": [\n      {\n        \"id\": {{POPULATION.GATE_SET_ID}},\n        \"selected\": true,\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}}\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}}\n         },\n         {\n           \"id\": {{FCS_FILE_ID_3}}\n         }\n       ]\n      }\n    ]\n  }\n}");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"visne\":\n  {\n    \"name\": \"viSNE analysis - Updated\",\n    \"channels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"compensationId\": {{COMP_ID}},\n    \"samplingTotalCount\": {{TOTAL_EVENTS_IN_RUN}},\n    \"samplingTargetType\": \"{{SAMPLING_METHOD}}\",\n    \"iterations\": {{ITERATIONS}},\n    \"perplexity\": {{PERPLEXITY}},\n    \"theta\": {{THETA}},\n    \"populationSelections\": [\n      {\n        \"id\": {{POPULATION.GATE_SET_ID}},\n        \"selected\": true,\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}}\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}}\n         },\n         {\n           \"id\": {{FCS_FILE_ID_3}}\n         }\n       ]\n      }\n    ]\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}"

	payload := strings.NewReader("{\n  \"visne\":\n  {\n    \"name\": \"viSNE analysis - Updated\",\n    \"channels\": [{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}, {{CHANNEL_ID_3}}],\n    \"compensationId\": {{COMP_ID}},\n    \"samplingTotalCount\": {{TOTAL_EVENTS_IN_RUN}},\n    \"samplingTargetType\": \"{{SAMPLING_METHOD}}\",\n    \"iterations\": {{ITERATIONS}},\n    \"perplexity\": {{PERPLEXITY}},\n    \"theta\": {{THETA}},\n    \"populationSelections\": [\n      {\n        \"id\": {{POPULATION.GATE_SET_ID}},\n        \"selected\": true,\n        \"fcsFiles\": [\n          {\n            \"id\": {{FCS_FILE_ID_1}}\n          },\n          {\n            \"id\": {{FCS_FILE_ID_2}}\n         },\n         {\n           \"id\": {{FCS_FILE_ID_3}}\n         }\n       ]\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
DELETE Delete viSNE
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}

Delete a viSNE analysis permanently.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Delete viSNE
curl --request DELETE \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}} \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}",
  "method": "DELETE",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST Copy viSNE Settings
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings

Copy an existing viSNE analysis to create a new viSNE analysis with the same settings.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}


Sample Request
Copy viSNE Settings
curl --request POST \
  --url https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings"

payload = ""
headers = {'authorization': 'Bearer {{AUTH_TOKEN}}'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/copy_settings"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("authorization", "Bearer {{AUTH_TOKEN}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
Sample Response
PUT Rename viSNE
https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/rename

Rename a viSNE analysis. This is useful for post-run modifications of viSNE analysis name, since the update command is not allowed after the run is started.

HEADERS

Authorization
Bearer {{AUTH_TOKEN}}

Content-Type
application/json
BODY

{
  "visne":
  {
      "name": "API viSNE - Renamed"
  }
}


Sample Request
Rename viSNE
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/rename",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"visne\":\n  {\n      \"name\": \"API viSNE - Renamed\"\n  }\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
require 'uri'
require 'net/http'

url = URI("https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/rename")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"visne\":\n  {\n      \"name\": \"API viSNE - Renamed\"\n  }\n}"

response = http.request(request)
puts response.read_body
import requests

url = "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/rename"

payload = "{\n  \"visne\":\n  {\n      \"name\": \"API viSNE - Renamed\"\n  }\n}"
headers = {
    'authorization': "Bearer {{AUTH_TOKEN}}",
    'content-type': "application/json"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "",
  "port": null,
  "path": "{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/rename",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ visne: { name: 'API viSNE - Renamed' } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/rename",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n  \"visne\":\n  {\n      \"name\": \"API viSNE - Renamed\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/{{EXPT_ID}}/advanced_analyses/visne/{{VISNE_ID}}/rename"