Transfer Resource
POST
/organizations/{slug}/transfer-resource
const url = 'https://api.mengi.cloud/organizations/example/transfer-resource';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"resource_type":"example","resource_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.mengi.cloud/organizations/example/transfer-resource \ --header 'Content-Type: application/json' \ --data '{ "resource_type": "example", "resource_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Transfer a resource to this organization.
The caller must be an ADMIN/OWNER of both the resource’s current organization and the target organization. Transferring a cluster cascades to everything it owns (deployments, databases, and their secrets) so the org-inheritance invariant is preserved.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
Slug
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
TransferResourceRequest
object
resource_type
required
Resource Type
string
resource_id
required
Resource Id
string format: uuid
Examplegenerated
{ "resource_type": "example", "resource_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}