Skip to content

FwMotion/3scale-cms

Repository files navigation

3scale CMS Tools

1. Overview

The 3scale CMS tools project provides the ability to interact with 3scale’s Content Management System programmatically. The project also demonstrates API-first code generation.

The included Command Line Interface (CLI) tool is a rewritten and enhanced version of the same tool written in Ruby, available at hguerrero/3scale-cms#master. This version of the CLI tool has been implemented using Java and Quarkus.

Warning

This project is not supported by Red Hat. These tools come with no promise of support and may change at any moment without any guarantee of compatibility.

2. Included Artifacts

This repository provides the following artifacts:

2.1. Command-Line Interface

The 3scale CMS tools project includes a Command-Line Interface (CLI) tool that provides a convenient mechanism for interacting with the 3scale Developer Portal API. It is implemented using Quarkus and picocli.

More information on CLI Usage may be found in the Command-Line Interface Usage document.

2.2. Container Images

Images are available for running the command-line interface in container environments. Images are available in the GitHub Packages repository at ghcr.io/fwmotion/3scale-cms.

The following image tags are used:

  • VERSION (eg, v2.0.1): Execution of the CLI using the JVM

  • VERSION-native (eg, v2.0.1-native): Execution of a native-built CLI

  • latest: The latest version available using JVM-mode builds

  • latest-native: The latest version available using native-mode builds

Note

Images using the JVM are made available for both linux/amd64 and linux/arm64. Images using native builds are made available only for linux/amd64.

2.2.1. Usage with Podman

Run the CLI tool using Podman:

podman run -it --rm -v .:/cms:Z ghcr.io/fwmotion/3scale-cms:latest --help

2.2.2. Usage with Docker

Run the CLI tool using Docker:

docker run -it --rm -v .:/cms ghcr.io/fwmotion/3scale-cms:latest --help

2.2.3. Usage with Tekton

Sample Tasks and Pipelines for Tekton are available under the samples directory of this repository:

2.3. OpenAPI Specification for 3scale CMS

The 3scale CMS tools project provides documentation for the 3scale Content Management API, which can be found in the repository at: rest-client/src/main/resources/api-spec/3scale-cms.yaml.

The documentation uses the OpenAPI Specification v3.0 format. It describes the available endpoints for managing CMS objects, along with the "provider" endpoint of the Account Management API. This provider endpoint is used for lookup of the Developer Portal base URL and the Developer Portal access code.

2.4. REST Client JARs

The 3scale CMS tools project provides JARs to handle interaction with 3scale’s Developer Portal API. These JARs are available in the GitHub Packages maven repository.

To use a JAR in a Maven project, first include the following repository definition:

<repositories>
  <repository>
    <id>threescale-cms-rest-client</id>
    <name>Unofficial 3scale CMS REST Client</name>
    <url>https://maven.pkg.github.com/fwmotion/3scale-cms</url>
    <layout>default</layout>
    <releases>
      <enabled>true</enabled>
      <updatePolicy>never</updatePolicy>
    </releases>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>

As an example, to include the REST client JAR as a dependency, use the following dependency definition:

<dependency>
  <groupId>com.fwmotion</groupId>
  <artifactId>3scale-cms-rest-client</artifactId>
  <version>VERSION</version>
</dependency>

3. Additional Documentation

Additional documentation is available in the following files: