POST Generate participant id from response datastore
{{baseUrl}}/participant/add
HEADERS

appId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/add");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "appid: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/participant/add" {:headers {:appid ""}})
require "http/client"

url = "{{baseUrl}}/participant/add"
headers = HTTP::Headers{
  "appid" => ""
}

response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/participant/add"),
    Headers =
    {
        { "appid", "" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/participant/add");
var request = new RestRequest("", Method.Post);
request.AddHeader("appid", "");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/participant/add"

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

	req.Header.Add("appid", "")

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

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

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

}
POST /baseUrl/participant/add HTTP/1.1
Appid: 
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/add")
  .setHeader("appid", "")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/participant/add"))
    .header("appid", "")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/participant/add")
  .post(null)
  .addHeader("appid", "")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/add")
  .header("appid", "")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/participant/add');
xhr.setRequestHeader('appid', '');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/add',
  headers: {appid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/participant/add';
const options = {method: 'POST', headers: {appid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/participant/add',
  method: 'POST',
  headers: {
    appid: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/participant/add")
  .post(null)
  .addHeader("appid", "")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/participant/add',
  headers: {
    appid: ''
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/add',
  headers: {appid: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/participant/add');

req.headers({
  appid: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/add',
  headers: {appid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/participant/add';
const options = {method: 'POST', headers: {appid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"appid": @"" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/add"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/participant/add" in
let headers = Header.add (Header.init ()) "appid" "" in

Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/participant/add",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "appid: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/participant/add', [
  'headers' => [
    'appid' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/participant/add');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'appid' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/participant/add');
$request->setRequestMethod('POST');
$request->setHeaders([
  'appid' => ''
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("appid", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/add' -Method POST -Headers $headers
$headers=@{}
$headers.Add("appid", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/add' -Method POST -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'appid': "" }

conn.request("POST", "/baseUrl/participant/add", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/participant/add"

headers = {"appid": ""}

response = requests.post(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/participant/add"

response <- VERB("POST", url, add_headers('appid' = ''), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/participant/add")

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

request = Net::HTTP::Post.new(url)
request["appid"] = ''

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/participant/add') do |req|
  req.headers['appid'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/participant/add";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("appid", "".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/participant/add \
  --header 'appid: '
http POST {{baseUrl}}/participant/add \
  appid:''
wget --quiet \
  --method POST \
  --header 'appid: ' \
  --output-document \
  - {{baseUrl}}/participant/add
import Foundation

let headers = ["appid": ""]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/add")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Provides an indication about the health of the service
{{baseUrl}}/healthCheck
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/healthCheck");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/healthCheck")
require "http/client"

url = "{{baseUrl}}/healthCheck"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/healthCheck"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/healthCheck");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/healthCheck"

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

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

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

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

}
GET /baseUrl/healthCheck HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/healthCheck")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/healthCheck"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/healthCheck")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/healthCheck")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/healthCheck');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/healthCheck'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/healthCheck';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/healthCheck',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/healthCheck")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/healthCheck',
  headers: {}
};

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

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

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

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/healthCheck'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/healthCheck');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/healthCheck'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/healthCheck';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/healthCheck"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/healthCheck" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/healthCheck",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/healthCheck');

echo $response->getBody();
setUrl('{{baseUrl}}/healthCheck');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/healthCheck');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/healthCheck' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/healthCheck' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/healthCheck")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/healthCheck"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/healthCheck"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/healthCheck")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/healthCheck') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/healthCheck";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/healthCheck
http GET {{baseUrl}}/healthCheck
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/healthCheck
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/healthCheck")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Get activity response data for participant from cloud fire store
{{baseUrl}}/participant/getresponse
HEADERS

userId
QUERY PARAMS

activityId
appId
participantId
questionKey
siteId
studyId
tokenId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "userid: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/participant/getresponse" {:headers {:userid ""}
                                                                   :query-params {:activityId ""
                                                                                  :appId ""
                                                                                  :participantId ""
                                                                                  :questionKey ""
                                                                                  :siteId ""
                                                                                  :studyId ""
                                                                                  :tokenId ""}})
require "http/client"

url = "{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId="
headers = HTTP::Headers{
  "userid" => ""
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId="),
    Headers =
    {
        { "userid", "" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=");
var request = new RestRequest("", Method.Get);
request.AddHeader("userid", "");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId="

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

	req.Header.Add("userid", "")

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

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

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

}
GET /baseUrl/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId= HTTP/1.1
Userid: 
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=")
  .setHeader("userid", "")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId="))
    .header("userid", "")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=")
  .get()
  .addHeader("userid", "")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=")
  .header("userid", "")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=');
xhr.setRequestHeader('userid', '');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/participant/getresponse',
  params: {
    activityId: '',
    appId: '',
    participantId: '',
    questionKey: '',
    siteId: '',
    studyId: '',
    tokenId: ''
  },
  headers: {userid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=';
const options = {method: 'GET', headers: {userid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=',
  method: 'GET',
  headers: {
    userid: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=")
  .get()
  .addHeader("userid", "")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=',
  headers: {
    userid: ''
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/participant/getresponse',
  qs: {
    activityId: '',
    appId: '',
    participantId: '',
    questionKey: '',
    siteId: '',
    studyId: '',
    tokenId: ''
  },
  headers: {userid: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/participant/getresponse');

req.query({
  activityId: '',
  appId: '',
  participantId: '',
  questionKey: '',
  siteId: '',
  studyId: '',
  tokenId: ''
});

req.headers({
  userid: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/participant/getresponse',
  params: {
    activityId: '',
    appId: '',
    participantId: '',
    questionKey: '',
    siteId: '',
    studyId: '',
    tokenId: ''
  },
  headers: {userid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=';
const options = {method: 'GET', headers: {userid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"userid": @"" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=" in
let headers = Header.add (Header.init ()) "userid" "" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "userid: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=', [
  'headers' => [
    'userid' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/participant/getresponse');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'activityId' => '',
  'appId' => '',
  'participantId' => '',
  'questionKey' => '',
  'siteId' => '',
  'studyId' => '',
  'tokenId' => ''
]);

$request->setHeaders([
  'userid' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/participant/getresponse');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'activityId' => '',
  'appId' => '',
  'participantId' => '',
  'questionKey' => '',
  'siteId' => '',
  'studyId' => '',
  'tokenId' => ''
]));

$request->setHeaders([
  'userid' => ''
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("userid", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("userid", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'userid': "" }

conn.request("GET", "/baseUrl/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/participant/getresponse"

querystring = {"activityId":"","appId":"","participantId":"","questionKey":"","siteId":"","studyId":"","tokenId":""}

headers = {"userid": ""}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/participant/getresponse"

queryString <- list(
  activityId = "",
  appId = "",
  participantId = "",
  questionKey = "",
  siteId = "",
  studyId = "",
  tokenId = ""
)

response <- VERB("GET", url, query = queryString, add_headers('userid' = ''), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=")

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

request = Net::HTTP::Get.new(url)
request["userid"] = ''

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/participant/getresponse') do |req|
  req.headers['userid'] = ''
  req.params['activityId'] = ''
  req.params['appId'] = ''
  req.params['participantId'] = ''
  req.params['questionKey'] = ''
  req.params['siteId'] = ''
  req.params['studyId'] = ''
  req.params['tokenId'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/participant/getresponse";

    let querystring = [
        ("activityId", ""),
        ("appId", ""),
        ("participantId", ""),
        ("questionKey", ""),
        ("siteId", ""),
        ("studyId", ""),
        ("tokenId", ""),
    ];

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("userid", "".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=' \
  --header 'userid: '
http GET '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=' \
  userid:''
wget --quiet \
  --method GET \
  --header 'userid: ' \
  --output-document \
  - '{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId='
import Foundation

let headers = ["userid": ""]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/getresponse?activityId=&appId=&participantId=&questionKey=&siteId=&studyId=&tokenId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Process activity response for participant and store in cloud fire store
{{baseUrl}}/participant/process-response
HEADERS

userId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/process-response");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "userid: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/participant/process-response" {:headers {:userid ""}})
require "http/client"

url = "{{baseUrl}}/participant/process-response"
headers = HTTP::Headers{
  "userid" => ""
}

response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/participant/process-response"),
    Headers =
    {
        { "userid", "" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/participant/process-response");
var request = new RestRequest("", Method.Post);
request.AddHeader("userid", "");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/participant/process-response"

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

	req.Header.Add("userid", "")

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

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

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

}
POST /baseUrl/participant/process-response HTTP/1.1
Userid: 
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/process-response")
  .setHeader("userid", "")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/participant/process-response"))
    .header("userid", "")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/participant/process-response")
  .post(null)
  .addHeader("userid", "")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/process-response")
  .header("userid", "")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/participant/process-response');
xhr.setRequestHeader('userid', '');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/process-response',
  headers: {userid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/participant/process-response';
const options = {method: 'POST', headers: {userid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/participant/process-response',
  method: 'POST',
  headers: {
    userid: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/participant/process-response")
  .post(null)
  .addHeader("userid", "")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/participant/process-response',
  headers: {
    userid: ''
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/process-response',
  headers: {userid: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/participant/process-response');

req.headers({
  userid: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/process-response',
  headers: {userid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/participant/process-response';
const options = {method: 'POST', headers: {userid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"userid": @"" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/process-response"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/participant/process-response" in
let headers = Header.add (Header.init ()) "userid" "" in

Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/participant/process-response",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "userid: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/participant/process-response', [
  'headers' => [
    'userid' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/participant/process-response');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'userid' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/participant/process-response');
$request->setRequestMethod('POST');
$request->setHeaders([
  'userid' => ''
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("userid", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/process-response' -Method POST -Headers $headers
$headers=@{}
$headers.Add("userid", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/process-response' -Method POST -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'userid': "" }

conn.request("POST", "/baseUrl/participant/process-response", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/participant/process-response"

headers = {"userid": ""}

response = requests.post(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/participant/process-response"

response <- VERB("POST", url, add_headers('userid' = ''), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/participant/process-response")

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

request = Net::HTTP::Post.new(url)
request["userid"] = ''

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/participant/process-response') do |req|
  req.headers['userid'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/participant/process-response";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("userid", "".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/participant/process-response \
  --header 'userid: '
http POST {{baseUrl}}/participant/process-response \
  userid:''
wget --quiet \
  --method POST \
  --header 'userid: ' \
  --output-document \
  - {{baseUrl}}/participant/process-response
import Foundation

let headers = ["userid": ""]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/process-response")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Withdraw participant from study from response datastore
{{baseUrl}}/participant/withdraw
HEADERS

appId
QUERY PARAMS

participantId
studyId
studyVersion
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "appid: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/participant/withdraw" {:headers {:appid ""}
                                                                 :query-params {:participantId ""
                                                                                :studyId ""
                                                                                :studyVersion ""}})
require "http/client"

url = "{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion="
headers = HTTP::Headers{
  "appid" => ""
}

response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion="),
    Headers =
    {
        { "appid", "" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=");
var request = new RestRequest("", Method.Post);
request.AddHeader("appid", "");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion="

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

	req.Header.Add("appid", "")

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

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

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

}
POST /baseUrl/participant/withdraw?participantId=&studyId=&studyVersion= HTTP/1.1
Appid: 
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=")
  .setHeader("appid", "")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion="))
    .header("appid", "")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=")
  .post(null)
  .addHeader("appid", "")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=")
  .header("appid", "")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=');
xhr.setRequestHeader('appid', '');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/withdraw',
  params: {participantId: '', studyId: '', studyVersion: ''},
  headers: {appid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=';
const options = {method: 'POST', headers: {appid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=',
  method: 'POST',
  headers: {
    appid: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=")
  .post(null)
  .addHeader("appid", "")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/participant/withdraw?participantId=&studyId=&studyVersion=',
  headers: {
    appid: ''
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/withdraw',
  qs: {participantId: '', studyId: '', studyVersion: ''},
  headers: {appid: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/participant/withdraw');

req.query({
  participantId: '',
  studyId: '',
  studyVersion: ''
});

req.headers({
  appid: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/withdraw',
  params: {participantId: '', studyId: '', studyVersion: ''},
  headers: {appid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=';
const options = {method: 'POST', headers: {appid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"appid": @"" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=" in
let headers = Header.add (Header.init ()) "appid" "" in

Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "appid: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=', [
  'headers' => [
    'appid' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/participant/withdraw');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData([
  'participantId' => '',
  'studyId' => '',
  'studyVersion' => ''
]);

$request->setHeaders([
  'appid' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/participant/withdraw');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
  'participantId' => '',
  'studyId' => '',
  'studyVersion' => ''
]));

$request->setHeaders([
  'appid' => ''
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("appid", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=' -Method POST -Headers $headers
$headers=@{}
$headers.Add("appid", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=' -Method POST -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'appid': "" }

conn.request("POST", "/baseUrl/participant/withdraw?participantId=&studyId=&studyVersion=", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/participant/withdraw"

querystring = {"participantId":"","studyId":"","studyVersion":""}

headers = {"appid": ""}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/participant/withdraw"

queryString <- list(
  participantId = "",
  studyId = "",
  studyVersion = ""
)

response <- VERB("POST", url, query = queryString, add_headers('appid' = ''), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=")

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

request = Net::HTTP::Post.new(url)
request["appid"] = ''

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/participant/withdraw') do |req|
  req.headers['appid'] = ''
  req.params['participantId'] = ''
  req.params['studyId'] = ''
  req.params['studyVersion'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/participant/withdraw";

    let querystring = [
        ("participantId", ""),
        ("studyId", ""),
        ("studyVersion", ""),
    ];

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("appid", "".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .query(&querystring)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=' \
  --header 'appid: '
http POST '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=' \
  appid:''
wget --quiet \
  --method POST \
  --header 'appid: ' \
  --output-document \
  - '{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion='
import Foundation

let headers = ["appid": ""]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/withdraw?participantId=&studyId=&studyVersion=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Get activity state
{{baseUrl}}/participant/get-activity-state
QUERY PARAMS

participantId
studyId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/get-activity-state?participantId=&studyId=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/participant/get-activity-state" {:query-params {:participantId ""
                                                                                         :studyId ""}})
require "http/client"

url = "{{baseUrl}}/participant/get-activity-state?participantId=&studyId="

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/participant/get-activity-state?participantId=&studyId="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/participant/get-activity-state?participantId=&studyId=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/participant/get-activity-state?participantId=&studyId="

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

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

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

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

}
GET /baseUrl/participant/get-activity-state?participantId=&studyId= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/participant/get-activity-state?participantId=&studyId=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/participant/get-activity-state?participantId=&studyId="))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/participant/get-activity-state?participantId=&studyId=")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/participant/get-activity-state?participantId=&studyId=")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/participant/get-activity-state?participantId=&studyId=');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/participant/get-activity-state',
  params: {participantId: '', studyId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/participant/get-activity-state?participantId=&studyId=';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/participant/get-activity-state?participantId=&studyId=',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/participant/get-activity-state?participantId=&studyId=")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/participant/get-activity-state?participantId=&studyId=',
  headers: {}
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/participant/get-activity-state',
  qs: {participantId: '', studyId: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/participant/get-activity-state');

req.query({
  participantId: '',
  studyId: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/participant/get-activity-state',
  params: {participantId: '', studyId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/participant/get-activity-state?participantId=&studyId=';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/get-activity-state?participantId=&studyId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/participant/get-activity-state?participantId=&studyId=" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/participant/get-activity-state?participantId=&studyId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/participant/get-activity-state?participantId=&studyId=');

echo $response->getBody();
setUrl('{{baseUrl}}/participant/get-activity-state');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'participantId' => '',
  'studyId' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/participant/get-activity-state');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'participantId' => '',
  'studyId' => ''
]));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/get-activity-state?participantId=&studyId=' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/get-activity-state?participantId=&studyId=' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/participant/get-activity-state?participantId=&studyId=")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/participant/get-activity-state"

querystring = {"participantId":"","studyId":""}

response = requests.get(url, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/participant/get-activity-state"

queryString <- list(
  participantId = "",
  studyId = ""
)

response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/participant/get-activity-state?participantId=&studyId=")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/participant/get-activity-state') do |req|
  req.params['participantId'] = ''
  req.params['studyId'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/participant/get-activity-state";

    let querystring = [
        ("participantId", ""),
        ("studyId", ""),
    ];

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/participant/get-activity-state?participantId=&studyId='
http GET '{{baseUrl}}/participant/get-activity-state?participantId=&studyId='
wget --quiet \
  --method GET \
  --output-document \
  - '{{baseUrl}}/participant/get-activity-state?participantId=&studyId='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/get-activity-state?participantId=&studyId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Update activity state
{{baseUrl}}/participant/update-activity-state
HEADERS

userId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/participant/update-activity-state");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "userid: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/participant/update-activity-state" {:headers {:userid ""}})
require "http/client"

url = "{{baseUrl}}/participant/update-activity-state"
headers = HTTP::Headers{
  "userid" => ""
}

response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/participant/update-activity-state"),
    Headers =
    {
        { "userid", "" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/participant/update-activity-state");
var request = new RestRequest("", Method.Post);
request.AddHeader("userid", "");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/participant/update-activity-state"

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

	req.Header.Add("userid", "")

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

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

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

}
POST /baseUrl/participant/update-activity-state HTTP/1.1
Userid: 
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/participant/update-activity-state")
  .setHeader("userid", "")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/participant/update-activity-state"))
    .header("userid", "")
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/participant/update-activity-state")
  .post(null)
  .addHeader("userid", "")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/participant/update-activity-state")
  .header("userid", "")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/participant/update-activity-state');
xhr.setRequestHeader('userid', '');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/update-activity-state',
  headers: {userid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/participant/update-activity-state';
const options = {method: 'POST', headers: {userid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/participant/update-activity-state',
  method: 'POST',
  headers: {
    userid: ''
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/participant/update-activity-state")
  .post(null)
  .addHeader("userid", "")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/participant/update-activity-state',
  headers: {
    userid: ''
  }
};

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

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

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

req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/update-activity-state',
  headers: {userid: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/participant/update-activity-state');

req.headers({
  userid: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/participant/update-activity-state',
  headers: {userid: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/participant/update-activity-state';
const options = {method: 'POST', headers: {userid: ''}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"userid": @"" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/participant/update-activity-state"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/participant/update-activity-state" in
let headers = Header.add (Header.init ()) "userid" "" in

Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/participant/update-activity-state",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "userid: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/participant/update-activity-state', [
  'headers' => [
    'userid' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/participant/update-activity-state');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'userid' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/participant/update-activity-state');
$request->setRequestMethod('POST');
$request->setHeaders([
  'userid' => ''
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("userid", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/participant/update-activity-state' -Method POST -Headers $headers
$headers=@{}
$headers.Add("userid", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/participant/update-activity-state' -Method POST -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'userid': "" }

conn.request("POST", "/baseUrl/participant/update-activity-state", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/participant/update-activity-state"

headers = {"userid": ""}

response = requests.post(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/participant/update-activity-state"

response <- VERB("POST", url, add_headers('userid' = ''), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/participant/update-activity-state")

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

request = Net::HTTP::Post.new(url)
request["userid"] = ''

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/participant/update-activity-state') do |req|
  req.headers['userid'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/participant/update-activity-state";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("userid", "".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/participant/update-activity-state \
  --header 'userid: '
http POST {{baseUrl}}/participant/update-activity-state \
  userid:''
wget --quiet \
  --method POST \
  --header 'userid: ' \
  --output-document \
  - {{baseUrl}}/participant/update-activity-state
import Foundation

let headers = ["userid": ""]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/participant/update-activity-state")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Add or update study metadata in response datastore when a study is published from study builder
{{baseUrl}}/studymetadata
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/studymetadata");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/studymetadata")
require "http/client"

url = "{{baseUrl}}/studymetadata"

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/studymetadata"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/studymetadata");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/studymetadata"

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

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

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

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

}
POST /baseUrl/studymetadata HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/studymetadata")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/studymetadata"))
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/studymetadata")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/studymetadata")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/studymetadata');

xhr.send(data);
import axios from 'axios';

const options = {method: 'POST', url: '{{baseUrl}}/studymetadata'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/studymetadata';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/studymetadata',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/studymetadata")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/studymetadata',
  headers: {}
};

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

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

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

req.end();
const request = require('request');

const options = {method: 'POST', url: '{{baseUrl}}/studymetadata'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/studymetadata');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'POST', url: '{{baseUrl}}/studymetadata'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/studymetadata';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/studymetadata"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/studymetadata" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/studymetadata",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/studymetadata');

echo $response->getBody();
setUrl('{{baseUrl}}/studymetadata');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/studymetadata');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/studymetadata' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/studymetadata' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/studymetadata")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/studymetadata"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/studymetadata"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/studymetadata")

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

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/studymetadata') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/studymetadata";

    let client = reqwest::Client::new();
    let response = client.post(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/studymetadata
http POST {{baseUrl}}/studymetadata
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/studymetadata
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/studymetadata")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()