Home / Selection / Get 1st row by email

Selection ‐ Get 1st row by email


Get first match in a selection by email address

Endpoint

GET /api/selection/:selectionId/email-address/:email

Parameters:

  • :selectionId - id of the selection of which we want to obtain data
  • :email- e-mail by which we do the search

Headers

see Using authentication token

Response

        {
            "valid": true,
            "data": {
                "table_name.email": "some@email.com",
                "table_name.name": "john"
            }, "extra": {
               "email_field": {
                   "field_name" : "table_name.email"
                } 
            }
        } 

Example code:

<?php

require_once 'RestOpen.php';

$username = 'my_username';
$password = 'my_password';
$workspaceId = 999;
$selectionId = 999;
$email = 'email_to_search';

$rest = new RestOpen($username, $password, $workspaceId);
$result = $rest->getSelectionFirstRowByEmail($selectionId, $email);

var_dump($result);