• Online, Self-Paced
Course Description

Rails is an MVC framework that facilitates the use of web standards such as JSON and XML for data transfer, and HTML, CSS, and JavaScript for display and user interfacing. In this course, you will learn the basics for creating an API, how to use Postman, and how to implement API authentication.

Learning Objectives

Building an API

  • start the course
  • create an API application
  • add rails-api to an existing project

Tools

  • use Postman to test results

API Endpoints

  • work with endpoints for INDEX and CREATE
  • work with endpoint for SHOW, UPDATE, and DESTROY

JSON and XML

  • render JSON manually
  • render JSON with active_model_serializers

API Versioning

  • use versioning

API Authentication

  • generate access tokens for authentication
  • use SessionsController for issuing and validating access tokens
  • use the authenticate_or_request_with_http_token method
  • perform authentication with Devise

Documentation - API

  • set up Apipie Gem
  • document resources and actions using Apipie
  • customize validators for Apipie

Documentation - RDoc

  • use RDoc for documentation

Testing

  • use Rack::Test to test HTTP response codes

Advanced

  • work with log directories
  • implement Unicorn as a web server
  • use Kaminari for pagination
  • create search forms with Ransack
  • describe the basics of elasticsearch
  • manipulate CSV files
  • use rjb to connect Ruby with Java
  • customize error pages

Practice: API Endpoints

  • put search on an API endpoint

Framework Connections

The materials within this course focus on the Knowledge Skills and Abilities (KSAs) identified within the Specialty Areas listed below. Click to view Specialty Area details within the interactive National Cybersecurity Workforce Framework.

Feedback

If you would like to provide feedback for this course, please e-mail the NICCS SO at NICCS@hq.dhs.gov.