{"id":18576176,"url":"https://github.com/jreyesr/steampipe-plugin-samplerest","last_synced_at":"2025-07-18T19:06:56.061Z","repository":{"id":131446921,"uuid":"604859240","full_name":"jreyesr/steampipe-plugin-samplerest","owner":"jreyesr","description":"A starter plugin for Steampipe (https://steampipe.io)","archived":false,"fork":false,"pushed_at":"2023-02-21T23:57:40.000Z","size":40,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T21:39:02.700Z","etag":null,"topics":["steampipe"],"latest_commit_sha":null,"homepage":"https://jreyesr.github.io/posts/steampipe-part-one/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jreyesr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-21T23:57:25.000Z","updated_at":"2024-07-14T20:04:43.000Z","dependencies_parsed_at":"2023-05-12T11:15:09.376Z","dependency_job_id":null,"html_url":"https://github.com/jreyesr/steampipe-plugin-samplerest","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/jreyesr/steampipe-plugin-samplerest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jreyesr%2Fsteampipe-plugin-samplerest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jreyesr%2Fsteampipe-plugin-samplerest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jreyesr%2Fsteampipe-plugin-samplerest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jreyesr%2Fsteampipe-plugin-samplerest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jreyesr","download_url":"https://codeload.github.com/jreyesr/steampipe-plugin-samplerest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jreyesr%2Fsteampipe-plugin-samplerest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265816027,"owners_count":23833065,"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":["steampipe"],"created_at":"2024-11-06T23:23:53.079Z","updated_at":"2025-07-18T19:06:56.038Z","avatar_url":"https://github.com/jreyesr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Steampipe plugin\n\nThis is a starter [Steampipe](https://steampipe.io) plugin that you can customize to your needs.\n\nIt can be used to bootstrap any plugin, since it doesn't yet include dependencies for any SDK/external service.\n\n## Usage\n\n- [ ] Search for and replace all appearances of `jreyesr` with your Github username. Go mixes repository location and package name, so use wherever the code will be uploaded\n- [ ] Check if there is a Go package for whatever service you will integrate. If so, run `go get PACKAGE_NAME`\n- [ ] Search for and replace all appearances of `samplerest` with a short name for the target service. For example, `github`, `jira`, `aws` (these already exist)\n- [ ] Edit the `config/samplerest.spc` to contain the credentials that are required to connect to the target service (URL, port, username, password, API keys, subdomain, account ID, whatever).Leave the `plugin` key, it is required by Steampipe\n- [ ] Rename the `config/samplerest.spc` file to match the target service\n- [ ] On the `samplerest/config.go` file:\n    - [ ] Edit the `SampleRESTConfig` struct: rename it, edit its fields to match whatever you configured in the `config/*.spc` file. Ensure that the `` `cty:\"something\"` `` annotations match the keys in the `.spc` file\n    - [ ] Edit the `ConfigSchema` variable to match\n    - [ ] Edit the `String()` function to print an appropriate representation of your credentials. Endure that secrets are not leaked!\n- [ ]  On the `samplerest/plugin.go` file:\n    - [ ] Change the `Name`\n- [ ] For each table that you want to expose via SQL:\n    - [ ] Copy the `samplerest/table_samplerest_one_model.go` file\n    - [ ] Rename it to describe the service (instead of `samplerest`) and the entity listed (instead of `one_model`). For example, `table_github_repository`\n    - [ ] Change the `Name` and `Description`\n    - [ ] If your model doesn't support searching to return a subset of items, delete the `List.KeyColumns` field, and any other places marked with `Delete if your API doesn't suport searching over all instances`\n    - [ ] Add/edit all column names types and descriptions in `Columns` to match whatever is exposed by the API. The `Name` field will be seen by SQL, and the `Transform` field is used to match the objects that are returned by the `List` and `Get` functions\n    - [ ] Rename the `OneModel` struct, and edit it to match the data exposed by the API. The field names should match with the names passed to the `Columns.Transform` configs above\n    - [ ] Edit the `listOneModel` function to contact the API and get the results. You have available the `config` var, which holds API credentials, and possibly the `realQueryString` and/or `realQueryJson` variables, for filtering\n    - [ ] Complete the `listOneModel` function to make it return all data returned by the API\n    - [ ] Edit the `getOneModel` function to contact the API and get a single result. You have available the `config` var, which holds API credentials, and the `id` var, which holds the ID of the single object\n    - [ ] Complete the `getOneModel` function to make it return the data of a single item\n    - [ ] Rename the `listOneModel` and `getOneModel` functions to something that matches the actual objects. For example, `listRepository` and `getRepository` for the file `table_github_repository.go`\n- [ ]  On the `samplerest/plugin.go` file:\n    - [ ] Register your new tables in the `TableMap` field\n    - [ ] Delete the sample table\n- [ ] Rename the `samplerest` directory, where the code lives, to something that matches you service\n\n## Testing\n\nRun `make`, then run `steampipe query`. Run `.inspect` inside of it to ensure that the plugin is loaded.\n\nAlternatively, run `go build -o ~/.steampipe/plugins/hub.steampipe.io/plugins/YOUR_USERNAME/SERVICENAME@latest/steampipe-plugin-SERVICENAME.plugin *.go`, replacing `YOUR_USERNAME` and `SERVICENAME`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjreyesr%2Fsteampipe-plugin-samplerest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjreyesr%2Fsteampipe-plugin-samplerest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjreyesr%2Fsteampipe-plugin-samplerest/lists"}