-
Notifications
You must be signed in to change notification settings - Fork 24
Services
This topic introduces remote services and explains how to use them in your A-127 projects.
- What are remote services
- What has changed
- Using remote services
- Referencing services in Swagger files
Apigee-127 account providers can expose remote services. For instance, the apigee
account provider currently exposes a RemoteProxy service. This service allows apps to talk to a proxy that is deployed on Apigee Edge that provides OAuth 2.0 endpoints for generating tokens and authorization codes. If you want to use Apigee OAuth, simply bind the RemoteProxy service to your project.
Once a service is bound to a project, that service will be available no matter where you deploy it. For example, if you deploy your project to an Amazon or Heroku account, can access the service.
Service configuration information is stored in ~/.a127/services
.
After the release of services for A-127, the apigee-remote-proxy
is no longer automatically created and deployed when you create an A-127 apigee
account. And, the apigeeProxyKey
and apigeeProxyUri
values are no longer added to apigee
accounts as they were before.
It's easy to create and bind services to projects, as explained below.
When you delete an account, Apigee-127 asks you if you wish to delete any services associated with that account.
Services are exposed through A-127 accounts. So, the first thing to do is create an account that has exposes one or more services. Then, you can create a new service instance and bind it to an existing A-127 project.
To see which services are available for the currently selected A-127 account:
`a127 service types`
The basic flow for using services is:
-
Create an Apigee-127 account:
a127 account create
-
Create a service:
a127 service create
(required if you were not prompted to create a service during account creation) -
Create a project:
a127 project create
-
Bind the service to the project:
a127 project bind
-
Deploy the project:
a127 project deploy
For details on these a127 commands, see "a127 reference". Or, type a127 [command] [option] -h
for help. For example, a127 service create -h
To configure a service in your Swagger file, use the x-a127-config
extension:
x-a127-config:
ApigeeRemote.key: &apigeeProxyKey CONFIGURED
ApigeeRemote.uri: &apigeeProxyUri CONFIGURED
...
In this configuration:
-
ApigeeRemote
is the user-specified name of the remote service. You can get a list of service names witha127 service list
. -
key
anduri
are service-specific values. In the case of RemoteProxy service,key
anduri
are required values. -
&
signifies a variable that can be referenced later in the Swagger file, like this:
oauth2:
provider: "volos-oauth-apigee"
options:
## Needed for remote proxy service
key: *apigeeProxyKey
uri: *apigeeProxyUri
...
Having Trouble? Try posting your question to the Apigee Community. Or, for more links and resources, check out our Help Page
Need help? Visit the Apigee Community ! |
---|
-
Getting started
-
Add policies to your API
-
Add security policies
-
Deploy your projects
-
Programmatic hooks
-
Good to know about
-
Deep dives
-
Reference topics
-
Troubleshooting and getting help
-
Related resources