{"id":16521342,"url":"https://github.com/mikebionic/sap_api_go","last_synced_at":"2025-10-24T02:55:53.304Z","repository":{"id":223816822,"uuid":"466979942","full_name":"mikebionic/sap_api_go","owner":"mikebionic","description":"SapHasap Golang Integration API","archived":false,"fork":false,"pushed_at":"2022-03-08T05:05:50.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-03T01:17:18.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mikebionic.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}},"created_at":"2022-03-07T07:02:14.000Z","updated_at":"2024-02-24T16:35:08.000Z","dependencies_parsed_at":"2024-02-22T08:33:04.613Z","dependency_job_id":"f1dcc7d2-8324-497f-be77-9c51f5e32400","html_url":"https://github.com/mikebionic/sap_api_go","commit_stats":null,"previous_names":["mikebionic/sap_api_go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikebionic/sap_api_go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fsap_api_go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fsap_api_go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fsap_api_go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fsap_api_go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikebionic","download_url":"https://codeload.github.com/mikebionic/sap_api_go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fsap_api_go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265899940,"owners_count":23845879,"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","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":[],"created_at":"2024-10-11T16:55:19.365Z","updated_at":"2025-10-24T02:55:53.284Z","avatar_url":"https://github.com/mikebionic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SapApi Marketplace — Golang Implementation\n\nA part of SapApi Marketplace service running on Go, to handle operations like Bleve search, Websockets, File uploads.\n\n \n### 📂 File Upload \u0026 Retrieval API\n\nThis API allows uploading and retrieving files (currently supports JPEG and PNG).\nIt supports associating uploaded files with various entities such as brands, companies, admins, users, or resources.\n\n---\n\n## **1. Upload File**\n\n### **Endpoint**\n\n```http\nPOST /  \nHost: localhost:8080\nContent-Type: multipart/form-data\n```\n\n\u003e **Note:** At least **one** of the following **form fields** must be provided.\n\n### **Form Fields**\n\n| Field       | Type | Description              |\n| ----------- | ---- | ------------------------ |\n| `BrandGuid` | UUID | Brand identifier         |\n| `CGuid`     | UUID | Company identifier       |\n| `RpAccGuid` | UUID | Admin account identifier |\n| `UGuid`     | UUID | User identifier          |\n| `ResGuid`   | UUID | Resource identifier      |\n\n### **File Field**\n\n| Field   | Type       | Description                                                                    |\n| ------- | ---------- | ------------------------------------------------------------------------------ |\n| `Files` | File/Image | One or more files to upload. Multiple files can be sent in the **same** field. |\n\n**Supported formats:** `JPEG`, `PNG`\n\n---\n\n### **Example Request**\n\nMultipart form-data with files:\n\n```http\nPOST / HTTP/1.1\nHost: localhost:8080\nContent-Type: multipart/form-data; boundary=----BOUNDARY\n\n------BOUNDARY\nContent-Disposition: form-data; name=\"BrandGuid\"\nd3d10f66-a812-4a5b-8d32-b7e60184c7f5\n------BOUNDARY\nContent-Disposition: form-data; name=\"Files\"; filename=\"download.jpeg\"\nContent-Type: image/jpeg\n\n(binary content)\n------BOUNDARY--\n```\n\n---\n\n### **Example Response**\n\n```json\n{\n  \"status\": true,\n  \"message\": \"Ok\",\n  \"errors\": null,\n  \"data\": [\n    {\n      \"Name\": \"download.jpeg\",\n      \"Path\": \"./uploads/RpAccGuid/d0a51101-3bb6-4d7b-ae62-d69a6b7ab40f/images/\u003cFSIZE\u003e/d0a51101-3bb6-4d7b-ae62-d69a6b7ab40f.jpeg\",\n      \"Guid\": \"d0a51101-3bb6-4d7b-ae62-d69a6b7ab40f\",\n      \"Error\": \"\",\n      \"TargetGuid\": \"f3f00f78-20b9-475d-86a1-70f376f8bb0a\"\n    }\n  ]\n}\n```\n\n---\n\n## **2. Retrieve File**\n\n### **Endpoint**\n\n```http\nGET /  \nHost: localhost:8080\nContent-Type: application/json\n```\n\n---\n\n### **Request Body**\n\n```json\n{\n  \"File\": \"image\",\n  \"Guid\": \"fd0b38ec-c409-48c5-9183-ae10d7ad8295\",\n  \"Size\": \"R\"\n}\n```\n\n| Field  | Type   | Description                                                        |\n| ------ | ------ | ------------------------------------------------------------------ |\n| `File` | string | File type — `\"image\"` or `\"doc\"`                                   |\n| `Guid` | UUID   | `TargetGuid` of the uploaded file                                  |\n| `Size` | string | **If Image**: `\"S\"` = small, `\"M\"` = medium, `\"R\"` = real/original |\n\n---\n\n### **Example Response**\n\n```json\n{\n  \"status\": true,\n  \"message\": \"Ok\",\n  \"errors\": null,\n  \"data\": {\n    \"ImgId\": 1,\n    \"EmpId\": null,\n    \"BrandId\": null,\n    \"ResId\": 1,\n    \"CId\": null,\n    \"UId\": null,\n    \"RpAccId\": null,\n    \"ImgGuid\": \"fd0b38ec-c409-48c5-9183-ae10d7ad8295\",\n    \"FileName\": \"052288a2121369f3254fb3bfe63a.png\",\n    \"FilePath\": \"uploads/commerce/Resource/1/images/R/052288a2121369f3254fb3bfe63a.png\",\n    \"CreatedDate\": \"2020-10-27T17:48:16.190445Z\",\n    \"ModifiedDate\": \"2020-09-21T17:12:00.43Z\",\n    \"GCRecord\": null\n  }\n}\n```\n\n---\n\n## **📌 Notes**\n\n* The API is designed for **multipart file uploads** with entity association.\n* Currently supports **image storage \u0026 retrieval**, but can be extended for other file types.\n* File size variations (`S`, `M`, `R`) are generated for images to optimize usage.\n* Implemented in **Go (Golang)** with SapApi marketplace architecture.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fsap_api_go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikebionic%2Fsap_api_go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fsap_api_go/lists"}