You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importngsi_ld_clientfromngsi_ld_client.apiimportbatch_operations_apifromngsi_ld_client.model.entity_listimportEntityListfromngsi_ld_client.model.problem_detailsimportProblemDetailsfromngsi_ld_client.model.batch_operation_resultimportBatchOperationResultfrompprintimportpprint# Defining the host is optional and defaults to http://localhost# See configuration.py for a list of all supported configuration parameters.configuration=ngsi_ld_client.Configuration(
host="http://localhost"
)
# Enter a context with an instance of the API clientwithngsi_ld_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=batch_operations_api.BatchOperationsApi(api_client)
# example passing only required values which don't have defaults setbody=EntityList([
Entity(None)
])
try:
api_response=api_instance.batch_entity_creation(
body=body,
)
pprint(api_response)
exceptngsi_ld_client.ApiExceptionase:
print("Exception when calling BatchOperationsApi->batch_entity_creation: %s\n"%e)
Selects the schema and serialization of the request body
accept_content_types
typing.Tuple[str]
default is ('application/json', 'application/ld+json', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
importngsi_ld_clientfromngsi_ld_client.apiimportbatch_operations_apifromngsi_ld_client.model.problem_detailsimportProblemDetailsfromngsi_ld_client.model.batch_operation_resultimportBatchOperationResultfrompprintimportpprint# Defining the host is optional and defaults to http://localhost# See configuration.py for a list of all supported configuration parameters.configuration=ngsi_ld_client.Configuration(
host="http://localhost"
)
# Enter a context with an instance of the API clientwithngsi_ld_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=batch_operations_api.BatchOperationsApi(api_client)
# example passing only required values which don't have defaults setbody= [
"request_body_example"
]
try:
api_response=api_instance.batch_entity_delete(
body=body,
)
pprint(api_response)
exceptngsi_ld_client.ApiExceptionase:
print("Exception when calling BatchOperationsApi->batch_entity_delete: %s\n"%e)
Selects the schema and serialization of the request body
accept_content_types
typing.Tuple[str]
default is ('application/json', 'application/ld+json', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
body
SchemaForRequestBodyApplicationJson
Type
Description
Notes
[str]
SchemaForRequestBodyApplicationLdjson
Type
Description
Notes
[str]
Return Types, Responses
Code
Class
Description
n/a
api_client.ApiResponseWithoutDeserialization
When skip_deserialization is True this response is returned
importngsi_ld_clientfromngsi_ld_client.apiimportbatch_operations_apifromngsi_ld_client.model.entity_listimportEntityListfromngsi_ld_client.model.problem_detailsimportProblemDetailsfromngsi_ld_client.model.batch_operation_resultimportBatchOperationResultfrompprintimportpprint# Defining the host is optional and defaults to http://localhost# See configuration.py for a list of all supported configuration parameters.configuration=ngsi_ld_client.Configuration(
host="http://localhost"
)
# Enter a context with an instance of the API clientwithngsi_ld_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=batch_operations_api.BatchOperationsApi(api_client)
# example passing only required values which don't have defaults setquery_params= {
}
body=EntityList([
Entity(None)
])
try:
api_response=api_instance.batch_entity_update(
query_params=query_params,
body=body,
)
pprint(api_response)
exceptngsi_ld_client.ApiExceptionase:
print("Exception when calling BatchOperationsApi->batch_entity_update: %s\n"%e)
# example passing only optional valuesquery_params= {
'options': "noOverwrite",
}
body=EntityList([
Entity(None)
])
try:
api_response=api_instance.batch_entity_update(
query_params=query_params,
body=body,
)
pprint(api_response)
exceptngsi_ld_client.ApiExceptionase:
print("Exception when calling BatchOperationsApi->batch_entity_update: %s\n"%e)
Selects the schema and serialization of the request body
accept_content_types
typing.Tuple[str]
default is ('application/json', 'application/ld+json', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned
importngsi_ld_clientfromngsi_ld_client.apiimportbatch_operations_apifromngsi_ld_client.model.entity_listimportEntityListfromngsi_ld_client.model.problem_detailsimportProblemDetailsfromngsi_ld_client.model.batch_operation_resultimportBatchOperationResultfrompprintimportpprint# Defining the host is optional and defaults to http://localhost# See configuration.py for a list of all supported configuration parameters.configuration=ngsi_ld_client.Configuration(
host="http://localhost"
)
# Enter a context with an instance of the API clientwithngsi_ld_client.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=batch_operations_api.BatchOperationsApi(api_client)
# example passing only required values which don't have defaults setquery_params= {
}
body=EntityList([
Entity(None)
])
try:
api_response=api_instance.batch_entity_upsert(
query_params=query_params,
body=body,
)
pprint(api_response)
exceptngsi_ld_client.ApiExceptionase:
print("Exception when calling BatchOperationsApi->batch_entity_upsert: %s\n"%e)
# example passing only optional valuesquery_params= {
'options': "replace",
}
body=EntityList([
Entity(None)
])
try:
api_response=api_instance.batch_entity_upsert(
query_params=query_params,
body=body,
)
pprint(api_response)
exceptngsi_ld_client.ApiExceptionase:
print("Exception when calling BatchOperationsApi->batch_entity_upsert: %s\n"%e)
Selects the schema and serialization of the request body
accept_content_types
typing.Tuple[str]
default is ('application/json', 'application/ld+json', )
Tells the server the content type(s) that are accepted by the client
stream
bool
default is False
if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout
typing.Optional[typing.Union[int, typing.Tuple]]
default is None
the timeout used by the rest client
skip_deserialization
bool
default is False
when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned