{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"3c4c6789-75f2-4bfa-8691-3bbceec1bcdb","name":"Deployed endpoints","description":"The following collection outlines the available endpoints for storing, editing, and retrieving data on the ExtremeXP server maintained by CUNI. Access to these endpoints requires an access token, which can be obtained at [https://expvis.smartarch.cz/account/api](https://expvis.smartarch.cz/account/api). The base API server is [https://api.expvis.smartarch.cz/api/](https://api.expvis.smartarch.cz/api/).\n\n_As a rule of thumb, the endpoints are meant to be used by the ExtremeXP engine and visualization modules in the following way:_\n\n1. the engine is instructed to run a new experiment, it issues a PUT request to the add-new-executed-experiment endpoint, which contains the DSL specification of the experiment and returns an (auto-generated) experiment id.\n    \n2. Following the experimentation strategy logic of the experiment (random, full factorial, etc.) the engine then creates one or more workflows and sends them to the executionware for execution. At the point of creating a workflow (and before sending them for execution), the engine sends a PUT request to the add-new-executed-workflow endpoint, which contains the ID of the experiment the workflow belongs to and returns an (auto-generated) workflow id.\n    \n3. Workflow can include various parameters and configurations as defined by the experiment's requirements. Once the workflow has been created and its ID obtained, the engine updates the workflow’s details or queries for further information using the appropriate endpoints. This process ensures that the workflows are correctly associated with their respective experiments and are properly managed throughout their lifecycle.\n    \n4. Metrics associated with the workflows are then collected and analyzed as defined by the experiment’s specifications. The engine might use additional endpoints to manage these metrics, update them, or retrieve aggregated data as needed.\n    \n\nEndpoints are categorized by their HTTP methods:\n\n- **PUT**: Used to create or update data. A successful response will be `201 Created` (for creation), along with the ID of the created or updated element. Requires a JSON body representing the element.\n    \n- **GET**: Used to retrieve data. A successful response will be `200 OK` with the element returned as JSON. Requires a path variable specifying the ID of the element.\n    \n- **POST**: Used for updating or querying data. For updates, a JSON body and the ID of the element are required. For queries, only a JSON body specifying the filter criteria is needed.\n    \n\nEndpoints interact with data at three levels: executed experiments, executed workflows, and metrics.\n\n### Executed Experiments\n\n- **PUT**: Creates a new executed experiment. The `model` attribute, given as text, represents the DSL used for the experiment. Conversion from DSL to JSON occurs when using `GET` to read the executed experiment, not when calling this endpoint.\n    \n- **POST**: Updates an existing executed experiment.\n    \n- **GET**: Reads the executed experiment. If the `model` attribute is present, it is converted from DSL to JSON and included in the response.\n    \n- **POST (QUERY)**: Queries executed experiments based on the provided JSON body.\n    \n- **GET (ALL)**: Returns all executed experiments.\n    \n- **POST (SORT)**: Sorts the workflows of an executed experiment according to the provided JSON body. The JSON body should specify the desired order of workflows. For example, to move workflow D after workflow B in the order \\[A, B, C, D\\], the JSON body should be:  \n    {  \n    \"precedence\": {  \n    \"B\": \"C\"  \n    }  \n    }\n    \n\n### Executed Workflow\n\n- **PUT**: creates a new executed workflow. the JSON body expects an executed experiment ID (which is created with the previous endpoint) to add the newly created workflow to the executed experiment. Once this is done, if one GET s the associated executed experiment, the newly created workflow is listed in workflow_ids. The JSON body also can have metrics, datasets, and executed tasks. However; the metric list (if provided) is then created as a separate document associated with the current workflow and when reading the workflow, the metric has an ID. This ID then can be used to interact with the metric separately.  \n    For example, if workflow A has metrics X and Y; when putting them in the list of metrics as \\[X, Y\\], and then reading workflow A, the response will contain a map of each metric ID to its object {A_ID: A, B_ID: B}.\n    \n- **POST**: Updates an existing executed workflow.\n    \n- **GET**: Reads the executed workflow. If metrics are present, their IDs and corresponding objects are included in the response.\n    \n- **POST (QUERY)**: Queries executed workflows based on the provided JSON body.\n    \n\n### Metric\n\n- **PUT**: Creates a new metric. The JSON body should include an executed workflow ID. Metrics have `parent_type` and `parent_id` attributes to specify their owner. For metrics associated with an executed workflow, set `parent_type` to \"executed workflow\" and `parent_id` to the workflow's ID. The metric is automatically linked to the executed experiment.\n    \n- **POST**: Updates an existing metric.\n    \n- **GET**: Reads the metric and provides aggregation data such as sum, min, max, count, average, and median. The aggregation is only present if the metric contains a `records` field containing the metric data.\n    \n- **PUT (METRIC DATA)**: Adds records to an existing metric. Requires a metric ID and a JSON body with the records.\n    \n\n| {baseURL}/URL | /:variable | PUT | POST | GET |\n| --- | --- | --- | --- | --- |\n| experiments | \\- | [creates a new experiment](#7812075e-891c-4b19-83be-77486663351a) | \\- | [reads all experiments](#5cfb6c95-253b-4f10-8ae6-c402abdb7c2b) |\n| experiments | experimentId | \\- | [updates the given experiment](#08c9edfd-8726-4be9-9533-9a36a1288060) | [reads the given experiment](#709da60b-f3a8-44a6-861f-681cb2dc6102) |\n| experiments-query | \\- | \\- | [query experiments](#2e904088-7d5e-48cb-b825-56c02a5d9913) | \\- |\n| experiments-metrics | \\- | \\- | [experiments metrics](#cb271b18-5fa7-46c4-8d84-3a55800478aa) | \\- |\n| experiments-sort-workflows | experimentId | \\- | [sorts workflows for the given experiment](#b4dd69e7-60cd-41d8-8f5d-eb48e93f831b) | \\- |\n| workflows | \\- | [creates a new workflow](#39f3c146-215f-498d-9026-714a5d443b5b) | \\- | [reads all workflows](#c55a0b64-8348-4229-8d6e-a2e2567a3e5a) |\n| workflows | workflowId | \\- | [updates the given workflow](#b77d31b7-8885-4005-a0d7-71984e4c1e3a) | [reads the given workflow](#e58a1a38-1742-45bb-878b-3c0ce472ab5d) |\n| workflows-query | \\- | \\- | [query workflows](#3de930b7-468e-4602-bf49-732d758ef7e6) | \\- |\n| metrics | \\- | [creates a new metric](#a5f66bbb-f37d-42aa-8596-5b92c6705836) | \\- | [reads all metrics](#3e8f3a50-72e2-4ee5-8bad-0c0a5d2f8644) |\n| metrics | metricId | \\- | [updates the given metric](#dec320b9-e4de-4920-8974-0c5d43c72314) | [reads the given metric](#51981823-92e9-41ec-9645-02e22ffc9783) |\n| metrics-query | \\- | \\- | [query metrics](#e7536efb-121f-4717-9b6a-571dceb230e3) | \\- |\n| metrics-data | metricId | [updates the metric records](#d5c03bf9-f979-4ec7-aefe-41ed5b6fc3ea) | \\- | \\- |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"37096355","team":6350964,"collectionId":"3c4c6789-75f2-4bfa-8691-3bbceec1bcdb","publishedId":"2sA3sAio7d","public":true,"publicUrl":"https://documenter-api.postman.tech/view/37096355/2sA3sAio7d","privateUrl":"https://go.postman.co/documentation/37096355-3c4c6789-75f2-4bfa-8691-3bbceec1bcdb","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.0","publishDate":"2024-08-27T22:54:58.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/b713fbe8ccbedfa88c6440445a23cfb19bd421cfe8ae5be1d4cfac66a5225f4d","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sA3sAio7d"}