Skip to main content
POST
/
app
/
workflows
/
approval_requests
/
{approval_id}
/
revoke
import cobo_waas2
from cobo_waas2.models.revoke_approval_request201_response import (
    RevokeApprovalRequest201Response,
)
from cobo_waas2.models.revoke_approval_request_request import (
    RevokeApprovalRequestRequest,
)
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.AppWorkflowsApi(api_client)
    approval_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    revoke_approval_request_request = cobo_waas2.RevokeApprovalRequestRequest(
        initiator_email="johnsmith@example.com"
    )

    try:
        # Revoke approval request
        api_response = api_instance.revoke_approval_request(
            approval_id, revoke_approval_request_request=revoke_approval_request_request
        )
        print("The response of AppWorkflowsApi->revoke_approval_request:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling AppWorkflowsApi->revoke_approval_request: %s\n" % e
        )

{
  "approval_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status": "Pending"
}
import cobo_waas2
from cobo_waas2.models.revoke_approval_request201_response import (
    RevokeApprovalRequest201Response,
)
from cobo_waas2.models.revoke_approval_request_request import (
    RevokeApprovalRequestRequest,
)
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.AppWorkflowsApi(api_client)
    approval_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    revoke_approval_request_request = cobo_waas2.RevokeApprovalRequestRequest(
        initiator_email="johnsmith@example.com"
    )

    try:
        # Revoke approval request
        api_response = api_instance.revoke_approval_request(
            approval_id, revoke_approval_request_request=revoke_approval_request_request
        )
        print("The response of AppWorkflowsApi->revoke_approval_request:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling AppWorkflowsApi->revoke_approval_request: %s\n" % e
        )

Authorizations

BIZ-API-KEY
string
header
required

The API key. For more details, refer to API key.

In the API playground, enter your API secret, and your API key will be accordingly calculated.

Path Parameters

approval_id
string<uuid>
required

The system-generated unique ID of the approval request.

Body

application/json

The request body to revoke an approval request.

initiator_email
string
required

The email of the user who requested the approval.

Example:

"johnsmith@example.com"

Response

The request workflow approval was successful.

approval_id
string<uuid>
required

The system-generated unique ID of the approval request.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

status
enum<string>

The approval status. Possible values include:

  • Pending: The approval is pending.
  • Completed: The approval is completed.
  • Failed: The approval is rejected.
  • Revoked: The approval is revoked.
Available options:
Pending,
Completed,
Failed,
Revoked
Example:

"Pending"