From ea55704f39c5465b2044a24c3628ed3da13d728c Mon Sep 17 00:00:00 2001 From: Will Russell Date: Fri, 22 Nov 2024 16:21:27 +0000 Subject: [PATCH] fix: port number in example --- content/docs/15.how-to-guides/api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/15.how-to-guides/api.md b/content/docs/15.how-to-guides/api.md index 2c9f41bced..822a551354 100644 --- a/content/docs/15.how-to-guides/api.md +++ b/content/docs/15.how-to-guides/api.md @@ -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 'admin@kestra.io:kestra' http://localhost:8084/api/v1/executions/company.team/hello_world +curl -X POST -u 'admin@kestra.io: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: @@ -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: @@ -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: