下载所有Twilio通话记录?

问题描述 投票:0回答:2

我想下载我所有的Twilio通话记录(这里有说明) https:/support.twilio.comhcen-usarticles223183588-Exporting-SMS-and-Call-Logs。)但问题是这种方法只能下载1000条日志。有什么办法可以让我下载所有的日志(csv)?

先谢谢你

python twilio twilio-api
2个回答
0
投票

从文档中。

PageSize 参数被限制在1000页。

当获取多页API结果时,使用提供的nextpageuri参数来检索下一页的结果。所有的Twilio帮助库都使用了该方法。nextpageuri 来翻阅资源。

你应该使用 Twilio帮助图书馆nextpageuripreviouspageuri 来浏览资源。


0
投票

您可以使用 Twilio帮助图书馆Twilio CLI 以此。

TWILIO CLI USAGE
  $ twilio api:core:calls:list

OPTIONS
  -l=(debug|info|warn|error|none)                                                 [default: info] Level of logging messages.
  -o=(columns|json|tsv)                                                           [default: columns] Format of command output.
  -p, --profile=profile                                                           Shorthand identifier for your profile.
  --account-sid=account-sid                                                       The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call resource(s) to read.

  --end-time=end-time                                                             Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also
                                                                                  specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on
                                                                                  or after midnight of this date.

  --end-time-after=end-time-after                                                 Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also
                                                                                  specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on
                                                                                  or after midnight of this date.

  --end-time-before=end-time-before                                               Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also
                                                                                  specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on
                                                                                  or after midnight of this date.

  --from=from                                                                     Only include calls from this phone number, SIP address, Client identifier or SIM SID.

  --limit=limit                                                                   [default: 50] The maximum number of resources to return. Use '--no-limit' to disable.

  --page-size=page-size                                                           How many resources to return in each list page. The default is 50, and the maximum is 1000.

  --parent-call-sid=parent-call-sid                                               Only include calls spawned by calls with this SID.

  --properties=properties                                                         [default: sid,from,to,status,startTime] The properties you would like to display (JSON output always shows all properties).

  --start-time=start-time                                                         Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can
                                                                                  also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls
                                                                                  that started on or after midnight of this date.

  --start-time-after=start-time-after                                             Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can
                                                                                  also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls
                                                                                  that started on or after midnight of this date.

  --start-time-before=start-time-before                                           Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can
                                                                                  also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls
                                                                                  that started on or after midnight of this date.

  --status=(queued|ringing|in-progress|completed|busy|failed|no-answer|canceled)  The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.

  --to=to                                                                         Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
© www.soinside.com 2019 - 2024. All rights reserved.