Up - API Reference - Home
Requires JWT
Copy a class.
All properties are copied, and the class is marked as new. Before use, you must commit it - until then you can keep modifying it.
Note: you cannot copy a new or modified class
The accompanying layout is copied too.
POST /api/p/<project gid>/classes/copy
Authorization: Bearer <JWT>
{
"class": "<class gid>"
}
class
the class to copy
Authorization: <JWT>
{
"success": true,
"result": {
"class": "<class copy gid>"
},
"data": {
"classes": {
"<class copy gid>": {…}
},
"layouts": {
…
}
}
}
class
the copy of the class.
classes
Class info with name, fields.
layouts
Layout info with hierarchy, for the copied class.
400
Bad request - missing parameters or wrong type or value
401
Unauthorized - missing or expired JWT
403
Forbidden - not a member of this project
422
Unprocessable entity - can't work with this item