Skip to main content
deleted 87 characters in body; edited tags
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

Please forgive the newbie question!

In an REST API URL Parameter string, how How do I exclude records based on the presence of a certain field (like the equivalent of SQL's [fieldname] Is Null)?

Example:

  • Results for Closed questions include field closed_date=1234567890.

  • Results for Open questions do not include this field as a Null as I would expect.

Is there a parameter I can add to the URL to exclude questions that have the field?


The only information I could find was from the documentation:

Absent Fields

To save space, the API does not return null values, instead opting to exclude the field altogether in the returned JSON. Fields that are not always guaranteed to be set (closed_date on question objects for example) are indicated in the per-type documentation. (Source)

Please forgive the newbie question!

In an REST API URL Parameter string, how do I exclude records based on the presence of a certain field (like the equivalent of SQL's [fieldname] Is Null)?

Example:

  • Results for Closed questions include field closed_date=1234567890.

  • Results for Open questions do not include this field as a Null as I would expect.

Is there a parameter I can add to the URL to exclude questions that have the field?


The only information I could find was from the documentation:

Absent Fields

To save space, the API does not return null values, instead opting to exclude the field altogether in the returned JSON. Fields that are not always guaranteed to be set (closed_date on question objects for example) are indicated in the per-type documentation. (Source)

How do I exclude records based on the presence of a certain field (like the equivalent of SQL's [fieldname] Is Null)?

Example:

  • Results for Closed questions include field closed_date=1234567890.

  • Results for Open questions do not include this field as a Null as I would expect.

Is there a parameter I can add to the URL to exclude questions that have the field?


The only information I could find was from the documentation:

Absent Fields

To save space, the API does not return null values, instead opting to exclude the field altogether in the returned JSON. Fields that are not always guaranteed to be set (closed_date on question objects for example) are indicated in the per-type documentation. (Source)

Source Link
ashleedawg
  • 256
  • 1
  • 11

Exclude records where field is present (ie., return only open questions)

Please forgive the newbie question!

In an REST API URL Parameter string, how do I exclude records based on the presence of a certain field (like the equivalent of SQL's [fieldname] Is Null)?

Example:

  • Results for Closed questions include field closed_date=1234567890.

  • Results for Open questions do not include this field as a Null as I would expect.

Is there a parameter I can add to the URL to exclude questions that have the field?


The only information I could find was from the documentation:

Absent Fields

To save space, the API does not return null values, instead opting to exclude the field altogether in the returned JSON. Fields that are not always guaranteed to be set (closed_date on question objects for example) are indicated in the per-type documentation. (Source)