Latest Legacy

Get details of all masking sessions

This method retrieves details of all sessions associated with an account.

GET https://api.plivo.com/v1/Account/{Auth ID}/Masking/Session

Attributes

first_party string

Single first-party phone number.

second_party string

Single second-party phone number.

virtual_number string

Single virtual number.

status string

Allowed values: active, in-progress, expired, all
Defaults to all.

created_time timestamp

Filters sessions based on their created time. The time format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. You can use variants of this attribute:

  • created_time
  • created_time__gt
  • created_time__gte
  • created_time__lt
  • created_time__lte
You can combine these filters to retrieve sessions with a precise created time range.
The default search window is seven days, and the maximum search window is 30 days.

expiry_time timestamp

Filters sessions based on their expiry time. The time format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. You can use variants of this attribute:

  • expiry_time
  • expiry_time__gt
  • expiry_time__gte
  • expiry_time__lt
  • expiry_time__lte
You can combine these filters to retrieve sessions with a precise expiry time range.
The default search window is seven days, and the maximum search window is 30 days.

duration string

Filters sessions based on duration in seconds. You can use variants of this attribute:

  • session_duration
  • session_duration__gt
  • session_duration__gte
  • session_duration__lt
  • session_duration__lte
You can combine these filters to retrieve sessions with a precise duration range.
The default search window is 7 days, and the maximum search window is 30 days.

limit integer

Limits the number of results retrieved.
The minimum value is 1, the maximum value is 20.
Defaults to 20.

offset integer

Denotes the number of value items by which the results should be offset. For example, if the results contain 100 values and limit is set to 10 and offset is set to 5, then values 51 through 60 are displayed in the results. This parameter is also used for the pagination of the results.

Response

{
  "sessions": [
    {
      "session_uuid": "session_uuid_1",
      "first_party": "+12025557890",
      "second_party": "+14145553210",
      "virtual_number": "+12025554567",
      "record": true,
      "recording_callback_url": "https://example.com/recordings",
      "record_file_format": "mp3",
      "recording_callback_method": "POST",
      "session_expiry": 3600,
      "call_time_limit": 600,
      "status": "active",
      "initiate_call_to_first_party": false,
      "callback_url": "https://example.com/callback",
      "callback_method": "POST",
      "ring_timeout": 120,
      "first_party_play_url": "https://example.com/first_party_audio",
      "second_party_play_url": "https://example.com/second_party_audio",
      "created_time": "2023-06-15 12:30:00",
      "modified_time": "2023-06-15 13:15:00",
      "expiry_time": "2023-06-15 14:30:00",
      "last_interaction_time": "2023-06-15 13:10:00",
      "total_call_count": 4,
      "total_call_amount": "9.50",
      "total_call_billed_duration": 900,
      "interaction": "{
"first_party_resource_url": "/Account/{auth_id}/Call/{first_party_call_uuid}/"
"second_party_resource_url": "https://api.plivo.com/v1/Account/{auth_id}/Call/{second_party_call_uuid}/"
“recording_resource_url”: "null"
}",
      "duration": 2700,
      "amount": "4.50",
      "total_session_amount": "14.00"
    },
    {
      "session_uuid": "session_uuid_2",
      "first_party": "+13035551234",
      "second_party": "+13035556789",
      "virtual_number": "+12125550123",
      "record": false,
      "recording_callback_url": null,
      "record_file_format": "wav",
      "recording_callback_method": "GET",
      "session_expiry": 1800,
      "call_time_limit": 1200,
      "status": "expired",
      "initiate_call_to_first_party": true,
      "callback_url": "https://example.com/callback",
      "callback_method": "POST",
      "ring_timeout": 60,
      "first_party_play_url": null,
      "second_party_play_url": null,
      "created_time": "2023-06-14 09:45:00",
      "modified_time": "2023-06-14 10:00:00",
      "expiry_time": "2023-06-14 11:15:00",
      "last_interaction_time": null,
      "total_call_count": 0,
      "total_call_amount": "0.00",
      "total_call_billed_duration": 0,
      "interaction": "{
"first_party_resource_url": "/Account/{auth_id}/Call/{first_party_call_uuid}/"
"second_party_resource_url": "https://api.plivo.com/v1/Account/{auth_id}/Call/{second_party_call_uuid}/"
“recording_resource_url”: "null"
}",
      "duration": 900,
      "amount": "1.00",
      "total_session_amount": "1.00"
    }
  ]
}