Search

1.8. http://localhost:7080/rest/operation : Endpoints for operations.

download PDF

These endpoints deal with scheduling of operations and retrieval of operation results.

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

Produces: application/json, application/xml

Methods

  • GET /operation/definition/{id}

    Description

    Retrieve a single operation definition by its id
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the definition to retrieve true int all
    resourceId Query Id of a resource that supports this operation false Integer all

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

  • GET /operation/definitions

    Description

    List all operation definitions for a resource

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    resourceId Query Id of the resource true Integer all

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

  • POST /operation/definition/{id}

    Description

    Create a new (draft) operation from the passed definition id for the passed resource
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the definition true int all
    resourceId Query Id of the resource true Integer all

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

  • GET /operation/{id}

    Description

    Return a (draft) operation
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the operation to retrieve true int all

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

  • PUT /operation/{id}

    Description

    Update a (draft) operation. If the state is set to 'ready', the operation will be scheduled
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the operation to update true int all
    -body- The operation definition to use for the update. true OperationRest -all- -none-

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

    Error codes:
    CodeReason
    404 No draft operation with the passed id exists
    406 Draft was set for scheduling, but parameters failed validation
    200 Update was successful, operation was scheduled if requested
  • DELETE /operation/{id}

    Description

    Delete a (draft) operation
    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Id of the operation to remove true int all

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

  • GET /operation/history/{id}

    Description

    Return the outcome of the scheduled operation

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Name of the submitted job. true String all

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

  • GET /operation/history

    Description

    Return the outcome of the executed operations for a resource

    Supports returning a gzip'ed Content-Encoding

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    resourceId Query Id of a resource to limit to false int all
    ps Query Page size for paging false int all 20
    page Query Page for paging, 0-based false Integer all

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

  • DELETE /operation/history/{id}

    Description

    Delete the operation history item with the passed id

    Notes

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

    Parameters:
    NameP.TypeDescriptionRequiredTypeAllowed valuesDefault value
    id Path Name for the submitted job true String all
    validate Query Validate if the job exists false boolean all false

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

    Error codes:
    CodeReason
    204 Item was deleted or did not exist with validation not set
    404 Item did not exist and validate was set
    406 Passed Job ID did not pass name validation
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.