All Downloads are FREE. Search and download functionalities are using the official Maven repository.

swagger.api-permissions-swagger.json Maven / Gradle / Ivy

The newest version!
{
  "swagger" : "2.0",
  "info" : {
    "description" : "API module for permissions.",
    "version" : "8.4.5",
    "title" : "api-permissions"
  },
  "tags" : [ {
    "name" : "Permissions API"
  } ],
  "paths" : {
    "/api/permissions" : {
      "get" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Gets all permissions for one or more users or roles",
        "description" : "",
        "operationId" : "getPermissionsForUser",
        "parameters" : [ {
          "name" : "q",
          "in" : "query",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "inheritance",
          "in" : "query",
          "required" : false,
          "type" : "boolean"
        } ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/ApiResponse"
            }
          }
        }
      }
    },
    "/api/permissions/objects/{typeId}" : {
      "get" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Get a list object's for a type. Typically this is a row in a row level secured entity.",
        "description" : "",
        "operationId" : "getAcls",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "page",
          "in" : "query",
          "required" : false,
          "type" : "integer",
          "format" : "int32"
        }, {
          "name" : "pageSize",
          "in" : "query",
          "required" : false,
          "type" : "integer",
          "format" : "int32"
        } ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/PagedApiResponse"
            }
          }
        }
      }
    },
    "/api/permissions/objects/{typeId}/{objectId}" : {
      "post" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Create a type for a entity",
        "description" : "",
        "operationId" : "createAcl",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "objectId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      }
    },
    "/api/permissions/types" : {
      "get" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Get a list of ACL types in the system",
        "description" : "",
        "operationId" : "getRlsEntities",
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/ApiResponse"
            }
          }
        }
      }
    },
    "/api/permissions/types/permissions/{typeId}" : {
      "get" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Get a list of permissions that can be used on a type",
        "description" : "",
        "operationId" : "getSuitablePermissions",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/ApiResponse"
            }
          }
        }
      }
    },
    "/api/permissions/types/{typeId}" : {
      "post" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Create a type this enables row level secure an entity",
        "description" : "",
        "operationId" : "enableRLS",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      },
      "delete" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Delete a type this removes row level security from an entity",
        "description" : "",
        "operationId" : "disableRLS",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      }
    },
    "/api/permissions/{typeId}" : {
      "get" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Gets all permissions for all objects of a certain type",
        "description" : "",
        "operationId" : "getPermissionsForType",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "q",
          "in" : "query",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "page",
          "in" : "query",
          "required" : false,
          "type" : "integer",
          "format" : "int32"
        }, {
          "name" : "pageSize",
          "in" : "query",
          "required" : false,
          "type" : "integer",
          "format" : "int32"
        }, {
          "name" : "inheritance",
          "in" : "query",
          "required" : false,
          "type" : "boolean"
        } ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/PagedApiResponse"
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Create a list of permissions on an type for a single user or role",
        "description" : "",
        "operationId" : "createPermissions",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "in" : "body",
          "name" : "body",
          "required" : false,
          "schema" : {
            "$ref" : "#/definitions/SetTypePermissionsRequest"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      },
      "patch" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Update a list of permissions on objects of a certain type",
        "description" : "",
        "operationId" : "setTypePermissions",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "in" : "body",
          "name" : "body",
          "required" : false,
          "schema" : {
            "$ref" : "#/definitions/SetTypePermissionsRequest"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      }
    },
    "/api/permissions/{typeId}/{objectId}" : {
      "get" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Gets permissions on a single object",
        "description" : "",
        "operationId" : "getPermissionsForObject",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "objectId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "q",
          "in" : "query",
          "required" : false,
          "type" : "string"
        }, {
          "name" : "inheritance",
          "in" : "query",
          "required" : false,
          "type" : "boolean"
        } ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/ApiResponse"
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Create a permission on an object for a single user or role",
        "description" : "",
        "operationId" : "createPermission",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "objectId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "in" : "body",
          "name" : "body",
          "required" : false,
          "schema" : {
            "$ref" : "#/definitions/SetObjectPermissionRequest"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      },
      "delete" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Delete a permission on an object for a single user or role",
        "description" : "",
        "operationId" : "deletePermission",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "objectId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "in" : "body",
          "name" : "body",
          "required" : false,
          "schema" : {
            "$ref" : "#/definitions/DeletePermissionRequest"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      },
      "patch" : {
        "tags" : [ "Permissions API" ],
        "summary" : "Update a permission on a single object for one or more users or roles",
        "description" : "",
        "operationId" : "setPermission",
        "parameters" : [ {
          "name" : "typeId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "name" : "objectId",
          "in" : "path",
          "required" : true,
          "type" : "string"
        }, {
          "in" : "body",
          "name" : "body",
          "required" : false,
          "schema" : {
            "$ref" : "#/definitions/SetObjectPermissionRequest"
          }
        } ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      }
    }
  },
  "definitions" : {
    "ApiResponse" : {
      "type" : "object",
      "properties" : {
        "data" : {
          "type" : "object"
        }
      }
    },
    "DeletePermissionRequest" : {
      "type" : "object",
      "properties" : {
        "role" : {
          "type" : "string"
        },
        "user" : {
          "type" : "string"
        }
      }
    },
    "LinksResponse" : {
      "type" : "object",
      "properties" : {
        "self" : {
          "type" : "string",
          "format" : "uri"
        },
        "next" : {
          "type" : "string",
          "format" : "uri"
        },
        "previous" : {
          "type" : "string",
          "format" : "uri"
        }
      }
    },
    "ObjectPermissionsRequest" : {
      "type" : "object",
      "properties" : {
        "permissions" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/PermissionRequest"
          }
        },
        "objectId" : {
          "type" : "string"
        }
      }
    },
    "PageResponse" : {
      "type" : "object",
      "properties" : {
        "size" : {
          "type" : "integer",
          "format" : "int32"
        },
        "number" : {
          "type" : "integer",
          "format" : "int32"
        },
        "totalElements" : {
          "type" : "integer",
          "format" : "int32"
        },
        "totalPages" : {
          "type" : "integer",
          "format" : "int32"
        }
      }
    },
    "PagedApiResponse" : {
      "type" : "object",
      "properties" : {
        "data" : {
          "type" : "object"
        },
        "links" : {
          "$ref" : "#/definitions/LinksResponse"
        },
        "page" : {
          "$ref" : "#/definitions/PageResponse"
        }
      }
    },
    "PermissionRequest" : {
      "type" : "object",
      "properties" : {
        "permission" : {
          "type" : "string"
        },
        "role" : {
          "type" : "string"
        },
        "user" : {
          "type" : "string"
        }
      }
    },
    "SetObjectPermissionRequest" : {
      "type" : "object",
      "properties" : {
        "permissions" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/PermissionRequest"
          }
        }
      }
    },
    "SetTypePermissionsRequest" : {
      "type" : "object",
      "properties" : {
        "objects" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/ObjectPermissionsRequest"
          }
        }
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy