|
|
```
|
|
|
{
|
|
|
"swagger": "2.0",
|
|
|
"info": {
|
|
|
"version": "1.0.1.4",
|
|
|
"title": "Ingestion Pipeline Service",
|
|
|
"description": "These API's will provide an interface for automated pipeline operations. There are two basic operations provided here : one is to submit the ingestion job and other to get its status."
|
|
|
},
|
|
|
"host": "ingestion-pipeline-service-dot-evd-ddl-us-services.appspot.com",
|
|
|
"basePath": "/_ah/api",
|
|
|
"schemes": [
|
|
|
"https"
|
|
|
],
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"paths": {
|
|
|
"/ingestionpipeline/v1/jobs": {
|
|
|
"get": {
|
|
|
"description": "This API will return the all jobs based on the job status input. Possible values for job status input are all, running, completed and failed",
|
|
|
"operationId": "jobs",
|
|
|
"parameters": [{
|
|
|
"name": "jobStatus",
|
|
|
"in": "query",
|
|
|
"description": "Return the all jobs based on the required jobs status input(all/running/completed/failed). By default is all.",
|
|
|
"required": true,
|
|
|
"type": "string",
|
|
|
"default": "all",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
{
|
|
|
"name": "Slb-Account-Id",
|
|
|
"in": "header",
|
|
|
"description": "Account ID is the active DELFI account (SLB account or customer's account) which the users choose to use with the Search API.",
|
|
|
"required": true,
|
|
|
"type": "string",
|
|
|
"default": "slb"
|
|
|
},
|
|
|
|
|
|
{
|
|
|
"name": "Slb-On-Behalf-Of",
|
|
|
"in": "header",
|
|
|
"description": "On behalf email or token is the token/email of the original user making the call. For now, only email is supported but eventually, primary usage will be token.",
|
|
|
"required": false,
|
|
|
"type": "string"
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/IngestionJob"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Authorization info missing",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ApiError"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"security": [{
|
|
|
"s-auth": [
|
|
|
"email"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"Bearer": [
|
|
|
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
"x-security": [{
|
|
|
"s-auth": {
|
|
|
"audiences": [
|
|
|
""
|
|
|
]
|
|
|
}
|
|
|
}],
|
|
|
"tags": [
|
|
|
"Ingestion Pipeline Service"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"/ingestionpipeline/v1/status": {
|
|
|
"get": {
|
|
|
"description": "This API will return the status of the submitted ingestion job. ",
|
|
|
"operationId": "status",
|
|
|
"parameters": [{
|
|
|
"name": "jobId",
|
|
|
"in": "query",
|
|
|
"description": "Id of the ingestion job returned by submit method.",
|
|
|
"required": true,
|
|
|
"type": "string",
|
|
|
"default": "",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
{
|
|
|
"name": "Slb-Account-Id",
|
|
|
"in": "header",
|
|
|
"description": "Account ID is the active DELFI account (SLB account or customer's account) which the users choose to use with the Search API.",
|
|
|
"required": true,
|
|
|
"type": "string",
|
|
|
"default": "slb"
|
|
|
},
|
|
|
|
|
|
{
|
|
|
"name": "Slb-On-Behalf-Of",
|
|
|
"in": "header",
|
|
|
"description": "On behalf email or token is the token/email of the original user making the call. For now, only email is supported but eventually, primary usage will be token.",
|
|
|
"required": false,
|
|
|
"type": "string"
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/IngestionJobStatus"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Authorization info missing",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ApiError"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"security": [{
|
|
|
"s-auth": [
|
|
|
"email"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"Bearer": [
|
|
|
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
"x-security": [{
|
|
|
"s-auth": {
|
|
|
"audiences": [
|
|
|
""
|
|
|
]
|
|
|
}
|
|
|
}],
|
|
|
"tags": [
|
|
|
"Ingestion Pipeline Service"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"/ingestionpipeline/v1/submit": {
|
|
|
"post": {
|
|
|
"description": "This API will submit a file to ingest into datalake, enrich it and re-ingest WKE back to datalake.",
|
|
|
"operationId": "submit",
|
|
|
"parameters": [{
|
|
|
"in": "body",
|
|
|
"name": "body",
|
|
|
"required": false,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/UploadRequest"
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
"name": "Slb-Account-Id",
|
|
|
"in": "header",
|
|
|
"description": "Account ID is the active DELFI account (SLB account or customer's account) which the users choose to use with the Search API.",
|
|
|
"required": true,
|
|
|
"type": "string",
|
|
|
"default": "slb"
|
|
|
},
|
|
|
{
|
|
|
"name": "Slb-On-Behalf-Of",
|
|
|
"in": "header",
|
|
|
"description": "On behalf email or token is the token/email of the original user making the call. For now, only email is supported but eventually, primary usage will be token.",
|
|
|
"required": false,
|
|
|
"type": "string"
|
|
|
}
|
|
|
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/UploadRequest"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Authorization info missing",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ApiError"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"security": [{
|
|
|
"s-auth": [
|
|
|
"email"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"Bearer": [
|
|
|
|
|
|
]
|
|
|
}
|
|
|
|
|
|
],
|
|
|
"x-security": [{
|
|
|
"s-auth": {
|
|
|
"audiences": [
|
|
|
""
|
|
|
]
|
|
|
}
|
|
|
}],
|
|
|
"tags": [
|
|
|
"Ingestion Pipeline Service"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"securityDefinitions": {
|
|
|
"s-auth": {
|
|
|
"type": "oauth2",
|
|
|
"authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth",
|
|
|
"flow": "implicit",
|
|
|
"x-google-issuer": "https://accounts.google.com",
|
|
|
"x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs",
|
|
|
"scopes": {
|
|
|
"email": "default scope"
|
|
|
}
|
|
|
},
|
|
|
"Bearer": {
|
|
|
"type": "apiKey",
|
|
|
"name": "Authorization",
|
|
|
"in": "header"
|
|
|
}
|
|
|
|
|
|
},
|
|
|
"definitions": {
|
|
|
"MainJobStatus": {
|
|
|
"properties": {
|
|
|
"fileName": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"jobId": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"status": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"timestamp": {
|
|
|
"type": "string",
|
|
|
"format": "date-time"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"UploadRequest": {
|
|
|
"required": [
|
|
|
"acls",
|
|
|
"kind",
|
|
|
"legalTags"
|
|
|
|
|
|
],
|
|
|
"properties": {
|
|
|
"acls": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"enrichmentRoutines": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"fileData": {
|
|
|
"type": "string",
|
|
|
"format": "byte"
|
|
|
},
|
|
|
"fileInput": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"fileName": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"filePath": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"ingestorRoutines": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"kind": {
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
"legalTags": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
},
|
|
|
"example": {
|
|
|
"kind": "slb:welldbCMZ:wellbore:1.0.0",
|
|
|
"acl": "{\"acl\":{\"owners\":[\"data.ingestion.test@slb.p4d.cloud.slb-ds.com\"],\"viewers\":[\"data.ingestion.test@slb.p4d.cloud.slb-ds.com\"]}}",
|
|
|
"legaltags": "{\"legal\":{\"legaltags\":[\"slb-CountryIndex\"],\"otherRelevantDataCountries\":[\"US\"]}}",
|
|
|
"filePath": "gs://test-data-p4d-slb/JSON-InputFile.txt",
|
|
|
"fileInput": "filePath",
|
|
|
"ingestorRoutines": "[{\"JSONIngestor\":{\"datasetDescriptor\":\"welldb:dataset_descriptor-1.3\",\"idColumnName\": \"WELL_ID\"}}]"
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"IngestionJob": {
|
|
|
"properties": {
|
|
|
"jobs": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/Job"
|
|
|
}
|
|
|
},
|
|
|
"totalJobs": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"Job": {
|
|
|
"properties": {
|
|
|
"jobId": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"jobStatus": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/JobStatus"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"JobStatus": {
|
|
|
"properties": {
|
|
|
"message": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"status": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"timestamp": {
|
|
|
"type": "string",
|
|
|
"format": "date-time"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"IngestionJobStatus": {
|
|
|
"properties": {
|
|
|
"childJobStatus": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/ChildJobStatus"
|
|
|
}
|
|
|
},
|
|
|
"errors": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
},
|
|
|
"mainJobStatus": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MainJobStatus"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"ChildJobStatus": {
|
|
|
"properties": {
|
|
|
"fileName": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"jobId": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"message": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"status": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"timestamp": {
|
|
|
"type": "string",
|
|
|
"format": "date-time"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"ApiResponse": {
|
|
|
"properties": {
|
|
|
"jobId": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"ApiError": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"code": {
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
"message": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
},
|
|
|
"description": "An error that occurs during normal application logic"
|
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
"tags": [{
|
|
|
"name": "Ingestion Pipeline Service"
|
|
|
}]
|
|
|
} |
|
|
\ No newline at end of file |