Skip to content

Latest commit

 

History

History
118 lines (80 loc) · 4.91 KB

File metadata and controls

118 lines (80 loc) · 4.91 KB

swagger_client.TypesApi

All URIs are relative to http://orion.lab.fiware.org:1026/v2

Method HTTP request Description
retrieve_entity_type GET /types/{entityType}
retrieve_entity_types GET /types/

retrieve_entity_type

EntityType retrieve_entity_type(entity_type)

This operation returns a JSON object with information about the type: * attrs : the set of attribute names along with all the entities of such type, represented in a JSON object whose keys are the attribute names and whose values contain information of such attributes (in particular a list of the types used by attributes with that name along with all the entities). * count : the number of entities belonging to that type. Response code: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on "Error Responses" for more details.

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: fiware_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TypesApi()
entity_type = 'entity_type_example' # str | Entity Type

try: 
    api_response = api_instance.retrieve_entity_type(entity_type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TypesApi->retrieve_entity_type: %s\n" % e)

Parameters

Name Type Description Notes
entity_type str Entity Type

Return type

EntityType

Authorization

fiware_token

HTTP request headers

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

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

retrieve_entity_types

list[EntityType] retrieve_entity_types(limit=limit, offset=offset, options=options)

If the values option is not in use, this operation returns a JSON array with the entity types. Each element is a JSON object with information about the type: * type : the entity type name. * attrs : the set of attribute names along with all the entities of such type, represented in a JSON object whose keys are the attribute names and whose values contain information of such attributes (in particular a list of the types used by attributes with that name along with all the entities). * count : the number of entities belonging to that type. If the values option is used, the operation returns a JSON array with a list of entity type names as strings. Results are ordered by entity type in alphabetical order. Response code: * Successful operation uses 200 OK * Errors use a non-2xx and (optionally) an error payload. See subsection on "Error Responses" for more details.

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: fiware_token
swagger_client.configuration.api_key['X-Auth-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.TypesApi()
limit = 1.2 # float | Limit the number of types to be retrieved. (optional)
offset = 1.2 # float | Skip a number of records. (optional)
options = 'options_example' # str | Options dictionary. (optional)

try: 
    api_response = api_instance.retrieve_entity_types(limit=limit, offset=offset, options=options)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TypesApi->retrieve_entity_types: %s\n" % e)

Parameters

Name Type Description Notes
limit float Limit the number of types to be retrieved. [optional]
offset float Skip a number of records. [optional]
options str Options dictionary. [optional]

Return type

list[EntityType]

Authorization

fiware_token

HTTP request headers

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

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