get_queryId_status: Get the status of a ChemSpider query

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/FILTERING-get_queryId_status.R

Description

This function is used to return the status of a query from ChemSpider before get_results() is called.

Usage

1
2
3
4
5
6
7
8
get_queryId_status(
  queryId,
  count = TRUE,
  message = TRUE,
  apikey,
  coerce = FALSE,
  simplify = FALSE
)

Arguments

queryId

A valid 36-character ChemSpider query ID string; see Details.

count

logical: Should the count of the results be returned?

message

logical: Should the message be returned?

apikey

A 32-character string with a valid key for ChemSpider's API services.

coerce

logical: should the list be coerced to a data.frame? Defaults to FALSE.

simplify

logical: should the results be simplified to a vector? Defaults to FALSE.

Details

Call this endpoint with a queryId obtained from a previous POST query,e.g., post_inchikey().
If the query is still ongoing, returns a warning and a character vector of the query status as Incomplete. It is recommended to wait at least ten seconds before checking the status again.

If the query is finalized, returns a data frame of the query status with status, count and message. The status can be either Complete, Suspended, Failed, or Not Found.

A status of Suspended can be caused if the results could not be compiled within a reasonable amount of time. Create a new filter request with more restrictive parameters.

A status of Failed can be caused if the backend system could not compile the results. Create a new filter request and, if the same outcome occurs, apply more restrictive parameters.

A status of Not Found can be caused if the Query ID has not been registered or has expired. Create a new filter request.

Value

Returns the query status as list, data.frame or character vector.

Author(s)

Raoul Wolf (https://github.com/RaoulWolf/)

See Also

https://developer.rsc.org/compounds-v1/apis/get/filter/{queryId}/status

Examples

1
2
3
4
5
6
7
## Not run: 
## GET the status of a query from ChemSpider
queryId <- "A valid 36-character Chemspider query ID"
apikey <- "A valid 32-character Chemspider API key"
get_queryId_status(queryId = queryId, apikey = apikey)

## End(Not run)

NIVANorge/chemspiderapi documentation built on Jan. 10, 2021, 10:12 a.m.