{"id":25494276,"url":"https://github.com/guillempuche/postman_openfga","last_synced_at":"2026-02-10T03:31:18.310Z","repository":{"id":276022350,"uuid":"927955920","full_name":"guillempuche/postman_openfga","owner":"guillempuche","description":"Postman collection for OpenFGA API with environment setup. Ready-to-use requests for authorization model and relationship management.","archived":false,"fork":false,"pushed_at":"2025-02-05T21:04:57.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T02:48:48.665Z","etag":null,"topics":["abac","authorization","authz","openfga","postman-collection","rbac","rebac","zanzibar"],"latest_commit_sha":null,"homepage":"","language":null,"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/guillempuche.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":"2025-02-05T20:21:03.000Z","updated_at":"2025-02-05T21:08:52.000Z","dependencies_parsed_at":"2025-02-07T03:15:26.211Z","dependency_job_id":null,"html_url":"https://github.com/guillempuche/postman_openfga","commit_stats":null,"previous_names":["guillempuche/postman_openfga"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guillempuche/postman_openfga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillempuche%2Fpostman_openfga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillempuche%2Fpostman_openfga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillempuche%2Fpostman_openfga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillempuche%2Fpostman_openfga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guillempuche","download_url":"https://codeload.github.com/guillempuche/postman_openfga/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guillempuche%2Fpostman_openfga/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29289902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T02:32:08.756Z","status":"ssl_error","status_checked_at":"2026-02-10T02:30:31.937Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["abac","authorization","authz","openfga","postman-collection","rbac","rebac","zanzibar"],"created_at":"2025-02-18T23:19:45.656Z","updated_at":"2026-02-10T03:31:18.292Z","avatar_url":"https://github.com/guillempuche.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenFGA API Collection\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"postman-collection.png\" alt=\"Postman UI\" style=\"max-width: 600px; min-width: 400px; width: 100%;\" /\u003e\n\u003c/p\u003e\n\nPostman collection for OpenFGA API with environment setup. Ready-to-use requests for authorization model and relationship management. Includes example authorization models for:\n- Document management (Google Drive-like)\n- GitHub-style repository access\n- Employee management system\n- RBAC (Role-Based Access Control)\n- Conference room booking system\n\nThis collection is based on the official OpenFGA API specifications:\n- OpenAPI Spec: [OpenFGA API Swagger](https://raw.githubusercontent.com/openfga/api/main/docs/openapiv2/apidocs.swagger.json)\n- API Documentation: [OpenFGA API Reference](https://openfga.dev/api/service)\n\n## Getting Started\n\n### Prerequisites\n- [Postman](https://www.postman.com/downloads/) installed on your machine\n- Valid OpenFGA authentication credentials\n\n### Installation\n\n1. Download these files from the repository:\n   - `openfga-collection.json` (API collection)\n   - `openfga-environment.json` (Environment variables template)\n\n2. Set up environment:\n   - Copy `openfga-environment.json` and rename it to `openfga-environment.json`\n   - Modify the values according to your setup:\n     ```json\n     {\n       \"baseUrl\": \"Your OpenFGA API URL\",\n       \"bearerToken\": \"Your JWT token\",\n       \"storeId\": \"Your store ID\",\n       \"authorizationModelId\": \"Your model ID\",\n       \"pageSize\": \"Number of items per page (default: 10)\",\n       \"continuationToken\": \"Leave empty initially\"\n     }\n     ```\n\n3. Import into Postman:\n   - Open Postman\n   - Click \"Import\" (top left)\n   - Upload both JSON files\n   - Select the imported environment from the environment dropdown (top right)\n\n\u003e **Note**: The `bearerToken` is marked as a \"secret\" type for additional security. Postman will treat this value with extra care and hide it in the UI.\n\n## Example: Setting up a Document Management System\n\nThis example shows how to create a store, set up an authorization model for document management, and grant access to a user.\n\n1. First, create a new store:\n```http\nPOST {{baseUrl}}/stores\nContent-Type: application/json\n\n{\n  \"name\": \"document-management-store\"\n}\n\n// Response will contain your store ID\n{\n  \"id\": \"01FCNDV6P870EA6S7TK1DSYDG0\",\n  \"name\": \"document-management-store\",\n  \"created_at\": \"2024-02-05T12:00:00.000Z\"\n}\n```\n\n2. Create an authorization model for document management:\n```http\nPOST {{baseUrl}}/stores/{{storeId}}/authorization-models\nContent-Type: application/json\n\n{\n  \"schema_version\": \"1.1\",\n  \"type_definitions\": [\n    {\n      \"type\": \"user\"\n    },\n    {\n      \"type\": \"document\",\n      \"relations\": {\n        \"reader\": {\n          \"union\": {\n            \"child\": [\n              {\n                \"this\": {}\n              },\n              {\n                \"computedUserset\": {\n                  \"relation\": \"writer\"\n                }\n              }\n            ]\n          }\n        },\n        \"writer\": {\n          \"this\": {}\n        }\n      }\n    }\n  ]\n}\n\n// Response will contain your authorization model ID\n{\n  \"authorization_model_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}\n```\n\n3. Write a relationship tuple to grant access:\n```http\nPOST {{baseUrl}}/stores/{{storeId}}/write\nContent-Type: application/json\n\n{\n  \"writes\": {\n    \"tuple_keys\": [\n      {\n        \"user\": \"user:anne\",\n        \"relation\": \"writer\",\n        \"object\": \"document:budget-2024\"\n      }\n    ]\n  }\n}\n```\n\n4. Verify access:\n```http\nPOST {{baseUrl}}/stores/{{storeId}}/check\nContent-Type: application/json\n\n{\n  \"tuple_key\": {\n    \"user\": \"user:anne\",\n    \"relation\": \"reader\",\n    \"object\": \"document:budget-2024\"\n  },\n  \"authorization_model_id\": \"01FCNDV6P870EA6S7TK1DSYDG0\"\n}\n\n// Response should show allowed: true because writers are also readers\n{\n  \"allowed\": true\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillempuche%2Fpostman_openfga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguillempuche%2Fpostman_openfga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguillempuche%2Fpostman_openfga/lists"}