Skip to content

Verification API

Verification API

Verification API

For more, see Tutorials.

The Verification API module provides methods to manage and retrieve event verifications. It allows users to fetch verification data, update verification statuses, and handle associated metadata.

Using Pagination parameters (skip, limit)

The Verification API now supports pagination parameters skip and limit. This allows users to control the number of results returned and to navigate through large datasets efficiently.

Example Pagination Usage

Python
# Fetch the first 50 NEW CANDIDATE verifications
verifications = master.verification.get_verifications_paginated(
    verification_type="NEW CANDIDATE",
    skip=0,
    limit=50
)

# Fetch the next 50 NEW CANDIDATE verifications
verifications_next_page = master.verification.get_verifications_paginated(
    verification_type="NEW CANDIDATE",
    skip=50,
    limit=50
)

# Fetch the next 50 NEW CANDIDATE verifications
verifications_third_page = master.verification.get_verifications_paginated(
    verification_type="NEW CANDIDATE",
    skip=100,
    limit=50
)
As seen in the example above, the skip parameter is used to offset the starting point of the results, while the limit parameter specifies the maximum number of results to return.

So, to retrieve verifications in batches of 50, you would increment the skip value by 50 for each subsequent call.


CHIME/FRB Verification API

add_verification

Python
add_verification(event_id, verification)

Adds a new CHIME/FRB Verification record to Verification Database.

Parameters:

Name Type Description Default
event_id

The event ID to add verification for.

required
verification dict

A dictionary of CHIME/FRB Verification record.

required

Returns:

Type Description
dict

A dictionary containing the added verification record.

get_all_faint_verifications

Python
get_all_faint_verifications()

Retrieves ALL CHIME/FRB Verification records of type FAINT.

Note: For large datasets, this may take some time and use significant memory. If you need more control, use get_verifications_paginated() instead.

Returns:

Type Description
list

A complete list of all events with FAINT classification.

Example
Get ALL FAINT verifications

all_verifications = verification.get_all_faint_verifications()

get_all_known_candidate_verifications

Python
get_all_known_candidate_verifications()

Retrieves ALL CHIME/FRB Verification records of type KNOWN CANDIDATE.

Note: For large datasets, this may take some time and use significant memory. If you need more control, use get_verifications_paginated() instead.

Returns:

Type Description
list

A complete list of all events with KNOWN CANDIDATE classification.

Example
Get ALL KNOWN CANDIDATE verifications

all_verifications = verification.get_all_known_candidate_verifications()

get_all_known_source_verifications

Python
get_all_known_source_verifications()

Retrieves ALL CHIME/FRB Verification records of type KNOWN SOURCE.

Note: For large datasets, this may take some time and use significant memory. If you need more control, use get_verifications_paginated() instead.

Returns:

Type Description
list

A complete list of all events with KNOWN SOURCE classification.

Example
Get ALL KNOWN SOURCE verifications

all_verifications = verification.get_all_known_source_verifications()

get_all_new_candidate_verifications

Python
get_all_new_candidate_verifications()

Retrieves ALL CHIME/FRB Verification records of type NEW CANDIDATE.

Note: For large datasets, this may take some time and use significant memory. If you need more control, use get_verifications_paginated() instead.

Returns:

Type Description
list

A complete list of all events with NEW CANDIDATE classification.

Example
Get ALL NEW CANDIDATE verifications (could be 5000+ records)

all_verifications = verification.get_all_new_candidate_verifications()

get_all_rfi_verifications

Python
get_all_rfi_verifications()

Retrieves ALL CHIME/FRB Verification records of type RFI.

Note: For large datasets, this may take some time and use significant memory. If you need more control, use get_verifications_paginated() instead.

Returns:

Type Description
list

A complete list of all events with RFI classification.

Example
Get ALL RFI verifications

all_verifications = verification.get_all_rfi_verifications()

get_all_todelete_verifications

Python
get_all_todelete_verifications()

Retrieves ALL CHIME/FRB Verification records of type TODELETE.

Note: For large datasets, this may take some time and use significant memory. If you need more control, use get_verifications_paginated() instead.

Returns:

Type Description
list

A complete list of all TODELETE verification records.

Example
Get ALL TODELETE verifications

all_verifications = verification.get_all_todelete_verifications()

get_all_unclassified_verifications

Python
get_all_unclassified_verifications()

Retrieves ALL CHIME/FRB Verification records of type UNCLASSIFIED.

Note: For large datasets, this may take some time and use significant memory. If you need more control, use get_verifications_paginated() instead.

Returns:

Type Description
list

A complete list of all events with UNCLASSIFIED classification.

Example
Get ALL UNCLASSIFIED verifications

all_verifications = verification.get_all_unclassified_verifications()

get_conflicting_verifications_faint

Python
get_conflicting_verifications_faint()

Retrieves verification records for events that have conflicting tsar verifications and at least one classification of FAINT.

Returns:

Type Description
list

A list of dictionaries each contains an eligible event verification record.

get_verification_for_event

Python
get_verification_for_event(event_id)

Retrieves a CHIME/FRB Verification record for a given event_id.

Parameters:

Name Type Description Default
event_id str

The event_id of the CHIME/FRB Verification record.

required

Returns:

Type Description
dict

A dictionary containing verification record for that event.

get_verifications_paginated

Python
get_verifications_paginated(verification_type, skip=0, limit=1500)

Retrieves CHIME/FRB Verification records with manual batch control.

Use this method when you need fine-grained control over how many events to fetch and from which offset.

For example, loading data in specific chunks.

Parameters:

Name Type Description Default
verification_type str

The type of verification to retrieve. Valid types: FAINT, KNOWN CANDIDATE, KNOWN SOURCE, NEW CANDIDATE, RFI, UNCLASSIFIED, TODELETE, REPEATER

required
skip int

Number of records to skip (pagination offset). Default: 0

0
limit int

Maximum number of records to return per request. Must be between 1 and 1500. Default: 1500

1500

Returns:

Type Description
list

A list of dictionaries containing verification records for the

list

requested page.

Example
Get first 100 records

batch_1 = verification.get_verifications_paginated("NEW CANDIDATE", skip=0, limit=100)

Get next 100 records

batch_2 = verification.get_verifications_paginated("NEW CANDIDATE", skip=100, limit=100)

Get the next 100 records

batch_3 = verification.get_verifications_paginated("NEW CANDIDATE", skip=200, limit=100)