| --- |
| title: RamEx API v1 |
| language_tabs: |
| - python: Python |
| - javascript: JavaScript |
| language_clients: |
| - python: "" |
| - javascript: "" |
| toc_footers: [] |
| includes: [] |
| search: true |
| highlight_theme: darkula |
| headingLevel: 2 |
|
|
| --- |
| |
| <!-- Generator: Widdershins v4.0.1 --> |
|
|
| <h1 id="ramex-api">RamEx API v1</h1> |
|
|
| > Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu. |
|
|
| RamEx拉曼光谱分析系统API文档 |
|
|
| Base URLs: |
|
|
| * <a href="http://localhost:8080/api">http://localhost:8080/api</a> |
|
|
| <a href="https://www.yourapp.com/terms/">Terms of service</a> |
| Email: <a href="mailto:contact@example.com">Support</a> |
| License: BSD License |
|
|
| # Authentication |
|
|
| - HTTP Authentication, scheme: basic |
|
|
| <h1 id="ramex-api-projects">projects</h1> |
|
|
| ## projects_list |
| |
| <a id="opIdprojects_list"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| headers = { |
| 'Accept': 'application/json' |
| } |
| |
| r = requests.get('http://localhost:8080/api/projects/', headers = headers) |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| |
| const headers = { |
| 'Accept':'application/json' |
| }; |
| |
| fetch('http://localhost:8080/api/projects/', |
| { |
| method: 'GET', |
| |
| headers: headers |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `GET /projects/` |
| |
| 项目视图集 |
| |
| > Example responses |
| |
| > 200 Response |
| |
| ```json |
| [ |
| { |
| "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| "name": "string", |
| "created_at": "2019-08-24T14:15:22Z", |
| "last_modified": "2019-08-24T14:15:22Z", |
| "status": "initialized" |
| } |
| ] |
| ``` |
| |
| <h3 id="projects_list-responses">Responses</h3> |
|
|
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|Inline| |
|
|
| <h3 id="projects_list-responseschema">Response Schema</h3> |
|
|
| Status Code **200** |
|
|
| |Name|Type|Required|Restrictions|Description| |
| |---|---|---|---|---| |
| |*anonymous*|[[Project](#schemaproject)]|false|none|none| |
| |» id|string(uuid)|false|read-only|none| |
| |» name|string|true|none|none| |
| |» created_at|string(date-time)|false|read-only|none| |
| |» last_modified|string(date-time)|false|read-only|none| |
| |» status|string|false|read-only|none| |
|
|
| #### Enumerated Values |
|
|
| |Property|Value| |
| |---|---| |
| |status|initialized| |
| |status|data_loaded| |
| |status|preprocessing| |
| |status|preprocessing_completed| |
| |status|analysis| |
| |status|completed| |
| |status|error| |
|
|
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
|
|
| ## projects_create |
| |
| <a id="opIdprojects_create"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| headers = { |
| 'Content-Type': 'application/json', |
| 'Accept': 'application/json' |
| } |
| |
| r = requests.post('http://localhost:8080/api/projects/', headers = headers) |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| const inputBody = '{ |
| "name": "string" |
| }'; |
| const headers = { |
| 'Content-Type':'application/json', |
| 'Accept':'application/json' |
| }; |
| |
| fetch('http://localhost:8080/api/projects/', |
| { |
| method: 'POST', |
| body: inputBody, |
| headers: headers |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `POST /projects/` |
| |
| 项目视图集 |
| |
| > Body parameter |
| |
| ```json |
| { |
| "name": "string" |
| } |
| ``` |
| |
| <h3 id="projects_create-parameters">Parameters</h3> |
| |
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |body|body|[Project](#schemaproject)|true|none| |
| |
| > Example responses |
| |
| > 201 Response |
| |
| ```json |
| { |
| "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| "name": "string", |
| "created_at": "2019-08-24T14:15:22Z", |
| "last_modified": "2019-08-24T14:15:22Z", |
| "status": "initialized" |
| } |
| ``` |
| |
| <h3 id="projects_create-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|[Project](#schemaproject)| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_read |
|
|
| <a id="opIdprojects_read"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| headers = { |
| 'Accept': 'application/json' |
| } |
| |
| r = requests.get('http://localhost:8080/api/projects/{id}/', headers = headers) |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| const headers = { |
| 'Accept':'application/json' |
| }; |
| |
| fetch('http://localhost:8080/api/projects/{id}/', |
| { |
| method: 'GET', |
| |
| headers: headers |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{id}/` |
|
|
| 项目视图集 |
|
|
| <h3 id="projects_read-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |id|path|string(uuid)|true|A UUID string identifying this 项目.| |
|
|
| > Example responses |
|
|
| > 200 Response |
|
|
| ```json |
| { |
| "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| "name": "string", |
| "description": "string", |
| "created_at": "2019-08-24T14:15:22Z", |
| "last_modified": "2019-08-24T14:15:22Z", |
| "status": "initialized", |
| "data_files": [ |
| { |
| "id": 0, |
| "filename": "string", |
| "uploaded_at": "2019-08-24T14:15:22Z", |
| "wavenumber_min": 0, |
| "wavenumber_max": 0 |
| } |
| ], |
| "active_data_file": { |
| "id": 0, |
| "filename": "string", |
| "uploaded_at": "2019-08-24T14:15:22Z", |
| "wavenumber_min": 0, |
| "wavenumber_max": 0 |
| }, |
| "data_files_count": "string" |
| } |
| ``` |
|
|
| <h3 id="projects_read-responses">Responses</h3> |
|
|
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|[ProjectDetail](#schemaprojectdetail)| |
|
|
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
|
|
| ## projects_update |
| |
| <a id="opIdprojects_update"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| headers = { |
| 'Content-Type': 'application/json', |
| 'Accept': 'application/json' |
| } |
| |
| r = requests.put('http://localhost:8080/api/projects/{id}/', headers = headers) |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| const inputBody = '{ |
| "name": "string" |
| }'; |
| const headers = { |
| 'Content-Type':'application/json', |
| 'Accept':'application/json' |
| }; |
| |
| fetch('http://localhost:8080/api/projects/{id}/', |
| { |
| method: 'PUT', |
| body: inputBody, |
| headers: headers |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `PUT /projects/{id}/` |
| |
| 项目视图集 |
| |
| > Body parameter |
| |
| ```json |
| { |
| "name": "string" |
| } |
| ``` |
| |
| <h3 id="projects_update-parameters">Parameters</h3> |
| |
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |body|body|[Project](#schemaproject)|true|none| |
| |id|path|string(uuid)|true|A UUID string identifying this 项目.| |
| |
| > Example responses |
| |
| > 200 Response |
| |
| ```json |
| { |
| "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| "name": "string", |
| "created_at": "2019-08-24T14:15:22Z", |
| "last_modified": "2019-08-24T14:15:22Z", |
| "status": "initialized" |
| } |
| ``` |
| |
| <h3 id="projects_update-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|[Project](#schemaproject)| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_partial_update |
| |
| <a id="opIdprojects_partial_update"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| headers = { |
| 'Content-Type': 'application/json', |
| 'Accept': 'application/json' |
| } |
| |
| r = requests.patch('http://localhost:8080/api/projects/{id}/', headers = headers) |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| const inputBody = '{ |
| "name": "string" |
| }'; |
| const headers = { |
| 'Content-Type':'application/json', |
| 'Accept':'application/json' |
| }; |
| |
| fetch('http://localhost:8080/api/projects/{id}/', |
| { |
| method: 'PATCH', |
| body: inputBody, |
| headers: headers |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `PATCH /projects/{id}/` |
| |
| 项目视图集 |
| |
| > Body parameter |
| |
| ```json |
| { |
| "name": "string" |
| } |
| ``` |
| |
| <h3 id="projects_partial_update-parameters">Parameters</h3> |
| |
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |body|body|[Project](#schemaproject)|true|none| |
| |id|path|string(uuid)|true|A UUID string identifying this 项目.| |
| |
| > Example responses |
| |
| > 200 Response |
| |
| ```json |
| { |
| "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| "name": "string", |
| "created_at": "2019-08-24T14:15:22Z", |
| "last_modified": "2019-08-24T14:15:22Z", |
| "status": "initialized" |
| } |
| ``` |
| |
| <h3 id="projects_partial_update-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|[Project](#schemaproject)| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_delete |
|
|
| <a id="opIdprojects_delete"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.delete('http://localhost:8080/api/projects/{id}/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{id}/', |
| { |
| method: 'DELETE' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `DELETE /projects/{id}/` |
|
|
| 删除项目,包括其关联的所有文件和数据 |
|
|
| <h3 id="projects_delete-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |id|path|string(uuid)|true|A UUID string identifying this 项目.| |
|
|
| <h3 id="projects_delete-responses">Responses</h3> |
|
|
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| |
|
|
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
|
|
| ## projects_data_group_info_list |
|
|
| <a id="opIdprojects_data_group_info_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/data/group_info/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/data/group_info/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/data/group_info/` |
|
|
| 获取分组信息视图 |
|
|
| <h3 id="projects_data_group_info_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_data_group_info_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_data_save_rds_create |
| |
| <a id="opIdprojects_data_save_rds_create"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/data/save_rds/') |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/data/save_rds/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `POST /projects/{project_id}/data/save_rds/` |
| |
| 保存确认的RDS数据视图 |
| |
| <h3 id="projects_data_save_rds_create-parameters">Parameters</h3> |
| |
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
|
|
| <h3 id="projects_data_save_rds_create-responses">Responses</h3> |
|
|
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
|
|
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
|
|
| ## projects_data_upload_create |
| |
| <a id="opIdprojects_data_upload_create"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/data/upload/') |
|
|
| print(r.json()) |
|
|
| ``` |
| |
| ```javascript |
|
|
| fetch('http://localhost:8080/api/projects/{project_id}/data/upload/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `POST /projects/{project_id}/data/upload/` |
|
|
| 数据上传视图 |
|
|
| <h3 id="projects_data_upload_create-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_data_upload_create-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_data_delete_delete |
|
|
| <a id="opIdprojects_data_delete_delete"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.delete('http://localhost:8080/api/projects/{project_id}/data/{file_id}/delete/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/data/{file_id}/delete/', |
| { |
| method: 'DELETE' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `DELETE /projects/{project_id}/data/{file_id}/delete/` |
|
|
| 删除数据文件视图 |
|
|
| <h3 id="projects_data_delete_delete-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |file_id|path|string|true|none| |
|
|
| <h3 id="projects_data_delete_delete-responses">Responses</h3> |
|
|
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| |
|
|
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
|
|
| ## projects_data_select_create |
| |
| <a id="opIdprojects_data_select_create"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/data/{file_id}/select/') |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/data/{file_id}/select/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `POST /projects/{project_id}/data/{file_id}/select/` |
| |
| 选择活动数据文件视图 |
| |
| <h3 id="projects_data_select_create-parameters">Parameters</h3> |
| |
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |file_id|path|string|true|none| |
| |
| <h3 id="projects_data_select_create-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_data_update_create |
|
|
| <a id="opIdprojects_data_update_create"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/data/{file_id}/update/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/data/{file_id}/update/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `POST /projects/{project_id}/data/{file_id}/update/` |
|
|
| 更新数据文件视图 |
|
|
| <h3 id="projects_data_update_create-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |file_id|path|string|true|none| |
|
|
| <h3 id="projects_data_update_create-responses">Responses</h3> |
|
|
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
|
|
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
|
|
| ## projects_meta-based_create |
|
|
| <a id="opIdprojects_meta-based_create"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/meta-based/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/meta-based/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `POST /projects/{project_id}/meta-based/` |
|
|
| 基于元数据分析任务视图 |
|
|
| <h3 id="projects_meta-based_create-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-based_create-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_meta-based_export_list |
|
|
| <a id="opIdprojects_meta-based_export_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/meta-based/export/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/meta-based/export/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/meta-based/export/` |
|
|
| 基于元数据分析结果导出视图 |
|
|
| <h3 id="projects_meta-based_export_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-based_export_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_meta-based_results_list |
|
|
| <a id="opIdprojects_meta-based_results_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/meta-based/results/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/meta-based/results/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/meta-based/results/` |
|
|
| 基于元数据分析结果视图 |
|
|
| <h3 id="projects_meta-based_results_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-based_results_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_meta-based_status_list |
|
|
| <a id="opIdprojects_meta-based_status_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/meta-based/status/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/meta-based/status/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/meta-based/status/` |
|
|
| 基于元数据分析状态视图 |
|
|
| <h3 id="projects_meta-based_status_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-based_status_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_meta-free_create |
| |
| <a id="opIdprojects_meta-free_create"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/meta-free/') |
|
|
| print(r.json()) |
|
|
| ``` |
| |
| ```javascript |
|
|
| fetch('http://localhost:8080/api/projects/{project_id}/meta-free/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `POST /projects/{project_id}/meta-free/` |
|
|
| 无元数据分析任务视图 |
|
|
| <h3 id="projects_meta-free_create-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-free_create-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_meta-free_export_list |
|
|
| <a id="opIdprojects_meta-free_export_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/meta-free/export/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/meta-free/export/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/meta-free/export/` |
|
|
| 无元数据分析结果导出视图 |
|
|
| <h3 id="projects_meta-free_export_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-free_export_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_meta-free_results_list |
|
|
| <a id="opIdprojects_meta-free_results_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/meta-free/results/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/meta-free/results/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/meta-free/results/` |
|
|
| 无元数据分析结果视图 |
|
|
| <h3 id="projects_meta-free_results_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-free_results_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_meta-free_status_list |
|
|
| <a id="opIdprojects_meta-free_status_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/meta-free/status/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/meta-free/status/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/meta-free/status/` |
|
|
| 无元数据分析状态视图 |
|
|
| <h3 id="projects_meta-free_status_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_meta-free_status_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_preprocessing_create |
| |
| <a id="opIdprojects_preprocessing_create"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/preprocessing/') |
|
|
| print(r.json()) |
|
|
| ``` |
| |
| ```javascript |
|
|
| fetch('http://localhost:8080/api/projects/{project_id}/preprocessing/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `POST /projects/{project_id}/preprocessing/` |
|
|
| 预处理任务视图 |
|
|
| <h3 id="projects_preprocessing_create-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_preprocessing_create-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_preprocessing_export_list |
|
|
| <a id="opIdprojects_preprocessing_export_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/preprocessing/export/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/preprocessing/export/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/preprocessing/export/` |
|
|
| 预处理数据导出视图 |
|
|
| <h3 id="projects_preprocessing_export_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_preprocessing_export_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_preprocessing_status_list |
|
|
| <a id="opIdprojects_preprocessing_status_list"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/preprocessing/status/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/preprocessing/status/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/preprocessing/status/` |
|
|
| 预处理状态视图 |
|
|
| <h3 id="projects_preprocessing_status_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_preprocessing_status_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_results_export_create |
|
|
| <a id="opIdprojects_results_export_create"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/projects/{project_id}/results/export/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/results/export/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `POST /projects/{project_id}/results/export/` |
|
|
| 导出结果视图 |
|
|
| <h3 id="projects_results_export_create-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_results_export_create-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## projects_results_export_read |
|
|
| <a id="opIdprojects_results_export_read"></a> |
|
|
| > Code samples |
|
|
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/results/export/{export_id}/') |
| |
| print(r.json()) |
| |
| ``` |
|
|
| ```javascript |
| |
| fetch('http://localhost:8080/api/projects/{project_id}/results/export/{export_id}/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
|
|
| `GET /projects/{project_id}/results/export/{export_id}/` |
|
|
| 导出状态视图 |
|
|
| <h3 id="projects_results_export_read-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |export_id|path|string|true|none| |
|
|
| <h3 id="projects_results_export_read-responses">Responses</h3> |
|
|
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
|
|
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
|
|
| ## projects_results_summary_list |
| |
| <a id="opIdprojects_results_summary_list"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/projects/{project_id}/results/summary/') |
|
|
| print(r.json()) |
|
|
| ``` |
| |
| ```javascript |
|
|
| fetch('http://localhost:8080/api/projects/{project_id}/results/summary/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `GET /projects/{project_id}/results/summary/` |
|
|
| 结果摘要视图 |
|
|
| <h3 id="projects_results_summary_list-parameters">Parameters</h3> |
|
|
| |Name|In|Type|Required|Description| |
| |---|---|---|---|---| |
| |project_id|path|string|true|none| |
| |
| <h3 id="projects_results_summary_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| <h1 id="ramex-api-token">token</h1> |
| |
| ## token_validate_list |
| |
| <a id="opIdtoken_validate_list"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/token/validate/') |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| |
| fetch('http://localhost:8080/api/token/validate/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `GET /token/validate/` |
| |
| GET方法也支持Token验证(通过URL参数) |
| |
| <h3 id="token_validate_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| ## 验证Token |
| |
| <a id="opIdtoken_validate_create"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.post('http://localhost:8080/api/token/validate/') |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| |
| fetch('http://localhost:8080/api/token/validate/', |
| { |
| method: 'POST' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `POST /token/validate/` |
| |
| 支持的参数传递方式: |
| 1. JSON: {"token": "your_token"} |
| 2. Form data: token=your_token |
| 3. URL参数: ?token=your_token |
| 4. Header: Authorization: Token your_token |
| |
| <h3 id="验证token-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| <h1 id="ramex-api-user">user</h1> |
| |
| ## user_info_list |
| |
| <a id="opIduser_info_list"></a> |
| |
| > Code samples |
| |
| ```python |
| import requests |
| |
| r = requests.get('http://localhost:8080/api/user/info/') |
| |
| print(r.json()) |
| |
| ``` |
| |
| ```javascript |
| |
| fetch('http://localhost:8080/api/user/info/', |
| { |
| method: 'GET' |
| |
| }) |
| .then(function(res) { |
| return res.json(); |
| }).then(function(body) { |
| console.log(body); |
| }); |
| |
| ``` |
| |
| `GET /user/info/` |
| |
| 获取当前用户信息 |
| |
| <h3 id="user_info_list-responses">Responses</h3> |
| |
| |Status|Meaning|Description|Schema| |
| |---|---|---|---| |
| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|None| |
| |
| <aside class="warning"> |
| To perform this operation, you must be authenticated by means of one of the following methods: |
| Basic |
| </aside> |
| |
| # Schemas |
| |
| <h2 id="tocS_Project">Project</h2> |
| <!-- backwards compatibility --> |
| <a id="schemaproject"></a> |
| <a id="schema_Project"></a> |
| <a id="tocSproject"></a> |
| <a id="tocsproject"></a> |
| |
| ```json |
| { |
| "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| "name": "string", |
| "created_at": "2019-08-24T14:15:22Z", |
| "last_modified": "2019-08-24T14:15:22Z", |
| "status": "initialized" |
| } |
| |
| ``` |
| |
| ### Properties |
| |
| |Name|Type|Required|Restrictions|Description| |
| |---|---|---|---|---| |
| |id|string(uuid)|false|read-only|none| |
| |name|string|true|none|none| |
| |created_at|string(date-time)|false|read-only|none| |
| |last_modified|string(date-time)|false|read-only|none| |
| |status|string|false|read-only|none| |
| |
| #### Enumerated Values |
| |
| |Property|Value| |
| |---|---| |
| |status|initialized| |
| |status|data_loaded| |
| |status|preprocessing| |
| |status|preprocessing_completed| |
| |status|analysis| |
| |status|completed| |
| |status|error| |
| |
| <h2 id="tocS_DataFile">DataFile</h2> |
| <!-- backwards compatibility --> |
| <a id="schemadatafile"></a> |
| <a id="schema_DataFile"></a> |
| <a id="tocSdatafile"></a> |
| <a id="tocsdatafile"></a> |
| |
| ```json |
| { |
| "id": 0, |
| "filename": "string", |
| "uploaded_at": "2019-08-24T14:15:22Z", |
| "wavenumber_min": 0, |
| "wavenumber_max": 0 |
| } |
|
|
| ``` |
| |
| ### Properties |
| |
| |Name|Type|Required|Restrictions|Description| |
| |---|---|---|---|---| |
| |id|integer|false|read-only|none| |
| |filename|string|false|read-only|none| |
| |uploaded_at|string(date-time)|false|read-only|none| |
| |wavenumber_min|number¦null|false|none|none| |
| |wavenumber_max|number¦null|false|none|none| |
| |
| <h2 id="tocS_ProjectDetail">ProjectDetail</h2> |
| <!-- backwards compatibility --> |
| <a id="schemaprojectdetail"></a> |
| <a id="schema_ProjectDetail"></a> |
| <a id="tocSprojectdetail"></a> |
| <a id="tocsprojectdetail"></a> |
| |
| ```json |
| { |
| "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", |
| "name": "string", |
| "description": "string", |
| "created_at": "2019-08-24T14:15:22Z", |
| "last_modified": "2019-08-24T14:15:22Z", |
| "status": "initialized", |
| "data_files": [ |
| { |
| "id": 0, |
| "filename": "string", |
| "uploaded_at": "2019-08-24T14:15:22Z", |
| "wavenumber_min": 0, |
| "wavenumber_max": 0 |
| } |
| ], |
| "active_data_file": { |
| "id": 0, |
| "filename": "string", |
| "uploaded_at": "2019-08-24T14:15:22Z", |
| "wavenumber_min": 0, |
| "wavenumber_max": 0 |
| }, |
| "data_files_count": "string" |
| } |
| |
| ``` |
| |
| ### Properties |
| |
| |Name|Type|Required|Restrictions|Description| |
| |---|---|---|---|---| |
| |id|string(uuid)|false|read-only|none| |
| |name|string|true|none|none| |
| |description|string|false|none|none| |
| |created_at|string(date-time)|false|read-only|none| |
| |last_modified|string(date-time)|false|read-only|none| |
| |status|string|false|read-only|none| |
| |data_files|[[DataFile](#schemadatafile)]|false|read-only|none| |
| |active_data_file|[DataFile](#schemadatafile)|false|none|none| |
| |data_files_count|string|false|read-only|none| |
| |
| #### Enumerated Values |
| |
| |Property|Value| |
| |---|---| |
| |status|initialized| |
| |status|data_loaded| |
| |status|preprocessing| |
| |status|preprocessing_completed| |
| |status|analysis| |
| |status|completed| |
| |status|error| |
| |
| |