@octra/ngx-octra-api
v0.2.3
Published
This library provides a module with all methods supported by octra-backend API.
Downloads
100
Readme
@octra/ngx-octra-api
This library provides a module with all methods supported by octra-backend API.
Installation
npm install @octra/ngx-octra-api
- Import Module
NgxOctraApiModule
:
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
NgxOctraApiModule // <-- IMPORT
],
providers: [],
bootstrap: [AppComponent],
exports: [],
})
export class AppModule {}
- Initialize the API Service:
// ...
class AppComponent {
constructor(private apiService: OctraAPIService) {
const url = '';
const appToken = '';
const webToken = '';
const useCookies = true;
this.apiService.init(url, appToken, webToken, useCookies);
}
// ...
}
- Now see chapter Methods for more information about supported API functions. Refer to the API reference generated by an octra-server for more information.
Methods
addBatchUploadTaskData()
addBatchUploadTaskData(
session_timestamp
,session_id
,project_id
,properties
,inputs
,outputs
):Observable
<HttpEvent
<unknown
>>
adds a new batch upload operation
Allowed user roles: administrator, project_admin, data_delivery
Parameters
• session_timestamp: number
• session_id: string
• project_id: string
• properties: TaskProperties
• inputs: File
[]
• outputs: File
[] = []
Returns
Observable
<HttpEvent
<unknown
>>
Defined in
assignProjectRoles()
assignProjectRoles(
project_id
,dto
):Observable
<any
[]>
assigns roles for an account to a specific project.
Allowed user roles: administrator, project_admin
Parameters
• project_id: string
• dto: any
[]
Returns
Observable
<any
[]>
Defined in
cancelBatchSession()
cancelBatchSession(
project_id
,session_id
,session_timestamp
):Observable
<void
>
cancels an existing session and removes all its temporary data. Recommended to save disk space on server.
Allowed user roles: administrator, project_admin, data_delivery
Parameters
• project_id: string
• session_id: string
• session_timestamp: number
Returns
Observable
<void
>
Defined in
changeAppToken()
changeAppToken(
id
,tokenData
):Observable
<AppTokenDto
>
changes an app token.
Allowed user roles: administrator
Parameters
• id: string
• tokenData: AppTokenChangeDto
Returns
Observable
<AppTokenDto
>
Defined in
changeEmailTemplateTranslation()
changeEmailTemplateTranslation(
templateID
,translationID
,body
):Observable
<EmailTemplateTranslationDto
>
changes a email template translation
Allowed user roles: administrator
Parameters
• templateID: number
• translationID: string
• body: EmailTranslationChangeRequestDto
Returns
Observable
<EmailTemplateTranslationDto
>
Defined in
changeImprint()
changeImprint(
data
):Observable
<ImprintDto
>
returns an object containing the imprint
Allowed user roles: administrator
Parameters
• data: ImprintSaveDto
Returns
Observable
<ImprintDto
>
Defined in
changeLink()
changeLink(
project_id
,link_id
,dto
):Observable
<LinkDto
>
changes given link from project.
Allowed user roles: administrator, project_admin
Parameters
• project_id: string
• link_id: string
• dto: LinkOptionsDto
Returns
Observable
<LinkDto
>
Defined in
changeMyPassword()
changeMyPassword(
oldPassword
,newPassword
):Observable
<void
>
changes the password of the current account.
Parameters
• oldPassword: string
• newPassword: string
Returns
Observable
<void
>
Defined in
changeMyPersonalAccountInformation()
changeMyPersonalAccountInformation(
data
):Observable
<void
>
sets personal information about the own account.
Allowed user roles: administrator, user
Parameters
• data: ChangeAccountInformationDto
Returns
Observable
<void
>
Defined in
changePolicyTranslation()
changePolicyTranslation(
policy_id
,policy_translation_id
,dto
):Observable
<PolicyTranslationDto
>
updates a policy translation.
Allowed user roles: administrator
Parameters
• policy_id: number
• policy_translation_id: number
• dto: PolicyCreateTranslationDto
Returns
Observable
<PolicyTranslationDto
>
Defined in
changeProject()
changeProject(
id
,requestData
):Observable
<void
>
changes a specific project.
Allowed user roles: administrator, project_admin
Parameters
• id: string
• requestData: ProjectRequestDto
Returns
Observable
<void
>
Defined in
changeProjectRole()
changeProjectRole(
project_id
,role_id
,data
):Observable
<ProjectRoleResultDto
>
Parameters
• project_id: string
• role_id: string
• data: any
Returns
Observable
<ProjectRoleResultDto
>
Defined in
changeRole()
changeRole(
id
,dto
):Observable
<RoleDto
>
changes a specific role.
Allowed user roles: administrator
Parameters
• id: string
• dto: RoleCreateDto
Returns
Observable
<RoleDto
>
Defined in
changeTaskData()
changeTaskData(
projectID
,taskID
,properties
,inputs
,outputs
,log
,inputsMetaData
,outputsMetaData
):Observable
<HttpEvent
<unknown
>>
changes a task and it's data. If properties.files_destination is set it is going to be applied only on a new media file. If you want to move a already uploaded file, use moveProjectFile() method.
Allowed user roles: administrator, project_admin, data_delivery
Parameters
• projectID: string
• taskID: string
• properties: TaskSaveDtoProperties
• inputs: File
[] = []
• outputs: File
[] = []
• log: undefined
| File
= undefined
• inputsMetaData: IOMetaData
[] = []
• outputsMetaData: IOMetaData
[] = []
Returns
Observable
<HttpEvent
<unknown
>>
Defined in
changeTool()
changeTool(
id
,dto
):Observable
<ToolDto
>
changes a registered tool.
Allowed user roles: administrator
Parameters
• id: number
• dto: ToolChangeRequestDto
Returns
Observable
<ToolDto
>
Defined in
changeToolConfiguration()
changeToolConfiguration(
projectId
,configId
,dto
):Observable
<ToolConfigurationDto
>
Parameters
• projectId: string
• configId: string
• dto: ToolConfigurationChangeDto
Returns
Observable
<ToolConfigurationDto
>
Defined in
checkIfProjectFilesExist()
checkIfProjectFilesExist(
projectId
,dto
):Observable
<ProjectFileExistResponseDto
>
Parameters
• projectId: string
• dto: ProjectFileExistRequestDto
Returns
Observable
<ProjectFileExistResponseDto
>
Defined in
continueTask()
continueTask(
projectID
,taskID
):Observable
<TaskDto
>
continues a task (only if status is 'BUSY' or 'PAUSED' and worker_id is the same as id by current user).
Allowed user roles: administrator, project_admin
Parameters
• projectID: string
• taskID: string
Returns
Observable
<TaskDto
>
Defined in
convertTaskIOToOCBJSONFileReference()
convertTaskIOToOCBJSONFileReference(
io
):OCBJSONFileReference
Parameters
• io: TaskInputOutputDto
Returns
OCBJSONFileReference
Defined in
createAccount()
createAccount(
dto
):Observable
<AccountDto
>
creates a new account.
Allowed user roles: administrator
Parameters
• dto: AccountCreateRequestDto
Returns
Observable
<AccountDto
>
Defined in
createAppToken()
createAppToken(
tokenData
):Observable
<boolean
>
creates a new app token.
Allowed user roles: administrator
Parameters
• tokenData: AppTokenCreateDto
Returns
Observable
<boolean
>
Defined in
createEmailTemplateTranslation()
createEmailTemplateTranslation(
templateID
,body
):Observable
<EmailTemplateTranslationDto
>
creates a new translation for a given template
Allowed user roles: administrator
Parameters
• templateID: number
• body: EmailTranslationChangeRequestDto
Returns
Observable
<EmailTemplateTranslationDto
>
Defined in
createPolicy()
createPolicy(
dto
):Observable
<PolicyDto
>
adds a new policy with undefined publish date (draft). Only one draft per policy type may exist.
Allowed user roles: administrator
Parameters
• dto: PolicyCreateRequestDto
Returns
Observable
<PolicyDto
>
Defined in
createPolicyTranslation()
createPolicyTranslation(
policy_id
,dto
):Observable
<PolicyTranslationDto
>
adds a new policy translation.
Allowed user roles: administrator
Parameters
• policy_id: number
• dto: PolicyCreateTranslationDto
Returns
Observable
<PolicyTranslationDto
>
Defined in
createProject()
createProject(
projectData
):Observable
<ProjectDto
>
creates a new project.
Allowed user roles: administrator
Parameters
• projectData: ProjectRequestDto
Returns
Observable
<ProjectDto
>
Defined in
createProjectFolder()
createProjectFolder(
project_id
,dto
):Observable
<void
>
Parameters
• project_id: string
• dto: ProjectFileCreateFolderRequestDto
Returns
Observable
<void
>
Defined in
createRole()
createRole(
dto
):Observable
<RoleDto
>
create a new role.
Allowed user roles: administrator
Parameters
• dto: RoleCreateDto
Returns
Observable
<RoleDto
>
Defined in
createToolConfiguration()
createToolConfiguration(
projectId
,dto
):Observable
<ToolConfigurationDto
>
Parameters
• projectId: string
• dto: ToolConfigurationCreateDto
Returns
Observable
<ToolConfigurationDto
>
Defined in
deleteEmailTemplateTranslation()
deleteEmailTemplateTranslation(
templateID
,translationID
):Observable
<void
>
removes a given translation
Allowed user roles: administrator
Parameters
• templateID: number
• translationID: string
Returns
Observable
<void
>
Defined in
deleteProjectFiles()
deleteProjectFiles(
projectID
,items
):Observable
<void
>
Parameters
• projectID: string
• items: DeleteProjectFilesRequest
[]
Returns
Observable
<void
>
Defined in
deleteToolConfiguration()
deleteToolConfiguration(
projectId
,configId
):Observable
<void
>
Parameters
• projectId: string
• configId: string
Returns
Observable
<void
>
Defined in
downloadDataPackage()
downloadDataPackage(
project_id
,data
):Observable
<unknown
>
requests a download package for the selected options. As soon as requested a link entry is generated with status "WAITING".
urls can not be exported to task_outputs First the output is converted to AnnotJSON and then to other formats some converters need audio information. if a converter can't export data it's skipped.
Allowed user roles: administrator, project_admin
Parameters
• project_id: string
• data: DownloadPackageOptionsDto
Returns
Observable
<unknown
>
Defined in
duplicateToolConfiguration()
duplicateToolConfiguration(
projectId
,configId
):Observable
<ToolConfigurationDto
>
Parameters
• projectId: string
• configId: string
Returns
Observable
<ToolConfigurationDto
>
Defined in
freeTask()
freeTask(
projectID
,taskID
):Observable
<TaskDto
>
sets the status from 'BUSY' to 'FREE' of a task.
Allowed user roles: all with access
Parameters
• projectID: string
• taskID: string
Returns
Observable
<TaskDto
>
Defined in
getAccountInformation()
getAccountInformation(
id
):Observable
<AccountDto
>
returns information about a specific account.
Allowed user roles: administrator
Parameters
• id: string
Returns
Observable
<AccountDto
>
Defined in
getAllStatistics()
getAllStatistics():
Observable
<AllStatisticsDto
>
returns statistics about number of accounts, roles, projects, tasks and app tokens. The response is cached every 15 minutes.
Returns
Observable
<AllStatisticsDto
>
Defined in
getAppProperties()
getAppProperties():
Observable
<AppPropertiesDto
>
Returns
Observable
<AppPropertiesDto
>
Defined in
getAppToken()
getAppToken(
id
):Observable
<AppTokenDto
>
returns one specific app token.
Allowed user roles: administrator
Parameters
• id: string
Returns
Observable
<AppTokenDto
>
Defined in
getCookie()
getCookie(
cname
):undefined
|string
Parameters
• cname: string
Returns
undefined
| string
Defined in
getEmailTemplate()
getEmailTemplate(
id
,queryParams
?):Observable
<EmailTemplateDto
>
retrieves a specific template and its translations
Allowed user roles: administrator
Parameters
• id: string
• queryParams?: StandardPageQueryParamsDto
Returns
Observable
<EmailTemplateDto
>
Defined in
getEmailTemplateTranslation()
getEmailTemplateTranslation(
templateID
,translationID
):Observable
<EmailTemplateTranslationDto
>
retrieves a specific translation from a given translation.
Allowed user roles: administrator
Parameters
• templateID: number
• translationID: string
Returns
Observable
<EmailTemplateTranslationDto
>
Defined in
getImprint()
getImprint():
Observable
<ImprintDto
>
returns an object containing the imprint
Allowed user roles: administrator
Returns
Observable
<ImprintDto
>
Defined in
getMyAccountInformation()
getMyAccountInformation():
Observable
<CurrentAccountDto
>
returns information about the own account.
Allowed user roles: administrator, user
Returns
Observable
<CurrentAccountDto
>
Defined in
getMyAccountPersonalInformation()
getMyAccountPersonalInformation():
Observable
<AccountDto
>
returns personal information about the own account.
Allowed user roles: administrator, user
Returns
Observable
<AccountDto
>
Defined in
getPolicy()
getPolicy(
id
):Observable
<PolicyDto
>
get specific policy
Allowed user roles: administrator
Parameters
• id: number
Returns
Observable
<PolicyDto
>
Defined in
getProject()
getProject(
id
,queryParams
?):Observable
<ProjectDto
>
returns a project. Administrator and project administrator see all information, others limited information.
Allowed user roles: all
Parameters
• id: string
• queryParams?: ProjectQueryParamsDto
Returns
Observable
<ProjectDto
>
Defined in
getProjectStatistics()
getProjectStatistics(
id
):Observable
<ProjectStatisticsDto
>
returns statistics about a project.
Allowed user roles: administrator, project_admin
Parameters
• id: string
Returns
Observable
<ProjectStatisticsDto
>
Defined in
getRole()
getRole(
id
):Observable
<RoleDto
>
Parameters
• id: string
Returns
Observable
<RoleDto
>
Defined in
getRunningBackup()
getRunningBackup():
Observable
<null
|RunningBackupDto
>
returns the backup that is currently running.
Allowed user roles: administrator
Returns
Observable
<null
| RunningBackupDto
>
Defined in
getTask()
getTask(
projectID
,taskID
):Observable
<TaskDto
>
returns a task.
Allowed user roles: all
Parameters
• projectID: string
• taskID: string
Returns
Observable
<TaskDto
>
Defined in
getTool()
getTool(
id
):Observable
<ToolDto
>
returns a tool by id.
Allowed user roles: administrator
Parameters
• id: number
Returns
Observable
<ToolDto
>
Defined in
init()
init(
apiURL
,appToken
,webToken
,useCookieStrategy
):Observable
<AppPropertiesDto
>
Parameters
• apiURL: string
• appToken: string
• webToken: undefined
| string
• useCookieStrategy: boolean
Returns
Observable
<AppPropertiesDto
>
Defined in
installTool()
installTool(
folder
):Observable
<ToolDto
>
changes a registered tool.
Allowed user roles: administrator
Parameters
• folder: string
Returns
Observable
<ToolDto
>
Defined in
listAccountFields()
listAccountFields():
Observable
<AccountFieldValueDefinitionDto
[]>
returns a list of existing account fields.
Allowed user roles: all
Returns
Observable
<AccountFieldValueDefinitionDto
[]>
Defined in
listAccounts()
listAccounts(
queryParams
?):Observable
<AccountMinimalListDto
>
returns a list of existing accounts.
Allowed user roles: administrator
Parameters
• queryParams?: AccountListQueryParamsDto
Returns
Observable
<AccountMinimalListDto
>
Defined in
listAppTokens()
listAppTokens(
queryParams
?):Observable
<AppTokenListDto
>
returns a list of app tokens.
Allowed user roles: administrator
Parameters
• queryParams?: ProjectListQueryParamsDto
Returns
Observable
<AppTokenListDto
>
Defined in
listBackups()
listBackups(
queryParams
?):Observable
<BackupDto
[]>
lists backups.
Allowed user roles: administrator
Parameters
• queryParams?: ProjectListQueryParamsDto
Returns
Observable
<BackupDto
[]>
Defined in
listEmailTemplates()
listEmailTemplates(
queryParams
?):Observable
<EmailTemplateDto
[]>
lists email templates.
Allowed user roles: administrator
Parameters
• queryParams?: StandardPageQueryParamsDto
Returns
Observable
<EmailTemplateDto
[]>
Defined in
listLatestPolicies()
listLatestPolicies():
Observable
<PolicyListItemDto
[]>
Returns
Observable
<PolicyListItemDto
[]>
Defined in
listPolicies()
listPolicies():
Observable
<PolicyMinimalDto
[]>
returns a list of policies
Allowed user roles: administrator
Returns
Observable
<PolicyMinimalDto
[]>
Defined in
listProjectFiles()
listProjectFiles(
projectID
,path
,showOutputs
):Observable
<ProjectFileDto
[]>
Parameters
• projectID: string
• path: string
= ''
• showOutputs: boolean
= false
Returns
Observable
<ProjectFileDto
[]>
Defined in
listProjectLinks()
listProjectLinks(
project_id
):Observable
<LinkDto
[]>
lists all links from specific project.
Allowed user roles: administrator, project_admin
Parameters
• project_id: string
Returns
Observable
<LinkDto
[]>
Defined in
listProjectRoles()
listProjectRoles(
projectID
):Observable
<ProjectRoleDto
[]>
returns all roles associated to the project.
Allowed user roles: administrator, project_admin
Parameters
• projectID: string
Returns
Observable
<ProjectRoleDto
[]>
Defined in
listProjects()
listProjects(
queryParams
?):Observable
<ProjectListDto
>
returns a list of projects. Administrators get a more detailed and unfiltered list of projects. If an application uses an app token linked to a specific tool only tasks supported by this tool are used for the statistics.
Allowed user roles: all
Parameters
• queryParams?: ProjectListQueryParamsDto
Returns
Observable
<ProjectListDto
>
Defined in
listRoles()
listRoles():
Observable
<RoleDto
[]>
Returns
Observable
<RoleDto
[]>
Defined in
listTasks()
listTasks(
projectID
,order
?,start
?,length
?):Observable
<TaskDto
[][]>
lists tasks grouped by chains as arrays of arrays.
Allowed user roles: administrator, project_admin, data_delivery
Parameters
• projectID: string
• order?: "desc"
| "asc"
• start?: number
• length?: number
Returns
Observable
<TaskDto
[][]>
Defined in
listToolConfigurations()
listToolConfigurations(
projectID
,start
?,length
?):Observable
<ToolConfigurationDto
[]>
Parameters
• projectID: string
• start?: number
• length?: number
Returns
Observable
<ToolConfigurationDto
[]>
Defined in
listTools()
listTools(
queryParams
?):Observable
<ToolListDto
>
lists tools.
Allowed user roles: administrator, project_admin
Parameters
• queryParams?: StandardPageQueryParamsDto
Returns
Observable
<ToolListDto
>
Defined in
login()
login(
type
,usernameOrEmail
?,password
?):Observable
<AuthDto
>
authenticates a given account. Two authentication methods are supported: local and shibboleth:
local: the account authenticates using a local account (via credentials). You can choose if session_token and app_token are saved as cookies. shibboleth: the account authenticates via Shibboleth (the shibboleth authentication must be supported by the server). session_token and app_token are saved as cookies.
Parameters
• type: AccountLoginMethod
• usernameOrEmail?: string
• password?: string
Returns
Observable
<AuthDto
>
Defined in
logout()
logout():
Observable
<unknown
>
does logout process
Returns
Observable
<unknown
>
Defined in
moveProjectFileOrFolder()
moveProjectFileOrFolder(
project_id
,dto
):Observable
<void
>
Parameters
• project_id: string
• dto: ProjectFileMoveRequestDto
Returns
Observable
<void
>
Defined in
postOnNewTab()
postOnNewTab(
partURL
,data
,target
?):void
Parameters
• partURL: string
• data: any
• target?: string
Returns
void
Defined in
prepareFileURL()
prepareFileURL(
fileURL
):string
Parameters
• fileURL: string
Returns
string
Defined in
publishPolicies()
publishPolicies(
dto
):Observable
<unknown
>
publishes selected policies with given dates.
Allowed user roles: administrator
Parameters
• dto: PolicyPublishRequestDto
Returns
Observable
<unknown
>
Defined in
refreshAppToken()
refreshAppToken(
id
):Observable
<AppTokenDto
>
overwrites an existing app token with a new auto-generated token.
Allowed user roles: administrator
Parameters
• id: string
Returns
Observable
<AppTokenDto
>
Defined in
registerAccount()
registerAccount(
dto
):Observable
<AccountRegisterResponseDto
>
Parameters
• dto: AccountRegisterRequestDto
Returns
Observable
<AccountRegisterResponseDto
>
Defined in
removeAccount()
removeAccount(
id
):Observable
<void
>
Parameters
• id: string
Returns
Observable
<void
>
Defined in
removeAppToken()
removeAppToken(
id
):Observable
<void
>
deletes an existing app token.
Allowed user roles: administrator
Parameters
• id: string
Returns
Observable
<void
>
Defined in
removePolicy()
removePolicy(
policy_id
):Observable
<void
>
removes a policy (only if there is no active user consent connected to it).
Allowed user roles: administrator
Parameters
• policy_id: number
Returns
Observable
<void
>
Defined in
removePolicyTranslation()
removePolicyTranslation(
policy_id
,translation_id
):Observable
<void
>
Parameters
• policy_id: number
• translation_id: number
Returns
Observable
<void
>
Defined in
removeProject()
removeProject(
id
,reqData
):Observable
<void
>
removes a specific project.
Allowed user roles: administrator
Parameters
• id: string
• reqData
• reqData.removeProjectFiles?: boolean
Returns
Observable
<void
>
Defined in
removeProjectLink()
removeProjectLink(
project_id
,link_id
):Observable
<void
>
removes given link from project.
Allowed user roles: administrator, project_admin
Parameters
• project_id: string
• link_id: string
Returns
Observable
<void
>
Defined in
removeProjectRole()
removeProjectRole(
project_id
,account_id
):Observable
<void
>
Parameters
• project_id: string
• account_id: string
Returns
Observable
<void
>
Defined in
removeRole()
removeRole(
id
):Observable
<void
>
removes a specific role.
Allowed user roles: administrator
Parameters
• id: string
Returns
Observable
<void
>
Defined in
removeTask()
removeTask(
project_id
,task_id
):Observable
<void
>
Parameters
• project_id: string
• task_id: string
Returns
Observable
<void
>
Defined in
removeTool()
removeTool(
id
):Observable
<void
>
removes a registered tool.
Allowed user roles: administrator
Parameters
• id: number
Returns
Observable
<void
>
Defined in
removeToolByFolderName()
removeToolByFolderName(
folderName
):Observable
<void
>
removes a registered tool.
Allowed user roles: administrator
Parameters
• folderName: string
Returns
Observable
<void
>
Defined in
renameProjectFileOrFolder()
renameProjectFileOrFolder(
project_id
,dto
):Observable
<void
>
Parameters
• project_id: string
• dto: ProjectFileRenameRequestDto
Returns
Observable
<void
>
Defined in
requestPasswordReset()
requestPasswordReset(
dto
):Observable
<any
>
sends an E-Mail with a request to reset the password. It always returns 200 even if account was not found.
Parameters
• dto: ResetPasswordRequestDto
Returns
Observable
<any
>
Defined in
restart()
restart():
Observable
<unknown
>
saves the general settings. "shutdown" option for app token must be enabled. Linux and MacOS only.
Allowed user roles: administrator
Returns
Observable
<unknown
>
Defined in
runBackup()
runBackup():
Observable
<void
>
runs a manual command
Allowed user roles: administrator
Returns
Observable
<void
>
Defined in
runBatchAction()
runBatchAction(
dto
):Observable
<void
>
runs an action on given accounts. This functions doesn't wait for emails to be sent.
Allowed user roles: administrator
Parameters
• dto: AccountBatchActionDto
Returns
Observable
<void
>
Defined in
saveAccountFieldValues()
saveAccountFieldValues(
data
):Observable
<void
>
saves values of account fields.
Allowed user roles: all
Parameters
• data: Record
<string
, any
>
Returns
Observable
<void
>
Defined in
saveAccountInformation()
saveAccountInformation(
id
,dto
):Observable
<AccountDto
>
saves information about a specific account.
Allowed user roles: administrator
Parameters
• id: string
• dto: AccountChangeDto
Returns
Observable
<AccountDto
>
Defined in
saveMyAccountSettings()
saveMyAccountSettings(
data
):Observable
<void
>
Parameters
• data: AccountSettingsDto
Returns
Observable
<void
>
Defined in
saveTask()
saveTask(
projectID
,taskID
,properties
,log
,outputs
):Observable
<TaskDto
>
saves the current task by specific type. It doesn't automatically start a new task, it rather responds with the saved annotation.
Allowed user roles: all with access to this project
Parameters
• projectID: string
• taskID: string
• properties: TaskSaveDtoProperties
• log: undefined
| File
= undefined
• outputs: File
[] = []
Returns
Observable
<TaskDto
>
Defined in
searchAccounts()
searchAccounts(
keyword
):Observable
<AccountSearchResultDto
[]>
Parameters
• keyword: string
Returns
Observable
<AccountSearchResultDto
[]>
Defined in
sendFeedback()
sendFeedback(
properties
,protocol
?,appending
?):Observable
<HttpEvent
<unknown
>>
Parameters
• properties: FeedbackRequestPropertiesDto
• protocol?: File
• appending?: File
[] = []
Returns
Observable
<HttpEvent
<unknown
>>
Defined in
shutdown()
shutdown():
Observable
<unknown
>
shutdowns the system asap. "shutdown" option for app token must be enabled. Linux and MacOS only.
Allowed user roles: administrator, project_admin
Returns
Observable
<unknown
>
Defined in
startBatchSession()
startBatchSession(
project_id
):Observable
<TaskBatchSessionDto
>
starts a new session for batch upload.
Allowed user roles: administrator, project_admin, data_delivery
Parameters
• project_id: string
Returns
Observable
<TaskBatchSessionDto
>
Defined in
startTask()
startTask(
projectID
,data
):Observable
<TaskDto
>
looks for a free task of type task_type (e.g. "annotation"), changes its status to 'BUSY' and returns it.
Allowed user roles: all with access to this project
Parameters
• projectID: string
• data: TaskStartActionDto
Returns
Observable
<TaskDto
>
Defined in
submitBatchSession()
submitBatchSession(
project_id
,session_id
,session_timestamp
):Observable
<void
>
submits a batch session and runs all its transactions. If one of the transaction fails, all previous transactions are reverted and an error is returned
Allowed user roles: administrator, project_admin, data_delivery
Parameters
• project_id: string
• session_id: string
• session_timestamp: number
Returns
Observable
<void
>
Defined in
updateAppProperties()
updateAppProperties():
Observable
<AppPropertiesDto
>
Returns
Observable
<AppPropertiesDto
>
Defined in
updatePolicy()
updatePolicy(
id
,dto
):Observable
<PolicyDto
>
updates a policy.
Allowed user roles: administrator
Parameters
• id: number
• dto: any
Returns
Observable
<PolicyDto
>
Defined in
uploadProjectFiles()
uploadProjectFiles(
project_id
,target_path
,files
,force_overwrite
):Observable
<HttpEvent
<FileProjectDto
[]>>
Parameters
• project_id: string
• target_path: string
• files: File
[]
• force_overwrite: boolean
Returns
Observable
<HttpEvent
<FileProjectDto
[]>>
Defined in
uploadTaskData()
uploadTaskData(
project_id
,properties
,inputs
,outputs
,log
):Observable
<HttpEvent
<unknown
>>
creates a new task with the uploaded data.
Notice: If you want to add urls you need to create a file that contains OCBJSONFileReference.
Allowed user roles: administrator, project_admin, data_delivery
Parameters
• project_id: string
• properties: TaskProperties
• inputs: File
[]
• outputs: File
[] = []
• log: undefined
| File
= undefined
Returns
Observable
<HttpEvent
<unknown
>>