POST Agents/Batch/GetBatchTaskInfosByAssociates
Some tooltip text!
• 4 minutes to read
• 4 minutes to read
POST /api/v1/Agents/Batch/GetBatchTaskInfosByAssociates
Get an array of BatchTaskInfo for the provided associate id's.
NsApiSlow threshold: 3000 ms.
Query String Parameters
| Parameter Name | Type | Description |
|---|---|---|
| $select | string | Optional comma separated list of properties to include in the result. Other fields are then nulled out to reduce payload size: "Name,department,category". Default = show all fields. |
POST /api/v1/Agents/Batch/GetBatchTaskInfosByAssociates?$select=name,department,category/id
Request Headers
| Parameter Name | Description |
|---|---|
| Authorization | Supports 'Basic', 'SoTicket' and 'Bearer' schemes, depending on installation type. |
| X-XSRF-TOKEN | If not using Authorization header, you must provide XSRF value from cookie or hidden input field |
| Content-Type | Content-type of the request body: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded, application/json-patch+json, application/merge-patch+json |
| Accept | Content-type(s) you would like the response in: application/json, text/json, application/xml, text/xml, application/json-patch+json, application/merge-patch+json |
| Accept-Language | Convert string references and multi-language values into a specified language (iso2) code. |
| SO-Language | Convert string references and multi-language values into a specified language (iso2) code. Overrides Accept-Language value. |
| SO-Culture | Number, date formatting in a specified culture (iso2 language) code. Partially overrides SO-Language/Accept-Language value. Ignored if no Language set. |
| SO-TimeZone | Specify the timezone code that you would like date/time responses converted to. |
| SO-AppToken | The application token that identifies the partner app. Used when calling Online WebAPI from a server. |
Request Body: request
AssociateIds
| Property Name | Type | Description |
|---|---|---|
| AssociateIds | Array |
Response:array
OK
| Response | Description |
|---|---|
| 200 | OK |
Response body: array
| Property Name | Type | Description |
|---|---|---|
| Id | int32 | Id of the task. |
| Name | string | Name of the task. |
| AssociateId | int32 | Task owner. If it is a System task, AssociateId = 0. |
| DetailsTable | int32 | Id of table with more information about the task. |
| DetailsRecord | int32 | Record Id of a row in the DetailsTable containing more info about the task. |
| IsSystemTask | bool | If IsSystemTask is true, the task is not initiated by an associate. |
| IsInternalTask | bool | If IsInternalTask is true, this task will not add a trace to the database. |
| ParameterObject | object | ParameterObject will be serialized to a binary blob and saved in the BinaryObject table. The link to the BinaryObject will be set using DetailsTable and DetailsRecord. |
| LastStarted | date-time | When was the task last started. |
| Created | date-time | Task creation time. |
| StartCount | int32 | Maps to the startcount field in the batchtask table. |
| DatabaseSerialNumber | string | Serial number of the database the task is to run on. |
| Context | string | Context for the executing task. |
| Result | string | Maps to the result field in the batchtask table. |
| State | string | BatchTaskState of the task. |
| Description | string | Description of the task. |
| Response | string | Maps to the response field in the batchtask table. |
| Request | string | Maps to the request field in the batchtask table. |
| ProgressDescription | string | Descriptive text for the current stage |
| ProgressPercent | int32 | Task progress, in percent of estimated total |
| FileName | string | The filename related to the batchtask. |
| CancellationBehaviour | string | Indicate if the task can be stopped. |
| TableRight | TableRight | The carrier's table right |
| FieldProperties | object | Field property dictionary mapping field names to field access rights. |
Sample request
POST /api/v1/Agents/Batch/GetBatchTaskInfosByAssociates
Authorization: Basic dGplMDpUamUw
Accept: application/json; charset=utf-8
Accept-Language: en
Content-Type: application/json; charset=utf-8
{
"AssociateIds": [
65,
139
]
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"Id": 5,
"Name": "DataBackup",
"AssociateId": 595,
"DetailsTable": 359,
"DetailsRecord": 583,
"IsSystemTask": true,
"IsInternalTask": true,
"ParameterObject": {
"ParameterObject1": "destination=Azure",
"ParameterObject2": "compression=enabled"
},
"LastStarted": "2024-11-27T03:00:00+01:00",
"Created": "2024-01-01T00:00:00+01:00",
"StartCount": 331,
"DatabaseSerialNumber": "1070177",
"Context": "System Backup",
"Result": "Success",
"State": "Succeeded",
"Description": "Automated nightly backup of all CRM data to Azure cloud storage",
"Response": "Backup completed successfully - 15.2 GB backed up",
"Request": "Scheduled system backup",
"ProgressDescription": "Backup completed and verified",
"ProgressPercent": 100,
"FileName": "backup_2024-11-27_0300.bak",
"CancellationBehaviour": "CannotCancel",
"TableRight": null,
"FieldProperties": {
"fieldName": {
"FieldRight": null,
"FieldType": "System.String",
"FieldLength": 644
}
}
}
]