@@ -1473,9 +1473,9 @@ paths:
1473
1473
1474
1474
```bash
1475
1475
1476
- curl -X POST -H 'Content-type: application/json' https://localhost:8080/api/ml -H 'Authorization: Token abc123'\
1476
+ curl -X POST -H 'Content-type: application/json' https://localhost:8080/api/ml -H 'Authorization: Token abc123' --data '{"url": "http://localhost:9090", "project": {project_id}}'
1477
1477
1478
- --data '{"url": "http://localhost:9090", "project": {project_id}}'
1478
+ ```
1479
1479
requestBody :
1480
1480
$ref : " #/components/requestBodies/api_ml_createData"
1481
1481
responses :
@@ -2404,7 +2404,7 @@ paths:
2404
2404
control tag named my_bbox should be included with 0.33 weight
2405
2405
in agreement calculation, and the first label Car should be
2406
2406
twice as important as Airplane, then you need to specify:
2407
- \ {'my_bbox': \ {'type': 'RectangleLabels', 'labels': \ {'Car': 1.0,
2407
+ {'my_bbox': {'type': 'RectangleLabels', 'labels': {'Car': 1.0,
2408
2408
'Airplane': 0.5}, 'overall': 0.33}}
2409
2409
type : object
2410
2410
example :
@@ -2595,7 +2595,7 @@ paths:
2595
2595
control tag named my_bbox should be included with 0.33 weight
2596
2596
in agreement calculation, and the first label Car should be
2597
2597
twice as important as Airplane, then you need to specify:
2598
- \ {'my_bbox': \ {'type': 'RectangleLabels', 'labels': \ {'Car': 1.0,
2598
+ {'my_bbox': {'type': 'RectangleLabels', 'labels': {'Car': 1.0,
2599
2599
'Airplane': 0.5}, 'overall': 0.33}}
2600
2600
type : object
2601
2601
example :
@@ -2723,7 +2723,7 @@ paths:
2723
2723
There are three possible ways to import tasks with this endpoint:
2724
2724
2725
2725
2726
- ### 1\ . **POST with data**
2726
+ ### 1. **POST with data**
2727
2727
2728
2728
Send JSON tasks as POST data. Only JSON is supported for POSTing files directly.
2729
2729
@@ -2734,14 +2734,12 @@ paths:
2734
2734
2735
2735
```bash
2736
2736
2737
- curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' \
2738
-
2739
- -X POST 'https://localhost:8080/api/projects/1/import' --data '[{"text": "Some text 1"}, {"text": "Some text 2"}]'
2737
+ curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' -X POST 'https://localhost:8080/api/projects/1/import' --data '[{"text": "Some text 1"}, {"text": "Some text 2"}]'
2740
2738
2741
2739
```
2742
2740
2743
2741
2744
- ### 2\ . **POST with files**
2742
+ ### 2. **POST with files**
2745
2743
2746
2744
Send tasks as files. You can attach multiple files with different names.
2747
2745
@@ -2762,25 +2760,19 @@ paths:
2762
2760
2763
2761
```bash
2764
2762
2765
- curl -H 'Authorization: Token abc123' \
2766
-
2767
- -X POST 'https://localhost:8080/api/projects/1/import' -F ‘file=@path/to/my_file.csv’
2763
+ curl -H 'Authorization: Token abc123' -X POST 'https://localhost:8080/api/projects/1/import' -F 'file=@path/to/my_file.csv'
2768
2764
2769
2765
```
2770
2766
2771
2767
2772
- ### 3\ . **POST with URL**
2768
+ ### 3. **POST with URL**
2773
2769
2774
2770
You can also provide a URL to a file with labeling tasks. Supported file formats are the same as in option 2.
2775
2771
2776
2772
2777
2773
```bash
2778
2774
2779
- curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' \
2780
-
2781
- -X POST 'https://localhost:8080/api/projects/1/import' \
2782
-
2783
- --data '[{"url": "http://example.com/test1.csv"}, {"url": "http://example.com/test2.csv"}]'
2775
+ curl -H 'Content-Type: application/json' -H 'Authorization: Token abc123' -X POST 'https://localhost:8080/api/projects/1/import' --data '[{"url": "http://example.com/test1.csv"}, {"url": "http://example.com/test2.csv"}]'
2784
2776
2785
2777
```
2786
2778
@@ -6710,7 +6702,7 @@ components:
6710
6702
control tag named my_bbox should be included with 0.33 weight
6711
6703
in agreement calculation, and the first label Car should be
6712
6704
twice as important as Airplane, then you need to specify:
6713
- \ {'my_bbox': \ {'type': 'RectangleLabels', 'labels': \ {'Car': 1.0,
6705
+ {'my_bbox': {'type': 'RectangleLabels', 'labels': {'Car': 1.0,
6714
6706
'Airplane': 0.5}, 'overall': 0.33}}
6715
6707
type : object
6716
6708
example :
@@ -8652,7 +8644,7 @@ components:
8652
8644
control tag named my_bbox should be included with 0.33 weight
8653
8645
in agreement calculation, and the first label Car should be
8654
8646
twice as important as Airplane, then you need to specify:
8655
- \ {'my_bbox': \ {'type': 'RectangleLabels', 'labels': \ {'Car': 1.0,
8647
+ {'my_bbox': {'type': 'RectangleLabels', 'labels': {'Car': 1.0,
8656
8648
'Airplane': 0.5}, 'overall': 0.33}}
8657
8649
type : object
8658
8650
nullable : true
0 commit comments