# List mutually exclusive study collections in a project GET https://api.prolific.com/api/v1/study-collections/mutually-exclusive/ List studies Reference: https://beta-docs.prolific.com/api-reference/study-collections/list-mutually-exclusive-study-collections ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: List mutually exclusive study collections in a project version: endpoint_studyCollections.ListMutuallyExclusiveStudyCollections paths: /api/v1/study-collections/mutually-exclusive/: get: operationId: list-mutually-exclusive-study-collections summary: List mutually exclusive study collections in a project description: List studies tags: - - subpackage_studyCollections parameters: - name: project_id in: query required: true schema: type: string - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: List of mutually exclusive study collections content: application/json: schema: $ref: '#/components/schemas/MutuallyExclusiveStudyCollectionsResponse' '400': description: Error content: {} components: schemas: MutuallyExclusiveStudyCollectionListStatus: type: string enum: - value: ACTIVE - value: PAUSED - value: UNPUBLISHED - value: PUBLISHING - value: AWAITING_REVIEW - value: SCHEDULED MutuallyExclusiveStudyCollectionList: type: object properties: name: type: string description: Mutually exclusive study collection name description: type: string description: A description of the study collection publish_at: type: - string - 'null' description: >- Datetime and timezone the study collection should be scheduled to be published at study_ids: type: array items: type: string description: >- List of study ids you wish to include in the collection. Note, this will overwrite the current list of studies in the collection id: type: string description: Mutually exclusive study collection id status: $ref: '#/components/schemas/MutuallyExclusiveStudyCollectionListStatus' description: Status of the study collection MutuallyExclusiveStudyCollectionsResponse: type: object properties: results: type: array items: $ref: '#/components/schemas/MutuallyExclusiveStudyCollectionList' description: List of all mutually exclusive study collections in a project required: - results ``` ## SDK Code Examples ```python import requests url = "https://api.prolific.com/api/v1/study-collections/mutually-exclusive/" querystring = {"project_id":"65786062db3b35bcbeb07bcc"} headers = {"Authorization": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.prolific.com/api/v1/study-collections/mutually-exclusive/?project_id=65786062db3b35bcbeb07bcc'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.prolific.com/api/v1/study-collections/mutually-exclusive/?project_id=65786062db3b35bcbeb07bcc" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.prolific.com/api/v1/study-collections/mutually-exclusive/?project_id=65786062db3b35bcbeb07bcc") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.get("https://api.prolific.com/api/v1/study-collections/mutually-exclusive/?project_id=65786062db3b35bcbeb07bcc") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://api.prolific.com/api/v1/study-collections/mutually-exclusive/?project_id=65786062db3b35bcbeb07bcc', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp var client = new RestClient("https://api.prolific.com/api/v1/study-collections/mutually-exclusive/?project_id=65786062db3b35bcbeb07bcc"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/study-collections/mutually-exclusive/?project_id=65786062db3b35bcbeb07bcc")! 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() ```