Static
MethodsPerforms batch call to the API.
Api
A function which will be invoked with api instance.
This instance is special, as all methods there return a url string instead of making a backend call.
uriCollector
should return an array of uris to be executed in batch.
So, for example, one may return [batchApi.metadata(), batchApi.count(...)]
from uriCollector
.
That will mean call metadata() method
and then call count() method
.
Optional
isAtomic: falsePass true if you want all operations to happen in the same transaction. There is a limitation, however. Atomic batch operations can only return success or error.
Optional
isConcurrent: booleanRequests to the DB are made asynchronously.
Optional
isAtomic: trueOptional
isConcurrent: booleanCopies an existing object with making changes on a copy. Copying is supported only for some objects. The API Explorer page displays which objects support the Copy action.
Api
One of object codes from API Explorer
ID of object to copy
Which fields to set on copied object. See API Explorer for the list of available fields for the given objCode.
Optional
fields: TFieldsWhich fields to return. See API Explorer for the list of available fields for the given objCode.
Optional
options: string[]A list of options that are attached to the copy request (object specific)
A promise which will resolved with results if everything went ok and rejected otherwise
Creates a new object.
Api
One of object codes from API Explorer
Values of fields to be set for the new object. See API Explorer for the list of available fields for the given objCode.
Optional
fields: TFieldsWhich fields of newly created object to return. See API Explorer for the list of available fields for the given objCode.
A promise which will resolved with the ID and any other specified fields of newly created object
Edits an existing object
Api
One of object codes from API Explorer
ID of object to modify
Which fields to set. See API Explorer for the list of available fields for the given objCode.
Optional
fields: TFieldsWhich fields to return. See API Explorer for the list of available fields for the given objCode.
A promise which will resolved with results if everything went ok and rejected otherwise
Edit multiple existing objects
Api
One of object codes from API Explorer
Array of fields for each object to be edited. See API Explorer for the list of available fields for the given objCode.
Optional
fields: TFieldsWhich fields to return. See API Explorer for the list of available fields for the given objCode.
A promise which will resolved with results if everything went ok and rejected otherwise
Executes an action for the given object
Api
One of object codes from API Explorer
ID of object. Optional, pass null or undefined to omit
An action to execute. A list of allowed actions are available within the API Explorer under "actions" for each object.
Optional
actionArgs: objectOptional. Arguments for the action. See API Explorer for the list of valid arguments
A promise which will resolved if everything went ok and rejected otherwise
Used for retrieve an object or multiple objects.
Api
One of object codes from API Explorer
Either one or multiple object ids
Optional
fields: TFieldsWhich fields to return. See API Explorer for the list of available fields for the given objCode.
A promise which will resolved with results if everything went ok and rejected otherwise
Used to obtain an API key
Api
A username in Workfront
Password to use
Optional
subdomain: stringSub-domain to use
A promise which will resolved with API key if everything went ok and rejected otherwise
Protected
getLogs in into Workfront. Should be a first call to Workfront API. Other calls should be made after this one will be completed.
Api
A username in Workfront
Password to use
Optional
subdomain: stringSub-domain to use
A promise which will resolved with logged in user data if everything went ok and rejected otherwise
Retrieves API metadata for an object.
Api
Optional
objCode: stringOne of object codes from API Explorer. If omitted will return list of objects available in API.
Optional
fields: TFieldsWhich fields to return.
A promise which will resolved with object metadata if everything went ok and rejected otherwise
Executes a named query for the given obj code
Api
One of object codes from API Explorer
A query to execute. A list of allowed named queries are available within the API Explorer under "actions" for each object.
Optional
queryArgs: objectOptional. Arguments for the action. See API Explorer for the list of valid arguments
Optional
fields: TFieldsWhich fields to return. See API Explorer for the list of available fields for the given objCode.
A promise which will resolved with received data if everything went ok and rejected with error info otherwise
Deletes an object
Api
One of object codes from API Explorer
ID of object
Optional
bForce: booleanPass true to cause the server to remove the specified data and its dependants
A promise which will resolved if everything went ok and rejected otherwise
Performs report request, where only the aggregate of some field is desired, with one or more groupings.
Api
One of object codes from API Explorer
An object with search criteria and aggregate functions
Optional
useHttpPost: boolean = falseWhenever to use POST to send query params
A promise which will resolved with results if everything went ok and rejected otherwise
Do the request using Fetch API.
Api
URI path where the request calls
An object with params
Optional
fields: TFields = []Fields to query for the request
Optional
method: string = Api.Methods.GETThe method which the request will do (GET|POST|PUT|DELETE)
A promise which will resolved with results if everything went ok and rejected otherwise
Used for object retrieval by multiple search criteria.
Api
One of object codes from API Explorer
Optional
query: objectAn object with search criteria
Optional
fields: TFieldsWhich fields to return. See API Explorer for the list of available fields for the given objCode.
Optional
useHttpPost: boolean = falseWhenever to use POST to send query params
A promise which will resolved with search results if everything went ok and rejected otherwise
Generated using TypeDoc
Creates new Api instance.
Param
An object with the following keys: