Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions fern/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1473,9 +1473,9 @@ paths:

```bash

curl -X POST -H 'Content-type: application/json' https://localhost:8080/api/ml -H 'Authorization: Token abc123'\
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}}'

--data '{"url": "http://localhost:9090", "project": {project_id}}'
```
requestBody:
$ref: "#/components/requestBodies/api_ml_createData"
responses:
Expand Down Expand Up @@ -2723,7 +2723,7 @@ paths:
There are three possible ways to import tasks with this endpoint:


### 1\. **POST with data**
### 1. **POST with data**

Send JSON tasks as POST data. Only JSON is supported for POSTing files directly.

Expand All @@ -2734,14 +2734,12 @@ paths:

```bash

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"}]'
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"}]'

```


### 2\. **POST with files**
### 2. **POST with files**

Send tasks as files. You can attach multiple files with different names.

Expand All @@ -2762,25 +2760,19 @@ paths:

```bash

curl -H 'Authorization: Token abc123' \

-X POST 'https://localhost:8080/api/projects/1/import' -F ‘file=@path/to/my_file.csv’
curl -H 'Authorization: Token abc123' -X POST 'https://localhost:8080/api/projects/1/import' -F 'file=@path/to/my_file.csv'

```


### 3\. **POST with URL**
### 3. **POST with URL**

You can also provide a URL to a file with labeling tasks. Supported file formats are the same as in option 2.


```bash

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"}]'
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"}]'

```

Expand Down
23 changes: 7 additions & 16 deletions fern/openapi/overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,7 @@ paths:

```bash

curl -H 'Authorization: Token abc123' \
-X POST 'https://localhost:8080/api/import/file-upload/245' -F ‘file=@path/to/my_file.csv’
curl -H 'Authorization: Token abc123' -X POST 'https://localhost:8080/api/import/file-upload/245' -F 'file=@path/to/my_file.csv'

```

Expand Down Expand Up @@ -841,7 +840,7 @@ paths:
There are three possible ways to import tasks with this endpoint:


#### 1\. **POST with data**
#### 1. **POST with data**

Send JSON tasks as POST data. Only JSON is supported for POSTing files directly.

Expand All @@ -853,14 +852,12 @@ paths:

```bash

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"}]'
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"}]'

```


#### 2\. **POST with files**
#### 2. **POST with files**

Send tasks as files. You can attach multiple files with different names.

Expand All @@ -881,25 +878,19 @@ paths:

```bash

curl -H 'Authorization: Token abc123' \

-X POST 'https://localhost:8080/api/projects/1/import' -F ‘file=@path/to/my_file.csv’
curl -H 'Authorization: Token abc123' -X POST 'https://localhost:8080/api/projects/1/import' -F 'file=@path/to/my_file.csv'

```


#### 3\. **POST with URL**
#### 3. **POST with URL**

You can also provide a URL to a file with labeling tasks. Supported file formats are the same as in option 2.


```bash

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"}]'
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"}]'

```

Expand Down
2 changes: 1 addition & 1 deletion fern/openapi/resources/exports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ paths:

```bash

curl -X GET https://localhost:8080/api/projects/{id}/export?ids[]=123\&ids[]=345 -H 'Authorization: Token abc123' --output 'annotations.json'
curl -X GET "https://localhost:8080/api/projects/{id}/export?ids[]=123&ids[]=345" -H 'Authorization: Token abc123' --output 'annotations.json'

```

Expand Down
Loading