- Home
- Resources
- Allocated Resource Controller
The API allows you to list, view, create and edit allocated resource.
GET /allocatedresource
Returns list of allocated resource.
Request Parameters
name |
type |
description |
node-guid |
query |
|
protected-entity-guid |
query |
|
resource |
query |
|
Response Body
media type |
data type |
description |
application/json |
array of AllocatedResourceDetails
(JSON) |
list of allocated resource. |
Example
Request
GET /allocatedresource
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"guid" : "...",
"resource" : "...",
"removalAttempts" : 12345,
"protectedEntity" : {
"type" : {
"name" : "ENUM_NAME",
"description" : "Enum description"
},
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
}
} ]
POST /allocatedresource
Create allocated resource or get an existing one.
Request Body
media type |
data type |
description |
application/json |
AllocatedResourceRequest
(JSON) |
specify allocated resource. |
Response Body
media type |
data type |
description |
application/json |
AllocatedResourceDetails
(JSON) |
newly created or existing allocated resource. |
Example
Request
POST /allocatedresource
Content-Type: application/json
Accept: application/json
{
"resource" : "...",
"protectedEntity" : {
"type" : {
"name" : "ENUM_NAME",
"description" : "Enum description"
},
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
},
"newNode" : {
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
}
}
Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"guid" : "...",
"resource" : "...",
"removalAttempts" : 12345,
"protectedEntity" : {
"type" : {
"name" : "ENUM_NAME",
"description" : "Enum description"
},
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
}
}
POST /allocatedresource/for-node
Create allocated resource for specified node or get an existing one.
Request Body
media type |
data type |
description |
application/json |
AllocatedResourceRequest
(JSON) |
specify allocated resource. |
Response Body
media type |
data type |
description |
application/json |
AllocatedResourceDetails
(JSON) |
newly created or existing allocated resource. |
Example
Request
POST /allocatedresource/for-node
Content-Type: application/json
Accept: application/json
{
"resource" : "...",
"protectedEntity" : {
"type" : {
"name" : "ENUM_NAME",
"description" : "Enum description"
},
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
},
"newNode" : {
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
}
}
Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"guid" : "...",
"resource" : "...",
"removalAttempts" : 12345,
"protectedEntity" : {
"type" : {
"name" : "ENUM_NAME",
"description" : "Enum description"
},
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
}
}
DELETE /allocatedresource/{guid}
Remove allocated resource.
Request Parameters
name |
type |
description |
guid |
path |
specify local unique identifier for allocated resource (use by vProtect) |
node-guid |
query |
|
Example
Request
DELETE /allocatedresource/{guid}
Content-Type: */*
...
Response
HTTP/1.1 204 No Content
GET /allocatedresource/{guid}
Get a single allocated resource.
Request Parameters
name |
type |
description |
guid |
path |
specify local unique identifier for allocated resource (use by vProtect) |
Response Body
media type |
data type |
description |
application/json |
AllocatedResourceDetails
(JSON) |
allocated resource |
Example
Request
GET /allocatedresource/{guid}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"guid" : "...",
"resource" : "...",
"removalAttempts" : 12345,
"protectedEntity" : {
"type" : {
"name" : "ENUM_NAME",
"description" : "Enum description"
},
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
}
}
PUT /allocatedresource/{guid}
Update allocated resource.
Request Parameters
name |
type |
description |
guid |
path |
specify local unique identifier for allocated resource (use by vProtect) |
Request Body
media type |
data type |
description |
application/json |
UpdateAllocatedResourceRequest
(JSON) |
specify allocated resource properties to update |
Response Body
media type |
data type |
description |
application/json |
AllocatedResourceDetails
(JSON) |
updated details of allocated resource |
Example
Request
PUT /allocatedresource/{guid}
Content-Type: application/json
Accept: application/json
{
"removalAttempts" : 12345
}
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{
"guid" : "...",
"resource" : "...",
"removalAttempts" : 12345,
"protectedEntity" : {
"type" : {
"name" : "ENUM_NAME",
"description" : "Enum description"
},
"guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
"name" : "Entity name"
}
}
DELETE /allocatedresource/{guid}/if-necessary
Remove allocated resource if enough attempts were made
Request Parameters
name |
type |
description |
constraints |
guid |
path |
specify local unique identifier for allocated resource (use by vProtect) |
|
max-removal-attempts |
query |
|
required |
node-guid |
query |
|
|
Example
Request
DELETE /allocatedresource/{guid}/if-necessary
Content-Type: */*
...
Response
HTTP/1.1 204 No Content