InBox AsanaIntegration - API
Version 6.4.0
Creation Date 2019-05-20
Installation
bin/otrs.Console.pl Admin::Package::Install /path/to/InBox\ AsanaIntegration-6.4.0.opm
API AsanaIntegration
Create the AsanaIntegration object.
my $AsanaIntegrationObject = $Kernel::OM->Get('Kernel::System::AsanaIntegration');
WebHookAdd
create a new hook
my $AddHook = $AsanaIntegrationObject->WebHookAdd(
ProjectID => $ProjectID,
Target => "https://otrshomolog.com.br/otrs/api/v1/receive_hooks.pl",
WebHookID => $WebHookID,
);
CustomFieldAdd
create a new customfield
my $AddField = $AsanaIntegrationObject->CustomFieldAdd(
FieldID => $ID,
Name => $Name,
Type => $Type,
WorkspaceID => $WorkspaceID,
);
CustomFieldGet
get a custom field
Return {
ID = '1';
FieldID = 'Document 1';
Name = 'Contract 1';
Type = 'customer.com.br';
WorkspaceID = '2018-01-01 00:00:00';
}
my %FieldData = $AsanaIntegrationObject->CustomFieldGet(
FieldName => 'TicketID',
);
CreateCustomField
create a new customfield
my $ResponseField = $AsanaIntegrationObject->CreateCustomField(
Name => $ProjectID,
Type => $Target,
Workspace => $Workspace,
Description => $Description
);
UpdateCustomField
update a customfield
my $UpdateCustomField = $AsanaIntegrationObject->UpdateCustomField(
TaskID => 123,
FieldID => 1121874571353494,
Value => 'some value',
);
TaskAssign
Function to assign user to task
my $TaskAssign = $AsanaIntegrationObject->TaskAssign(
TaskID => 123,
AssignID => 1121874571353494,
);
TaskFollowers
Function to add followers to the task
my $TaskFollowers = $AsanaIntegrationObject->TaskFollowers(
TaskID => 123, # required
Followers => @ArrayOfFollowers, # required
);
UsersAdd
my $AddField = $AsanaIntegrationObject->UsersAdd(
UserID => $ID,
Name => $Name
);
ListUsers
my $ResponseField = $AsanaIntegrationObject->ListUsers(
WorkspaceID => $WorkspaceID,
);
UsersList
List of asana users
my %Users = $AsanaIntegrationObject->UsersList();
TaskGet
my $UpdateCustomField = $AsanaIntegrationObject->TaskGet(
TaskID => 123,
);
TaskCreate
create a new task into asana
my $Response = $AsanaIntegrationObject->TaskCreate(
Body => $Article{Body},
TicketNumber => $TicketNumber,
Title => $Ticket{Title},
WorkspaceID => $WorkspaceID
ProjectID => ProjectID
SectionID => SessionID
);
TaskFinish
my $TaskFinish = $AsanaIntegrationObject->TaskFinish(
TaskID => 123,
AssignID => 1121874571353494,
);
ProjectAddCustomField
add a customfield into asana project
my $Response = $AsanaIntegrationObject->ProjectAddCustomField(
FieldID => $FieldID,
ProjectID => $ProjectID,
);
SessionList
List all session of the project
my $Sessions = $AsanaIntegrationObject->SessionList(
ProjectID => $ProjectID
);
ProjectTaskAdd
add a task into project
my $Response = $AsanaIntegrationObject->ProjectTaskAdd(
Body => $Article{Body},
TicketNumber => $TicketNumber,
Title => $Ticket{Title},
WorkspaceID => $WorkspaceID
);
WorkspaceList
my $Workspaces = $AsanaIntegrationObject->WorkspaceList();
CreateWebHook
my $ResponseHook = $AsanaIntegrationObject->CreateWebHook(
ProjectID => $ProjectID,
Target => $Target
);
WebServiceRequest
return a response of a request in HashRef
my $RequestResponse = $AsanaIntegrationObject->WebServiceRequest(
RequestURL => $RequestURL,
Token => $Token,
Type => "GET"|"POST"|"PUT",
Body => $JSONBody
);