RPC API documentation v34.4.0

Back to Documentation Version:  General How to use RPC Managers AttributesManagerAuditMessagesManagerAuthzResolverCabinetManagerConfigManagerConsentsManagerDatabaseManagerExtSourcesManagerFacilitiesManagerGroupsManagerIntegrationManagerMembersManagerNotificationManagerOwnersManagerRTMessagesManagerRegistrarManagerResourcesManagerSearcherSecurityTeamsManagerServicesManagerTasksManagerUsersManagerVosManager

ResourcesManager

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 nameData typeDescription
groupintGroup id
resourceintResource id
asyncbooleanif true the validation is performed asynchronously, default value is false
Thrown exceptionDescription
GroupNotDefinedOnResourceExceptionwhen the group-resource assignment doesn't exist
GroupNotExistsExceptionwhen the group doesn't exist
GroupResourceMismatchExceptionwhen the given group and resource are not from the same VO
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
ResourceNotExistsExceptionwhen the resource doesn't exist
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
WrongAttributeValueExceptionwhen an attribute value has wrong/illegal syntax
WrongReferenceAttributeValueExceptionwhen an attribute value has wrong/illegal semantics
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/activateGroupResourceAssignment

Example params

{ "group" : 9 , "resource" : 10 , "async" : true }

Example response

null

Adds a Resource admin.

Parameter nameData typeDescription
resourceintResource id
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/addAdmin

Example params

{ "resource" : 41 , "user" : 60 }

Example response

null

Adds a group administrator to the Resource.

Parameter nameData typeDescription
resourceintResource id
authorizedGroupintGroup id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/addAdmin

Example params

{ "resource" : 18 , "authorizedGroup" : 80 }

Example response

null

Sets ResourceSelfService role to given group for given resource.

Parameter nameData typeDescription
resourceIdintResource id
groupIdintGroup id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/addResourceSelfServiceGroup

Example params

{ "resourceId" : 25 , "groupId" : 48 }

Example response

null

Sets ResourceSelfService role to given user for given resource.

Parameter nameData typeDescription
resourceIdintResource id
userIdintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/addResourceSelfServiceUser

Example params

{ "resourceId" : 76 , "userId" : 98 }

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 nameData typeDescription
groupintGroup id
resourceintResource id
asyncbooleanasynchronous flag
assignInactivebooleanflag for inactive group-resource assignment
autoAssignSubgroupsbooleanflag for automatic assignment of all subgroups
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResource

Example params

{ "group" : 79 , "resource" : 64 , "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 nameData typeDescription
groupintGroup id
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResource

Example params

{ "group" : 60 , "resource" : 71 }

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 nameData typeDescription
groupintGroup id
resourcesList<Integer>list of resources IDs
asyncbooleanasynchronous flag
assignInactivebooleanflag for inactive group-resource assignment
autoAssignSubgroupsbooleanflag for automatic assignment of all subgroups
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResources

Example params

{ "group" : 95 , "resources" : [ 57 , 45 ] , "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 nameData typeDescription
groupintGroup id
resourcesList<Integer>list of resources IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignGroupToResources

Example params

{ "group" : 70 , "resources" : [ 10 , 33 ] }

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 nameData typeDescription
groupsList<Integer>list of groups IDs
resourceintResource id
asyncbooleanasynchronous flag
assignInactivebooleanflag for inactive group-resource assignment
autoAssignSubgroupsbooleanflag for automatic assignment of all subgroups
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignGroupsToResource

Example params

{ "groups" : [ 89 , 11 ] , "resource" : 2 , "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 nameData typeDescription
groupsList<Integer>list of groups IDs
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignGroupsToResource

Example params

{ "groups" : [ 24 , 41 ] , "resource" : 73 }

Example response

null

Assign resource tag to resource

Parameter nameData typeDescription
resourceTagResourceTagResourceTag to assign
resourceintid of Resource to assign tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignResourceTagToResource

Example params

{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , "resource" : 43 }

Example response

null

Assign resource tags to resource

Parameter nameData typeDescription
resourceTagsList<ResourceTag>ResourceTags to assign
resourceintid of Resource to assign tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignResourceTagsToResource

Example params

{ "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] , "resource" : 35 }

Example response

null

Assign service to resource.

Parameter nameData typeDescription
resourceintResource id
serviceintService id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignService

Example params

{ "resource" : 24 , "service" : 26 }

Example response

null

Assign services to resource.

Parameter nameData typeDescription
resourceintResource id
servicesList<Integer>list of services IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignServices

Example params

{ "resource" : 94 , "services" : [ 84 , 3 ] }

Example response

null

Assign all services from services package to resource.

Parameter nameData typeDescription
resourceintResource id
servicesPackageintServices package id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/assignServicesPackage

Example params

{ "resource" : 98 , "servicesPackage" : 98 }

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. 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.

Parameter nameData typeDescription
templateResourcetemplateresource to copy
destinationResourcedestinationresource containing IDs of destination facility, VO and resource name.
withGroupsifset to true and resources ARE from the same VO we also
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
Resourcenew Resource with copied settings based on withGroups parameter.

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/copyResource

Example params

{ "templateResource" : {...} , "destinationResource" : {...} , "withGroups" : {...} }

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 nameData typeDescription
resourceResourceJSON object
vointvirtual organization id
facilityintFacility id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceCreated 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 nameData typeDescription
nameStringname of a new resource
descriptionStringdescription of a new resource
vointvirtual organization id
facilityintFacility id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceCreated 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 nameData typeDescription
resourceTagResourceTagResourceTag with tagName set
vointid of VO to create tag for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceTagcreated 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" : 30 }

Example response

{ "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" }

Create new resource tag defined by tag name in VO

Parameter nameData typeDescription
tagNameStringtagName
vointid of VO to create tag for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceTagcreated ResourceTag with id and VO_ID set

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/createResourceTag

Example params

{ "tagName" : "text" , "vo" : 17 }

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 nameData typeDescription
groupintGroup id
resourceintResource id
Thrown exceptionDescription
GroupNotDefinedOnResourceExceptionwhen the group-resource assignment doesn't exist
GroupNotExistsExceptionwhen the group doesn't exist
GroupResourceStatusExceptionwhen trying to deactivate an assignment in PROCESSING state
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
ResourceNotExistsExceptionwhen the resource doesn't exist
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/deactivateGroupResourceAssignment

Example params

{ "group" : 45 , "resource" : 68 }

Example response

null

Deletes all VO resources

Parameter nameData typeDescription
vointVO id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/deleteAllResources

Example params

{ "vo" : 58 }

Example response

null

Delete all resources tags of VO

Parameter nameData typeDescription
vointid of VO to delete all resources tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/deleteAllResourcesTagsForVo

Example params

{ "vo" : 42 }

Example response

null

Deletes a resource.

Parameter nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/deleteResource

Example params

{ "resource" : 56 }

Example response

null

Delete resource tag by it's id and VO_ID

Parameter nameData typeDescription
resourceTagResourceTagResourceTag to delete
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Group>admins

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAdminGroups

Example params

{ "resource" : 89 }

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. indirect)

Parameter nameData typeDescription
resourceintResource id
onlyDirectAdminsbooleanif true, get only direct resource administrators (if false, get both direct and
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
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" : 6 , "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 exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
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 nameData typeDescription
resourceTagResourceTagResourceTag to get resources for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
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 nameData typeDescription
resourceintid of Resource to get all resource tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<ResourceTag>all resources tags of Resource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAllResourcesTagsForResource

Example params

{ "resource" : 24 }

Example response

[ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ]

Get all resource tags of VO

Parameter nameData typeDescription
vointid of VO to get all resource tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<ResourceTag>all resources tags of VO

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAllResourcesTagsForVo

Example params

{ "vo" : 85 }

Example response

[ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ]

Returns all members assigned to the resource.

Parameter nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Member>Members assigned to the resource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAllowedMembers

Example params

{ "resource" : 13 }

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 nameData typeDescription
memberintMember id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>VO resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAllowedResources

Example params

{ "member" : 46 }

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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<User>Users assigned to the resource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAllowedUsers

Example params

{ "resource" : 52 }

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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Group>Resource groups

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedGroups

Example params

{ "resource" : 47 }

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 nameData typeDescription
resourceintResource id
memberintMember id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Group>Resource groups with specified member

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedGroups

Example params

{ "resource" : 13 , "member" : 93 }

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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Member>list of assigned members

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedMembers

Example params

{ "resource" : 70 }

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 nameData typeDescription
sessperunSession
resourceresource
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
PrivilegeExceptioninsufficient permissions
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
listof 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 nameData typeDescription
groupintGroup id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>Resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedResources

Example params

{ "group" : 28 }

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 nameData typeDescription
memberintMember id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
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 nameData typeDescription
memberintMember id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<AssignedResource>Resources with statuses

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedResourcesWithStatus

Example params

{ "member" : 76 }

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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichMember>list of assigned rich members

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichMembers

Example params

{ "resource" : 28 }

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 nameData typeDescription
memberintMember id
serviceintService id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>List of rich resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichResources

Example params

{ "member" : 57 , "service" : 36 }

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 nameData typeDescription
memberintMember id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>List of rich resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichResources

Example params

{ "member" : 52 }

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 nameData typeDescription
groupintGroup id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>List of rich resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedRichResources

Example params

{ "group" : 21 }

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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Service>Services

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getAssignedServices

Example params

{ "resource" : 61 }

Example response

[ { "id" : 290 , "name" : "passwd" , "description" : "Provision /etc/passwd file." , "delay" : 10 , "recurrence" : 2 , "enabled" : true , "script" : "./passwd" , "useExpiredMembers" : false } , {...} , {...} ]

Get ban by memberId and resource id.

Parameter nameData typeDescription
memberIdintMember id
resourceIdintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
BanOnResourcebanOnResource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getBan

Example params

{ "memberId" : 83 , "resourceId" : 42 }

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 nameData typeDescription
banIdintBanOnResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
BanOnResourcebanOnResource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getBanById

Example params

{ "banId" : 67 }

Example response

{ "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" }

Get all bans for member on any resource.

Parameter nameData typeDescription
memberIdintMember id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<BanOnResource>memberBansOnResources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getBansForMember

Example params

{ "memberId" : 32 }

Example response

[ { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } , {...} , {...} ]

Get all bans for members on the resource.

Parameter nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<BanOnResource>membersBansOnResource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getBansForResource

Example params

{ "resource" : 93 }

Example response

[ { "id" : 4 , "validityTo" : 1533638919 , "description" : "banned" , "memberId" : 13541 , "resourceId" : 2234 , "beanName" : "BanOnResource" } , {...} , {...} ]

Get all enriched bans for members on the resource.

Parameter nameData typeDescription
resourceintResource id
attrNamesList<String>list of attribute names, if empty or null returns all user and member attributes
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
ResourceNotExistsException
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<BanOnResource>enriched bans on resource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedBansForResource

Example params

{ "resource" : 74 , "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 nameData typeDescription
userintuser id
attrNamesList<String>list of attribute names, if empty or null returns all user and member attributes
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
UserNotExistsException
Return typeDescription
List<BanOnResource>enriched bans for user

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedBansForUser

Example params

{ "user" : 33 , "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 nameData typeDescription
idintresource id
attrNamesList<String>names of attributes to return
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
ResourceNotExistsExceptionif there is no resource with given id
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
EnrichedResourceresource for given id with desired attributes

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourceById

Example params

{ "id" : 28 , "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 nameData typeDescription
idintresource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
ResourceNotExistsExceptionif there is no resource with given id
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
EnrichedResourceresource for given id with desired attributes

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourceById

Example params

{ "id" : 46 }

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 nameData typeDescription
facilityintfacility
attrNamesList<String>names of attributes to return
Thrown exceptionDescription
FacilityNotExistsExceptionif there is not facility with given id
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<EnrichedResource>resources with desired attributes

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForFacility

Example params

{ "facility" : 60 , "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 nameData typeDescription
facilityintfacility
Thrown exceptionDescription
FacilityNotExistsExceptionif there is not facility with given id
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<EnrichedResource>resources with desired attributes

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForFacility

Example params

{ "facility" : 46 }

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 nameData typeDescription
vointvo
attrNamesList<String>names of attributes to return
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
VoNotExistsExceptionif there is no vo with given id
Return typeDescription
EnrichedResourceresources with desired attributes

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForVo

Example params

{ "vo" : 50 , "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 nameData typeDescription
vointvo
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
VoNotExistsExceptionif there is no vo with given id
Return typeDescription
EnrichedResourceresources with desired attributes

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getEnrichedResourcesForVo

Example params

{ "vo" : 63 }

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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
FacilityFound facility

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getFacility

Example params

{ "resource" : 66 }

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 nameData typeDescription
resourceintResource id
attrNamesList<String>names of attributes to return
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
ResourceNotExistsExceptionwhen the resource doesn't exist
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<AssignedGroup>groups for given resource with specified attributes

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getGroupAssignments

Example params

{ "resource" : 14 , "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 nameData typeDescription
memberintVO id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
MemberNotExistsExceptionif member is not present (does not exist)
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>member resources with mailing service

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getMailingServiceRichResourcesWithMember

Example params

{ "member" : 5 }

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 nameData typeDescription
groupintGroup id
attrNamesList<String>names of attributes to return
Thrown exceptionDescription
GroupNotExistsExceptionwhen the group doesn't exist
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<AssignedResource>resources for given group with specified attributes and resource tags

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourceAssignments

Example params

{ "group" : 39 , "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 nameData typeDescription
idintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceFound Resource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourceById

Example params

{ "id" : 98 }

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 nameData typeDescription
vointVO id
facilityintFacility id
nameStringresource name
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceFound Resource based on the input.

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourceByName

Example params

{ "vo" : 81 , "facility" : 27 , "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 nameData typeDescription
vointVO id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>VO resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResources

Example params

{ "vo" : 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 resources by their ids.

Parameter nameData typeDescription
idsList<Integer>list of resources IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>resources with specified IDs

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourcesByIds

Example params

{ "ids" : [ 62 , 58 ] }

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 nameData typeDescription
vointVO id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
intVO resources count

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourcesCount

Example params

{ "vo" : 11 }

Example response

0

Gets count of all users.

Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
intresources count

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourcesCount

Example response

51

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 nameData typeDescription
facilityintFacility id
vointVo id
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>Found Resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin

Example params

{ "facility" : 5 , "vo" : 33 , "user" : 22 }

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 nameData typeDescription
facilityintFacility id
vointVo id
groupintGroup id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>Found Resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin

Example params

{ "facility" : 60 , "vo" : 34 , "group" : 52 }

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 nameData typeDescription
vointVo id
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>Found Resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin

Example params

{ "vo" : 53 , "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" } , {...} , {...} ]

Returns list of all Resources, where the user is an Administrator. Including resources, where the user is a VALID member of authorized group.

Parameter nameData typeDescription
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<Resource>Found Resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getResourcesWhereUserIsAdmin

Example params

{ "user" : 36 }

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. (if false, get only specific attributes) indirect)

Parameter nameData typeDescription
resourceintResource id
specificAttributesList<String>list of specified attributes which are needed in object richUser
allUserAttributesintif == true, get all possible user attributes and ignore list of specificAttributes
onlyDirectAdminsintif == true, get only direct resource administrators (if false, get both direct and
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
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" : 6 , "specificAttributes" : [ "text" , "text" ] , "allUserAttributes" : 23 , "onlyDirectAdmins" : 15 }

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 nameData typeDescription
idintRichResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
RichResourceFound RichResource

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getRichResourceById

Example params

{ "id" : 21 }

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 nameData typeDescription
vointVO id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>VO resources

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getRichResources

Example params

{ "vo" : 90 }

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 nameData typeDescription
idsList<Integer>list of rich resources IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
List<RichResource>rich resources with specified IDs

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getRichResourcesByIds

Example params

{ "ids" : [ 98 , 1 ] }

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 nameData typeDescription
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
VoVirtualOrganization

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/getVo

Example params

{ "resource" : 18 }

Example response

{ "id" : 123 , "name" : "My testing VO" , "shortName" : "test_vo" , "beanName" : "Vo" }

Removes a Resource admin.

Parameter nameData typeDescription
resourceintResource id
userintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeAdmin

Example params

{ "resource" : 48 , "user" : 93 }

Example response

null

Removes a group administrator of the Resource.

Parameter nameData typeDescription
resourceintResource id
authorizedGroupintGroup id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeAdmin

Example params

{ "resource" : 77 , "authorizedGroup" : 85 }

Example response

null

Remove all resources tags from resource

Parameter nameData typeDescription
resourceintid of Resource to remove all tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeAllResourcesTagFromResource

Example params

{ "resource" : 36 }

Example response

null

Remove specific ban by it's id.

Parameter nameData typeDescription
banIdintBanOnResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeBan

Example params

{ "banId" : 35 }

Example response

null

Remove specific ban by memberId and resourceId.

Parameter nameData typeDescription
memberIdintMember id
resourceIdintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeBan

Example params

{ "memberId" : 96 , "resourceId" : 70 }

Example response

null

Remove group from a resource. After removing, check attributes and fix them if it is needed.

Parameter nameData typeDescription
groupintGroup id
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeGroupFromResource

Example params

{ "group" : 7 , "resource" : 23 }

Example response

null

Remove group from resources. After removing, check attributes and fix them if it is needed.

Parameter nameData typeDescription
groupintGroup id
resourcesList<Integer>list of resources IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeGroupFromResources

Example params

{ "group" : 24 , "resources" : [ 52 , 0 ] }

Example response

null

Remove groups from a resource. After removing, check attributes and fix them if it is needed.

Parameter nameData typeDescription
groupsList<Group>list of group
resourceintResource id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
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" : 57 }

Example response

null

Unset ResourceSelfService role to given group for given resource.

Parameter nameData typeDescription
resourceIdintResource id
groupIdintGroup id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeResourceSelfServiceGroup

Example params

{ "resourceId" : 83 , "groupId" : 6 }

Example response

null

Unset ResourceSelfService role to given user for given resource.

Parameter nameData typeDescription
resourceIdintResource id
userIdintUser id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeResourceSelfServiceUser

Example params

{ "resourceId" : 14 , "userId" : 21 }

Example response

null

Remove resource tag from resource

Parameter nameData typeDescription
resourceTagResourceTagResourceTag to remove
resourceintid of Resource to remove tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeResourceTagFromResource

Example params

{ "resourceTag" : { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , "resource" : 57 }

Example response

null

Remove resource tags from resource

Parameter nameData typeDescription
resourceTagsList<ResourceTag>ResourceTags to remove
resourceintid of Resource to remove tags for
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeResourceTagsFromResource

Example params

{ "resourceTags" : [ { "id" : 3 , "tagName" : "comp_cluster" , "voId" : 123 , "beanName" : "ResourceTag" } , {...} , {...} ] , "resource" : 19 }

Example response

null

Removes a service from a resource.

Parameter nameData typeDescription
resourceintResource id
serviceintService id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeService

Example params

{ "resource" : 9 , "service" : 94 }

Example response

null

Removes service from multiple resources in the same facility.

Parameter nameData typeDescription
resourcesList<Integer>Resource id
serviceintService id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeService

Example params

{ "resources" : [ 55 , 29 ] , "service" : 26 }

Example response

null

Removes services from resource.

Parameter nameData typeDescription
resourceintResource id
servicesList<Integer>list of services IDs
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeServices

Example params

{ "resource" : 71 , "services" : [ 0 , 6 ] }

Example response

null

Remove from resource all services from services package.

Parameter nameData typeDescription
resourceintResource id
servicesPackageintServices package id
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
void

Example URL

https://[hostname]/krb/rpc/json/resourcesManager/removeServicesPackage

Example params

{ "resource" : 72 , "servicesPackage" : 6 }

Example response

null

Set ban for member on resource.

Parameter nameData typeDescription
banOnResourceBanOnResourceJSON object
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
BanOnResourceCreated 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 nameData typeDescription
banOnResourceBanOnResourceJSON object
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
BanOnResourceupdated 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 nameData typeDescription
resourceResourceJSON object
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceUpdated 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 nameData typeDescription
resourceTagResourceTagResourceTag with new tagName set
Thrown exceptionDescription
InternalErrorExceptionWhen unspecified error occur. See exception param message for explanation.
PrivilegeExceptionWhen caller is not allowed to call this method. Result may vary based on caller identity and provided parameter values.
RpcExceptionWrong usage of API (wrong url, missing param etc.). See exception params message and type for explanation.
Return typeDescription
ResourceTagupdated 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" }