Skip to content

Latest commit

 

History

History
97 lines (70 loc) · 1.91 KB

foundry-api-source-ingestion.md

File metadata and controls

97 lines (70 loc) · 1.91 KB

Foundry API: Source Ingestion (old)

POST dashboard/start

ingest a resource.

Request

  • Form Param: apiKey, string
  • Form Param: sourceID, string

Response

Content-Type: application/json

200 OK

Response Body: (A JSON object)

{
  "sourceID": "SCR_013869-Cellosaurus-RIN-test",
  "dataSource": "SCR_013869-Cellosaurus-RIN-test",
  "startDate": "2020-02-25T13:20:57.000-08:00",
  "endDate": "2020-02-25T13:23:04.000-08:00",
  "ingestionEndDate": "2020-02-25T13:21:14.000-08:00",
  "new": 97,
  "resource.enhanced.1": 100,
  "ingested": 100,
  "finished": 100,
  "error": 0,
  "transformed.1": 100,
  "runStats": {
    "resourceID": "SCR_013869-Cellosaurus-RIN-test",
    "dataSource": "SCR_013869-Cellosaurus-RIN-test",
    "startDate": "Tue Feb 25 13:20:57 PST 2020",
    "endDate": "Tue Feb 25 13:23:04 PST 2020",
    "newCount": 97,
    "sameCount": 0,
    "changeCount": 3,
    "errorCount": 0,
    "finished": true,
    "opType": "full"
  }
}

403 Forbidden

500 Internal Server Error


GET dashboard/ingest_logs

returns all the ingestion logs for a resource in reverse chronological order.

Request

No body

  • Query Param: apiKey, string
  • Query Param: sourceID, string

Response

Content-Type: application/json

200 OK

Response Body: (A JSON object)

{"ingestLogs": [{
  "resourceID": "SCR_004712-CDC-CDIsmall",
  "dataSource": "SCR_004712-CDC-CDIsmall",
  "startDate": "Wed May 06 17:01:10 PDT 2020",
  "endDate": "Wed May 06 17:01:12 PDT 2020",
  "newCount": 14,
  "sameCount": 0,
  "changeCount": 55,
  "errorCount": 0,
  "finished": true,
  "opType": "full",
  "errorMessage": "This is only set when ingestion cannot be started"
}]}

400 Bad Request

if no sourceID is provided or sourceID is empty

403 Forbidden

500 Internal Server Error

Response Body: (error message)