Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update links and files in QSG #660

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"servers": [
{
"url": "http://employee-service:80",
"url": "http://employee-service:8080",
"description": "Server URL",
"variables": {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Sample content before the modification is shown below.
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://employee-service:80"
endpoint: "http://employee-service:8080"
operations:
- target: "/employee"
verb: "GET"
Expand Down
4 changes: 2 additions & 2 deletions en/docs/get-started/quick-start-guide-with-cp.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Apart from the above API definition file, we also need an `apk-conf` file that d
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://employee-service:80"
endpoint: "http://employee-service:8080"
operations:
- target: "/employee"
verb: "GET"
Expand Down Expand Up @@ -149,7 +149,7 @@ You now have the API Definition (`EmployeeServiceDefinition.json`) and the apk-c
## Step 3 - Create the Backend
The endpoint "http://employee-service:80" provided in the above files points to a backend deployed on a kubernetes service. Prior to invoking the API, you will need to have this backend up.
The endpoint "http://employee-service:8080" provided in the above files points to a backend deployed on a kubernetes service. Prior to invoking the API, you will need to have this backend up.
We have provided the file containing this sample backend [here](../assets/files/get-started/employee-service-backend.yaml). Download it and create the backend service using the following command.
Expand Down
79 changes: 54 additions & 25 deletions en/docs/get-started/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This section is a step-by-step guide to creating, deploying, and invoking an API using the WSO2 API Platform For Kubernetes.

!!!NOTE
To set up the APK as an enterprise version, please follow the steps specified in the [Install APK Enterprise](../setup/enterprise-apk-install.md) section.
To set up the APK as an enterprise version, please follow the steps specified in the <a href="../../setup/enterprise-apk-install" target="_blank">Install APK Enterprise</a> section.

## Before you begin...

Expand Down Expand Up @@ -36,7 +36,7 @@ kubectl get pods

1. Save and download the sample
<a href="https://raw.githubusercontent.com/wso2/docs-apk/refs/heads/1.2.0/en/docs/assets/files/get-started/EmployeeServiceDefinition.json"
target="_blank" onclick="downloadFile(event)">EmployeeServiceDefinition.json</a> <script src="download.js"></script> file. This is the OAS definition of the API that we are going to deploy in APK.
target="_blank" onclick="downloadFile(event)">EmployeeServiceDefinition.json</a></script> file. This is the OAS definition of the API that we are going to deploy in APK.
2. Add a hostname mapping to the ```/etc/hosts``` file as follows.

| IP | Domain name |
Expand Down Expand Up @@ -84,24 +84,24 @@ Apart from the above API definition file, we also need an `apk-conf` file that d
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://employee-service:80"
endpoint: "http://employee-service:8080"
operations:
- target: "/employees
verb: "GET"
secured: true
scopes: []
- target: "/employee"
verb: "GET"
secured: true
scopes: []
- target: "/employee"
verb: "POST"
secured: true
scopes: []
verb: "POST"
secured: true
scopes: []
- target: "/employee/{employeeId}"
verb: "PUT"
secured: true
scopes: []
verb: "PUT"
secured: true
scopes: []
- target: "/employee/{employeeId}"
verb: "DELETE"
secured: true
scopes: []
verb: "DELETE"
secured: true
scopes: []
```

=== "Request Format"
Expand All @@ -113,7 +113,36 @@ Apart from the above API definition file, we also need an `apk-conf` file that d
```


2. You will get the apk-conf file content as the response. Save this content into a file named `EmployeeService.apk-conf`.
2. You will get the apk-conf file content as the response. Save this content into a file named `EmployeeService.apk-conf`. You can edit these values as necessary. Let's change the basepath from the autogenerated value to "/employees". Your apk-conf file should now appear as follows.

```
---
name: "EmployeeServiceAPI"
basePath: "/employees"
version: "3.14"
type: "REST"
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://employee-service:8080"
operations:
- target: "/employees"
verb: "GET"
secured: true
scopes: []
- target: "/employee"
verb: "POST"
secured: true
scopes: []
- target: "/employee/{employeeId}"
verb: "PUT"
secured: true
scopes: []
- target: "/employee/{employeeId}"
verb: "DELETE"
secured: true
scopes: []
```

!!! Important
We recommend installing the <a href="{{base_path}}/en/{{site_version}}/api-management-overview/apk-conf-lang-support/" target="_blank">APK Config Language Support Visual Studio Code (VS Code) extension</a> to edit the APK Configuration file.
Expand All @@ -124,7 +153,7 @@ Apart from the above API definition file, we also need an `apk-conf` file that d
To invoke the system APIs such as for deploying, we need a valid access token issued by an identity provider (IdP). While APK supports third-party IdPs such as Asgardeo and Auth0, it also supports an inbuilt non-production identity provider as well, which is only meant for testing purposes. We are going to use the non-production inbuilt IdP for this guide.

!!!NOTE
If you are using a different organization to the one used in this guide, you will have to create a TokenIssuer with the relevant organization name in APK before proceeding to the next step. You can use the [Add Token Issuer](../develop-and-deploy-api/token-issuers/token-issuers.md) to create a new token issuer.
If you are using a different organization to the one used in this guide, you will have to create a TokenIssuer with the relevant organization name in APK before proceeding to the next step. You can use the <a href="../../develop-and-deploy-api/token-issuers/token-issuers" target="_blank">Add Token Issuer</a> to create a new token issuer.

1. We will be using the client credentials grant type to generate the token.

Expand Down Expand Up @@ -186,15 +215,15 @@ You now have the API Definition (`EmployeeServiceDefinition.json`) and the apk-c
---
id: "3940857a942e08686e58b511d43d046a7168281e"
name: "EmployeeServiceAPI"
basePath: "/RW1wbG95ZWVTZXJ2aWNlQVBJMy4xNA"
basePath: "/employees"
version: "3.14"
type: "REST"
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://employee-service:80"
endpoint: "http://employee-service:8080"
operations:
- target: "/employee"
- target: "/employees"
verb: "GET"
secured: true
scopes: []
Expand Down Expand Up @@ -231,14 +260,14 @@ You now have the API Definition (`EmployeeServiceDefinition.json`) and the apk-c

## Step 4 - Invoke the API

Now the API is ready to be invoked. Let’s get the list of Employees by invoking the `/employee` resource in the `EmployeeServiceAPI`.
Now the API is ready to be invoked. Let’s get the list of employees by invoking the `/employees` resource in the `EmployeeServiceAPI`.

1. Execute the following request to invoke the API. Make sure to provide the access token obtained in the previous step under ["Generate an access token to invoke APIs"](#generate-an-access-token-to-invoke-apis) section as the `Authorization` header in this request.


=== "Sample Request"
```
curl -k --location 'https://default.gw.wso2.com:9095/RW1wbG95ZWVTZXJ2aWNlQVBJMy4xNA/3.14/employee' \
curl -k --location 'https://default.gw.wso2.com:9095/employees/3.14/employees' \
--header 'Host: default.gw.wso2.com' \
--header 'Authorization: bearer eyJhbGciOiJSUzI1NiIsICJ0eXAiOiJKV1QiLCAia2lkIjoiZ2F0ZXdheV9jZXJ0aWZpY2F0ZV9hbGlhcyJ9.eyJpc3MiOiJodHRwczovL2lkcC5hbS53c28yLmNvbS90b2tlbiIsICJzdWIiOiI0NWYxYzVjOC1hOTJlLTExZWQtYWZhMS0wMjQyYWMxMjAwMDIiLCAiZXhwIjoxNjg4MTMxNDQ0LCAibmJmIjoxNjg4MTI3ODQ0LCAiaWF0IjoxNjg4MTI3ODQ0LCAianRpIjoiMDFlZTE3NDEtMDA0Ni0xOGE2LWFhMjEtYmQwYTk4ZjYzNzkwIiwgImNsaWVudElkIjoiNDVmMWM1YzgtYTkyZS0xMWVkLWFmYTEtMDI0MmFjMTIwMDAyIiwgInNjb3BlIjoiZGVmYXVsdCJ9.RfKQq2fUZKZFAyjimvsPD3cOzaVWazabmq7b1iKYacqIdNjkvO9CQmu7qdtrVNDmdZ_gHhWLXiGhN4UTSCXv_n1ArDnxTLFBroRS8dxuFBZoD9Mpj10vYFSDDhUfFqjgMqtpr30TpDMfee1wkqB6K757ZSjgCDa0hAbv555GkLdZtRsSgR3xWcxPBsIozqAMFDCWoUCbgTQuA5OiEhhpVco2zv4XLq2sz--VRoBieO12C69KnGRmoLuPtvOayInvrnV96Tbt9fR0fLS2l1nvAdFzVou0SIf9rMZLnURLVQQYE64GR14m-cFRYdUI9vTsFHZBl5w-uCLdzMMofzZaLQ'
```
Expand Down Expand Up @@ -270,12 +299,12 @@ Now the API is ready to be invoked. Let’s get the list of Employees by invokin
```
=== "Request Format"
```
curl --location 'https://<host>:9095/<basePath>/3.14/employee' \
curl --location 'https://<host>:9095/<basePath>/3.14/employees' \
--header 'Host: <host>' \
--header 'Authorization: bearer <access-token>'
```

You will now be able to see a successful response with the details of the Employees from the mock backend that we used for this guide.
You will now be able to see a successful response with the details of the employees from the mock backend that we used for this guide.

!!!Note
To invoke the APIs, we need a valid access token issued by an identity provider (IdP). APK supports third-party IdPs such as Asgardeo and Auth0. Refer <a href="{{base_path}}/en/latest/setup/identity-platform/idp/idp-overview/" target="_blank">Configure IDP</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ To customize configurations in the Helm deployment, you need to have the `values

```
git clone https://github.com/wso2/apk.git
```
This will create a local copy of the entire repository on your machine. You can then navigate to the `helm-charts` directory and locate the `values.yaml` file.
Expand Down
2 changes: 1 addition & 1 deletion en/docs/includes/create-apk-conf-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type: "REST"
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://employee-service:80"
endpoint: "http://employee-service:8080"
operations:
- target: "/employee"
verb: "GET"
Expand Down
2 changes: 1 addition & 1 deletion en/docs/includes/direct-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ organization: "default"
defaultVersion: false
endpointConfigurations:
production:
endpoint: "http://employee-service:80"
endpoint: "http://employee-service:8080"
operations:
- target: "/employee"
verb: "GET"
Expand Down
2 changes: 1 addition & 1 deletion en/docs/includes/start-apk-cp.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Setup WSO2 API Manager 4.4.0 in K8s cluster using Helm Charts.
helm install <chart-name> <repository-name>/wso2am-cp --version <version-of-APIM> -f <path-to-values.yaml-file>
```

4. Install NGINX Ingress Controller using the following command. Please refer to the [NGINX Ingress Controller](https://kubernetes.github.io/ingress-nginx/deploy/#local-development-clusters) documentation for more information.
4. Install NGINX Ingress Controller using the following command. Please refer to the <a href="[../../about-apk/FAQs/#4-why-are-pods-not-transitioning-to-the-running-state-for-a-long-time](https://kubernetes.github.io/ingress-nginx/deploy/#local-development-clusters)" target="_blank">NGINX Ingress Controller</a> documentation for more information.


### Setup WSO2 APK Dataplane 1.2.0
Expand Down
3 changes: 1 addition & 2 deletions en/docs/includes/start-apk.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Now you can verify the deployment by executing the following command. You will s
[![Pod Status](../assets/img/get-started/pod-status.png)](../assets/img/get-started/podstatus.png)

!!! Important
Except for the `gateway-apim-admission` and `gateway-apim-admission-patch`, all other pods should transition to the running state.
If they have not, please refer the <a href="../../about-apk/FAQs#Installation-and-Deployment" target="_blank">FAQs</a> to troubleshoot the problem.
Except for the `gateway-apim-admission` and `gateway-apim-admission-patch` (which will run as soon as APK is installed and then complete), all other pods should transition to the running state. If they have not, please refer the <a href="../../about-apk/FAQs/#4-why-are-pods-not-transitioning-to-the-running-state-for-a-long-time" target="_blank">FAQs</a> to troubleshoot the problem.