You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/t/api-rest2/Calls.yaml

35 lines
923 B

---
#get a subscriber for testing
-
name: get a subscriber for testing
type: item
method: GET
path: '/api/subscribers/?page=1&rows=1&order_by=id&order_by_direction=desc'
retain:
subscriber: body
perl_code: !!perl/code |
{
my ($retained) = @_;
my $subscriber = $retained->{subscriber}->{'_embedded'}->{'ngcp:subscribers'}->[0];
$retained->{subscriber} = $subscriber;
$retained->{subscriber_id} = $subscriber->{id};
}
conditions:
is:
code: 200
ok:
'${subscriber}.id': defined
#fetch calls for subscriber
-
name: get a subscriber for testing
type: item
method: GET
path: '/api/calls/?page=1&rows=10&subscriber_id=${subscriber_id}'
retain:
calls: body
conditions:
is:
code: 200
ok:
'${calls}.total_count': defined