Skip to content

Commit b609b87

Browse files
committed
add error codes explanations
add error codes descriptions fix typos fix grammar
1 parent 1176d6a commit b609b87

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

sources/api/getting-started.mdx

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Expected response codes:
5454

5555
## Basic workflow
5656

57-
A most common workflow involving Apify API consists of the following steps:
57+
The most common workflow involving Apify API consists of the following steps:
5858

5959
1. Running an Actor.
6060
1. Retrieving the results.
@@ -63,10 +63,10 @@ A most common workflow involving Apify API consists of the following steps:
6363

6464
#### Synchronously
6565

66-
For shorter runs where you need immiediate results:
66+
For shorter runs where you need immediate results:
6767

6868
```http title="Endpoint"
69-
POST https://api.apify.com/v2/acts/{actorId}/run-sync
69+
POST https://api.apify.com/v2/acts/:actorId/run-sync
7070
```
7171

7272
Expected response codes:
@@ -77,12 +77,12 @@ Expected response codes:
7777

7878
#### Asynchronously
7979

80+
For longer-running operations or when you don't need immediate results.
81+
8082
```http title="Endpoint"
81-
POST https://api.apify.com/v2/acts/{actorId}/runs
83+
POST https://api.apify.com/v2/acts/:actorId/runs
8284
```
8385

84-
The request body is the same as for asynchronous runs, but the response will include the complete results once the Actor finishes.
85-
8686
Expected response codes:
8787

8888
* `201`
@@ -94,7 +94,7 @@ Expected response codes:
9494
Most Actors store their results in a dataset:
9595

9696
```http title="Endpoint"
97-
GET https://api.apify.com/v2/datasets/{datasetId}/items
97+
GET https://api.apify.com/v2/datasets/:datasetId/items
9898
```
9999

100100
Optional query parameters:
@@ -109,14 +109,14 @@ Optional query parameters:
109109
* `limit=100` (number of items to retrieve)
110110
* `offset=0` (pagination offset)
111111

112-
Expected code responses:
112+
Expected response codes:
113113

114114
* `200`
115115

116116
#### From a Key-value store
117117

118118
```http title="Endpoint"
119-
GET https://api.apify.com/v2/key-value-stores/{storeId}/records/{recordKey}
119+
GET https://api.apify.com/v2/key-value-stores/:storeId/records/:recordKey
120120
```
121121

122122
Expected response codes:
@@ -134,7 +134,7 @@ You can get a log for a specific run or build of an Actor.
134134
GET https://api.apify.com/v2/logs/:buildOrRunId
135135
```
136136

137-
Expected code responses:
137+
Expected response codes:
138138

139139
* `200`
140140

@@ -144,7 +144,7 @@ Expected code responses:
144144
GET https://api.apify.com/v2/actor-runs/:runId
145145
```
146146

147-
Expected response code:
147+
Expected response codes:
148148

149149
* `200`
150150

@@ -156,7 +156,7 @@ To store your own data in a Dataset:
156156
POST https://api.apify.com/v2/datasets/:datasetId/items
157157
```
158158

159-
If any of the items received by the API fails the validation, whole request is discarded.
159+
If any item in the request fails validation, the entire request will be rejected.
160160

161161
Expected response codes:
162162

@@ -168,7 +168,7 @@ Expected response codes:
168168
To store your own data in a Key-value store:
169169

170170
```http title="Endpoint"
171-
PUT https://api.apify.com/v2/key-value-stores/{storeId}/records/{recordKey}
171+
PUT https://api.apify.com/v2/key-value-stores/:storeId/records/:recordKey
172172
```
173173

174174
Include your data in the request body and set the appropriate `Content-Type` header.
@@ -177,6 +177,32 @@ Expected response codes:
177177

178178
* `201`
179179

180+
## HTTP Status Code Descriptions
181+
182+
### `200` OK
183+
184+
The request has succeeded.
185+
186+
### `201` Created
187+
188+
The request has been fulfilled and a new resource has been created.
189+
190+
### `302` Found
191+
192+
A redirection response indicating that the requested resource has been temporarily moved to a different URL.
193+
194+
### `400` Bad Request
195+
196+
The server cannot process the request due to client error, such as request syntax, invalid request parameters, or invalid data format. This occurs when:
197+
198+
* The request body contains invalid data
199+
* Required parameters are missing
200+
* Data validation fails for Dataset items
201+
202+
### `408` Request Timeout
203+
204+
The server timed out waiting for the request to complete.
205+
180206
## Next steps
181207

182208
* Explore more advanced API endpoints in our full [API reference](/api/v2).

0 commit comments

Comments
 (0)