Skip to content

Commit 84328d9

Browse files
authored
fixed api-reference/status docs page (#4109)
1 parent 88d3c0f commit 84328d9

File tree

10 files changed

+258
-203
lines changed

10 files changed

+258
-203
lines changed

docs/en/api-reference/introduction.mdx

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ Welcome to the CrewAI AOP API reference. This API allows you to programmatically
1616
Navigate to your crew's detail page in the CrewAI AOP dashboard and copy your Bearer Token from the Status tab.
1717
</Step>
1818

19-
<Step title="Discover Required Inputs">
20-
Use the `GET /inputs` endpoint to see what parameters your crew expects.
21-
</Step>
19+
<Step title="Discover Required Inputs">
20+
Use the `GET /inputs` endpoint to see what parameters your crew expects.
21+
</Step>
2222

23-
<Step title="Start a Crew Execution">
24-
Call `POST /kickoff` with your inputs to start the crew execution and receive a `kickoff_id`.
25-
</Step>
23+
<Step title="Start a Crew Execution">
24+
Call `POST /kickoff` with your inputs to start the crew execution and receive
25+
a `kickoff_id`.
26+
</Step>
2627

2728
<Step title="Monitor Progress">
28-
Use `GET /status/{kickoff_id}` to check execution status and retrieve results.
29+
Use `GET /{kickoff_id}/status` to check execution status and retrieve results.
2930
</Step>
3031
</Steps>
3132

@@ -40,13 +41,14 @@ curl -H "Authorization: Bearer YOUR_CREW_TOKEN" \
4041

4142
### Token Types
4243

43-
| Token Type | Scope | Use Case |
44-
|:-----------|:--------|:----------|
45-
| **Bearer Token** | Organization-level access | Full crew operations, ideal for server-to-server integration |
46-
| **User Bearer Token** | User-scoped access | Limited permissions, suitable for user-specific operations |
44+
| Token Type | Scope | Use Case |
45+
| :-------------------- | :------------------------ | :----------------------------------------------------------- |
46+
| **Bearer Token** | Organization-level access | Full crew operations, ideal for server-to-server integration |
47+
| **User Bearer Token** | User-scoped access | Limited permissions, suitable for user-specific operations |
4748

4849
<Tip>
49-
You can find both token types in the Status tab of your crew's detail page in the CrewAI AOP dashboard.
50+
You can find both token types in the Status tab of your crew's detail page in
51+
the CrewAI AOP dashboard.
5052
</Tip>
5153

5254
## Base URL
@@ -63,29 +65,33 @@ Replace `your-crew-name` with your actual crew's URL from the dashboard.
6365

6466
1. **Discovery**: Call `GET /inputs` to understand what your crew needs
6567
2. **Execution**: Submit inputs via `POST /kickoff` to start processing
66-
3. **Monitoring**: Poll `GET /status/{kickoff_id}` until completion
68+
3. **Monitoring**: Poll `GET /{kickoff_id}/status` until completion
6769
4. **Results**: Extract the final output from the completed response
6870

6971
## Error Handling
7072

7173
The API uses standard HTTP status codes:
7274

73-
| Code | Meaning |
74-
|------|:--------|
75-
| `200` | Success |
76-
| `400` | Bad Request - Invalid input format |
77-
| `401` | Unauthorized - Invalid bearer token |
78-
| `404` | Not Found - Resource doesn't exist |
75+
| Code | Meaning |
76+
| ----- | :----------------------------------------- |
77+
| `200` | Success |
78+
| `400` | Bad Request - Invalid input format |
79+
| `401` | Unauthorized - Invalid bearer token |
80+
| `404` | Not Found - Resource doesn't exist |
7981
| `422` | Validation Error - Missing required inputs |
80-
| `500` | Server Error - Contact support |
82+
| `500` | Server Error - Contact support |
8183

8284
## Interactive Testing
8385

8486
<Info>
85-
**Why no "Send" button?** Since each CrewAI AOP user has their own unique crew URL, we use **reference mode** instead of an interactive playground to avoid confusion. This shows you exactly what the requests should look like without non-functional send buttons.
87+
**Why no "Send" button?** Since each CrewAI AOP user has their own unique crew
88+
URL, we use **reference mode** instead of an interactive playground to avoid
89+
confusion. This shows you exactly what the requests should look like without
90+
non-functional send buttons.
8691
</Info>
8792

8893
Each endpoint page shows you:
94+
8995
-**Exact request format** with all parameters
9096
-**Response examples** for success and error cases
9197
-**Code samples** in multiple languages (cURL, Python, JavaScript, etc.)
@@ -103,6 +109,7 @@ Each endpoint page shows you:
103109
</CardGroup>
104110

105111
**Example workflow:**
112+
106113
1. **Copy this cURL example** from any endpoint page
107114
2. **Replace `your-actual-crew-name.crewai.com`** with your real crew URL
108115
3. **Replace the Bearer token** with your real token from the dashboard
@@ -111,10 +118,18 @@ Each endpoint page shows you:
111118
## Need Help?
112119

113120
<CardGroup cols={2}>
114-
<Card title="Enterprise Support" icon="headset" href="mailto:[email protected]">
121+
<Card
122+
title="Enterprise Support"
123+
icon="headset"
124+
href="mailto:[email protected]"
125+
>
115126
Get help with API integration and troubleshooting
116127
</Card>
117-
<Card title="Enterprise Dashboard" icon="chart-line" href="https://app.crewai.com">
128+
<Card
129+
title="Enterprise Dashboard"
130+
icon="chart-line"
131+
href="https://app.crewai.com"
132+
>
118133
Manage your crews and view execution logs
119134
</Card>
120135
</CardGroup>

docs/en/api-reference/status.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
2-
title: "GET /status/{kickoff_id}"
2+
title: "GET /{kickoff_id}/status"
33
description: "Get execution status"
4-
openapi: "/enterprise-api.en.yaml GET /status/{kickoff_id}"
4+
openapi: "/enterprise-api.en.yaml GET /{kickoff_id}/status"
55
mode: "wide"
66
---
7-
8-

docs/enterprise-api.base.yaml

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ info:
3535
3636
1. **Discover inputs** using `GET /inputs`
3737
2. **Start execution** using `POST /kickoff`
38-
3. **Monitor progress** using `GET /status/{kickoff_id}`
38+
3. **Monitor progress** using `GET /{kickoff_id}/status`
3939
version: 1.0.0
4040
contact:
4141
name: CrewAI Support
@@ -63,7 +63,7 @@ paths:
6363
Use this endpoint to discover what inputs you need to provide when starting a crew execution.
6464
operationId: getRequiredInputs
6565
responses:
66-
'200':
66+
"200":
6767
description: Successfully retrieved required inputs
6868
content:
6969
application/json:
@@ -84,13 +84,21 @@ paths:
8484
outreach_crew:
8585
summary: Outreach crew inputs
8686
value:
87-
inputs: ["name", "title", "company", "industry", "our_product", "linkedin_url"]
88-
'401':
89-
$ref: '#/components/responses/UnauthorizedError'
90-
'404':
91-
$ref: '#/components/responses/NotFoundError'
92-
'500':
93-
$ref: '#/components/responses/ServerError'
87+
inputs:
88+
[
89+
"name",
90+
"title",
91+
"company",
92+
"industry",
93+
"our_product",
94+
"linkedin_url",
95+
]
96+
"401":
97+
$ref: "#/components/responses/UnauthorizedError"
98+
"404":
99+
$ref: "#/components/responses/NotFoundError"
100+
"500":
101+
$ref: "#/components/responses/ServerError"
94102

95103
/kickoff:
96104
post:
@@ -170,7 +178,7 @@ paths:
170178
taskWebhookUrl: "https://api.example.com/webhooks/task"
171179
crewWebhookUrl: "https://api.example.com/webhooks/crew"
172180
responses:
173-
'200':
181+
"200":
174182
description: Crew execution started successfully
175183
content:
176184
application/json:
@@ -182,24 +190,24 @@ paths:
182190
format: uuid
183191
description: Unique identifier for tracking this execution
184192
example: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
185-
'400':
193+
"400":
186194
description: Invalid request body or missing required inputs
187195
content:
188196
application/json:
189197
schema:
190-
$ref: '#/components/schemas/Error'
191-
'401':
192-
$ref: '#/components/responses/UnauthorizedError'
193-
'422':
198+
$ref: "#/components/schemas/Error"
199+
"401":
200+
$ref: "#/components/responses/UnauthorizedError"
201+
"422":
194202
description: Validation error - ensure all required inputs are provided
195203
content:
196204
application/json:
197205
schema:
198-
$ref: '#/components/schemas/ValidationError'
199-
'500':
200-
$ref: '#/components/responses/ServerError'
206+
$ref: "#/components/schemas/ValidationError"
207+
"500":
208+
$ref: "#/components/responses/ServerError"
201209

202-
/status/{kickoff_id}:
210+
/{kickoff_id}/status:
203211
get:
204212
summary: Get Execution Status
205213
description: |
@@ -222,15 +230,15 @@ paths:
222230
format: uuid
223231
example: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
224232
responses:
225-
'200':
233+
"200":
226234
description: Successfully retrieved execution status
227235
content:
228236
application/json:
229237
schema:
230238
oneOf:
231-
- $ref: '#/components/schemas/ExecutionRunning'
232-
- $ref: '#/components/schemas/ExecutionCompleted'
233-
- $ref: '#/components/schemas/ExecutionError'
239+
- $ref: "#/components/schemas/ExecutionRunning"
240+
- $ref: "#/components/schemas/ExecutionCompleted"
241+
- $ref: "#/components/schemas/ExecutionError"
234242
examples:
235243
running:
236244
summary: Execution in progress
@@ -262,19 +270,19 @@ paths:
262270
status: "error"
263271
error: "Task execution failed: Invalid API key for external service"
264272
execution_time: 23.1
265-
'401':
266-
$ref: '#/components/responses/UnauthorizedError'
267-
'404':
273+
"401":
274+
$ref: "#/components/responses/UnauthorizedError"
275+
"404":
268276
description: Kickoff ID not found
269277
content:
270278
application/json:
271279
schema:
272-
$ref: '#/components/schemas/Error'
280+
$ref: "#/components/schemas/Error"
273281
example:
274282
error: "Execution not found"
275283
message: "No execution found with ID: abcd1234-5678-90ef-ghij-klmnopqrstuv"
276-
'500':
277-
$ref: '#/components/responses/ServerError'
284+
"500":
285+
$ref: "#/components/responses/ServerError"
278286

279287
/resume:
280288
post:
@@ -354,7 +362,7 @@ paths:
354362
taskWebhookUrl: "https://api.example.com/webhooks/task"
355363
crewWebhookUrl: "https://api.example.com/webhooks/crew"
356364
responses:
357-
'200':
365+
"200":
358366
description: Execution resumed successfully
359367
content:
360368
application/json:
@@ -381,28 +389,28 @@ paths:
381389
value:
382390
status: "retrying"
383391
message: "Task will be retried with your feedback"
384-
'400':
392+
"400":
385393
description: Invalid request body or execution not in pending state
386394
content:
387395
application/json:
388396
schema:
389-
$ref: '#/components/schemas/Error'
397+
$ref: "#/components/schemas/Error"
390398
example:
391399
error: "Invalid Request"
392400
message: "Execution is not in pending human input state"
393-
'401':
394-
$ref: '#/components/responses/UnauthorizedError'
395-
'404':
401+
"401":
402+
$ref: "#/components/responses/UnauthorizedError"
403+
"404":
396404
description: Execution ID or Task ID not found
397405
content:
398406
application/json:
399407
schema:
400-
$ref: '#/components/schemas/Error'
408+
$ref: "#/components/schemas/Error"
401409
example:
402410
error: "Not Found"
403411
message: "Execution ID not found"
404-
'500':
405-
$ref: '#/components/responses/ServerError'
412+
"500":
413+
$ref: "#/components/responses/ServerError"
406414

407415
components:
408416
securitySchemes:
@@ -458,7 +466,7 @@ components:
458466
tasks:
459467
type: array
460468
items:
461-
$ref: '#/components/schemas/TaskResult'
469+
$ref: "#/components/schemas/TaskResult"
462470
execution_time:
463471
type: number
464472
description: Total execution time in seconds
@@ -536,7 +544,7 @@ components:
536544
content:
537545
application/json:
538546
schema:
539-
$ref: '#/components/schemas/Error'
547+
$ref: "#/components/schemas/Error"
540548
example:
541549
error: "Unauthorized"
542550
message: "Invalid or missing bearer token"
@@ -546,7 +554,7 @@ components:
546554
content:
547555
application/json:
548556
schema:
549-
$ref: '#/components/schemas/Error'
557+
$ref: "#/components/schemas/Error"
550558
example:
551559
error: "Not Found"
552560
message: "The requested resource was not found"
@@ -556,7 +564,7 @@ components:
556564
content:
557565
application/json:
558566
schema:
559-
$ref: '#/components/schemas/Error'
567+
$ref: "#/components/schemas/Error"
560568
example:
561569
error: "Internal Server Error"
562570
message: "An unexpected error occurred"

0 commit comments

Comments
 (0)