API
Package v1alpha2 contains the API Schema definitions for WSO2 APK.
API¶
API is the Schema for the apis API
Field | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion
string
|
dp.wso2.com/v1alpha2
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
kind
string
|
API |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata
Kubernetes meta/v1.ObjectMeta
|
Refer to the Kubernetes API documentation for the fields of the
metadata field.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
spec
APISpec
|
APISpec ¶(Appears on: API)
APISpec defines the desired state of API
APIStatus ¶(Appears on: API)
APIStatus defines the observed state of API
|
DeploymentStatus ¶
(Appears on: APIStatus)
DeploymentStatus contains the status of the API deployment
Field | Description |
---|---|
status
string
|
Status denotes the state of the API in its lifecycle. Possible values could be Accepted, Invalid, Deploy etc. |
message
string
|
(Optional)
Message represents a user friendly message that explains the current state of the API. |
accepted
bool
|
Accepted represents whether the API is accepted or not. |
transitionTime
Kubernetes meta/v1.Time
|
TransitionTime represents the last known transition timestamp. |
events
[]string
|
(Optional)
Events contains a list of events related to the API. |
EnvConfig ¶
(Appears on: APISpec)
EnvConfig contains the environment specific configuration
Field | Description |
---|---|
httpRouteRefs
[]string
|
HTTPRouteRefs denotes the environment of the API. |
Property ¶
(Appears on: APISpec)
Property holds key value pair of APIProperties
Field | Description |
---|---|
name
string
|
|
value
string
|
Generated with gen-crd-api-reference-docs
.
API Sample¶
A single API in the APK project is defined using a set of combined Kubernetes resources.
This is the root level resource for an API. API related metadata are also defined in this CR.
In the following CR, we have defined a REST API by giving the name, context, and version information for the API. We have also referred to the HTTPRoute resource in spec.production.httpRouteRefs[0] path.
apiVersion: dp.wso2.com/v1alpha2
kind: API
metadata:
name: http-bin-api
spec:
apiName: HTTP Bin API
apiType: REST
apiVersion: 1.0.0
basePath: /http-bin-api/1.0.0
isDefaultVersion: true
production:
- httpRouteRefs:
- prod-http-route-http-bin-api
sandbox:
- httpRouteRefs:
- sand-http-route-http-bin-api
organization: apk-org
Refer Manage API for more information on how to configure APIs.