Linked Data Import API

ImportJob

getFailedLines

Downloads CSV file with failed RDF lines for the specified job


/linked-data-import/jobs/{jobId}/failed-lines

Usage and SDK Samples

curl -X GET \
 -H "Accept: text/csv" \
 "http://localhost/linked-data-import/jobs/{jobId}/failed-lines"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ImportJobApi;

import java.io.File;
import java.util.*;

public class ImportJobApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ImportJobApi apiInstance = new ImportJobApi();
        Long jobId = 789; // Long | The ID of the Import Job Instance

        try {
            File result = apiInstance.getFailedLines(jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImportJobApi#getFailedLines");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Long jobId = new Long(); // Long | The ID of the Import Job Instance

try {
    final result = await api_instance.getFailedLines(jobId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getFailedLines: $e\n');
}

import org.openapitools.client.api.ImportJobApi;

public class ImportJobApiExample {
    public static void main(String[] args) {
        ImportJobApi apiInstance = new ImportJobApi();
        Long jobId = 789; // Long | The ID of the Import Job Instance

        try {
            File result = apiInstance.getFailedLines(jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImportJobApi#getFailedLines");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ImportJobApi *apiInstance = [[ImportJobApi alloc] init];
Long *jobId = 789; // The ID of the Import Job Instance (default to null)

[apiInstance getFailedLinesWith:jobId
              completionHandler: ^(File output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LinkedDataImportApi = require('linked_data_import_api');

// Create an instance of the API class
var api = new LinkedDataImportApi.ImportJobApi()
var jobId = 789; // {Long} The ID of the Import Job Instance

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFailedLines(jobId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getFailedLinesExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ImportJobApi();
            var jobId = 789;  // Long | The ID of the Import Job Instance (default to null)

            try {
                File result = apiInstance.getFailedLines(jobId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ImportJobApi.getFailedLines: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ImportJobApi();
$jobId = 789; // Long | The ID of the Import Job Instance

try {
    $result = $api_instance->getFailedLines($jobId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImportJobApi->getFailedLines: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ImportJobApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ImportJobApi->new();
my $jobId = 789; # Long | The ID of the Import Job Instance

eval {
    my $result = $api_instance->getFailedLines(jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ImportJobApi->getFailedLines: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ImportJobApi()
jobId = 789 # Long | The ID of the Import Job Instance (default to null)

try:
    api_response = api_instance.get_failed_lines(jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportJobApi->getFailedLines: %s\n" % e)
extern crate ImportJobApi;

pub fn main() {
    let jobId = 789; // Long

    let mut context = ImportJobApi::Context::default();
    let result = client.getFailedLines(jobId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
jobId*
Long (int64)
The ID of the Import Job Instance
Required

Responses

Name Type Format Description
Content-Disposition String Attachment header for file download


getJobInfo

Returns information about Import Job by ID


/linked-data-import/jobs/{jobId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost/linked-data-import/jobs/{jobId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ImportJobApi;

import java.io.File;
import java.util.*;

public class ImportJobApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ImportJobApi apiInstance = new ImportJobApi();
        Long jobId = 789; // Long | The ID of the Import Job Instance

        try {
            jobInfo result = apiInstance.getJobInfo(jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImportJobApi#getJobInfo");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Long jobId = new Long(); // Long | The ID of the Import Job Instance

try {
    final result = await api_instance.getJobInfo(jobId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getJobInfo: $e\n');
}

import org.openapitools.client.api.ImportJobApi;

public class ImportJobApiExample {
    public static void main(String[] args) {
        ImportJobApi apiInstance = new ImportJobApi();
        Long jobId = 789; // Long | The ID of the Import Job Instance

        try {
            jobInfo result = apiInstance.getJobInfo(jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImportJobApi#getJobInfo");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ImportJobApi *apiInstance = [[ImportJobApi alloc] init];
Long *jobId = 789; // The ID of the Import Job Instance (default to null)

[apiInstance getJobInfoWith:jobId
              completionHandler: ^(jobInfo output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LinkedDataImportApi = require('linked_data_import_api');

// Create an instance of the API class
var api = new LinkedDataImportApi.ImportJobApi()
var jobId = 789; // {Long} The ID of the Import Job Instance

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getJobInfo(jobId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getJobInfoExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ImportJobApi();
            var jobId = 789;  // Long | The ID of the Import Job Instance (default to null)

            try {
                jobInfo result = apiInstance.getJobInfo(jobId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ImportJobApi.getJobInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ImportJobApi();
$jobId = 789; // Long | The ID of the Import Job Instance

try {
    $result = $api_instance->getJobInfo($jobId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImportJobApi->getJobInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ImportJobApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ImportJobApi->new();
my $jobId = 789; # Long | The ID of the Import Job Instance

eval {
    my $result = $api_instance->getJobInfo(jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ImportJobApi->getJobInfo: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ImportJobApi()
jobId = 789 # Long | The ID of the Import Job Instance (default to null)

try:
    api_response = api_instance.get_job_info(jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportJobApi->getJobInfo: %s\n" % e)
extern crate ImportJobApi;

pub fn main() {
    let jobId = 789; // Long

    let mut context = ImportJobApi::Context::default();
    let result = client.getJobInfo(jobId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
jobId*
Long (int64)
The ID of the Import Job Instance
Required

Responses


ImportStart

startImport

Starts the process of Linked Data Import and returns ID of Import Job Instance


/linked-data-import/start

Usage and SDK Samples

curl -X POST \
 -H "Accept: text/plain" \
 "http://localhost/linked-data-import/start?fileUrl=fileUrl_example&contentType=contentType_example&defaultWorkType="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ImportStartApi;

import java.io.File;
import java.util.*;

public class ImportStartApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        ImportStartApi apiInstance = new ImportStartApi();
        String fileUrl = fileUrl_example; // String | The URL of the file to be imported from S3
        String contentType = contentType_example; // String | Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
        DefaultWorkType defaultWorkType = ; // DefaultWorkType | Default Work extra type - MONOGRAPH or SERIAL

        try {
            'String' result = apiInstance.startImport(fileUrl, contentType, defaultWorkType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImportStartApi#startImport");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String fileUrl = new String(); // String | The URL of the file to be imported from S3
final String contentType = new String(); // String | Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
final DefaultWorkType defaultWorkType = new DefaultWorkType(); // DefaultWorkType | Default Work extra type - MONOGRAPH or SERIAL

try {
    final result = await api_instance.startImport(fileUrl, contentType, defaultWorkType);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->startImport: $e\n');
}

import org.openapitools.client.api.ImportStartApi;

public class ImportStartApiExample {
    public static void main(String[] args) {
        ImportStartApi apiInstance = new ImportStartApi();
        String fileUrl = fileUrl_example; // String | The URL of the file to be imported from S3
        String contentType = contentType_example; // String | Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
        DefaultWorkType defaultWorkType = ; // DefaultWorkType | Default Work extra type - MONOGRAPH or SERIAL

        try {
            'String' result = apiInstance.startImport(fileUrl, contentType, defaultWorkType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ImportStartApi#startImport");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
ImportStartApi *apiInstance = [[ImportStartApi alloc] init];
String *fileUrl = fileUrl_example; // The URL of the file to be imported from S3 (default to null)
String *contentType = contentType_example; // Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default. (optional) (default to null)
DefaultWorkType *defaultWorkType = ; // Default Work extra type - MONOGRAPH or SERIAL (optional) (default to null)

[apiInstance startImportWith:fileUrl
    contentType:contentType
    defaultWorkType:defaultWorkType
              completionHandler: ^('String' output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var LinkedDataImportApi = require('linked_data_import_api');

// Create an instance of the API class
var api = new LinkedDataImportApi.ImportStartApi()
var fileUrl = fileUrl_example; // {String} The URL of the file to be imported from S3
var opts = {
  'contentType': contentType_example, // {String} Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
  'defaultWorkType':  // {DefaultWorkType} Default Work extra type - MONOGRAPH or SERIAL
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.startImport(fileUrl, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class startImportExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new ImportStartApi();
            var fileUrl = fileUrl_example;  // String | The URL of the file to be imported from S3 (default to null)
            var contentType = contentType_example;  // String | Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default. (optional)  (default to null)
            var defaultWorkType = new DefaultWorkType(); // DefaultWorkType | Default Work extra type - MONOGRAPH or SERIAL (optional)  (default to null)

            try {
                'String' result = apiInstance.startImport(fileUrl, contentType, defaultWorkType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ImportStartApi.startImport: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ImportStartApi();
$fileUrl = fileUrl_example; // String | The URL of the file to be imported from S3
$contentType = contentType_example; // String | Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
$defaultWorkType = ; // DefaultWorkType | Default Work extra type - MONOGRAPH or SERIAL

try {
    $result = $api_instance->startImport($fileUrl, $contentType, $defaultWorkType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImportStartApi->startImport: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ImportStartApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ImportStartApi->new();
my $fileUrl = fileUrl_example; # String | The URL of the file to be imported from S3
my $contentType = contentType_example; # String | Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
my $defaultWorkType = ; # DefaultWorkType | Default Work extra type - MONOGRAPH or SERIAL

eval {
    my $result = $api_instance->startImport(fileUrl => $fileUrl, contentType => $contentType, defaultWorkType => $defaultWorkType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ImportStartApi->startImport: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.ImportStartApi()
fileUrl = fileUrl_example # String | The URL of the file to be imported from S3 (default to null)
contentType = contentType_example # String | Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default. (optional) (default to null)
defaultWorkType =  # DefaultWorkType | Default Work extra type - MONOGRAPH or SERIAL (optional) (default to null)

try:
    api_response = api_instance.start_import(fileUrl, contentType=contentType, defaultWorkType=defaultWorkType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ImportStartApi->startImport: %s\n" % e)
extern crate ImportStartApi;

pub fn main() {
    let fileUrl = fileUrl_example; // String
    let contentType = contentType_example; // String
    let defaultWorkType = ; // DefaultWorkType

    let mut context = ImportStartApi::Context::default();
    let result = client.startImport(fileUrl, contentType, defaultWorkType, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
fileUrl*
String
The URL of the file to be imported from S3
Required
contentType
String
Content type of the file to be imported (e.g., application/ld+json, text/turtle). JSON by default.
defaultWorkType
DefaultWorkType
Default Work extra type - MONOGRAPH or SERIAL

Responses