{ "uuid": "6ccc7a0b-23af-4290-87df-049351a1cabd", "lastMigration": 29, "name": "Firebase Rules API", "endpointPrefix": "", "latency": 0, "port": 3000, "hostname": "", "routes": [ { "uuid": "5f4c1a89-fa1f-486b-9a88-2efd0b3d41f8", "documentation": "Delete a `Ruleset` by resource name. If the `Ruleset` is referenced by a `Release` the operation will fail.", "method": "delete", "endpoint": "v1/:name", "responses": [ { "uuid": "d51e3d21-79bf-4b8d-9499-d08e31a7ae76", "body": "{}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "2404a5a8-4d8b-4eb2-aeba-ede2fef26152", "documentation": "Get a `Ruleset` by name including the full `Source` contents.", "method": "get", "endpoint": "v1/:name", "responses": [ { "uuid": "2d645656-a120-400b-9501-99794e3a18f1", "body": "{\n \"createTime\": \"\",\n \"metadata\": {\n \"services\": [\n \"\"\n ]\n },\n \"name\": \"\",\n \"source\": {\n \"files\": [\n {\n \"content\": \"\",\n \"fingerprint\": \"\",\n \"name\": \"\"\n }\n ]\n }\n}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "2fe591ab-c278-4e17-9218-d07e0092e1d2", "documentation": "Update a `Release` via PATCH. Only updates to `ruleset_name` will be honored. `Release` rename is not supported. To create a `Release` use the CreateRelease method.", "method": "patch", "endpoint": "v1/:name", "responses": [ { "uuid": "4649173f-b9d0-4d2f-add1-c9edbe803317", "body": "{\n \"createTime\": \"\",\n \"name\": \"\",\n \"rulesetName\": \"\",\n \"updateTime\": \"\"\n}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "02fe06e1-d95f-434f-afe7-cef3596e99db", "documentation": "List the `Release` values for a project. This list may optionally be filtered by `Release` name, `Ruleset` name, `TestSuite` name, or any combination thereof.", "method": "get", "endpoint": "v1/:name/releases", "responses": [ { "uuid": "07bc3a3c-c24b-46e9-b35f-41480d9bb349", "body": "{\n \"nextPageToken\": \"\",\n \"releases\": [\n {\n \"createTime\": \"\",\n \"name\": \"\",\n \"rulesetName\": \"\",\n \"updateTime\": \"\"\n }\n ]\n}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "5315b4aa-588b-417e-b6bc-900a13109948", "documentation": "Create a `Release`. Release names should reflect the developer's deployment practices. For example, the release name may include the environment name, application name, application version, or any other name meaningful to the developer. Once a `Release` refers to a `Ruleset`, the rules can be enforced by Firebase Rules-enabled services. More than one `Release` may be 'live' concurrently. Consider the following three `Release` names for `projects/foo` and the `Ruleset` to which they refer. Release Name -> Ruleset Name * projects/foo/releases/prod -> projects/foo/rulesets/uuid123 * projects/foo/releases/prod/beta -> projects/foo/rulesets/uuid123 * projects/foo/releases/prod/v23 -> projects/foo/rulesets/uuid456 The relationships reflect a `Ruleset` rollout in progress. The `prod` and `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23` refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be updated using the UpdateRelease method.", "method": "post", "endpoint": "v1/:name/releases", "responses": [ { "uuid": "35dd1fcb-d13a-4af3-a1ef-4a706bb704be", "body": "{\n \"createTime\": \"\",\n \"name\": \"\",\n \"rulesetName\": \"\",\n \"updateTime\": \"\"\n}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "dd1ec1e2-666d-4a02-88aa-84c5e34ba1b8", "documentation": "List `Ruleset` metadata only and optionally filter the results by `Ruleset` name. The full `Source` contents of a `Ruleset` may be retrieved with GetRuleset.", "method": "get", "endpoint": "v1/:name/rulesets", "responses": [ { "uuid": "91ddd221-2eac-4549-b73c-6e3171af74a7", "body": "{\n \"nextPageToken\": \"\",\n \"rulesets\": [\n {\n \"createTime\": \"\",\n \"metadata\": {\n \"services\": [\n \"\"\n ]\n },\n \"name\": \"\",\n \"source\": {\n \"files\": [\n {\n \"content\": \"\",\n \"fingerprint\": \"\",\n \"name\": \"\"\n }\n ]\n }\n }\n ]\n}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "b515095f-4e71-40ba-9e7e-a361384571c1", "documentation": "Create a `Ruleset` from `Source`. The `Ruleset` is given a unique generated name which is returned to the caller. `Source` containing syntactic or semantics errors will result in an error response indicating the first error encountered. For a detailed view of `Source` issues, use TestRuleset.", "method": "post", "endpoint": "v1/:name/rulesets", "responses": [ { "uuid": "d2aa51bf-fdc8-431a-a2a8-8d9ea0d05140", "body": "{\n \"createTime\": \"\",\n \"metadata\": {\n \"services\": [\n \"\"\n ]\n },\n \"name\": \"\",\n \"source\": {\n \"files\": [\n {\n \"content\": \"\",\n \"fingerprint\": \"\",\n \"name\": \"\"\n }\n ]\n }\n}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "4427d86e-5687-4041-a2c2-ef7498837a48", "documentation": "Get the `Release` executable to use when enforcing rules.", "method": "get", "endpoint": "v1/:name:getExecutable", "responses": [ { "uuid": "6603bfab-fc2b-42ce-bab3-9146a5a7be40", "body": "{\n \"executable\": \"\",\n \"executableVersion\": \"{{oneOf (array 'RELEASE_EXECUTABLE_VERSION_UNSPECIFIED' 'FIREBASE_RULES_EXECUTABLE_V1' 'FIREBASE_RULES_EXECUTABLE_V2')}}\",\n \"language\": \"{{oneOf (array 'LANGUAGE_UNSPECIFIED' 'FIREBASE_RULES' 'EVENT_FLOW_TRIGGERS')}}\",\n \"rulesetName\": \"\",\n \"syncTime\": \"\",\n \"updateTime\": \"\"\n}", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" }, { "uuid": "108582ee-6df3-4afa-88c0-79c1b87e77aa", "documentation": "Test `Source` for syntactic and semantic correctness. Issues present, if any, will be returned to the caller with a description, severity, and source location. The test method may be executed with `Source` or a `Ruleset` name. Passing `Source` is useful for unit testing new rules. Passing a `Ruleset` name is useful for regression testing an existing rule. The following is an example of `Source` that permits users to upload images to a bucket bearing their user id and matching the correct metadata: _*Example*_ // Users are allowed to subscribe and unsubscribe to the blog. service firebase.storage { match /users/{userId}/images/{imageName} { allow write: if userId == request.auth.uid && (imageName.matches('*.png$') || imageName.matches('*.jpg$')) && resource.mimeType.matches('^image/') } }", "method": "post", "endpoint": "v1/:name:test", "responses": [ { "uuid": "0d7cd043-ce5a-4bd1-8c3d-e3d7ac373726", "body": "\"\"", "latency": 0, "statusCode": 200, "label": "Successful response", "headers": [{ "key": "Content-Type", "value": "application/json" }], "bodyType": "INLINE", "filePath": "", "databucketID": "", "sendFileAsBody": false, "rules": [], "rulesOperator": "OR", "disableTemplating": false, "fallbackTo404": false, "default": true, "crudKey": "id" } ], "enabled": true, "responseMode": null, "type": "http" } ], "proxyMode": false, "proxyHost": "", "proxyRemovePrefix": false, "tlsOptions": { "enabled": false, "type": "CERT", "pfxPath": "", "certPath": "", "keyPath": "", "caPath": "", "passphrase": "" }, "cors": true, "headers": [], "proxyReqHeaders": [{ "key": "", "value": "" }], "proxyResHeaders": [{ "key": "", "value": "" }], "data": [], "folders": [], "rootChildren": [ { "type": "route", "uuid": "5f4c1a89-fa1f-486b-9a88-2efd0b3d41f8" }, { "type": "route", "uuid": "2404a5a8-4d8b-4eb2-aeba-ede2fef26152" }, { "type": "route", "uuid": "2fe591ab-c278-4e17-9218-d07e0092e1d2" }, { "type": "route", "uuid": "02fe06e1-d95f-434f-afe7-cef3596e99db" }, { "type": "route", "uuid": "5315b4aa-588b-417e-b6bc-900a13109948" }, { "type": "route", "uuid": "dd1ec1e2-666d-4a02-88aa-84c5e34ba1b8" }, { "type": "route", "uuid": "b515095f-4e71-40ba-9e7e-a361384571c1" }, { "type": "route", "uuid": "4427d86e-5687-4041-a2c2-ef7498837a48" }, { "type": "route", "uuid": "108582ee-6df3-4afa-88c0-79c1b87e77aa" } ] }