NAME
WebService::Xential - A Xential REST API module
VERSION
version 0.004
SYNOPSIS
my
$xential
= WebService::Xential->new(
api_user
=>
'foo'
,
api_key
=>
'foo'
,
api_host
=>
'127.0.0.1'
,
);
my
$who
=
$xential
->whoami();
my
$other
=
$xential
->impersonate(...,
$who
->{XSessionId});
my
$session_id
=
$other
{XSessionID};
my
$ticket
=
$xential
->create_ticket(
$xml
, \
%options
,
$session_id
);
my
$start
=
$xential
->start_document(
$ticket
->{startDocumentUrl},
$ticket
->{ticketUuid},
$session_id
);
# Status is either INVALID or VALID
if
(
$start
->{status} eq
'VALID'
) {
my
$build
=
$xential
->build_document(
1,
$start
->{documentUuid},
$session_id
);
if
(
$build
->{status} eq
'done'
) {
# build succeeded
}
else
{
# build failed
}
}
else
{
$uri
= URI->new(
$start
{resumeUrl});
$uri
->scheme(
'https'
);
$uri
->query_form(
$uri
->query_form,
afterOpenAction
=>
'close'
);
$uri
->host(
$xential
->api_host);
# redirect user to $uri
}
DESCRIPTION
This module implements the REST API of Xential.
ATTRIBUTES
api_host
The API host of the Xential WebService
client
The OpenAPI::Client
METHODS
new()
my
$xential
= WebService::Xential->new(
api_user
=>
'foo'
,
api_key
=>
'foo'
,
api_host
=>
'127.0.0.1'
,
);
has_api_host()
Tells you if you have a custom API host defined
whoami($session_id)
Implements the whoami call from Xential
logout($session_id)
Implements the logout call from Xential
impersonate($username, $user_uuid, $session_id)
Implements the impersonate call from Xential
create_ticket($xml, $options, $session_id)
Implements the create_ticket call from Xential
start_document($username, $user_uuid, $session_id)
Implements the start_document call from Xential
build_document($username, $user_uuid, $session_id)
Implements the build_document call from Xential
api_call($operation, $query, $content)
A wrapper around the OpenAPI::Client::call function. Returns the JSON from the endpoint.
AUTHOR
Wesley Schwengle <waterkip@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2024 by Wesley Schwengle.
This is free software, licensed under:
The (three-clause) BSD License