githubEdit

Query AMS requests

Retrieving a single AMS request

Use the amsRequest query with the id returned from the adverseMediaSearch mutation to check the status of a scan or retrieve its results.

const bodyJSON = {
  variables: {
    id: "6820a4f3e1c2b5d8f0123456",
  },
  query: `
query ($id: ID!) {
  amsRequest(id: $id) {
    id
    name
    country
    status
    createdAt
    results {
      title
      link
      adversityScore
      personSimilarity
      summary
    }
  }
}`,
};
circle-info

The results field is populated only once the scan reaches COMPLETED status. While the scan is INITIALISED or PENDING, results will be null.

Retrieving all your AMS requests

Filtering AMS requests

Use the input parameter to narrow results by status, date range, or name.

Available filter fields on AmsQueryInput:

Field
Description

statuses

Filter by one or more AMS statuses

minCreatedAt

Return only requests created after this timestamp (ISO 8601)

maxCreatedAt

Return only requests created before this timestamp (ISO 8601)

firstName

Filter by first name β€” case insensitive, partial match

middleName

Filter by middle name β€” case insensitive, partial match

lastName

Filter by last name β€” case insensitive, partial match

accountName

Filter by business name β€” case insensitive, partial match

country

Filter by two-letter ISO country code

Last updated

Was this helpful?