QueryJobs

Updated at:

Queries a list of jobs.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

outboundbot:QueryJobs

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

af81a389-91f0-4157-8d82-720edd02b66a

ScenarioId

string

No

The scenario ID. [Deprecated] Legacy parameter.

b0f35dd1-0337-402e-9c4f-3a6c2426950a

JobGroupId

string

No

The job group ID.

994b8baf-7ef8-480c-b141-b7b6db77c4df

StartTime

integer

No

The start time for filtering. Default value: 0, which indicates 00:00 today. Specify a UNIX timestamp in milliseconds.

1579068424883

EndTime

integer

No

The end time for filtering. Default value: 0, which indicates the current time. Specify a UNIX timestamp in milliseconds.

1579077794665

TimeAlignment

string

No

The time basis for filtering. This parameter specifies the filtering criterion rather than a specific date or time. Valid values:

  • start: Filters by start time.

  • end: Filters by end time.

  • job_create: Filters by job creation time.

start

ContactName

string

No

The contact name for filtering.

Zhang San

PhoneNumber

string

No

The contact phone number for filtering.

135****8888

PageNumber

integer

Yes

The page number.

1

PageSize

integer

Yes

The page size.

10

Response elements

Element

Type

Description

Example

object

HttpStatusCode

integer

The response code.

200

Code

string

The HTTP status code.

OK

Message

string

The response message.

Success

RequestId

string

The request ID.

254EB995-DEDF-48A4-9101-9CA5B72FFBCC

Success

boolean

Indicates whether the request is successful.

true

Jobs

object

The job data.

PageNumber

integer

The page number.

1

PageSize

integer

The page size.

10

TotalCount

integer

The total number of entries.

1

List

array<object>

The job array.

array<object>

Status

string

The job status. Valid values:

  • Scheduling(0, "Scheduling")

  • Executing(1, "Executing")

  • Succeeded(2, "Finished - Reached")

  • Paused(3, "Paused")

  • Failed(4, "Finished - Not reached")

  • Cancelled(5, "Cancelled - Manual intervention")

  • Drafted(6, "Draft")

Succeeded

JobGroupId

string

The job group ID.

fce6c599-8ede-40e3-9f78-0928eda7b4e8

ScenarioId

string

[Deprecated] The scenario ID. This is a legacy parameter.

ade80092-03d9-4f4d-ad4f-ab8a247d3150

StrategyId

string

The strategy ID.

c8a2b7f2-ad1a-4865-b872-d0080d9802d9

JobId

string

The job ID.

fce6c599-8ede-40e3-9f78-0928eda7b4e8

Priority

integer

The priority.

1

FailureReason

string

The reason for the failure. Valid values:

  • Unknown: Unknown error.

  • NoAnswer: No answer.

  • InvalidStrategy: Invalid strategy. The strategy configuration is incorrect.

  • TimeUp: Timeout detected during scheduling.

  • NoStrategy: The strategy is empty or not found.

  • CallFailed: Call failed.

  • PerDayCallCountLimit: The daily call count limit for the number is reached.

  • ContactBlockList: The number is on the outbound call blacklist.

  • EmptyNumber: The number is a nonexistent number and will not be called.

  • JobPerDayCallCountLimit: The daily call count limit for the number is reached.

  • VerificationCancelled: Cancelled due to failed pre-call verification.

  • ContactSuspended: Call suspended.

  • InArrears: Overdue payment.

  • OutOfService: Service suspended.

NoAnswer

ReferenceId

string

The associated business ID.

d5971d98-7312-4f0e-a918-a17d67133e28

Contacts

array<object>

[Deprecated] The contact information.

Note

You can obtain this information by calling the DescribeJob operation.

object

PhoneNumber

string

The phone number.

135****8888

State

string

The status. Valid values:

  • Available: Normal.

  • WrongNumber: Wrong number.

  • DoesNotExist: Nonexistent number.

  • Suspended: Call suspended.

Available

ContactId

string

The contact ID.

db3db762-e421-44c9-9a01-cb423470757c

Honorific

string

The honorific.

Mr. Zhang

JobId

string

The job ID.

fce6c599-8ede-40e3-9f78-0928eda7b4e8

ContactName

string

The contact name.

Zhang San

Role

string

The role.

*

ReferenceId

string

The associated business ID.

2fa6bac3-06da-4315-82ab-72d6fd3a6f34

Extras

array<object>

The business data, which displays the tag collection status in large model scenarios.

Note

If the key is TenantId or ServiceId, it is a system parameter.

object

Key

string

The key of the business data.

djrq

Value

string

The value of the business data.

2019-08-21 09:49:59.0

Summary

array<object>

[Deprecated] The conversation summary. This is a legacy field and is no longer used.

object

SummaryName

string

The summary name.

score

GroupId

string

The job group ID.

ba1ba502-d044-48c0-b710-0f1f840a7c53

JobId

string

The job ID.

b72425bd-7871-4050-838e-033d80d754b7

Category

string

The category.

{}

TaskId

string

The call ID.

9fdf7a81-6781-4ab8-92fb-1d4231ef365e

Content

string

The content.

5

ConversationDetailId

string

The call record ID.

098b9b09-9223-4a8b-a422-99726f0457f3

SummaryId

string

The summary ID.

dc67d544-df06-4625-ae48-13e3c9f72d8a

Tasks

array<object>

[Deprecated] The call list.

Note

You can obtain this information by calling the searchTask operation.

array<object>

Status

string

The task status. Note: The Succeeded status is subdivided into specific reasons. The Succeeded: 1 (Connected) status is no longer returned. Instead, specific subdivided reason types are returned. Valid values:

  • Executing: 0 (Calling).

  • Succeeded: 1 (Connected).

  • NoAnswer: 2 (Not connected - No answer).

  • NotExist: 3 (Not connected - Nonexistent number).

  • Busy: 4 (Not connected - Busy).

  • Cancelled: 5 (Not called - Task stopped).

  • Failed: 6 (Failed).

  • NotConnected: 7 (Not connected - Unreachable).

  • PoweredOff: 8 (Not connected - Powered off).

  • OutOfService: 9 (Not connected - Callee service suspended).

  • InArrears: 10 (Not connected - Callee overdue payment).

  • EmptyNumber: 11 (Not called - Nonexistent number, no outbound call).

  • PerDayCallCountLimit: 12 (Not called - Daily limit exceeded).

  • ContactBlockList: 13 (Not called - Blacklisted).

  • CallerNotRegistered: 14 (Not called - Caller number not registered).

  • Terminated: 15 (Not called - Terminated).

  • VerificationCancelled: 16 (Not called - Cancelled due to failed pre-call verification).

  • OutOfServiceNoCall: 17 (Not called - Callee service suspended, no outbound call).

  • InArrearsNoCall: 18 (Not called - Callee overdue payment, no outbound call).

  • CallingNumberNotExist: 19 (Not called - Caller number does not exist).

  • SucceededFinish: 20 (Connected - Normally finished).

  • SucceededChatbotHangUpAfterNoAnswer: 21 (Connected - Robot hung up after rejection).

  • SucceededChatbotHangUpAfterSilence: 22 (Connected - Hung up due to silence timeout).

  • SucceededClientHangUpAfterNoAnswer: 23 (Connected - User hung up after rejection).

  • SucceededClientHangUp: 24 (Connected - User hung up without reason).

  • SucceededTransferByIntent: 25 (Connected - Transferred to agent due to intent match).

  • SucceededTransferAfterNoAnswer: 26 (Connected - Transferred to agent after rejection).

  • SucceededInoInterAction: 27 (Connected - No interaction from the user side).

  • SucceededError: 28 (Connected - Interrupted due to system exception).

  • SucceededSpecialInterceptVoiceAssistant: 29 (Connected - Special interception - Voice assistant).

  • SucceededSpecialInterceptExtensionNumberTransfer: 30 (Connected - Special interception - Extension number transfer).

  • SucceededSpecialInterceptCustomSpecialIntercept: 31 (Connected - Special interception - Custom interception).

  • HighRiskSipCode: 32 (Not called - High risk, no outbound call).

Succeeded

PlanedTime

integer

The planned outbound call time. The value is a UNIX timestamp in milliseconds.

1579068424883

ChatbotId

string

The robot ID.

1234

ActualTime

integer

The actual outbound call time. The value is a UNIX timestamp in milliseconds.

1579068424883

CalledNumber

string

The called number.

135****8888

ScenarioId

string

The scenario ID.

ade80092-03d9-4f4d-ad4f-ab8a247d3150

JobId

string

The job ID.

b72425bd-7871-4050-838e-033d80d754b7

CallId

string

The SIP call ID.

1528189846043

CallingNumber

string

The calling number.

0571****3106

Brief

string

[Deprecated] The summary. This is a legacy field and is no longer used.

1

Duration

integer

The call duration.

120

TaskId

string

The call ID.

ff44709e-39a6-43ba-959b-20fcabe3e496

Contact

object

The contact information.

PhoneNumber

string

The phone number of the contact.

135****8888

State

string

The status.

Available

ContactId

string

The contact ID.

db3db762-e421-44c9-9a01-cb423470757c

Honorific

string

The honorific.

Mr. Zhang

JobId

string

The job ID.

b72425bd-7871-4050-838e-033d80d754b7

ContactName

string

The contact name.

Zhang San

Role

string

The role.

*

ReferenceId

string

The associated business ID.

2fa6bac3-06da-4315-82ab-72d6fd3a6f34

CallingNumbers

array

The calling number list.

string

The calling number list.

["0571****3106"]

TagHits

array<object>

The matched tag information in small model scenarios.

object

TagName

string

The tag name.

Interested

TagGroup

string

The tag group name.

Intent collection

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "Code": "OK",
  "Message": "Success",
  "RequestId": "254EB995-DEDF-48A4-9101-9CA5B72FFBCC",
  "Success": true,
  "Jobs": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 1,
    "List": [
      {
        "Status": "Succeeded",
        "JobGroupId": "fce6c599-8ede-40e3-9f78-0928eda7b4e8",
        "ScenarioId": "ade80092-03d9-4f4d-ad4f-ab8a247d3150",
        "StrategyId": "c8a2b7f2-ad1a-4865-b872-d0080d9802d9",
        "JobId": "fce6c599-8ede-40e3-9f78-0928eda7b4e8",
        "Priority": 1,
        "FailureReason": "NoAnswer",
        "ReferenceId": "d5971d98-7312-4f0e-a918-a17d67133e28",
        "Contacts": [
          {
            "PhoneNumber": "135****8888",
            "State": "Available",
            "ContactId": "db3db762-e421-44c9-9a01-cb423470757c",
            "Honorific": "Mr. Zhang",
            "JobId": "fce6c599-8ede-40e3-9f78-0928eda7b4e8\n",
            "ContactName": "John",
            "Role": "*",
            "ReferenceId": "2fa6bac3-06da-4315-82ab-72d6fd3a6f34"
          }
        ],
        "Extras": [
          {
            "Key": "djrq",
            "Value": "2019-08-21 09:49:59.0"
          }
        ],
        "Summary": [
          {
            "SummaryName": "score",
            "GroupId": "ba1ba502-d044-48c0-b710-0f1f840a7c53",
            "JobId": "b72425bd-7871-4050-838e-033d80d754b7\n",
            "Category": "{}",
            "TaskId": "9fdf7a81-6781-4ab8-92fb-1d4231ef365e",
            "Content": "5",
            "ConversationDetailId": "098b9b09-9223-4a8b-a422-99726f0457f3",
            "SummaryId": "dc67d544-df06-4625-ae48-13e3c9f72d8a"
          }
        ],
        "Tasks": [
          {
            "Status": "Succeeded",
            "PlanedTime": 1579068424883,
            "ChatbotId": "1234",
            "ActualTime": 1579068424883,
            "CalledNumber": "135****8888",
            "ScenarioId": "ade80092-03d9-4f4d-ad4f-ab8a247d3150",
            "JobId": "b72425bd-7871-4050-838e-033d80d754b7",
            "CallId": "1528189846043",
            "CallingNumber": "0571****3106",
            "Brief": "1",
            "Duration": 120,
            "TaskId": "ff44709e-39a6-43ba-959b-20fcabe3e496",
            "Contact": {
              "PhoneNumber": "135****8888",
              "State": "Available",
              "ContactId": "db3db762-e421-44c9-9a01-cb423470757c",
              "Honorific": "Mr. Zhang",
              "JobId": "b72425bd-7871-4050-838e-033d80d754b7",
              "ContactName": "John",
              "Role": "*",
              "ReferenceId": "2fa6bac3-06da-4315-82ab-72d6fd3a6f34"
            }
          }
        ],
        "CallingNumbers": [
          "[\"0571****3106\"]"
        ],
        "TagHits": [
          {
            "TagName": "Interested",
            "TagGroup": "Intent collection"
          }
        ]
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter %s is invalid.
500 InternalError An error occurred while processing your request. Please try again later. Submit a ticket if the error still exists.
404 NotExist.Instance The specified Instance does not exist.
404 NotExist.JobGroup The specified JobGroup does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.