Skip to content

Latest commit

 

History

History
327 lines (220 loc) · 9.61 KB

DatasetApi.md

File metadata and controls

327 lines (220 loc) · 9.61 KB

wordlift_client.DatasetApi

All URIs are relative to https://api.wordlift.io

Method HTTP request Description
create_or_update_entities1 POST /dataset/batch Create or update many
create_or_update_entity POST /dataset Create or update one
delete_all_entities DELETE /dataset/all Delete all
delete_entity DELETE /dataset Delete one

create_or_update_entities1

object create_or_update_entities1(batch_request)

Create or update many

Create or update many entities in the Knowledge Graph.

Example

  • Api Key Authentication (ApiKey):
import wordlift_client
from wordlift_client.models.batch_request import BatchRequest
from wordlift_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wordlift.io
# See configuration.py for a list of all supported configuration parameters.
configuration = wordlift_client.Configuration(
    host = "https://api.wordlift.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
async with wordlift_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wordlift_client.DatasetApi(api_client)
    batch_request = [wordlift_client.BatchRequest()] # List[BatchRequest] | 

    try:
        # Create or update many
        api_response = await api_instance.create_or_update_entities1(batch_request)
        print("The response of DatasetApi->create_or_update_entities1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DatasetApi->create_or_update_entities1: %s\n" % e)

Parameters

Name Type Description Notes
batch_request List[BatchRequest]

Return type

object

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success -
401 Authentication Failure -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_or_update_entity

create_or_update_entity(uri, body, private=private)

Create or update one

Create or update an entity in the Knowledge Graph.

Example

  • Api Key Authentication (ApiKey):
import wordlift_client
from wordlift_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wordlift.io
# See configuration.py for a list of all supported configuration parameters.
configuration = wordlift_client.Configuration(
    host = "https://api.wordlift.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
async with wordlift_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wordlift_client.DatasetApi(api_client)
    uri = 'uri_example' # str | The entity's URI
    body = 'body_example' # str | 
    private = True # bool | Whether the entity should be hidden from Linked Data and GraphQL (optional) (default to True)

    try:
        # Create or update one
        await api_instance.create_or_update_entity(uri, body, private=private)
    except Exception as e:
        print("Exception when calling DatasetApi->create_or_update_entity: %s\n" % e)

Parameters

Name Type Description Notes
uri str The entity's URI
body str
private bool Whether the entity should be hidden from Linked Data and GraphQL [optional] [default to True]

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/ld+json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -
401 Authentication Failure -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_all_entities

delete_all_entities()

Delete all

Delete all the entities in the Knowledge Graph.

Example

  • Api Key Authentication (ApiKey):
import wordlift_client
from wordlift_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wordlift.io
# See configuration.py for a list of all supported configuration parameters.
configuration = wordlift_client.Configuration(
    host = "https://api.wordlift.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
async with wordlift_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wordlift_client.DatasetApi(api_client)

    try:
        # Delete all
        await api_instance.delete_all_entities()
    except Exception as e:
        print("Exception when calling DatasetApi->delete_all_entities: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -
401 Authentication Failure -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_entity

delete_entity(uri)

Delete one

Delete an entity from the Knowledge Graph.

Example

  • Api Key Authentication (ApiKey):
import wordlift_client
from wordlift_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.wordlift.io
# See configuration.py for a list of all supported configuration parameters.
configuration = wordlift_client.Configuration(
    host = "https://api.wordlift.io"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
async with wordlift_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = wordlift_client.DatasetApi(api_client)
    uri = 'uri_example' # str | The URI of the entity to delete.

    try:
        # Delete one
        await api_instance.delete_entity(uri)
    except Exception as e:
        print("Exception when calling DatasetApi->delete_entity: %s\n" % e)

Parameters

Name Type Description Notes
uri str The URI of the entity to delete.

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -
401 Authentication Failure -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]