Cancel data import
const url = 'https://api.shypr.app/rest/imports/cancel';const options = { method: 'POST', headers: {'X-API-KEY': '<X-API-KEY>', 'Content-Type': 'application/json'}, body: '{"iri":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shypr.app/rest/imports/cancel \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <X-API-KEY>' \ --data '{ "iri": "example" }'Creates a DataImport resource.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The new DataImport resource
The import of one CSV file of one type. The create reads the header and a few rows, the user maps the columns, and RunDataImport imports the rows in the worker. Each row gets a DataImportRow.
object
The IRI of the import, its id in GraphQL.
Example generated
{ "iri": "example"}The import of one CSV file of one type. The create reads the header and a few rows, the user maps the columns, and RunDataImport imports the rows in the worker. Each row gets a DataImportRow.
object
The IRI of the import, its id in GraphQL.
Responses
Section titled “Responses”DataImport resource created
The import of one CSV file of one type. The create reads the header and a few rows, the user maps the columns, and RunDataImport imports the rows in the worker. Each row gets a DataImportRow.
object
The column of each field, see DataImportStartInput::$mapping. Before the start it holds the suggestion of the create.
object
“dmy” or “mdy”, see DataImportStartInput::$dateOrder.
The data rows of the file, without the header. Null until the worker counted them.
Why the import stopped, for the status failed.
The names of the columns, the first line of the file.
The first SAMPLE_ROWS data rows.
Example
{ "status": "mapping", "onMatch": "skip", "dateOrder": "dmy", "processedRows": 0, "processedOffset": 0, "createdRows": 0, "updatedRows": 0, "skippedRows": 0, "failedRows": 0, "type": "categories", "creator": "https://example.com/", "file": "https://example.com/"}The import of one CSV file of one type. The create reads the header and a few rows, the user maps the columns, and RunDataImport imports the rows in the worker. Each row gets a DataImportRow.
object
The column of each field, see DataImportStartInput::$mapping. Before the start it holds the suggestion of the create.
object
“dmy” or “mdy”, see DataImportStartInput::$dateOrder.
The data rows of the file, without the header. Null until the worker counted them.
Why the import stopped, for the status failed.
The names of the columns, the first line of the file.
The first SAMPLE_ROWS data rows.
Example
https://example.com/Example
https://example.com/Invalid input
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}Forbidden
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}An error occurred
Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}