{
  "opencollection": "1.0.0",
  "info": {
    "name": "OpenFGA Assertions Authorization Models API",
    "version": "1.x"
  },
  "items": [
    {
      "info": {
        "name": "Authorization Models",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Return all the authorization models for a particular store",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/stores/:store_id/authorization-models",
            "params": [
              {
                "name": "store_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "page_size",
                "value": "",
                "type": "query"
              },
              {
                "name": "continuation_token",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "The ReadAuthorizationModels API will return all the authorization models for a certain store.\nOpenFGA's response will contain an array of all authorization models, sorted in descending order of creation.\n\n## Example\nAssume that a store's authorization model has been configured twice. To get all the authorization models that have been created in this store, call GET authorization-models. The API will return a response that looks like:\n```json\n{\n  \"authorization_models\": [\n    {\n      \"id\": \"01G50"
        },
        {
          "info": {
            "name": "Create a new authorization model",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/stores/:store_id/authorization-models",
            "params": [
              {
                "name": "store_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "The WriteAuthorizationModel API will add a new authorization model to a store.\nEach item in the `type_definitions` array is a type definition as specified in the field `type_definition`.\nThe response will return the authorization model's ID in the `id` field.\n\n## Example\nTo add an authorization model with `user` and `document` type definitions, call POST authorization-models API with the body: \n```json\n{\n  \"type_definitions\":[\n    {\n      \"type\":\"user\"\n    },\n    {\n      \"type\":\"document\",\n     "
        },
        {
          "info": {
            "name": "Return a particular version of an authorization model",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/stores/:store_id/authorization-models/:id",
            "params": [
              {
                "name": "store_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "The ReadAuthorizationModel API returns an authorization model by its identifier.\nThe response will return the authorization model for the particular version.\n\n## Example\nTo retrieve the authorization model with ID `01G5JAVJ41T49E9TT3SKVS7X1J` for the store, call the GET authorization-models by ID API with `01G5JAVJ41T49E9TT3SKVS7X1J` as the `id` path parameter.  The API will return:\n```json\n{\n  \"authorization_model\":{\n    \"id\":\"01G5JAVJ41T49E9TT3SKVS7X1J\",\n    \"type_definitions\":[\n      {\n      "
        }
      ]
    }
  ],
  "bundled": true
}