Create

Create a new document class, either inside another class or not.

Request

POST https://test-uni.cloudplan.biz/api/docclass/create

{
    "name": ...         //(string) the display name of the new class
    "parent_id": ...    //(optional, string) another class id
}

Example 0

REQUEST
{
    "name": "subclass",
    "parent_id": "5FCA267D02E8E1A82F0B87F6C145DE35"
}

REPLY
{
    "result": true,
    "class_doc": {
        "cp_id": "5FCA28ED35E922719D503359E091C5EA",
        "parent_folder_cp_id": "5FCA267D02E8E1A82F0B87F6C145DE35",
        "name": "subclass",
        "org_id": "56A23D908AD3312676D3D9DF9099A5C9",
        "rights_user_cp_ids": [
            "56A23EB6998F303B134C1C0A723447B0"
        ],
        "individual_rights_user_cp_ids": [
            "56A23EB6998F303B134C1C0A723447B0"
        ],
        "rights_user_56A23EB6998F303B134C1C0A723447B0": {
            "read_acl": true,
            "write_acl": true,
            "delete_acl": true,
            "sync_acl": true,
            "transfer_acl": true
        },
        "individual_rights_user_56A23EB6998F303B134C1C0A723447B0": {
            "read_acl": true,
            "write_acl": true,
            "delete_acl": true,
            "sync_acl": true,
            "transfer_acl": true
        }
    }
}

//Note:
the field names for cp_id and parent_folder_cp_id may change, they are currently there, so
some functionality implemented for the folder collection can be used.
parent_folder_cp_id may be renamed to parent_id to make more sense.

Error Codes

no_name
error codes from :doc:`api/user/login`