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 are availabe here.

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.





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": "{ \"username\": \"{{USERNAME}}\", \"password\": \"{{PASSWORD}}\" }"
}

$.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)

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

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

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

payload = "{ \"username\": \"{{USERNAME}}\", \"password\": \"{{PASSWORD}}\" }"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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 => "{ \"username\": \"{{USERNAME}}\", \"password\": \"{{PASSWORD}}\" }",
  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("{ \"username\": \"{{USERNAME}}\", \"password\": \"{{PASSWORD}}\" }")

	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
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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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))

}

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/1412/attachments' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/1412/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/1412/attachments")

http = Net::HTTP.new(url.host, url.port)

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/1412/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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "1412",
    "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/1412/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/1412/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/1412/attachments/3265' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/1412/attachments/3265",
  "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/1412/attachments/3265")

http = Net::HTTP.new(url.host, url.port)

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/1412/attachments/3265"

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

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

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

var options = {
  "method": "GET",
  "hostname": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "1412",
    "attachments",
    "3265"
  ],
  "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/1412/attachments/3265",
  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/1412/attachments/3265"

	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' \
  --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)

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

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

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

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--");
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 => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$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("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--")

	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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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": "{ \"attachments\": { \"description\": \"Description goes here...\" } }"
}

$.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)

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

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 = "{ \"attachments\": { \"description\": \"Description goes here...\" } }"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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 => "{ \"attachments\": { \"description\": \"Description goes here...\" } }",
  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("{ \"attachments\": { \"description\": \"Description goes here...\" } }")

	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))

}

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)

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"

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

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

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

var options = {
  "method": "GET",
  "hostname": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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_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)

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"}

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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}}?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_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": "{  \"name\": \"API CITRUS Experiment\" } "
}

$.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)

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

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 = "{  \"name\": \"API CITRUS Experiment\" } "
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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 => "{  \"name\": \"API CITRUS Experiment\" } ",
  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("{  \"name\": \"API CITRUS Experiment\" } ")

	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



Sample Request
Update CITRUS Details
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 \"name\":\"API CITRUS Experiment - Update\",\r \"options\":\r \t{\r \t  \"clusteringChannels\":[{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r \t  \"statisticsChannels\":[{{CHANNEL_ID_3}}],\r \t  \"fileGrouping\":[[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0],\r \t  \t\t\t\t  [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r \t  \"fileGroupNames\":[{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r \t  \"gateSetId\":{{POPULATION_ID}},\r \t  \"compensationId\":{{COMP_ID}},\r \t  \"eventsPerFile\":2064,\r \t  \"minimumClusterSize\":5,\r \t  \"crossValidationFolds\":2,\r \t  \"falseDiscoveryRate\":1,\r \t  \"associationModels\":[\"sam\",\"pamr\",\"glmnet\"],\r \t  \"clusteringCharacterization\": \"medians\",\r \t  \"eventSamplingMethod\":\"equal\",\r \t  \"normalizeScales\":false,\r \t  \"plotTheme\":\"white\"\r \t}\r }"
}

$.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)

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

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 \"name\":\"API CITRUS Experiment - Update\",\r \"options\":\r \t{\r \t  \"clusteringChannels\":[{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r \t  \"statisticsChannels\":[{{CHANNEL_ID_3}}],\r \t  \"fileGrouping\":[[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0],\r \t  \t\t\t\t  [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r \t  \"fileGroupNames\":[{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r \t  \"gateSetId\":{{POPULATION_ID}},\r \t  \"compensationId\":{{COMP_ID}},\r \t  \"eventsPerFile\":2064,\r \t  \"minimumClusterSize\":5,\r \t  \"crossValidationFolds\":2,\r \t  \"falseDiscoveryRate\":1,\r \t  \"associationModels\":[\"sam\",\"pamr\",\"glmnet\"],\r \t  \"clusteringCharacterization\": \"medians\",\r \t  \"eventSamplingMethod\":\"equal\",\r \t  \"normalizeScales\":false,\r \t  \"plotTheme\":\"white\"\r \t}\r }"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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 \"name\":\"API CITRUS Experiment - Update\",\r \"options\":\r \t{\r \t  \"clusteringChannels\":[{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r \t  \"statisticsChannels\":[{{CHANNEL_ID_3}}],\r \t  \"fileGrouping\":[[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0],\r \t  \t\t\t\t  [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r \t  \"fileGroupNames\":[{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r \t  \"gateSetId\":{{POPULATION_ID}},\r \t  \"compensationId\":{{COMP_ID}},\r \t  \"eventsPerFile\":2064,\r \t  \"minimumClusterSize\":5,\r \t  \"crossValidationFolds\":2,\r \t  \"falseDiscoveryRate\":1,\r \t  \"associationModels\":[\"sam\",\"pamr\",\"glmnet\"],\r \t  \"clusteringCharacterization\": \"medians\",\r \t  \"eventSamplingMethod\":\"equal\",\r \t  \"normalizeScales\":false,\r \t  \"plotTheme\":\"white\"\r \t}\r }");
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 \"name\":\"API CITRUS Experiment - Update\",\r \"options\":\r \t{\r \t  \"clusteringChannels\":[{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r \t  \"statisticsChannels\":[{{CHANNEL_ID_3}}],\r \t  \"fileGrouping\":[[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0],\r \t  \t\t\t\t  [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r \t  \"fileGroupNames\":[{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r \t  \"gateSetId\":{{POPULATION_ID}},\r \t  \"compensationId\":{{COMP_ID}},\r \t  \"eventsPerFile\":2064,\r \t  \"minimumClusterSize\":5,\r \t  \"crossValidationFolds\":2,\r \t  \"falseDiscoveryRate\":1,\r \t  \"associationModels\":[\"sam\",\"pamr\",\"glmnet\"],\r \t  \"clusteringCharacterization\": \"medians\",\r \t  \"eventSamplingMethod\":\"equal\",\r \t  \"normalizeScales\":false,\r \t  \"plotTheme\":\"white\"\r \t}\r }",
  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 \"name\":\"API CITRUS Experiment - Update\",\r \"options\":\r \t{\r \t  \"clusteringChannels\":[{{CHANNEL_ID_1}}, {{CHANNEL_ID_2}}],\r \t  \"statisticsChannels\":[{{CHANNEL_ID_3}}],\r \t  \"fileGrouping\":[[{{FCS_FILE_ID_1}}, 0], [{{FCS_FILE_ID_2}}, 0], [{{FCS_FILE_ID_3}}, 0],\r \t  \t\t\t\t  [{{FCS_FILE_ID_4}}, 1], [{{FCS_FILE_ID_5}}, 1], [{{FCS_FILE_ID_6}}, 1]],\r \t  \"fileGroupNames\":[{{FILE_GROUP_1}}, {{FILE_GROUP_2}}],\r \t  \"gateSetId\":{{POPULATION_ID}},\r \t  \"compensationId\":{{COMP_ID}},\r \t  \"eventsPerFile\":2064,\r \t  \"minimumClusterSize\":5,\r \t  \"crossValidationFolds\":2,\r \t  \"falseDiscoveryRate\":1,\r \t  \"associationModels\":[\"sam\",\"pamr\",\"glmnet\"],\r \t  \"clusteringCharacterization\": \"medians\",\r \t  \"eventSamplingMethod\":\"equal\",\r \t  \"normalizeScales\":false,\r \t  \"plotTheme\":\"white\"\r \t}\r }")

	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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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": " { \"name\": \"API CITRUS Experiment - Rename\" } "
}

$.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)

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

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 = " { \"name\": \"API CITRUS Experiment - Rename\" } "
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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 => " { \"name\": \"API CITRUS Experiment - Rename\" } ",
  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(" { \"name\": \"API CITRUS Experiment - Rename\" } ")

	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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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)

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"

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

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

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

var options = {
  "method": "GET",
  "hostname": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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_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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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/10559/compensations' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/10559/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/10559/compensations")

http = Net::HTTP.new(url.host, url.port)

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/10559/compensations"

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

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

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

var options = {
  "method": "GET",
  "hostname": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "10559",
    "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/10559/compensations",
  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/10559/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/10559/compensations/151' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/10559/compensations/151",
  "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/10559/compensations/151")

http = Net::HTTP.new(url.host, url.port)

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/10559/compensations/151"

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

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

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

var options = {
  "method": "GET",
  "hostname": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "10559",
    "compensations",
    "151"
  ],
  "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/10559/compensations/151",
  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/10559/compensations/151"

	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' \
  --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)

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

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 = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"; filename=\"@{{FILE_NAME}}\"\r Content-Type: false\r \r \r ------WebKitFormBoundary7MA4YWxkTrZu0gW--"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"; filename=\"@{{FILE_NAME}}\"\r Content-Type: false\r \r \r ------WebKitFormBoundary7MA4YWxkTrZu0gW--");
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 => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"; filename=\"@{{FILE_NAME}}\"\r Content-Type: false\r \r \r ------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{AUTH_TOKEN}}",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$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("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"; filename=\"@{{FILE_NAME}}\"\r Content-Type: false\r \r \r ------WebKitFormBoundary7MA4YWxkTrZu0gW--")

	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"
}

DROP

DROP allows any numeric matrix data to be uploaded to Cytobank for analysis. Learn more about DROP.

POST Upload and Convert File
https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload

Upload spreadsheet file for conversion. The uploaded file will be converted to FCS and be found within the Experiment to which it's uploaded.

HEADERS

Authorization
Bearer {{user_jwt}}
BODY

file
@{{FILE_NAME}}
convertDelimitedFiles
true
dataMatrixStartRow
2
dataMatrixStartColumn
1
skippedColumns
2


Sample Request
Upload and Convert File
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");
form.append("convertDelimitedFiles", "true");
form.append("dataMatrixStartRow", "2");
form.append("dataMatrixStartColumn", "1");
form.append("skippedColumns", "2");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{user_jwt}}"
  },
  "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://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{user_jwt}}'
request.body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--"

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

url = "https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {'authorization': 'Bearer {{user_jwt}}'}

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

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

var options = {
  "method": "POST",
  "hostname": [
    "{{cyto_server}}"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "{{new_exp_id}}",
    "fcs_files",
    "upload"
  ],
  "headers": {
    "authorization": "Bearer {{user_jwt}}"
  }
};

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("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_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 => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{user_jwt}}",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$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://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload"

	payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--")

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

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

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

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

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

}
POST Upload ZIP FCS File(CSV to FCS)
https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload_zip

Upload zip file of spreadsheets to convert. Each file within the zip should have the same properties for dataMatrixStartRow and dataMatrixStartColumn.

HEADERS

Authorization
Bearer {{user_jwt}}
BODY

file
@{{FILE_NAME}}
convertDelimitedFiles
true
dataMatrixStartRow
2
dataMatrixStartColumn
1
skippedColumns
2


Sample Request
Upload ZIP FCS File(CSV to FCS)
var form = new FormData();
form.append("file", "@{{FILE_NAME}}");
form.append("convertDelimitedFiles", "true");
form.append("dataMatrixStartRow", "2");
form.append("dataMatrixStartColumn", "1");
form.append("skippedColumns", "2");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload_zip",
  "method": "POST",
  "headers": {
    "authorization": "Bearer {{user_jwt}}"
  },
  "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://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload_zip")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{user_jwt}}'
request.body = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--"

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

url = "https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload_zip"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {'authorization': 'Bearer {{user_jwt}}'}

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

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

var options = {
  "method": "POST",
  "hostname": [
    "{{cyto_server}}"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "{{new_exp_id}}",
    "fcs_files",
    "upload_zip"
  ],
  "headers": {
    "authorization": "Bearer {{user_jwt}}"
  }
};

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("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--");
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_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 => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer {{user_jwt}}",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$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://{{cyto_server}}/cytobank/api/v1/experiments/{{new_exp_id}}/fcs_files/upload_zip"

	payload := strings.NewReader("------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"file\"\r \r @{{FILE_NAME}}\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"convertDelimitedFiles\"\r \r true\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartRow\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"dataMatrixStartColumn\"\r \r 1\r ------WebKitFormBoundary7MA4YWxkTrZu0gW\r Content-Disposition: form-data; name=\"skippedColumns\"\r \r 2\r ------WebKitFormBoundary7MA4YWxkTrZu0gW--")

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

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

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

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

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

}

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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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/10559' \
  --header 'authorization: Bearer {{AUTH_TOKEN}}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/10559",
  "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/10559")

http = Net::HTTP.new(url.host, url.port)

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/10559"

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

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

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

var options = {
  "method": "GET",
  "hostname": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "10559"
  ],
  "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/10559",
  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/10559"

	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 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": "{ \"experiment\": { \"experimentName\": \"{{EXPT_NAME}}\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{USER_ID}}, \"comments\": \"These become the comments in the Experiment\", \"purpose\": \"This becomes the purpose text in the Experiment\" } }"
}

$.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)

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{ \"experiment\": { \"experimentName\": \"{{EXPT_NAME}}\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{USER_ID}}, \"comments\": \"These become the comments in the Experiment\", \"purpose\": \"This becomes the purpose text in the Experiment\" } }"

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

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

payload = "{ \"experiment\": { \"experimentName\": \"{{EXPT_NAME}}\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{USER_ID}}, \"comments\": \"These become the comments in the Experiment\", \"purpose\": \"This becomes the purpose text in the Experiment\" } }"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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("{ \"experiment\": { \"experimentName\": \"{{EXPT_NAME}}\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{USER_ID}}, \"comments\": \"These become the comments in the Experiment\", \"purpose\": \"This becomes the purpose text in the Experiment\" } }");
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 => "{ \"experiment\": { \"experimentName\": \"{{EXPT_NAME}}\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{USER_ID}}, \"comments\": \"These become the comments in the Experiment\", \"purpose\": \"This becomes the purpose text in the Experiment\" } }",
  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("{ \"experiment\": { \"experimentName\": \"{{EXPT_NAME}}\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{USER_ID}}, \"comments\": \"These become the comments in the Experiment\", \"purpose\": \"This becomes the purpose text in the Experiment\" } }")

	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": "{ \"experiment\": { \"experimentName\": \"API Experiment - updated\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"projectId\": {{PROJECT_ID}}, \"purpose\": \"Trying out the Cytobank API\", \"comments\": \"This becomes the comments in the Experiment\" } }"
}

$.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)

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

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

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

payload = "{ \"experiment\": { \"experimentName\": \"API Experiment - updated\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"projectId\": {{PROJECT_ID}}, \"purpose\": \"Trying out the Cytobank API\", \"comments\": \"This becomes the comments in the Experiment\" } }"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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("{ \"experiment\": { \"experimentName\": \"API Experiment - updated\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"projectId\": {{PROJECT_ID}}, \"purpose\": \"Trying out the Cytobank API\", \"comments\": \"This becomes the comments in the Experiment\" } }");
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 => "{ \"experiment\": { \"experimentName\": \"API Experiment - updated\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"projectId\": {{PROJECT_ID}}, \"purpose\": \"Trying out the Cytobank API\", \"comments\": \"This becomes the comments in the Experiment\" } }",
  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("{ \"experiment\": { \"experimentName\": \"API Experiment - updated\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"projectId\": {{PROJECT_ID}}, \"purpose\": \"Trying out the Cytobank API\", \"comments\": \"This becomes the comments in the Experiment\" } }")

	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)

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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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": "{ \"experiment\": { \"experimentName\": \"selectively cloned Experiment\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"cloneGates\": true, \"cloneAnnotations\": true, \"cloneAttachments\": true, \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}] } }"
}

$.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)

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

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

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

payload = "{ \"experiment\": { \"experimentName\": \"selectively cloned Experiment\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"cloneGates\": true, \"cloneAnnotations\": true, \"cloneAttachments\": true, \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}] } }"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "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("{ \"experiment\": { \"experimentName\": \"selectively cloned Experiment\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"cloneGates\": true, \"cloneAnnotations\": true, \"cloneAttachments\": true, \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}] } }");
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 => "{ \"experiment\": { \"experimentName\": \"selectively cloned Experiment\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"cloneGates\": true, \"cloneAnnotations\": true, \"cloneAttachments\": true, \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}] } }",
  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("{ \"experiment\": { \"experimentName\": \"selectively cloned Experiment\", \"primaryResearcherId\": {{USER_ID}}, \"principalInvestigatorId\": {{PI_ID}}, \"cloneGates\": true, \"cloneAnnotations\": true, \"cloneAttachments\": true, \"fcsFileIds\": [{{FCS_FILE_ID_1}}, {{FCS_FILE_ID_2}}, {{FCS_FILE_ID_3}}] } }")

	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/10559",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer {{AUTH_TOKEN}}",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{ \"experiment\": { \"deleted\": true } }"
}

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

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

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer {{AUTH_TOKEN}}'
request["content-type"] = 'application/json'
request.body = "{ \"experiment\": { \"deleted\": true } }"

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

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

payload = "{ \"experiment\": { \"deleted\": true } }"
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": [
    "{{CYTOBANK}}",
    "cytobank",
    "org"
  ],
  "path": [
    "cytobank",
    "api",
    "v1",
    "experiments",
    "10559"
  ],
  "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({ experiment: { deleted: true } }));
req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://{{CYTOBANK}}.cytobank.org/cytobank/api/v1/experiments/10559",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{ \"experiment\": { \"deleted\": true } }",
  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/10559"

	payload := strings.NewReader("{ \"experiment\": { \"deleted\": true } }")

	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 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)

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