该Laserfiche API SDK由Swagger-Codegen V3自动生成。
您可以在此处找到此项目的PYPI页面。
Laserfiche API已构建可与OpenAPI 3.0.0合作。因此,必须使用Swagger-Codegen V3。
API_GEN文件夹下的api_gen.sh脚本将旋转运行swagger-codegen-cli-v3 Docker容器,并将laserfiche_api SDK导出到具有相同名称的文件夹。
如果将所得的SDK文件推到自己的PYPI存储库中,则可以安装:
pip install laserfiche-api您也可以通过setuptools手动安装:
python setup.py install --user以下文档是由Swagger-Codegen自动生成的。
欢迎来到Laserfiche API Swagger游乐场。您可以尝试针对您的Live Laserfiche Cloud帐户的任何API调用。请访问开发者中心以获取更多详细信息:<a href =“ https://developer.laserfiche.com ”> https://developer.laserfiche.com
访问更改列表的变更列表:<a href =“/repository/v2/changelog”>/repository/v2/changelog
构建#: 41A7347C0662989661D7AB8105A70D36CB42518E_.20240124.4
此Python软件包将由Swagger Codegen Project自动生成:
Python 2.7和3.4+
如果Python软件包是在GitHub上托管的,则可以直接从GitHub安装
pip install git+https://github.com/Layer8Err/laserfiche_api.git (您可能需要使用root权限运行pip : sudo pip install git+https://github.com/Layer8Err/laserfiche_api.git )
然后导入包:
import laserfiche_api 通过setuptools安装。
python setup.py install --user (或sudo python setup.py install以安装所有用户的软件包)
然后导入包:
import laserfiche_api 请遵循安装步骤,然后运行以下内容:
from __future__ import print_function
import time
import laserfiche_api
from laserfiche_api . rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: OAuth2 Authorization Code Flow
configuration = laserfiche_api . Configuration ()
configuration . access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = laserfiche_api . AttributesApi ( laserfiche_api . ApiClient ( configuration ))
repository_id = 'repository_id_example' # str | The requested repository ID.
attribute_key = 'attribute_key_example' # str | The requested attribute key.
everyone = false # bool | Indicates if attributes associated with the "Everyone" group or the currently authenticated user is returned. The default value is false. (optional) (default to false)
try :
# Returns an attribute object associated with the authenticated user.
api_response = api_instance . get_attribute ( repository_id , attribute_key , everyone = everyone )
pprint ( api_response )
except ApiException as e :
print ( "Exception when calling AttributesApi->get_attribute: %s n " % e )
# Configure OAuth2 access token for authorization: OAuth2 Authorization Code Flow
configuration = laserfiche_api . Configuration ()
configuration . access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = laserfiche_api . AttributesApi ( laserfiche_api . ApiClient ( configuration ))
repository_id = 'repository_id_example' # str | The requested repository ID.
everyone = false # bool | Indicates if attributes associated with the "Everyone" group or the currently authenticated user is returned. The default value is false. (optional) (default to false)
prefer = 'prefer_example' # str | An optional OData header. Can be used to set the maximum page size using odata.maxpagesize. (optional)
select = 'select_example' # str | Limits the properties returned in the result. (optional)
orderby = 'orderby_example' # str | Specifies the order in which items are returned. The maximum number of expressions is 5. (optional)
top = 56 # int | Limits the number of items returned from a collection. (optional)
skip = 56 # int | Excludes the specified number of items of the queried collection from the result. (optional)
count = true # bool | Indicates whether the total count of items within a collection are returned in the result. (optional)
try :
# Returns the attribute key value pairs associated with the authenticated user.
api_response = api_instance . list_attributes ( repository_id , everyone = everyone , prefer = prefer , select = select , orderby = orderby , top = top , skip = skip , count = count )
pprint ( api_response )
except ApiException as e :
print ( "Exception when calling AttributesApi->list_attributes: %s n " % e )所有URI都相对于https://api.laserfiche.com/repository
| 班级 | 方法 | HTTP请求 | 描述 |
|---|---|---|---|
| 属性 | get_attribute | get /v2/repositories/{repositoryId}/attributes/{attributekey} | 返回与身份验证的用户关联的属性对象。 |
| 属性 | list_attributes | get /v2/repositories/{repositoryId}/属性 | 返回与身份验证的用户关联的属性键值对。 |
| Auditreaconapi | list_audit_reasons | get /v2/repositories/{repositoryId}/审核季节 | 返回与身份验证的用户相关的审计原因。 |
| Entriesapi | copy_entry | post /v2/repositories/{repositorityId}/entries/{entryid}/folder/copy | 在文件夹中复制新的孩子条目。 |
| Entriesapi | create_entry | post /v2/repositories/{repositoryId}/entries/{entryid}/folder/children | 在文件夹中创建一个新的孩子条目。 |
| Entriesapi | create_multipart_upload_urls | post /v2/repositories/{repositoryId}/entries/createmultipartuploadurls | 请求上传URL以将大文件上传到块中。 |
| Entriesapi | delete_electronic_document | delete /v2/repositories/{repositoryId}/entries/{entryId}/document/edoc | 删除与条目关联的EDOC。 |
| Entriesapi | delete_pages | delete /v2/repositories/{repositoryId}/entries/{entryId}/document/peg | 删除与条目关联的页面。 |
| Entriesapi | export_entry | post /v2/repositories/{repositorityId}/entries/{entryid}/export | 导出条目。 |
| Entriesapi | get_entry | get /v2/repositories/{repositoryId}/entries/{entryid} | 返回单个入口对象。 |
| Entriesapi | get_entry_by_path | get /v2/repositories/{repositoryId}/entries/bypath | 使用条目路径返回单个入口对象。 |
| Entriesapi | import_entry | post /v2/repositories/{repositoryId}/entries/{entryid}/folder/import | 将文件导入文件夹(最大长度:100 MB)。 |
| Entriesapi | list_dynamic_field_values | post /v2/repositories/{repositoryId}/entries/{entriD}/fields/getdynamicfieldlogicvalue | 返回分配给条目的动态字段逻辑值。 |
| Entriesapi | List_entries | get /v2/repositories/{repositorityId}/entries/{entryid}/folder/children | 返回文件夹的儿童条目。 |
| Entriesapi | List_fields | get /v2/repositories/{repositoryId}/entries/{entryId}/fields | 返回分配给条目的字段。 |
| Entriesapi | list_links | get /v2/repositories/{repositoryId}/entries/{entryId}/链接 | 返回分配给条目的链接。 |
| Entriesapi | list_tags | get /v2/repositories/{repositoryId}/entries/{entryId}/tags | 返回分配给条目的标签。 |
| Entriesapi | remove_template | delete /v2/repositories/{repositoryId}/entries/{entryId}/template | 从条目中删除当前分配的模板。 |
| Entriesapi | set_fields | put /v2/repositories/{repositorityId}/entries/{entryId}/fields | 更新分配给条目的字段值。 |
| Entriesapi | set_links | put /v2/repositories/{repositoryId}/entries/{entryId}/链接 | 分配链接到条目。 |
| Entriesapi | set_tags | put /v2/repositories/{repositoryId}/entries/{entryId}/tags | 将标签分配给条目。 |
| Entriesapi | set_template | put /v2/repositories/{repositoryId}/entries/{entryId}/template | 将模板分配给条目。 |
| Entriesapi | start_copy_entry | post /v2/repositories/{repositorityId}/entries/{entryId}/folder/copyAsync | 启动异步复制任务,将条目复制到文件夹中。 |
| Entriesapi | start_delete_entry | delete /v2/repositories/{repositoryId}/entries/{entryid} | 启动异步删除任务以删除条目。 |
| Entriesapi | start_export_entry | post /v2/repositories/{repositoryId}/entries/{entryId}/exportAsync | 启动异步导出任务以导出条目。 |
| Entriesapi | start_import_uploaded_parts | post /v2/repositories/{repositorityId}/entries/{entryId}/folder/importUploadedParts | 启动异步导入任务,将文档导入文件夹。 |
| Entriesapi | update_entry | patch /v2/repositories/{repositoryId}/entries/{entryid} | 更新条目。 (移动和/或重命名) |
| fieldDefinitionSAPI | get_field_definition | get /v2/repositories/{repositoryId}/fieldDefinitions/{fieldID} | 返回单个字段定义对象。 |
| fieldDefinitionSAPI | List_field_definitions | get /v2/repositories/{repositoryId}/fieldDefinitions | 返回存储库中可用的字段定义的分页列表。 |
| LinkDefinitionSAPI | get_link_definition | get /v2/repositories/{repositoryId}/linkdefinitions/{linkDefinitionId} | 返回一个链接定义对象。 |
| LinkDefinitionSAPI | list_link_definitions | get /v2/repositories/{repositoryId}/linkDefinitions | 返回与存储库关联的链接定义。 |
| 存储库 | list_repositories | 获取/V2 /存储库 | 返回用户可访问的存储库列表。 |
| searchesapi | list_search_context_hits | get /v2/repositories/{repositoryId}/searches/{taskId}/resuct/{rownumber}/contexthits | 返回与搜索结果条目关联的上下文命中。 |
| searchesapi | list_search_results | get /v2/repositories/{repositoryId}/searches/{taskID}/结果 | 返回与搜索任务关联的结果列表。 |
| searchesapi | start_search_entry | post /v2/repositories/{repositoryId}/searches/searchAsync | 启动异步搜索任务。 |
| Simplesearchesapi | search_entry | post /v2/repositories/{repositoryId}/simplesearch | 运行a'搜索操作。 |
| tagdefinitionsapi | get_tag_definition | get /v2/repositories/{repositoryId}/tagdefinitions/{tagid} | 返回单个标签定义对象。 |
| tagdefinitionsapi | list_tag_definitions | get /v2/repositories/{repositoryId}/tagdefinitions | 返回与存储库关联的标签定义。 |
| Tasksapi | cancel_tasks | delete /v2/repositories/{repositoryId}/任务 | 启动一组或多项任务的取消。 |
| Tasksapi | list_tasks | get /v2/repositories/{repositorityId}/任务 | 返回一组或多项任务的状态。 |
| TemplatedEfinitionSAPI | get_template_definition | get /v2/repositories/{repositoryId}/templatedFinitions/{templateID} | 返回单个模板定义对象。 |
| TemplatedEfinitionSAPI | list_template_definitions | get /v2/repositories/{repositoryId}/templatedFinitions | 返回与存储库关联的模板定义。 |
| TemplatedEfinitionSAPI | list_template_field_definitions_by_template_id | get /v2/repositories/{repositoryId}/templatedFinitions/{templateID}/fieldDefinitions | 返回分配给模板定义的字段定义(通过模板定义ID)。 |
| TemplatedEfinitionSAPI | list_template_field_definitions_by_template_name | get /v2/repositories/{repositorityId}/templatedFinitions/fieldDefinitions | 返回分配给模板定义的字段定义(通过模板定义名称)。 |