Try to activate the group-resource status. If the async is set to false, the validation is performed synchronously. The assignment will be either ACTIVE, in case of a successful synchronous call, or it will be PROCESSING in case of an asynchronous call. After the async validation, the state can be either ACTIVE or FAILED.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resource | int | Resource id |
async | boolean | if true the validation is performed asynchronously, default value is false |
Thrown exception | Description |
---|---|
GroupNotDefinedOnResourceException | when the group-resource assignment doesn't exist |
GroupNotExistsException | when the group doesn't exist |
GroupResourceMismatchException | when the given group and resource are not from the same VO |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
ResourceNotExistsException | when the resource doesn't exist |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
WrongAttributeValueException | when an attribute value has wrong/illegal syntax |
WrongReferenceAttributeValueException | when an attribute value has wrong/illegal semantics |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/activateGroupResourceAssignment
Example params
{ "group" : 97 , "resource" : 0 , "async" : true }
Example response
null
Adds a Resource admin.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/addAdmin
Example params
{ "resource" : 35 , "user" : 74 }
Example response
null
Adds a group administrator to the Resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
authorizedGroup | int | Group id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/addAdmin
Example params
{ "resource" : 4 , "authorizedGroup" : 70 }
Example response
null
Sets ResourceSelfService role to given group for given resource.
Parameter name | Data type | Description |
---|---|---|
resourceId | int | Resource id |
groupId | int | Group id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/addResourceSelfServiceGroup
Example params
{ "resourceId" : 56 , "groupId" : 11 }
Example response
null
Sets ResourceSelfService role to given user for given resource.
Parameter name | Data type | Description |
---|---|---|
resourceId | int | Resource id |
userId | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/addResourceSelfServiceUser
Example params
{ "resourceId" : 26 , "userId" : 57 }
Example response
null
Assign group to a resource. Check if attributes for each member from group are valid. Fill members' attributes with missing value. Work in sync/async mode.Provide options for creating inactive or automatic subgroups group-resource assignments.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resource | int | Resource id |
async | boolean | asynchronous flag |
assignInactive | boolean | flag for inactive group-resource assignment |
autoAssignSubgroups | boolean | flag for automatic assignment of all subgroups |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResource
Example params
{ "group" : 11 , "resource" : 91 , "async" : true , "assignInactive" : true , "autoAssignSubgroups" : true }
Example response
null
Assign group to a resource. Check if attributes for each member from group are valid. Fill members' attributes with missing value.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResource
Example params
{ "group" : 14 , "resource" : 94 }
Example response
null
Assign group to resources. Check if attributes for each member from group are valid. Fill members' attributes with missing values. Work in sync/async mode.Provide options for creating inactive or automatic subgroups group-resource assignments.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resources | List<Integer> | list of resources IDs |
async | boolean | asynchronous flag |
assignInactive | boolean | flag for inactive group-resource assignment |
autoAssignSubgroups | boolean | flag for automatic assignment of all subgroups |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResources
Example params
{ "group" : 19 , "resources" : [ 88 , 13 ] , "async" : true , "assignInactive" : true , "autoAssignSubgroups" : true }
Example response
null
Assign group to resources. Check if attributes for each member from group are valid. Fill members' attributes with missing values.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resources | List<Integer> | list of resources IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResources
Example params
{ "group" : 64 , "resources" : [ 92 , 6 ] }
Example response
null
Assign groups to a resource. Check if attributes for each member from groups are valid. Fill members' attributes with missing values. Work in sync/async mode.Provide options for creating inactive or automatic subgroups group-resource assignments.
Parameter name | Data type | Description |
---|---|---|
groups | List<Integer> | list of groups IDs |
resource | int | Resource id |
async | boolean | asynchronous flag |
assignInactive | boolean | flag for inactive group-resource assignment |
autoAssignSubgroups | boolean | flag for automatic assignment of all subgroups |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignGroupsToResource
Example params
{ "groups" : [ 69 , 38 ] , "resource" : 72 , "async" : true , "assignInactive" : true , "autoAssignSubgroups" : true }
Example response
null
Assign groups to a resource. Check if attributes for each member from groups are valid. Fill members' attributes with missing values.
Parameter name | Data type | Description |
---|---|---|
groups | List<Integer> | list of groups IDs |
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignGroupsToResource
Example params
{ "groups" : [ 48 , 93 ] , "resource" : 59 }
Example response
null
Assign resource tag to resource
Parameter name | Data type | Description |
---|---|---|
resourceTag | ResourceTag | ResourceTag to assign |
resource | int | id of Resource to assign tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignResourceTagToResource
Example params
{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , "resource" : 46 }
Example response
null
Assign resource tags to resource
Parameter name | Data type | Description |
---|---|---|
resourceTags | List<ResourceTag> | ResourceTags to assign |
resource | int | id of Resource to assign tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignResourceTagsToResource
Example params
{ "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] , "resource" : 55 }
Example response
null
Assign service to resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
service | int | Service id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignService
Example params
{ "resource" : 5 , "service" : 23 }
Example response
null
Assign services to resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
services | List<Integer> | list of services IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignServices
Example params
{ "resource" : 52 , "services" : [ 18 , 93 ] }
Example response
null
Assign all services from services package to resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
servicesPackage | int | Services package id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/assignServicesPackage
Example params
{ "resource" : 68 , "servicesPackage" : 60 }
Example response
null
Copy "template" settings from user's another existing resource and create new resource with this template. The settings are attributes, services, tags (if exists), groups and their members (if the resources are from the same VO and withGroups is true) Template Resource can be from any of user's facilities.
Parameter name | Data type | Description |
---|---|---|
templateResource | Resource | template resource to copy |
destinationResource | Resource | destination resource containing IDs of destination facility, VO and resource name. |
withGroups | boolean | if set to true and resources ARE from the same VO we also copy all group-resource and member-resource attributes and assign all groups same as on templateResource if set to true and resources ARE NOT from the same VO InternalErrorException is thrown, if set to false we will NOT copy groups and group related attributes. |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Resource | new Resource with copied settings based on withGroups parameter. |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/copyResource
Example params
{ "templateResource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "destinationResource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "withGroups" : true }
Example response
{ "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" }
Creates a new resource. Resource object must contain name. Parameter description is optional. Other parameters are ignored.
Parameter name | Data type | Description |
---|---|---|
resource | Resource | JSON object |
vo | int | virtual organization id |
facility | int | Facility id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Resource | Created resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/createResource
Example params
{ "resource" : { "name" : "my new resource" } , "vo" : 1 , "facility" : 12 }
Example response
{ "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" }
Creates a new resource.
Parameter name | Data type | Description |
---|---|---|
name | String | name of a new resource |
description | String | description of a new resource |
vo | int | virtual organization id |
facility | int | Facility id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Resource | Created resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/createResource
Example params
{ "name" : "my new resource" , "description" : "New resource with information" , "vo" : 1 , "facility" : 12 }
Example response
{ "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" }
Create new resource tag in VO
Parameter name | Data type | Description |
---|---|---|
resourceTag | ResourceTag | ResourceTag with tagName set |
vo | int | id of VO to create tag for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
ResourceTag | created ResourceTag with id and VO_ID set |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/createResourceTag
Example params
{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , "vo" : 73 }
Example response
{ "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" }
Create new resource tag defined by tag name in VO
Parameter name | Data type | Description |
---|---|---|
tagName | String | tagName |
vo | int | id of VO to create tag for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
ResourceTag | created ResourceTag with id and VO_ID set |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/createResourceTag
Example params
{ "tagName" : "text" , "vo" : 28 }
Example response
{ "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" }
Deactivates the group-resource assignment. The assignment will become INACTIVE and will not be used to allow users from the given group to the resource.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resource | int | Resource id |
Thrown exception | Description |
---|---|
GroupNotDefinedOnResourceException | when the group-resource assignment doesn't exist |
GroupNotExistsException | when the group doesn't exist |
GroupResourceStatusException | when trying to deactivate an assignment in PROCESSING state |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
ResourceNotExistsException | when the resource doesn't exist |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/deactivateGroupResourceAssignment
Example params
{ "group" : 61 , "resource" : 1 }
Example response
null
Deletes all VO resources
Parameter name | Data type | Description |
---|---|---|
vo | int | VO id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/deleteAllResources
Example params
{ "vo" : 93 }
Example response
null
Delete all resources tags of VO
Parameter name | Data type | Description |
---|---|---|
vo | int | id of VO to delete all resources tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/deleteAllResourcesTagsForVo
Example params
{ "vo" : 75 }
Example response
null
Deletes a resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/deleteResource
Example params
{ "resource" : 39 }
Example response
null
Delete resource tag by it's id
and VO_ID
Parameter name | Data type | Description |
---|---|---|
resourceTag | ResourceTag | ResourceTag to delete |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/deleteResourceTag
Example params
{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } }
Example response
null
Get all Resource group admins.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Group> | admins |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAdminGroups
Example params
{ "resource" : 56 }
Example response
[ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ]
Get list of all resource administrators for supported role and given resource. If some group is administrator of the given resource, all VALID members are included in the list. If onlyDirectAdmins is == true, return only direct admins of the group for supported role.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
onlyDirectAdmins | boolean | if true, get only direct resource administrators (if false, get both direct and indirect) |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<User> | list of all resource administrators of the given resource for supported role |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAdmins
Example params
{ "resource" : 4 , "onlyDirectAdmins" : true }
Example response
[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]
Returns all resources.
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | All resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAllResources
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Get all resources with specific tag assigned
Parameter name | Data type | Description |
---|---|---|
resourceTag | ResourceTag | ResourceTag to get resources for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | all resources with specific tag assigned |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAllResourcesByResourceTag
Example params
{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Get all resource tags of Resource
Parameter name | Data type | Description |
---|---|---|
resource | int | id of Resource to get all resource tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<ResourceTag> | all resources tags of Resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAllResourcesTagsForResource
Example params
{ "resource" : 69 }
Example response
[ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ]
Get all resource tags of VO
Parameter name | Data type | Description |
---|---|---|
vo | int | id of VO to get all resource tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<ResourceTag> | all resources tags of VO |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAllResourcesTagsForVo
Example params
{ "vo" : 88 }
Example response
[ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ]
Returns all members assigned to the resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Member> | Members assigned to the resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAllowedMembers
Example params
{ "resource" : 1 }
Example response
[ { "id" : 12 , "userId" : 34 , "voId" : 42 , "sourceGroupId" : null , "membershipType" : "DIRECT" , "status" : "VALID" , "sponsored" : false , "beanName" : "Member" } , {...} , {...} ]
Get all resources which have the member access on.
Parameter name | Data type | Description |
---|---|---|
member | int | Member id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | VO resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAllowedResources
Example params
{ "member" : 2 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Returns all users assigned to the resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<User> | Users assigned to the resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAllowedUsers
Example params
{ "resource" : 90 }
Example response
[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , {...} , {...} ]
List all groups associated with the resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Group> | Resource groups |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedGroups
Example params
{ "resource" : 97 }
Example response
[ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ]
List all groups associated with the resource and member
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
member | int | Member id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Group> | Resource groups with specified member |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedGroups
Example params
{ "resource" : 40 , "member" : 96 }
Example response
[ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ]
Returns all members assigned to the resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Member> | list of assigned members |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedMembers
Example params
{ "resource" : 75 }
Example response
[ { "id" : 12 , "userId" : 34 , "voId" : 42 , "sourceGroupId" : null , "membershipType" : "DIRECT" , "status" : "VALID" , "sponsored" : false , "beanName" : "Member" } , {...} , {...} ]
Returns members of groups assigned to resource with status of group-resource assignment.
Parameter name | Data type | Description |
---|---|---|
sess | perunSession | |
resource | resource |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
PrivilegeException | insufficient permissions |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
list | of members of groups assigned to given resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedMembersWithStatus
Example params
{ "sess" : {...} , "resource" : {...} }
Example response
{ ... TODO ... }
List all resources associated with a group.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedResources
Example params
{ "group" : 34 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
List all resources associated with a member's group.
Parameter name | Data type | Description |
---|---|---|
member | int | Member id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedResources
Example params
{ "member" : 68 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Returns all assigned resources with statuses where member is assigned through the groups.
Parameter name | Data type | Description |
---|---|---|
member | int | Member id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<AssignedResource> | Resources with statuses |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedResourcesWithStatus
Example params
{ "member" : 29 }
Example response
[ { "enrichedResource" : { "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] } , "status" : "FAILED" , "sourceGroupId" : 10 , "failureCause" : "Wrong attribute value in group 1" , "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] , "autoAssignSubgroups" : false } , {...} , {...} ]
Returns all members assigned to the resource as RichMembers.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichMember> | list of assigned rich members |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichMembers
Example params
{ "resource" : 61 }
Example response
[ { "id" : 12 , "userId" : 34 , "voId" : 42 , "sourceGroupId" : null , "membershipType" : "DIRECT" , "status" : "VALID" , "sponsored" : false , "beanName" : "RichMember" , "user" : { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "User" } , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ] , "memberAttributes" : [ ] , "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]
Get all rich resources where the service and the member are assigned with facility property filled.
Parameter name | Data type | Description |
---|---|---|
member | int | Member id |
service | int | Service id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | List of rich resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichResources
Example params
{ "member" : 30 , "service" : 59 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]
List all rich resources associated with a member's group.
Parameter name | Data type | Description |
---|---|---|
member | int | Member id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | List of rich resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichResources
Example params
{ "member" : 19 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]
List all rich resources associated with a group.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | List of rich resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichResources
Example params
{ "group" : 15 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]
List all services associated with the resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Service> | Services |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getAssignedServices
Example params
{ "resource" : 7 }
Example response
[ { "id" : 290 , "name" : "passwd" , "description" : "Provision /etc/passwd file." , "delay" : 10 , "recurrence" : 2 , "enabled" : true , "script" : "./passwd" , "useExpiredMembers" : false , "useExpiredVoMembers" : false } , {...} , {...} ]
Get ban by memberId and resource id.
Parameter name | Data type | Description |
---|---|---|
memberId | int | Member id |
resourceId | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
BanOnResource | banOnResource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getBan
Example params
{ "memberId" : 16 , "resourceId" : 87 }
Example response
{ "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" }
Get Ban for member on resource by it's id.
Parameter name | Data type | Description |
---|---|---|
banId | int | BanOnResource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
BanOnResource | banOnResource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getBanById
Example params
{ "banId" : 41 }
Example response
{ "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" }
Get all bans for member on any resource.
Parameter name | Data type | Description |
---|---|---|
memberId | int | Member id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<BanOnResource> | memberBansOnResources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getBansForMember
Example params
{ "memberId" : 36 }
Example response
[ { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } , {...} , {...} ]
Get all bans for members on the resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<BanOnResource> | membersBansOnResource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getBansForResource
Example params
{ "resource" : 37 }
Example response
[ { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } , {...} , {...} ]
Get all enriched bans for members on the resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
attrNames | List<String> | list of attribute names, if empty or null returns all user and member attributes |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
ResourceNotExistsException | |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<BanOnResource> | enriched bans on resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedBansForResource
Example params
{ "resource" : 93 , "attrNames" : [ "text" , "text" ] }
Example response
[ { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } , {...} , {...} ]
Get all enriched bans for user's members on resources.
Parameter name | Data type | Description |
---|---|---|
user | int | user id |
attrNames | List<String> | list of attribute names, if empty or null returns all user and member attributes |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
UserNotExistsException |
Return type | Description |
---|---|
List<BanOnResource> | enriched bans for user |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedBansForUser
Example params
{ "user" : 23 , "attrNames" : [ "text" , "text" ] }
Example response
[ { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } , {...} , {...} ]
Find resource for given id and returns it with given attributes. If attrNames are null or empty, all resource attributes are returned.
Parameter name | Data type | Description |
---|---|---|
id | int | resource id |
attrNames | List<String> | names of attributes to return |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
ResourceNotExistsException | if there is no resource with given id |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
EnrichedResource | resource for given id with desired attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourceById
Example params
{ "id" : 32 , "attrNames" : [ "text" , "text" ] }
Example response
{ "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] }
Find resource for given id and returns it with all attributes.
Parameter name | Data type | Description |
---|---|---|
id | int | resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
ResourceNotExistsException | if there is no resource with given id |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
EnrichedResource | resource for given id with desired attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourceById
Example params
{ "id" : 76 }
Example response
{ "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] }
Find resources for given facility and attributes for given names. If the attrNames are empty or null, return all attributes.
Parameter name | Data type | Description |
---|---|---|
facility | int | facility |
attrNames | List<String> | names of attributes to return |
Thrown exception | Description |
---|---|
FacilityNotExistsException | if there is not facility with given id |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<EnrichedResource> | resources with desired attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForFacility
Example params
{ "facility" : 36 , "attrNames" : [ "text" , "text" ] }
Example response
[ { "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] } , {...} , {...} ]
Find resources for given facility and all attributes.
Parameter name | Data type | Description |
---|---|---|
facility | int | facility |
Thrown exception | Description |
---|---|
FacilityNotExistsException | if there is not facility with given id |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<EnrichedResource> | resources with desired attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForFacility
Example params
{ "facility" : 50 }
Example response
[ { "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] } , {...} , {...} ]
Find resources for given vo and attributes for given names. If the attrNames are empty or null, return all attributes.
Parameter name | Data type | Description |
---|---|---|
vo | int | vo |
attrNames | List<String> | names of attributes to return |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
VoNotExistsException | if there is no vo with given id |
Return type | Description |
---|---|
EnrichedResource | resources with desired attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForVo
Example params
{ "vo" : 18 , "attrNames" : [ "text" , "text" ] }
Example response
{ "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] }
Find resources for given vo and all attributes.
Parameter name | Data type | Description |
---|---|---|
vo | int | vo |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
VoNotExistsException | if there is no vo with given id |
Return type | Description |
---|---|
EnrichedResource | resources with desired attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForVo
Example params
{ "vo" : 15 }
Example response
{ "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] }
Get facility which belongs to a specific resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Facility | Found facility |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getFacility
Example params
{ "resource" : 68 }
Example response
{ "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" }
Lists all of the assigned groups for the given resource. Also, returns specified attributes for the groups. If attrNames are null, all group attributes are returned.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
attrNames | List<String> | names of attributes to return |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
ResourceNotExistsException | when the resource doesn't exist |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<AssignedGroup> | groups for given resource with specified attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getGroupAssignments
Example params
{ "resource" : 66 , "attrNames" : [ "text" , "text" ] }
Example response
[ { "enrichedGroup" : { "group" : { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] } , "status" : "FAILED" , "sourceGroupId" : 10 , "failureCause" : "Wrong attribute value in group 1" , "autoAssignSubgroups" : false } , {...} , {...} ]
Return all rich resources with mailing service(s) where given member is assigned.
Parameter name | Data type | Description |
---|---|---|
member | int | VO id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
MemberNotExistsException | if member is not present (does not exist) |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | member resources with mailing service |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getMailingServiceRichResourcesWithMember
Example params
{ "member" : 33 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]
Lists all of the resource assignments for the given group. Also, returns specified attributes and resource tags for the resources. If attrNames are null or empty, all resource attributes are returned.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
attrNames | List<String> | names of attributes to return |
Thrown exception | Description |
---|---|
GroupNotExistsException | when the group doesn't exist |
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<AssignedResource> | resources for given group with specified attributes and resource tags |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourceAssignments
Example params
{ "group" : 63 , "attrNames" : [ "text" , "text" ] }
Example response
[ { "enrichedResource" : { "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , "attributes" : [ { "id" : 2820 , "friendlyName" : "createdAt" , "namespace" : "urn:perun:vo:attribute-def:core" , "value" : "2011-05-17 00:50:06.3" , "type" : "java.lang.String" , "entity" : "vo" , "writable" : true , "baseFriendlyName" : "createdAt" , "friendlyNameParameter" : "" , "unique" : false , "displayName" : "VO created date" , "description" : "Date when VO was created." , "beanName" : "Attribute" } , {...} , {...} ] } , "status" : "FAILED" , "sourceGroupId" : 10 , "failureCause" : "Wrong attribute value in group 1" , "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] , "autoAssignSubgroups" : false } , {...} , {...} ]
Returns resource by its id
.
Parameter name | Data type | Description |
---|---|---|
id | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Resource | Found Resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourceById
Example params
{ "id" : 78 }
Example response
{ "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" }
Returns resource by its name, Vo id
and Facility id
.
Parameter name | Data type | Description |
---|---|---|
vo | int | VO id |
facility | int | Facility id |
name | String | resource name |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Resource | Found Resource based on the input. |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourceByName
Example params
{ "vo" : 1 , "facility" : 40 , "name" : "text" }
Example response
{ "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" }
Get all VO resources.
Parameter name | Data type | Description |
---|---|---|
vo | int | VO id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | VO resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResources
Example params
{ "vo" : 12 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Returns resources by their ids.
Parameter name | Data type | Description |
---|---|---|
ids | List<Integer> | list of resources IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | resources with specified IDs |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourcesByIds
Example params
{ "ids" : [ 32 , 47 ] }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Returns number of VO resources
Parameter name | Data type | Description |
---|---|---|
vo | int | VO id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
int | VO resources count |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourcesCount
Example params
{ "vo" : 38 }
Example response
33
Gets count of all users.
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
int | resources count |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourcesCount
Example response
74
Returns list of Resources for specified VO and Facility, where the user is an Administrator Including resources, where the user is a VALID member of authorized group.
Parameter name | Data type | Description |
---|---|---|
facility | int | Facility id |
vo | int | Vo id |
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Found Resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin
Example params
{ "facility" : 43 , "vo" : 60 , "user" : 5 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Returns list of Resources for specified VO and Facility, where the group is an Administrator.
Parameter name | Data type | Description |
---|---|---|
facility | int | Facility id |
vo | int | Vo id |
group | int | Group id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Found Resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin
Example params
{ "facility" : 40 , "vo" : 11 , "group" : 49 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Returns list of Resources for specified VO, where the user is an Administrator. Including resources, where the user is a VALID member of authorized group.
Parameter name | Data type | Description |
---|---|---|
vo | int | Vo id |
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Found Resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin
Example params
{ "vo" : 46 , "user" : 59 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Returns list of all Resources, where the user is an Administrator. Including resources, where the user is a VALID member of authorized group.
Parameter name | Data type | Description |
---|---|---|
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<Resource> | Found Resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin
Example params
{ "user" : 94 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } , {...} , {...} ]
Get list of all richUser administrators for the resource and supported role with specific attributes. If some group is administrator of the given group, all VALID members are included in the list. If "onlyDirectAdmins" is true, return only direct admins of the resource for supported role with specific attributes. If "allUserAttributes" is true, do not specify attributes through list and return them all in objects richUser. Ignoring list of specific attributes.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
specificAttributes | List<String> | list of specified attributes which are needed in object richUser |
allUserAttributes | int | if == true, get all possible user attributes and ignore list of specificAttributes (if false, get only specific attributes) |
onlyDirectAdmins | int | if == true, get only direct resource administrators (if false, get both direct and indirect) |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichUser> | list of RichUser administrators for the resource and supported role with attributes |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getRichAdmins
Example params
{ "resource" : 14 , "specificAttributes" : [ "text" , "text" ] , "allUserAttributes" : 2 , "onlyDirectAdmins" : 95 }
Example response
[ { "firstName" : "Some" , "lastName" : "Body" , "middleName" : null , "titleBefore" : "Mgr." , "titleAfter" : null , "serviceUser" : false , "sponsoredUser" : false , "specificUser" : false , "majorSpecificType" : "NORMAL" , "id" : 34 , "uuid" : "5e5a02dd-f991-4706-a428-69c3ea6c5ce8" , "beanName" : "RichUser" , "userExtSources" : [ { "userId": 34 , "loa" : 0 , "extSource" : { "name" : "PERUNPEOPLE" , "type" : "cz.metacentrum.perun.core.impl.ExtSourceSql" , "attributes" : {} , "id" : 2 , "beanName" : "ExtSource" } , "login" : "my_login" , "persistent" : true , "id" : 312 , "lastAccess" : "2019-06-10 14:07:42.2767" , "beanName" : "UserExtSource" } , {...} , {...} ], "userAttributes" : [ { "value" : "my_login" , "type" : "java.lang.String" , "entity" : "user" , "namespace" : "urn:perun:user:attribute-def:def" , "friendlyName" : "login-namespace:perun" , "writable" : true , "baseFriendlyName" : "login-namespace" , "friendlyNameParameter" : "perun" , "unique" : false , "displayName" : "Login in namespace: perun" , "description" : "Logname in namespace 'perun'." , "id" : 1905 , "beanName" : "Attribute" } ] } , {...} , {...} ]
Returns RichResource by its id
(also containing facility and VO inside)
Parameter name | Data type | Description |
---|---|---|
id | int | RichResource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
RichResource | Found RichResource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getRichResourceById
Example params
{ "id" : 70 }
Example response
{ "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] }
Get all VO rich resources.
Parameter name | Data type | Description |
---|---|---|
vo | int | VO id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | VO resources |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getRichResources
Example params
{ "vo" : 62 }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]
Returns rich resources by their ids.
Parameter name | Data type | Description |
---|---|---|
ids | List<Integer> | list of rich resources IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
List<RichResource> | rich resources with specified IDs |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getRichResourcesByIds
Example params
{ "ids" : [ 46 , 6 ] }
Example response
[ { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 123 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "RichResource" , "vo" : { "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }, "facility" : { "id" : 24 , "name" : "host.facility.cz" , "description" : "is optional" , "beanName" : "Facility" } , "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] } , {...} , {...} ]
Returns Vo which is tied to a specific resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Vo | VirtualOrganization |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/getVo
Example params
{ "resource" : 20 }
Example response
{ "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }
Removes a Resource admin.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
user | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeAdmin
Example params
{ "resource" : 41 , "user" : 81 }
Example response
null
Removes a group administrator of the Resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
authorizedGroup | int | Group id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeAdmin
Example params
{ "resource" : 91 , "authorizedGroup" : 39 }
Example response
null
Remove all resources tags from resource
Parameter name | Data type | Description |
---|---|---|
resource | int | id of Resource to remove all tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeAllResourcesTagFromResource
Example params
{ "resource" : 0 }
Example response
null
Remove specific ban by it's id.
Parameter name | Data type | Description |
---|---|---|
banId | int | BanOnResource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeBan
Example params
{ "banId" : 87 }
Example response
null
Remove specific ban by memberId and resourceId.
Parameter name | Data type | Description |
---|---|---|
memberId | int | Member id |
resourceId | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeBan
Example params
{ "memberId" : 92 , "resourceId" : 26 }
Example response
null
Remove group from a resource. After removing, check attributes and fix them if it is needed.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeGroupFromResource
Example params
{ "group" : 51 , "resource" : 55 }
Example response
null
Remove group from resources. After removing, check attributes and fix them if it is needed.
Parameter name | Data type | Description |
---|---|---|
group | int | Group id |
resources | List<Integer> | list of resources IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeGroupFromResources
Example params
{ "group" : 72 , "resources" : [ 69 , 5 ] }
Example response
null
Remove groups from a resource. After removing, check attributes and fix them if it is needed.
Parameter name | Data type | Description |
---|---|---|
groups | List<Group> | list of group |
resource | int | Resource id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeGroupsFromResource
Example params
{ "groups" : [ { "id" : 1061 , "name" : "My group" , "shortName" : "My group" , "description" : "My testing group" , "parentGroupId" : null , "voId" : 201 , "uuid" : "31e1014b-e994-4cb2-b238-e32aeef87670" , "beanName" : "Group" } , {...} , {...} ] , "resource" : 28 }
Example response
null
Unset ResourceSelfService role to given group for given resource.
Parameter name | Data type | Description |
---|---|---|
resourceId | int | Resource id |
groupId | int | Group id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeResourceSelfServiceGroup
Example params
{ "resourceId" : 4 , "groupId" : 43 }
Example response
null
Unset ResourceSelfService role to given user for given resource.
Parameter name | Data type | Description |
---|---|---|
resourceId | int | Resource id |
userId | int | User id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeResourceSelfServiceUser
Example params
{ "resourceId" : 75 , "userId" : 17 }
Example response
null
Remove resource tag from resource
Parameter name | Data type | Description |
---|---|---|
resourceTag | ResourceTag | ResourceTag to remove |
resource | int | id of Resource to remove tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeResourceTagFromResource
Example params
{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , "resource" : 87 }
Example response
null
Remove resource tags from resource
Parameter name | Data type | Description |
---|---|---|
resourceTags | List<ResourceTag> | ResourceTags to remove |
resource | int | id of Resource to remove tags for |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeResourceTagsFromResource
Example params
{ "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] , "resource" : 46 }
Example response
null
Removes a service from a resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
service | int | Service id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeService
Example params
{ "resource" : 53 , "service" : 28 }
Example response
null
Removes service from multiple resources in the same facility.
Parameter name | Data type | Description |
---|---|---|
resources | List<Integer> | Resource id |
service | int | Service id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeService
Example params
{ "resources" : [ 95 , 89 ] , "service" : 71 }
Example response
null
Removes services from resource.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
services | List<Integer> | list of services IDs |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeServices
Example params
{ "resource" : 22 , "services" : [ 68 , 8 ] }
Example response
null
Remove from resource all services from services package.
Parameter name | Data type | Description |
---|---|---|
resource | int | Resource id |
servicesPackage | int | Services package id |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
void |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/removeServicesPackage
Example params
{ "resource" : 41 , "servicesPackage" : 94 }
Example response
null
Set ban for member on resource.
Parameter name | Data type | Description |
---|---|---|
banOnResource | BanOnResource | JSON object |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
BanOnResource | Created banOnResource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/setBan
Example params
{ "banOnResource" : { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } }
Example response
{ "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" }
Update existing ban (description, validation timestamp)
Parameter name | Data type | Description |
---|---|---|
banOnResource | BanOnResource | JSON object |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
BanOnResource | updated banOnResource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/updateBan
Example params
{ "banOnResource" : { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } }
Example response
{ "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" }
Updates a resource.
Parameter name | Data type | Description |
---|---|---|
resource | Resource | JSON object |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
Resource | Updated resource |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/updateResource
Example params
{ "resource" : { "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" } }
Example response
{ "id" : 493 , "name" : "host1.host.cz" , "description" : "ROOT access to host1.host.cz" , "facilityId" : 24 , "voId" : 21 , "uuid" : "542d676f-99b2-4d1c-bc80-a46fd7f34e62" , "beanName" : "Resource" }
Update resource tag name by it's id
and VO_ID
Parameter name | Data type | Description |
---|---|---|
resourceTag | ResourceTag | ResourceTag with new tagName set |
Thrown exception | Description |
---|---|
InternalErrorException | When unspecified error occur. See exception param message for explanation. |
PrivilegeException | When caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values. |
RpcException | Wrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation. |
Return type | Description |
---|---|
ResourceTag | updated ResourceTag with new tagName |
Example URL
https://[hostname]/krb/rpc/json/resourcesManager/updateResourceTag
Example params
{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } }
Example response
{ "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" }