npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@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

  1. npm install @octra/ngx-octra-api
  2. Import Module NgxOctraApiModule:
@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    HttpClientModule,
    NgxOctraApiModule // <-- IMPORT
  ],
  providers: [],
  bootstrap: [AppComponent],
  exports: [],
})
export class AppModule {}
  1. 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);
  }
// ...
}
  1. 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

octra-api.service.ts:762


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

octra-api.service.ts:895


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

octra-api.service.ts:725


changeAppToken()

changeAppToken(id, tokenData): Observable<AppTokenDto>

changes an app token.

Allowed user roles: administrator

Parameters

id: string

tokenData: AppTokenChangeDto

Returns

Observable<AppTokenDto>

Defined in

octra-api.service.ts:517


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

octra-api.service.ts:1228


changeImprint()

changeImprint(data): Observable<ImprintDto>

returns an object containing the imprint

Allowed user roles: administrator

Parameters

data: ImprintSaveDto

Returns

Observable<ImprintDto>

Defined in

octra-api.service.ts:1081


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

octra-api.service.ts:1150


changeMyPassword()

changeMyPassword(oldPassword, newPassword): Observable<void>

changes the password of the current account.

Parameters

oldPassword: string

newPassword: string

Returns

Observable<void>

Defined in

octra-api.service.ts:444


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

octra-api.service.ts:917


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

octra-api.service.ts:1028


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

octra-api.service.ts:496


changeProjectRole()

changeProjectRole(project_id, role_id, data): Observable<ProjectRoleResultDto>

Parameters

project_id: string

role_id: string

data: any

Returns

Observable<ProjectRoleResultDto>

Defined in

octra-api.service.ts:921


changeRole()

changeRole(id, dto): Observable<RoleDto>

changes a specific role.

Allowed user roles: administrator

Parameters

id: string

dto: RoleCreateDto

Returns

Observable<RoleDto>

Defined in

octra-api.service.ts:870


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

octra-api.service.ts:604


changeTool()

changeTool(id, dto): Observable<ToolDto>

changes a registered tool.

Allowed user roles: administrator

Parameters

id: number

dto: ToolChangeRequestDto

Returns

Observable<ToolDto>

Defined in

octra-api.service.ts:362


changeToolConfiguration()

changeToolConfiguration(projectId, configId, dto): Observable<ToolConfigurationDto>

Parameters

projectId: string

configId: string

dto: ToolConfigurationChangeDto

Returns

Observable<ToolConfigurationDto>

Defined in

octra-api.service.ts:260


checkIfProjectFilesExist()

checkIfProjectFilesExist(projectId, dto): Observable<ProjectFileExistResponseDto>

Parameters

projectId: string

dto: ProjectFileExistRequestDto

Returns

Observable<ProjectFileExistResponseDto>

Defined in

octra-api.service.ts:276


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

octra-api.service.ts:556


convertTaskIOToOCBJSONFileReference()

convertTaskIOToOCBJSONFileReference(io): OCBJSONFileReference

Parameters

io: TaskInputOutputDto

Returns

OCBJSONFileReference

Defined in

octra-api.service.ts:1425


createAccount()

createAccount(dto): Observable<AccountDto>

creates a new account.

Allowed user roles: administrator

Parameters

dto: AccountCreateRequestDto

Returns

Observable<AccountDto>

Defined in

octra-api.service.ts:479


createAppToken()

createAppToken(tokenData): Observable<boolean>

creates a new app token.

Allowed user roles: administrator

Parameters

tokenData: AppTokenCreateDto

Returns

Observable<boolean>

Defined in

octra-api.service.ts:506


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

octra-api.service.ts:1237


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

octra-api.service.ts:969


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

octra-api.service.ts:1001


createProject()

createProject(projectData): Observable<ProjectDto>

creates a new project.

Allowed user roles: administrator

Parameters

projectData: ProjectRequestDto

Returns

Observable<ProjectDto>

Defined in

octra-api.service.ts:411


createProjectFolder()

createProjectFolder(project_id, dto): Observable<void>

Parameters

project_id: string

dto: ProjectFileCreateFolderRequestDto

Returns

Observable<void>

Defined in

octra-api.service.ts:899


createRole()

createRole(dto): Observable<RoleDto>

create a new role.

Allowed user roles: administrator

Parameters

dto: RoleCreateDto

Returns

Observable<RoleDto>

Defined in

octra-api.service.ts:859


createToolConfiguration()

createToolConfiguration(projectId, dto): Observable<ToolConfigurationDto>

Parameters

projectId: string

dto: ToolConfigurationCreateDto

Returns

Observable<ToolConfigurationDto>

Defined in

octra-api.service.ts:268


deleteEmailTemplateTranslation()

deleteEmailTemplateTranslation(templateID, translationID): Observable<void>

removes a given translation

Allowed user roles: administrator

Parameters

templateID: number

translationID: string

Returns

Observable<void>

Defined in

octra-api.service.ts:1246


deleteProjectFiles()

deleteProjectFiles(projectID, items): Observable<void>

Parameters

projectID: string

items: DeleteProjectFilesRequest[]

Returns

Observable<void>

Defined in

octra-api.service.ts:396


deleteToolConfiguration()

deleteToolConfiguration(projectId, configId): Observable<void>

Parameters

projectId: string

configId: string

Returns

Observable<void>

Defined in

octra-api.service.ts:264


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

octra-api.service.ts:1117


duplicateToolConfiguration()

duplicateToolConfiguration(projectId, configId): Observable<ToolConfigurationDto>

Parameters

projectId: string

configId: string

Returns

Observable<ToolConfigurationDto>

Defined in

octra-api.service.ts:272


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

octra-api.service.ts:645


getAccountInformation()

getAccountInformation(id): Observable<AccountDto>

returns information about a specific account.

Allowed user roles: administrator

Parameters

id: string

Returns

Observable<AccountDto>

Defined in

octra-api.service.ts:935


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

octra-api.service.ts:534


getAppProperties()

getAppProperties(): Observable<AppPropertiesDto>

Returns

Observable<AppPropertiesDto>

Defined in

octra-api.service.ts:415


getAppToken()

getAppToken(id): Observable<AppTokenDto>

returns one specific app token.

Allowed user roles: administrator

Parameters

id: string

Returns

Observable<AppTokenDto>

Defined in

octra-api.service.ts:206


getCookie()

getCookie(cname): undefined | string

Parameters

cname: string

Returns

undefined | string

Defined in

octra-api.service.ts:1376


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

octra-api.service.ts:1218


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

octra-api.service.ts:1255


getImprint()

getImprint(): Observable<ImprintDto>

returns an object containing the imprint

Allowed user roles: administrator

Returns

Observable<ImprintDto>

Defined in

octra-api.service.ts:1072


getMyAccountInformation()

getMyAccountInformation(): Observable<CurrentAccountDto>

returns information about the own account.

Allowed user roles: administrator, user

Returns

Observable<CurrentAccountDto>

Defined in

octra-api.service.ts:460


getMyAccountPersonalInformation()

getMyAccountPersonalInformation(): Observable<AccountDto>

returns personal information about the own account.

Allowed user roles: administrator, user

Returns

Observable<AccountDto>

Defined in

octra-api.service.ts:469


getPolicy()

getPolicy(id): Observable<PolicyDto>

get specific policy

Allowed user roles: administrator

Parameters

id: number

Returns

Observable<PolicyDto>

Defined in

octra-api.service.ts:979


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

octra-api.service.ts:297


getProjectStatistics()

getProjectStatistics(id): Observable<ProjectStatisticsDto>

returns statistics about a project.

Allowed user roles: administrator, project_admin

Parameters

id: string

Returns

Observable<ProjectStatisticsDto>

Defined in

octra-api.service.ts:809


getRole()

getRole(id): Observable<RoleDto>

Parameters

id: string

Returns

Observable<RoleDto>

Defined in

octra-api.service.ts:831


getRunningBackup()

getRunningBackup(): Observable<null | RunningBackupDto>

returns the backup that is currently running.

Allowed user roles: administrator

Returns

Observable<null | RunningBackupDto>

Defined in

octra-api.service.ts:1173


getTask()

getTask(projectID, taskID): Observable<TaskDto>

returns a task.

Allowed user roles: all

Parameters

projectID: string

taskID: string

Returns

Observable<TaskDto>

Defined in

octra-api.service.ts:217


getTool()

getTool(id): Observable<ToolDto>

returns a tool by id.

Allowed user roles: administrator

Parameters

id: number

Returns

Observable<ToolDto>

Defined in

octra-api.service.ts:341


init()

init(apiURL, appToken, webToken, useCookieStrategy): Observable<AppPropertiesDto>

Parameters

apiURL: string

appToken: string

webToken: undefined | string

useCookieStrategy: boolean

Returns

Observable<AppPropertiesDto>

Defined in

octra-api.service.ts:121


installTool()

installTool(folder): Observable<ToolDto>

changes a registered tool.

Allowed user roles: administrator

Parameters

folder: string

Returns

Observable<ToolDto>

Defined in

octra-api.service.ts:351


listAccountFields()

listAccountFields(): Observable<AccountFieldValueDefinitionDto[]>

returns a list of existing account fields.

Allowed user roles: all

Returns

Observable<AccountFieldValueDefinitionDto[]>

Defined in

octra-api.service.ts:799


listAccounts()

listAccounts(queryParams?): Observable<AccountMinimalListDto>

returns a list of existing accounts.

Allowed user roles: administrator

Parameters

queryParams?: AccountListQueryParamsDto

Returns

Observable<AccountMinimalListDto>

Defined in

octra-api.service.ts:308


listAppTokens()

listAppTokens(queryParams?): Observable<AppTokenListDto>

returns a list of app tokens.

Allowed user roles: administrator

Parameters

queryParams?: ProjectListQueryParamsDto

Returns

Observable<AppTokenListDto>

Defined in

octra-api.service.ts:195


listBackups()

listBackups(queryParams?): Observable<BackupDto[]>

lists backups.

Allowed user roles: administrator

Parameters

queryParams?: ProjectListQueryParamsDto

Returns

Observable<BackupDto[]>

Defined in

octra-api.service.ts:1163


listEmailTemplates()

listEmailTemplates(queryParams?): Observable<EmailTemplateDto[]>

lists email templates.

Allowed user roles: administrator

Parameters

queryParams?: StandardPageQueryParamsDto

Returns

Observable<EmailTemplateDto[]>

Defined in

octra-api.service.ts:1208


listLatestPolicies()

listLatestPolicies(): Observable<PolicyListItemDto[]>

Returns

Observable<PolicyListItemDto[]>

Defined in

octra-api.service.ts:959


listPolicies()

listPolicies(): Observable<PolicyMinimalDto[]>

returns a list of policies

Allowed user roles: administrator

Returns

Observable<PolicyMinimalDto[]>

Defined in

octra-api.service.ts:955


listProjectFiles()

listProjectFiles(projectID, path, showOutputs): Observable<ProjectFileDto[]>

Parameters

projectID: string

path: string = ''

showOutputs: boolean = false

Returns

Observable<ProjectFileDto[]>

Defined in

octra-api.service.ts:400


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

octra-api.service.ts:1127


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

octra-api.service.ts:392


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

octra-api.service.ts:319


listRoles()

listRoles(): Observable<RoleDto[]>

Returns

Observable<RoleDto[]>

Defined in

octra-api.service.ts:827


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

octra-api.service.ts:231


listToolConfigurations()

listToolConfigurations(projectID, start?, length?): Observable<ToolConfigurationDto[]>

Parameters

projectID: string

start?: number

length?: number

Returns

Observable<ToolConfigurationDto[]>

Defined in

octra-api.service.ts:247


listTools()

listTools(queryParams?): Observable<ToolListDto>

lists tools.

Allowed user roles: administrator, project_admin

Parameters

queryParams?: StandardPageQueryParamsDto

Returns

Observable<ToolListDto>

Defined in

octra-api.service.ts:330


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

octra-api.service.ts:149


logout()

logout(): Observable<unknown>

does logout process

Returns

Observable<unknown>

Defined in

octra-api.service.ts:185


moveProjectFileOrFolder()

moveProjectFileOrFolder(project_id, dto): Observable<void>

Parameters

project_id: string

dto: ProjectFileMoveRequestDto

Returns

Observable<void>

Defined in

octra-api.service.ts:907


postOnNewTab()

postOnNewTab(partURL, data, target?): void

Parameters

partURL: string

data: any

target?: string

Returns

void

Defined in

octra-api.service.ts:1400


prepareFileURL()

prepareFileURL(fileURL): string

Parameters

fileURL: string

Returns

string

Defined in

octra-api.service.ts:1392


publishPolicies()

publishPolicies(dto): Observable<unknown>

publishes selected policies with given dates.

Allowed user roles: administrator

Parameters

dto: PolicyPublishRequestDto

Returns

Observable<unknown>

Defined in

octra-api.service.ts:1063


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

octra-api.service.ts:527


registerAccount()

registerAccount(dto): Observable<AccountRegisterResponseDto>

Parameters

dto: AccountRegisterRequestDto

Returns

Observable<AccountRegisterResponseDto>

Defined in

octra-api.service.ts:178


removeAccount()

removeAccount(id): Observable<void>

Parameters

id: string

Returns

Observable<void>

Defined in

octra-api.service.ts:435


removeAppToken()

removeAppToken(id): Observable<void>

deletes an existing app token.

Allowed user roles: administrator

Parameters

id: string

Returns

Observable<void>

Defined in

octra-api.service.ts:286


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

octra-api.service.ts:1053


removePolicyTranslation()

removePolicyTranslation(policy_id, translation_id): Observable<void>

Parameters

policy_id: number

translation_id: number

Returns

Observable<void>

Defined in

octra-api.service.ts:1154


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

octra-api.service.ts:426


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

octra-api.service.ts:1138


removeProjectRole()

removeProjectRole(project_id, account_id): Observable<void>

Parameters

project_id: string

account_id: string

Returns

Observable<void>

Defined in

octra-api.service.ts:925


removeRole()

removeRole(id): Observable<void>

removes a specific role.

Allowed user roles: administrator

Parameters

id: string

Returns

Observable<void>

Defined in

octra-api.service.ts:880


removeTask()

removeTask(project_id, task_id): Observable<void>

Parameters

project_id: string

task_id: string

Returns

Observable<void>

Defined in

octra-api.service.ts:790


removeTool()

removeTool(id): Observable<void>

removes a registered tool.

Allowed user roles: administrator

Parameters

id: number

Returns

Observable<void>

Defined in

octra-api.service.ts:372


removeToolByFolderName()

removeToolByFolderName(folderName): Observable<void>

removes a registered tool.

Allowed user roles: administrator

Parameters

folderName: string

Returns

Observable<void>

Defined in

octra-api.service.ts:382


renameProjectFileOrFolder()

renameProjectFileOrFolder(project_id, dto): Observable<void>

Parameters

project_id: string

dto: ProjectFileRenameRequestDto

Returns

Observable<void>

Defined in

octra-api.service.ts:903


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

octra-api.service.ts:839


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

octra-api.service.ts:1099


runBackup()

runBackup(): Observable<void>

runs a manual command

Allowed user roles: administrator

Returns

Observable<void>

Defined in

octra-api.service.ts:1182


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

octra-api.service.ts:849


saveAccountFieldValues()

saveAccountFieldValues(data): Observable<void>

saves values of account fields.

Allowed user roles: all

Parameters

data: Record<string, any>

Returns

Observable<void>

Defined in

octra-api.service.ts:819


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

octra-api.service.ts:946


saveMyAccountSettings()

saveMyAccountSettings(data): Observable<void>

Parameters

data: AccountSettingsDto

Returns

Observable<void>

Defined in

octra-api.service.ts:823


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

octra-api.service.ts:570


searchAccounts()

searchAccounts(keyword): Observable<AccountSearchResultDto[]>

Parameters

keyword: string

Returns

Observable<AccountSearchResultDto[]>

Defined in

octra-api.service.ts:884


sendFeedback()

sendFeedback(properties, protocol?, appending?): Observable<HttpEvent<unknown>>

Parameters

properties: FeedbackRequestPropertiesDto

protocol?: File

appending?: File[] = []

Returns

Observable<HttpEvent<unknown>>

Defined in

octra-api.service.ts:1186


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

octra-api.service.ts:1090


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

octra-api.service.ts:713


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

octra-api.service.ts:545


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

octra-api.service.ts:740


updateAppProperties()

updateAppProperties(): Observable<AppPropertiesDto>

Returns

Observable<AppPropertiesDto>

Defined in

octra-api.service.ts:1349


updatePolicy()

updatePolicy(id, dto): Observable<PolicyDto>

updates a policy.

Allowed user roles: administrator

Parameters

id: number

dto: any

Returns

Observable<PolicyDto>

Defined in

octra-api.service.ts:990


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

octra-api.service.ts:688


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>>

Defined in

octra-api.service.ts:661