Skip to content

Commit

Permalink
fix: port number in example
Browse files Browse the repository at this point in the history
  • Loading branch information
wrussell1999 authored Nov 22, 2024
1 parent e24a9ee commit ea55704
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/docs/15.how-to-guides/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In the documentation, there's references for both the [Open Source](../api-refer
If you have [Basic Auth enabled](../configuration/index.md#http-basic-authentication), or you're using the [Enterprise Edition](/enterprise), you will need to add authentication to your requests. You can easily do this using the `-u` argument and passing our username and password in using the following format `username:password`. This example uses the default username and password inside of the [Kestra Docker Compose](../02.installation/03.docker-compose.md):

```bash
curl -X POST -u '[email protected]:kestra' http://localhost:8084/api/v1/executions/company.team/hello_world
curl -X POST -u '[email protected]:kestra' http://localhost:8080/api/v1/executions/company.team/hello_world
```

With the Enterprise Edition, you can generate [API Tokens](../06.enterprise/api-tokens.md) to authenticate when making requests, for example:
Expand Down Expand Up @@ -53,7 +53,7 @@ tasks:
To make this request, we can use [cURL](https://en.wikipedia.org/wiki/CURL) in the command line:
```bash
curl -X POST http://localhost:8084/api/v1/flows -H "Content-Type:application/x-yaml" -d "id: created_by_api
curl -X POST http://localhost:8080/api/v1/flows -H "Content-Type:application/x-yaml" -d "id: created_by_api
namespace: company.team

tasks:
Expand Down Expand Up @@ -162,7 +162,7 @@ For more examples on executing with the API, check out the [Executions documenta
When we execute a flow with the API, our response includes the Execution ID from that execution. This means we can use this to fetch more information about the Execution, especially once it's completed. In the previous example, the execution ID generated was `MYkTmLrI36s10iVXHwRbR` so let's use that to get an updated status on the execution with the [GET Request](https://kestra.io/docs/api-reference/open-source#get-/api/v1/executions/-executionId-) `/api/v1/executions/{executionId}`:

```bash
curl -X GET http://localhost:8084/api/v1/executions/MYkTmLrI36s10iVXHwRbR
curl -X GET http://localhost:8080/api/v1/executions/MYkTmLrI36s10iVXHwRbR
```

The response received includes everything about the execution including the times the state changed, and any outputs generated:
Expand Down

0 comments on commit ea55704

Please sign in to comment.