Permissions by Directory

Operations for managing directory and system permissions

Get Directory Permission

Retrieve a directory permission by its ID

GET

https://dev.officex.app/v1/drive/{organization_id}/permissions/directory/get/{directory_permission_id}

Run In Postman

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

directory_permission_id (required)

string

ID of the directory permission to retrieve

DirectoryPermissionID_3acdba66-1378-4257-bc9b-0563dd9c3bbf

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

Responses

chevron-rightsuccesshashtag
{
    "ok": {
        "data": {
            "id": "DirectoryPermissionID_3acdba66-1378-4257-bc9b-0563dd9c3bbf",
            "resource_id": "FolderID_b44cfb98-2278-42d8-b846-c16f3c70da2a",
            "resource_path": "DiskID_d2b1fec9-ebf8-4ca5-adb3-8dea93941939::",
            "granted_to": "GroupID_1873ebab-1403-412d-99ea-41a5f0d0c781",
            "granted_by": "UserID_3hrnt-ylswl-acoxp-fx4qh-irpw4-wyyx5-pdjfq-ih5cl-d2xy3-dfbga-tae",
            "permission_types": [
                "DELETE",
                "EDIT",
                "INVITE",
                "MANAGE",
                "UPLOAD",
                "VIEW"
            ],
            "begin_date_ms": 0,
            "expiry_date_ms": -1,
            "inheritable": true,
            "note": "Default permissions for disk root folder owner",
            "created_at": 1755588857475,
            "last_modified_at": 1755588857475,
            "from_placeholder_grantee": null,
            "labels": [],
            "redeem_code": null,
            "resource_name": "",
            "grantee_name": "Group for All",
            "grantee_avatar": null,
            "granter_name": "Owner",
            "permission_previews": [
                "CREATE",
                "VIEW",
                "EDIT",
                "DELETE",
                "INVITE"
            ]
        }
    }
}

chevron-righterrorhashtag

Typescript Types


Create Directory Permission

Create a new directory permission

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schemahashtag

resource_id (required)

string(DirectoryResourceID)

Enum: "FileID_<id>" "FolderID_<id>"

Unique identifier for a directory resource (file or folder)

FolderID_b9fa11bc-2926-4a13-944e-e1189df66e5a

granted_to

string (GranteeID) Either a UserID or GroupID

permission_types (required)

Array of permissions

[ "VIEW", "EDIT", "DELETE", "UPLOAD", "INVITE" ]

begin_date_ms

number

expiry_date_ms

number

inheritable

boolean Whether permission applies to sub-resources

false

note

string or null <= 8192 characters Note about the permission

metadata

object or null Additional metadata for the permission

external_id

string (ExternalID) <= 256 characters External identifier for integration purposes

external_payload

string (ExternalPayload) <= 8192 characters Additional data for external integrations. Eg Stringified JSON

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types


Update Directory Permission

Update directory permission

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schemahashtag

id (required)

string (DirectoryPermissionID) Unique identifier for a directory permission

DirectoryPermissionID_bddd1bb7-f292-448a-a9dc-6a82bb88627f

permission_types (required)

Array of permissions

[ "DELETE" ]

begin_date_ms

number

expiry_date_ms

number

inheritable

boolean Whether permission applies to sub-resources

false

note

string or null <= 8192 characters Note about the permission

metadata

object or null Additional metadata for the permission

external_id

string (ExternalID) <= 256 characters External identifier for integration purposes

external_payload

string (ExternalPayload) <= 8192 characters Additional data for external integrations. Eg Stringified JSON

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types


Delete Directory Permission

Delete an existing directory permission

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schemahashtag

permission_id (required)

string (DirectoryPermissionID) Unique identifier for a directory permission

DirectoryPermissionID_bddd1bb7-f292-448a-a9dc-6a82bb88627f

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types


Check Permissions by Directory

Check what permissions a user has for a specific resource

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schemahashtag

resource_id (required)

string (DirectoryResourceID) Enum: "FileID_" "FolderID_" Unique identifier for a directory resource (file or folder)

FolderID_b9fa11bc-2926-4a13-944e-e1189df66e5a

grantee_id (required)

string (GranteeID) Either a UserID or GroupID

UserID_wocat-vmb4r-rs5oj-ixung-f6e4c-r3zpk-ae2tm-jcmqr-vchpb-umcdf-fqe

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types


Redeem Directory Permission

Redeem a placeholder permission for a specific user

POST

Run In Postman

chevron-rightHeader Parametershashtag

Authorization (required)

stringBearer TOKEN Bearer token for authentication

Bearer eyJhbGciOiJIUz...

chevron-rightPath Parameterhashtag

organization_id (required)

string (DriveID)

Unique identifier for a drive

DriveID_abc123

chevron-rightRequest Body schemahashtag

permission_id (required)

string (DirectoryPermissionID)

Unique identifier for a directory permission

DirectoryPermissionID_ccb14bfc-2aa1-40af-a5ec-01740f0b2f37

user_id (required)

string (UserID) Unique identifier for a user

UserID_wocat-vmb4r-rs5oj-ixung-f6e4c-r3zpk-ae2tm-jcmqr-vchpb-umcdf-fqe

redeem_code (required)

string Optional redeem code for the permission

RedeemTokenID_8e82fb3c-7c7d-4aec-8329-935d27747b44

note

string Optional note for the redemption

Hello World

Responses

chevron-rightsuccesshashtag

chevron-righterrorhashtag

Typescript Types

Last updated