Skip to content

Latest commit

 

History

History
280 lines (239 loc) · 18.1 KB

README.md

File metadata and controls

280 lines (239 loc) · 18.1 KB

swagger-client

The ESCO REST API exposes ESCO as a simple, RESTful API.

<a href="esco-api-openapi-v3.yml">Open API v3 definition

This Python package is automatically generated by the Swagger Codegen project:

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import swagger_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

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

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
is_in_scheme = 'is_in_scheme_example' # str | The unique identifier of the requested concept scheme.
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
offset = 0 # int | The offset of the returned resources in the response. Supports paging where the 'offset' specifies the page number (optional) (default to 0)
limit = 20 # int | The maximum number of returned resources in the response. (optional) (default to 20)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get concepts - by Concept Scheme
    api_response = api_instance.get_concept_by_concept_scheme(is_in_scheme, language=language, offset=offset, limit=limit, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->get_concept_by_concept_scheme: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
curie = 'curie_example' # str | The prefix of the provided URIs as parameters. CURIE (or Compact URI) defines a generic, abbreviated syntax for expressing Uniform Resource Identifiers (URIs). (optional)
uris = ['uris_example'] # list[str] | The array of unique identifiers of the requested resources or the array of the end of unique identifiers if CURIE is defined. (optional)
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get concepts - by URIs
    api_response = api_instance.get_concept_by_uri(curie=curie, uris=uris, language=language, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->get_concept_by_uri: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
is_in_scheme = 'is_in_scheme_example' # str | The unique identifier of the requested concept scheme.
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
offset = 0 # int | The offset of the returned resources in the response. Supports paging where the 'offset' specifies the page number (optional) (default to 0)
limit = 20 # int | The maximum number of returned resources in the response. (optional) (default to 20)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get occupations - by Concept Scheme
    api_response = api_instance.get_occupation_by_concept_scheme(is_in_scheme, language=language, offset=offset, limit=limit, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->get_occupation_by_concept_scheme: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
curie = 'curie_example' # str | The prefix of the provided URIs as parameters. CURIE (or Compact URI) defines a generic, abbreviated syntax for expressing Uniform Resource Identifiers (URIs). (optional)
uris = ['uris_example'] # list[str] | The array of unique identifiers of the requested resources or the array of the end of unique identifiers if CURIE is defined. (optional)
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get occupations - by URIs
    api_response = api_instance.get_occupation_by_uri(curie=curie, uris=uris, language=language, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->get_occupation_by_uri: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
is_in_scheme = 'is_in_scheme_example' # str | The unique identifier of the requested concept scheme.
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
offset = 0 # int | The offset of the returned resources in the response. Supports paging where the 'offset' specifies the page number (optional) (default to 0)
limit = 20 # int | The maximum number of returned resources in the response. (optional) (default to 20)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get skills - by Concept Scheme
    api_response = api_instance.get_skill_by_concept_scheme(is_in_scheme, language=language, offset=offset, limit=limit, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->get_skill_by_concept_scheme: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
curie = 'curie_example' # str | The prefix of the provided URIs as parameters. CURIE (or Compact URI) defines a generic, abbreviated syntax for expressing Uniform Resource Identifiers (URIs). (optional)
uris = ['uris_example'] # list[str] | The array of unique identifiers of the requested resources or the array of the end of unique identifiers if CURIE is defined. (optional)
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get skills - by URIs
    api_response = api_instance.get_skill_by_uri(curie=curie, uris=uris, language=language, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->get_skill_by_uri: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
curie = 'curie_example' # str | The prefix of the provided URIs as parameters. CURIE (or Compact URI) defines a generic, abbreviated syntax for expressing Uniform Resource Identifiers (URIs). (optional)
uris = ['uris_example'] # list[str] | The array of unique identifiers of the requested resources or the array of the end of unique identifiers if CURIE is defined. (optional)
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get concept schemes - by URIs
    api_response = api_instance.get_taxonomy_by_uri(curie=curie, uris=uris, language=language, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->get_taxonomy_by_uri: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.BulkOperationApi(swagger_client.ApiClient(configuration))
uri = 'uri_example' # str | The unique identifier of the requested resource
relation = 'relation_example' # str | The relation to get the related resources for. Must be a known relation of the class the resource belongs to.
language = 'language_example' # str | The default language of the returned response. Overwrites the Accept-Language header. (optional)
offset = 0 # int | The offset of the returned resources in the response. Supports paging where the 'offset' specifies the page number (optional) (default to 0)
limit = 20 # int | The maximum number of returned resources in the response. (optional) (default to 20)
full = false # bool | If set to 'true' the full 'HAL' Object representation of each related resource is returned. (optional) (default to false)
selected_version = 'latest' # str | The selected ESCO dataset version. (optional) (default to latest)
view_obsolete = false # bool | If set to 'true', the obsoleted concepts will be returned (optional) (default to false)
accept_language = 'accept_language_example' # str | The default language of the returned response. Optional and might be overwritten by the language request parameter. (optional)

try:
    # Get related resources
    api_response = api_instance.resource_related_get(uri, relation, language=language, offset=offset, limit=limit, full=full, selected_version=selected_version, view_obsolete=view_obsolete, accept_language=accept_language)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling BulkOperationApi->resource_related_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:8082

Class Method HTTP request Description
BulkOperationApi get_concept_by_concept_scheme GET /__rm__3/resource/concept Get concepts - by Concept Scheme
BulkOperationApi get_concept_by_uri GET /__rm__2/resource/concept Get concepts - by URIs
BulkOperationApi get_occupation_by_concept_scheme GET /__rm__3/resource/occupation Get occupations - by Concept Scheme
BulkOperationApi get_occupation_by_uri GET /__rm__2/resource/occupation Get occupations - by URIs
BulkOperationApi get_skill_by_concept_scheme GET /__rm__3/resource/skill Get skills - by Concept Scheme
BulkOperationApi get_skill_by_uri GET /__rm__2/resource/skill Get skills - by URIs
BulkOperationApi get_taxonomy_by_uri GET /__rm__2/resource/taxonomy Get concept schemes - by URIs
BulkOperationApi resource_related_get GET /resource/related Get related resources
HistoryApi conversion_concept_get GET /conversion/concept Get Converted Concept
HistoryApi conversion_occupation_get GET /conversion/occupation Get Converted Occupation
HistoryApi conversion_skill_get GET /conversion/skill Get Converted Skill
HistoryApi history_get GET /history Get history
SearchApi search_get GET /search Full text search - complete mode
SearchApi search_quick_mode GET /__rm__2/search Full text search - quick mode
SearchApi suggest2_get GET /suggest2 Suggest2
SearchApi suggest_get GET /suggest Suggest
SearchApi terms_get GET /terms Terms
SingleConceptApi resource_concept_get GET /resource/concept Get concept
SingleConceptApi resource_occupation_get GET /resource/occupation Get occupation
SingleConceptApi resource_skill_get GET /resource/skill Get skill
SingleConceptApi resource_taxonomy_get GET /resource/taxonomy Get concept scheme

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

[email protected]