# bala0303/api architecture

> Architecture diagram of the GitHub repository bala0303/api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bala0303/api
- Repository: https://github.com/bala0303/api

## Overview

#### Purpose and Entry Points
This is a Maven-based Java API-testing training/practice repository. It contains standalone examples of HTTP operations, JSON-path extraction, and CRUD API chaining rather than a deployable application. `pom.xml` defines the build/runtime dependency boundary. `src/main/java/org/example/Main.java` is the nominal application entry point; most executable behavior is under test sources.

#### API Test Execution Layer
Individual Java classes act as API-test or request-driver entry points, likely run through Maven/test tooling or directly from an IDE:
- `src/test/java/AutomationStepByStep/Get.java`
- `src/test/java/Practice/GetandPOST.java`
- `src/test/java/Practice/HttpRequests.java`

These examples establish basic GET/POST and general HTTP request patterns.

#### REST-Assured Practice Boundary
REST-assured-focused exercises are isolated into dedicated packages:
- `src/test/java/restAussured/Program1.java`
- `src/test/java/restAussured/Program2.java`
- `src/test/java/Udemy_Rahul_Shetty/Post.java`

This separates tutorial/provider-specific request examples from broader practice code, although no shared production API client layer is visible.

#### CRUD API-Chaining Flows
Two packages model sequential user lifecycle operations. Their core control flow is: create a user, retain/extract its identifier or response value, retrieve it, update it, then delete it.
- `src/test/java/api_Chaining/CreateUser.java`
- `src/test/java/api_Chaining/GetUser.java`
- `src/test/java/api_Chaining/UpdateUser.java`
- `src/test/java/api_Chaining/DeleteUser.java`

A parallel student API flow uses the same staged pattern:
- `src/test/java/studentAPIChaining/CreateUser.java`
- `src/test/java/studentAPIChaining/ExtractingValues.java`
- `src/test/java/studentAPIChaining/DeleteUser.java`

The handoff between stages—particularly IDs and response values—is the repository’s primary data-flow boundary.

#### Response Parsing and Assertions
JSON response extraction/parsing is represented as a separate concern:
- `src/test/java/JsonPathParsing/Program1.java`
- `src/test/java/studentAPIChaining/ExtractingValues.java`

These components consume HTTP responses produced by request stages and expose values needed for validation or subsequent chained requests.

#### Runtime and External Dependencies
The repository runs on the JVM through Maven (`pom.xml`). It targets external HTTP API services, but the file tree does not identify endpoint hosts, credentials, databases, containers, or cloud infrastructure. API state is therefore external and lifecycle tests may depend on service availability, endpoint behavior, and cleanup via delete stages.

#### Documentation Assets
Training and test-design artifacts accompany the source but are not runtime components:
- `API_Testing_Complete_Training.pptx`
- `API_Test_Case_Template.xlsx`
- `API_Testing_KT_Topics.xlsx`

Main entry points: [`src/test/java/api_Chaining/CreateUser.java`](https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/CreateUser.java) (Create User), [`src/test/java/api_Chaining/GetUser.java`](https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/GetUser.java) (Get User), [`src/test/java/api_Chaining/UpdateUser.java`](https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/UpdateUser.java) (Update User), [`src/test/java/studentAPIChaining/CreateUser.java`](https://github.com/bala0303/api/blob/master/src/test/java/studentAPIChaining/CreateUser.java) (Create Student)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Build Runtime"]
  node_pom["Maven Build<br/>Maven project<br/>[pom.xml]"]
  node_main["Nominal Entry Point<br/>Java main<br/>[Main.java]"]
  node_maven_tests{{"Test Execution<br/>Maven/IDE runner"}}
end

subgraph group_examples["Request Examples"]
  node_get_example["GET Example<br/>request driver<br/>[Get.java]"]
  node_get_post_example["GET and POST Practice<br/>request driver<br/>[GetandPOST.java]"]
  node_http_requests["HTTP Requests Practice<br/>request driver<br/>[HttpRequests.java]"]
  node_rest_program1["REST-Assured Exercise 1<br/>REST-Assured driver<br/>[Program1.java]"]
  node_rest_program2["REST-Assured Exercise 2<br/>REST-Assured driver<br/>[Program2.java]"]
  node_rest_post["REST-Assured POST<br/>REST-Assured driver<br/>[Post.java]"]
end

subgraph group_user_chain["User CRUD Chain"]
  node_user_create["Create User<br/>CRUD stage<br/>[CreateUser.java]"]
  node_user_get["Get User<br/>CRUD stage<br/>[GetUser.java]"]
  node_user_update["Update User<br/>CRUD stage<br/>[UpdateUser.java]"]
  node_user_delete["Delete User<br/>CRUD stage<br/>[DeleteUser.java]"]
end

subgraph group_student_chain["Student API Chain"]
  node_student_create["Create Student<br/>CRUD stage<br/>[CreateUser.java]"]
  node_student_extract["Extract Response Values<br/>JSON parsing"]
  node_student_delete["Delete Student<br/>CRUD stage<br/>[DeleteUser.java]"]
end

node_external_api(("External HTTP APIs<br/>remote services"))
node_json_parsing["JSONPath Parsing<br/>response parsing<br/>[Program1.java]"]

node_pom -->|"builds"| node_main
node_pom -->|"runs"| node_maven_tests
node_maven_tests -->|"executes"| node_get_example
node_maven_tests -->|"executes"| node_get_post_example
node_maven_tests -->|"executes"| node_http_requests
node_maven_tests -->|"executes"| node_rest_program1
node_maven_tests -->|"executes"| node_rest_program2
node_maven_tests -->|"executes"| node_rest_post
node_maven_tests -->|"executes"| node_user_create
node_maven_tests -->|"executes"| node_student_create
node_get_example -->|"GET"| node_external_api
node_get_post_example -->|"requests"| node_external_api
node_http_requests -->|"requests"| node_external_api
node_rest_program1 -->|"REST calls"| node_external_api
node_rest_program2 -->|"REST calls"| node_external_api
node_rest_post -->|"POST"| node_external_api
node_user_create -->|"user ID"| node_user_get
node_user_get -->|"user ID"| node_user_update
node_user_update -->|"user ID"| node_user_delete
node_user_create -->|"creates"| node_external_api
node_user_get -->|"retrieves"| node_external_api
node_user_update -->|"updates"| node_external_api
node_user_delete -->|"deletes"| node_external_api
node_student_create -->|"response"| node_student_extract
node_student_extract -->|"extracted ID"| node_student_delete
node_student_create -->|"creates"| node_external_api
node_student_delete -->|"deletes"| node_external_api
node_external_api -.->|"JSON response"| node_json_parsing

click node_pom "https://github.com/bala0303/api/blob/master/pom.xml"
click node_main "https://github.com/bala0303/api/blob/master/src/main/java/org/example/Main.java"
click node_get_example "https://github.com/bala0303/api/blob/master/src/test/java/AutomationStepByStep/Get.java"
click node_get_post_example "https://github.com/bala0303/api/blob/master/src/test/java/Practice/GetandPOST.java"
click node_http_requests "https://github.com/bala0303/api/blob/master/src/test/java/Practice/HttpRequests.java"
click node_rest_program1 "https://github.com/bala0303/api/blob/master/src/test/java/restAussured/Program1.java"
click node_rest_program2 "https://github.com/bala0303/api/blob/master/src/test/java/restAussured/Program2.java"
click node_rest_post "https://github.com/bala0303/api/blob/master/src/test/java/Udemy_Rahul_Shetty/Post.java"
click node_user_create "https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/CreateUser.java"
click node_user_get "https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/GetUser.java"
click node_user_update "https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/UpdateUser.java"
click node_user_delete "https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/DeleteUser.java"
click node_student_create "https://github.com/bala0303/api/blob/master/src/test/java/studentAPIChaining/CreateUser.java"
click node_student_extract "https://github.com/bala0303/api/blob/master/src/test/java/studentAPIChaining/ExtractingValues.java"
click node_student_delete "https://github.com/bala0303/api/blob/master/src/test/java/studentAPIChaining/DeleteUser.java"
click node_json_parsing "https://github.com/bala0303/api/blob/master/src/test/java/JsonPathParsing/Program1.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pom,node_main,node_maven_tests toneBlue
class node_get_example,node_get_post_example,node_http_requests,node_rest_program1,node_rest_program2,node_rest_post toneAmber
class node_user_create,node_user_get,node_user_update,node_user_delete toneMint
class node_student_create,node_student_extract,node_student_delete toneRose
class node_external_api,node_json_parsing toneNeutral
```

## Components

### Build Runtime

- [Maven Build](https://github.com/bala0303/api/blob/master/pom.xml): Maven project · Defines JVM dependencies and test execution boundary. · `pom.xml`
- [Nominal Entry Point](https://github.com/bala0303/api/blob/master/src/main/java/org/example/Main.java): Java main · `src/main/java/org/example/Main.java`
- **Test Execution**: Maven/IDE runner · Most executable exercises run from test sources.

### Request Examples

- [GET Example](https://github.com/bala0303/api/blob/master/src/test/java/AutomationStepByStep/Get.java): request driver · `src/test/java/AutomationStepByStep/Get.java`
- [GET and POST Practice](https://github.com/bala0303/api/blob/master/src/test/java/Practice/GetandPOST.java): request driver · `src/test/java/Practice/GetandPOST.java`
- [HTTP Requests Practice](https://github.com/bala0303/api/blob/master/src/test/java/Practice/HttpRequests.java): request driver · `src/test/java/Practice/HttpRequests.java`
- [REST-Assured Exercise 1](https://github.com/bala0303/api/blob/master/src/test/java/restAussured/Program1.java): REST-Assured driver · `src/test/java/restAussured/Program1.java`
- [REST-Assured Exercise 2](https://github.com/bala0303/api/blob/master/src/test/java/restAussured/Program2.java): REST-Assured driver · `src/test/java/restAussured/Program2.java`
- [REST-Assured POST](https://github.com/bala0303/api/blob/master/src/test/java/Udemy_Rahul_Shetty/Post.java): REST-Assured driver · `src/test/java/Udemy_Rahul_Shetty/Post.java`

### User CRUD Chain

- [Create User](https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/CreateUser.java): CRUD stage · `src/test/java/api_Chaining/CreateUser.java`
- [Get User](https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/GetUser.java): CRUD stage · `src/test/java/api_Chaining/GetUser.java`
- [Update User](https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/UpdateUser.java): CRUD stage · `src/test/java/api_Chaining/UpdateUser.java`
- [Delete User](https://github.com/bala0303/api/blob/master/src/test/java/api_Chaining/DeleteUser.java): CRUD stage · Cleans up external user state. · `src/test/java/api_Chaining/DeleteUser.java`

### Student API Chain

- [Create Student](https://github.com/bala0303/api/blob/master/src/test/java/studentAPIChaining/CreateUser.java): CRUD stage · `src/test/java/studentAPIChaining/CreateUser.java`
- [Extract Response Values](https://github.com/bala0303/api/blob/master/src/test/java/studentAPIChaining/ExtractingValues.java): JSON parsing · Parses response values for validation or follow-up requests. · `src/test/java/studentAPIChaining/ExtractingValues.java`
- [Delete Student](https://github.com/bala0303/api/blob/master/src/test/java/studentAPIChaining/DeleteUser.java): CRUD stage · Cleans up external student state. · `src/test/java/studentAPIChaining/DeleteUser.java`

### Other components

- **External HTTP APIs**: remote services · Service state and availability are outside this repository.
- [JSONPath Parsing](https://github.com/bala0303/api/blob/master/src/test/java/JsonPathParsing/Program1.java): response parsing · Standalone JSON response extraction exercise. · `src/test/java/JsonPathParsing/Program1.java`

## Connections

- Maven Build → Nominal Entry Point: builds
- Maven Build → Test Execution: runs
- Test Execution → GET Example: executes
- Test Execution → GET and POST Practice: executes
- Test Execution → HTTP Requests Practice: executes
- Test Execution → REST-Assured Exercise 1: executes
- Test Execution → REST-Assured Exercise 2: executes
- Test Execution → REST-Assured POST: executes
- Test Execution → Create User: executes
- Test Execution → Create Student: executes
- GET Example → External HTTP APIs: GET
- GET and POST Practice → External HTTP APIs: requests
- HTTP Requests Practice → External HTTP APIs: requests
- REST-Assured Exercise 1 → External HTTP APIs: REST calls
- REST-Assured Exercise 2 → External HTTP APIs: REST calls
- REST-Assured POST → External HTTP APIs: POST
- Create User → Get User: user ID
- Get User → Update User: user ID
- Update User → Delete User: user ID
- Create User → External HTTP APIs: creates
- Get User → External HTTP APIs: retrieves
- Update User → External HTTP APIs: updates
- Delete User → External HTTP APIs: deletes
- Create Student → Extract Response Values: response
- Extract Response Values → Delete Student: extracted ID
- Create Student → External HTTP APIs: creates
- Delete Student → External HTTP APIs: deletes
- External HTTP APIs → JSONPath Parsing: JSON response
