{"id":16782147,"url":"https://github.com/arup-g/rest-api","last_synced_at":"2025-08-27T03:18:44.638Z","repository":{"id":184450038,"uuid":"671909834","full_name":"ARUP-G/REST-API","owner":"ARUP-G","description":"REST API built with Go","archived":false,"fork":false,"pushed_at":"2023-09-03T07:19:29.000Z","size":8235,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T21:21:45.819Z","etag":null,"topics":["goalng","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ARUP-G.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-28T12:26:50.000Z","updated_at":"2023-10-10T15:08:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7b4165a-10ab-4fac-bbae-14fe2148e19a","html_url":"https://github.com/ARUP-G/REST-API","commit_stats":null,"previous_names":["arup-g/rest-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ARUP-G/REST-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FREST-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FREST-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FREST-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FREST-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ARUP-G","download_url":"https://codeload.github.com/ARUP-G/REST-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARUP-G%2FREST-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272284422,"owners_count":24906884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["goalng","rest-api"],"created_at":"2024-10-13T07:44:33.790Z","updated_at":"2025-08-27T03:18:44.616Z","avatar_url":"https://github.com/ARUP-G.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API in Golang\n\nThis is a simple REST API built with Go that allows you to perform CRUD (Create, Read, Update, Delete) operations on a collection of items.\n\n## Features\n\n- **GET All Items**: Retrieve a list of all items.\n- **GET Item by ID**: Retrieve a specific item by its unique ID.\n- **POST New Item**: Create a new item and add it to the collection.\n- **UPDATE Item**: Update an existing item's information.\n- **DELETE Item**: Remove an item from the collection.\n\n## Installation\n\n1. Make sure you have Go installed on your system.\n\n2. Clone this repository:\n\n   ```shell\n   git clone https://github.com/ARUP-G/REST-API.git\n\n3. Build and run the application:\n\n    ```shell\n    go build\n    ./REST-API\n\n4. The API server will be running at http://localhost:9000.\n\n## Usage\n### GET All Books\n\n- **Endpoint**: /api/books\n- **Method**: `GET`\n- **Description**: Retrieve a list of all books.\n- **Example Response**:\n    ```json\n    [\n    {\n        \"id\": \"1\",\n        \"isbn\": \"86348\",\n        \"title\": \"Book1\",\n        \"author\": {\n            \"fname\": \"Ryan\",\n            \"lname\": \"Gosling\"\n        }\n    },\n    {\n        \"id\": \"2\",\n        \"isbn\": \"85578\",\n        \"title\": \"Book2\",\n        \"author\": {\n            \"fname\": \"Arup\",\n            \"lname\": \"Das\"\n        }\n    }\n    ]\n \n    ```\n\n### GET Books by ID\n - **Endpoint**: /api/books/{id}\n - **Method**: `GET`\n - **Description**: Retrieve a specific book by its unique ID.\n - **Example Request**: /api/books/2\n - **Example Response**:\n    ```json\n        {\n            \"id\": \"2\",\n            \"isbn\": \"85578\",\n            \"title\": \"Book2\",\n            \"author\": {\n                \"fname\": \"Arup\",\n                \"lname\": \"Das\"\n                }\n        }\n \n    ```\n###  Create Books\n - **Endpoint**: /api/books\n - **Method**: `POST`\n - **Description**: Create a new book and add it to the collection.\n - **Example Request**: /api/books\n\n - **Example Request Body**\n    ```json\n        {\n            \"isbn\": \"90078\",\n            \"title\": \"New Book\",\n            \"author\": {\n                \"fname\": \"Chilian\",\n                \"lname\": \"Murphy\"\n                }\n        }\n    ```\n - **Example Response**:\n    ```json\n        {\n            \"id\": \"60\",\n            \"isbn\": \"90078\",\n            \"title\": \"New Book\",\n            \"author\": {\n                \"fname\": \"Chilian\",\n                \"lname\": \"Murphy\"\n            }\n        }\n \n    ```\n\n###  Update Book\n - **Endpoint**: /api/books/{id}\n - **Method**: `UPDATE`\n - **Description**: Update existing book and add it to the collection.\n - **Example Request**: /api/books/60\n - **Example Request Body**\n    ```json\n        {\n            \"isbn\": \"90078\",\n            \"title\": \"Updated Book\",\n            \"author\": {\n                \"fname\": \"Chilian\",\n                \"lname\": \"Murphy\"\n                }\n        }\n    ```\n - **Example Response**:\n     ```json\n        {\n            \"id\": \"60\",\n            \"isbn\": \"90078\",\n            \"title\": \"Updated Book\",\n            \"author\": {\n                \"fname\": \"Chilian\",\n                \"lname\": \"Murphy\"\n            }\n        }\n \n    ```\n\n###  Delete Book\n - **Endpoint**: /api/books/{id}\n - **Method**: `DELETE`\n - **Description**: Delete a book from the collection.\n - **Example Request**: /api/books/0\n- **Example Request Body**\n    Deleted","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farup-g%2Frest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farup-g%2Frest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farup-g%2Frest-api/lists"}