Welcome to the Apigee Best Practices Hackathon!

I Love APIs

The main goal of this hackathon is to arm you with Apigee development best practices and to help you build better solutions for your clients.

It is hands on session which focuses on the Apigee best practices and practical examples for day to day projects.

We assume the basic knowledge of Apigee platform and you will get the most from this hackathon if you do.

Ideally you will have completed the Coursera Apigee Design, Development and Security Courses.

Alternatively, completing the Apigee API Jam will cover the same topics in less depth.

Lets get started!

Structure

During this hackathon we will follow the practical business use case for building a publicly-facing API endpoint on Google's Apigee platform.

Tools

Here are the prerequisites for completing the tasks:

Best Practices

Web UI

Apigee has Web UI Development Environment. It is great for visual representation of Apigee APIs, configuration and real time tracing, but it isn't the only way to manage the platform.

UI

Apigee Management APIs

The Best Practices of the API Development Lifecycle utilise the Apigee Management APIs for API development and operations. This enables:

In this hackathon we will use the tools and lifecycle commonly met in production grade Apigee projects.

UI

We will developer APIs for a startup in today's hackathon.

Global Fintech Startup

We Move Your Money Fast

Considerations

In addition, in order to fit We Move Your Money Fast technology standards:

API Gateway Architecture Apigee

Architecture Constraints

Apigee SaaS has the following constraints:

Task

Timer

API gateway architecture Apigee

Flows

Apigee API Development Lifecycle

API gateway architecture Apigee

Setup considerations

Task

We have 10 minutes to complete the task - timer.

Timer

Problem

It is fast to create new APIs, but we have dependencies on backend systems.

Generally these are:

By creating and hosting mocks in Apigee, we can isolate the API management functionality and remove this dependencies.

Approach

It is possible to build mocks with the following methods:

Task

Currency rates Mock

GET /mock/v1/currency/latest

200 OK
{
    "success": true,
    "base": "GBP",
    "date": "2020-07-01",
    "rates": {
        "AUD": 1.86,
        "CAD": 1.69,
        "CHF": 1.17,
        "CNY": 8.73,
        "EUR": 1.10,
        "JPY": 132.19,
        "USD": 1.23
    },
    "internal-traceid": "123e4567-e89b-12d3-a456-426614174000"
}

Convert Currency Mock

GET /mock/v1/currency/convert?from=GBP&to=EUR&amount=100

200 OK
{
    "success": true,
    "query": {
        "from": "GBP",
        "to": "EUR",
        "amount": 100
    },
    "info": {
        "timestamp": 1519328414,
        "rate": 1.10
    },
    "date": "2020-07-01",
    "result": 110,
    "internal-traceid": "123e4567-e89b-12d3-a456-679914174111"
}

We have 10 minutes to complete the task - timer.

Timer

Caching

Apigee API response caching capabilities. It allows reduced API response latency by avoiding the request to backend server and sending a cached response.

Considerations

Traffic Management Policies

Task

Please note the following:

Timer

Problem

You may have noticed that our Currency conversion microservice response contains internal data related to transaction tracing pattern used in We Move Your Money Fast technology stack.

This is an internal transaction trace information used for auditing and transaction correlation. We do not want it to be present in the public API response.

GET /mock/v1/currency/latest

200 OK
{
    "success": true,
    "base": "GBP",
    "date": "2020-07-01",
    "rates": {
        "AUD": 1.86,
        "CAD": 1.69,
        "CHF": 1.17,
        "CNY": 8.73,
        "EUR": 1.10,
        "JPY": 132.19,
        "USD": 1.23
    },
    "internal-traceid": "123e4567-e89b-12d3-a456-426614174000"
}

Apigee provides several inbuilt message transformation policies:

Task

Timer

Production Considerations

Task

Timer

Developer portal considerations

Developer portals allow to publish your APIs to developer community. They allow for external developers to self onboard, get API credentials, read API documentation and download related code samples.

Apigee has developed open source Drupal modules to allw Drupal CMS be used as powerful API developer portal.

Task

Timer