Search

1.6. http://localhost:7080/rest/group : Deal with groups and DynaGroups

download PDF

Api that deals with resource groups and group definitions

Defining class: org.rhq.enterprise.server.rest.GroupHandlerBean

Produces: application/json, application/xml, text/html, application/vnd.rhq.wrapped+json

Methods

  • GET /group

    Description

    List all groups

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    q Query String to search in the group name false String all
    ps Query Page size for paging false int all 20
    page Query Page number for paging, 0-based false Integer all

    Return type: GroupRest (multi)

  • GET /group/{id}

    Description

    Get the group with the passed id
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the group true int all

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    404 Group with passed id not found
  • POST /group

    Description

    Create a new group
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    -body- A GroupRest object containing at least a name for the group true GroupRest all

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    404 Resource type for provided type id does not exist
    406 No group provided
    406 Provided group has no name
  • PUT /group/{id}

    Description

    Update the passed group. Currently only name change is supported
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the group to update true int all
    -body- New version of the group true GroupRest all

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    404 Group with the passed id does not exist
    406 Updating the name failed
  • DELETE /group/{id}

    Description

    Delete the group with the passed id

    Notes

    This operation is by default idempotent, returning 204.If you want to check if the group existed at all, you need to pass the 'validate' query parameter.

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the group to delete true int all
    validate Query Validate if the group exists false boolean all false

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    204 Group was deleted or did not exist with validation not set
    404 Group did not exist and validate was set
  • GET /group/{id}/resources

    Description

    Get the resources of the group

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the group to retrieve the resources for true int all

    Return type: ResourceWithType (multi)

    Error codes:
    CodeReason
    404 Group with passed id does not exist
  • PUT /group/{id}/resource/{resourceId}

    Description

    Add a resource to an existing group

    Notes

    If you have created the group as a compatible group and a resource type was provided on creation, only resources with this type may be added.

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the existing group true int all
    resourceId Path Id of the resource to add true int all

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    404 If there is no resource or group with the passed id
    409 Resource type does not match the group one
  • DELETE /group/{id}/resource/{resourceId}

    Description

    Remove the resource with the passed id from the group

    Notes

    This operation is by default idempotent, returning 204even if the resource was not member of the group.If you want to check if the resource existed at all, you need to pass the 'validate' query parameter.

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the existing group true int all
    resourceId Path Id of the resource to remove true int all
    validate Query Validate if the resource exists in the group false boolean all false

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    404 Group with the passed id does not exist
    404 Resource with the passed id does not exist
    204 Resource was removed from the group or was no member and validation was not set
    404 Resource was no member of the group and validate was set
  • GET /group/{id}/metricDefinitions

    Description

    Get the metric definitions for the compatible group with the passed id

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the group true int all

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    404 Group with the passed id does not exist
  • GET /group/definitions

    Description

    List all existing GroupDefinitions

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    q Query String to search in the group definition name false String all

    Return type: GroupDefinitionRest (multi)

  • GET /group/definition/{id}

    Description

    Retrieve a single GroupDefinition by id

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path The id of the definition to retrieve true int all

    Return type: GroupDefinitionRest

    Error codes:
    CodeReason
    404 Group definition with the passed id does not exist.
  • DELETE /group/definition/{id}

    Description

    Delete the GroupDefinition with the passed id

    Notes

    This operation is by default idempotent, returning 204.If you want to check if the definition existed at all, you need to pass the 'validate' query parameter.

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path The id of the definition to delete true int all
    validate Query Validate if the definition exists false boolean all false

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    204 Definition was deleted or did not exist with validation not set
    404 Definition did not exist and validate was set
  • POST /group/definitions

    Description

    Create a new GroupDefinition.

    Notes

    The name of the group is required in the passed definition, as well as a non-empty expression. A recalcInterval of 0 means to never recalculate.

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    -body- The group definition to use for the new group. true GroupDefinitionRest -all- -none-

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    406 Passed group definition has no name
    406 Passed expression was empty
    406 Recalculation interval is < 0
    409 There already exists a definition by this name
    406 Group creation failed
  • PUT /group/definition/{id}

    Description

    Update or recalculate an existing GroupDefinition

    Notes

    If the query param 'recalculate' is set to true, the group with the passed id is recalculated. Otherwise the existing group will be updated with the passed definition. The expression in the definition must be empty. If the name is emtpy, the old name is kept. A recalcInterval of 0 means no recalculation.

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id for the definition to update true int all
    recalculate Query If true, trigger a re-calculation false boolean all false
    -body- The group definition to use for the update. This is required if recalculate is false. GroupDefinitionRest -all- -none-

    Return type: javax.ws.rs.core.Response

    Error codes:
    CodeReason
    404 Group with the passed id does not exist
    406 Passed expression was empty
    406 Recalculation interval is < 0
    406 Group membership calculation failed
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.