",
- "version": "1"
+ "description": "Welcome to the Laserfiche API Swagger Playground. You can try out any of our API calls against your live Laserfiche Cloud account. Visit the developer center for more details: https://developer.laserfiche.com
",
+ "version": "2"
},
"servers": [
{
@@ -12,17 +12,17 @@
}
],
"paths": {
- "/v1/Repositories/{repoId}/Entries/{parentEntryId}/{fileName}": {
- "post": {
+ "/v2/Repositories/{repositoryId}/Attributes": {
+ "get": {
"tags": [
- "Entries"
+ "Attributes"
],
- "summary": "Creates a new document in a folder.",
- "description": "- Creates a new document in the specified folder with file (no more than 100 MB).\n- Optionally sets metadata and electronic document component.\n- Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed. With this route, partial success is possible. The response returns multiple operation (entryCreate operation, setEdoc operation, setLinks operation, etc..) objects, which contain information about any errors that may have occurred during the creation. As long as the entryCreate operation succeeds, the entry will be created, even if all other operations fail.",
- "operationId": "ImportDocument",
+ "summary": "Returns the attribute key value pairs associated with the authenticated user.",
+ "description": "- Returns the attribute key value pairs associated with the authenticated user. Alternatively, return only the attribute key value pairs that are associated with the \"Everyone\" group.\n- Attribute keys can be used with subsequent calls to get specific attribute values.\n- Optional query parameters: everyone (bool, default false). When true, this route does not return the attributes that are tied to the currently authenticated user, but rather the attributes assigned to the \"Everyone\" group. Note when this is true, the response does not include both the \"Everyone\" groups attribute and the currently authenticated user, but only the \"Everyone\" groups.\n- Default page size: 100. Allowed OData query options: Select, Count, OrderBy, Skip, Top, SkipToken, Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListAttributes",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -32,72 +32,83 @@
"x-position": 1
},
{
- "name": "parentEntryId",
- "in": "path",
- "required": true,
- "description": "The entry ID of the folder that the document will be created in.",
+ "name": "everyone",
+ "in": "query",
+ "description": "Indicates if attributes associated with the \"Everyone\" group or the currently authenticated user is returned. The default value is false.",
"schema": {
- "type": "integer",
- "format": "int32"
+ "type": "boolean",
+ "default": false
},
"x-position": 2
},
{
- "name": "fileName",
- "in": "path",
- "required": true,
- "description": "The created document's file name.",
+ "name": "Prefer",
+ "x-originalName": "prefer",
+ "in": "header",
+ "description": "An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.",
"schema": {
- "type": "string"
+ "type": "string",
+ "nullable": true
},
"x-position": 3
},
{
- "name": "autoRename",
+ "name": "$select",
"in": "query",
- "description": "An optional query parameter used to indicate if the new document should be automatically\n renamed if an entry already exists with the given name in the folder. The default value is false.",
+ "description": "Limits the properties returned in the result.",
"schema": {
- "type": "boolean"
+ "type": "string",
+ "nullable": true
},
"x-position": 4
},
{
- "name": "culture",
+ "name": "$orderby",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used.\n The value should be a standard language tag. This may be used when setting field values with tokens.",
+ "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
"schema": {
"type": "string",
- "default": "",
"nullable": true
},
- "x-position": 5
+ "x-position": 6
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "Limits the number of items returned from a collection.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 7
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "Excludes the specified number of items of the queried collection from the result.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 8
+ },
+ {
+ "name": "$count",
+ "in": "query",
+ "description": "Indicates whether the total count of items within a collection are returned in the result.",
+ "schema": {
+ "type": "boolean"
+ },
+ "x-position": 9
}
],
- "requestBody": {
- "content": {
- "multipart/form-data": {
- "schema": {
- "type": "object",
- "properties": {
- "electronicDocument": {
- "type": "string",
- "format": "binary"
- },
- "request": {
- "$ref": "#/components/schemas/PostEntryWithEdocMetadataRequest"
- }
- }
- }
- }
- }
- },
"responses": {
- "201": {
- "description": "Document creation is success.",
+ "200": {
+ "description": "A collection of attributes associated with the authenticated user.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateEntryResult"
+ "$ref": "#/components/schemas/AttributeCollectionResponse"
}
}
}
@@ -107,7 +118,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateEntryResult"
+ "$ref": "#/components/schemas/ProblemDetails"
}
}
}
@@ -133,27 +144,7 @@
}
},
"404": {
- "description": "Parent entry is not found.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateEntryResult"
- }
- }
- }
- },
- "409": {
- "description": "Document creation is partial success.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateEntryResult"
- }
- }
- }
- },
- "413": {
- "description": "Request is too large.",
+ "description": "Not found.",
"content": {
"application/json": {
"schema": {
@@ -171,31 +162,21 @@
}
}
}
- },
- "500": {
- "description": "Document creation is complete failure.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateEntryResult"
- }
- }
- }
}
}
}
},
- "/v1/Repositories/{repoId}/Attributes": {
+ "/v2/Repositories/{repositoryId}/Attributes/{attributeKey}": {
"get": {
"tags": [
"Attributes"
],
- "summary": "Returns the attribute key value pairs associated with the authenticated user.",
- "description": "- Returns the attribute key value pairs associated with the authenticated user. Alternatively, return only the attribute key value pairs that are associated with the \"Everyone\" group.\n- Attribute keys can be used with subsequent calls to get specific attribute values.\n- Default page size: 100. Allowed OData query options: Select, Count, OrderBy, Skip, Top, SkipToken, Prefer. Optional query parameters: everyone (bool, default false). When true, this route does not return the attributes that are tied to the currently authenticated user, but rather the attributes assigned to the \"Everyone\" group. Note when this is true, the response does not include both the \"Everyone\" groups attribute and the currently authenticated user, but only the \"Everyone\" groups.",
- "operationId": "GetTrusteeAttributeKeyValuePairs",
+ "summary": "Returns an attribute object associated with the authenticated user.",
+ "description": "- Returns the attribute associated with the key. Alternatively, return the attribute associated with the key within \"Everyone\" group.\n- Optional query parameters: everyone (bool, default false). When true, the server only searches for the attribute value with the given key upon the authenticated users attributes. If false, only the authenticated users attributes will be queried.\n- Required OAuth scope: repository.Read",
+ "operationId": "GetAttribute",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -205,82 +186,33 @@
"x-position": 1
},
{
- "name": "everyone",
- "in": "query",
- "description": "Boolean value that indicates whether to return attributes key value pairs associated with everyone or the currently authenticated user.",
+ "name": "attributeKey",
+ "in": "path",
+ "required": true,
+ "description": "The requested attribute key.",
"schema": {
- "type": "boolean"
+ "type": "string"
},
"x-position": 2
},
{
- "name": "Prefer",
- "x-originalName": "prefer",
- "in": "header",
- "description": "An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 3
- },
- {
- "name": "$select",
- "in": "query",
- "description": "Limits the properties returned in the result.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 4
- },
- {
- "name": "$orderby",
- "in": "query",
- "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 6
- },
- {
- "name": "$top",
- "in": "query",
- "description": "Limits the number of items returned from a collection.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 7
- },
- {
- "name": "$skip",
- "in": "query",
- "description": "Excludes the specified number of items of the queried collection from the result.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 8
- },
- {
- "name": "$count",
+ "name": "everyone",
"in": "query",
- "description": "Indicates whether the total count of items within a collection are returned in the result.",
+ "description": "Indicates if attributes associated with the \"Everyone\" group or the currently authenticated user is returned. The default value is false.",
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "default": false
},
- "x-position": 9
+ "x-position": 3
}
],
"responses": {
"200": {
- "description": "Get trustee attribute key value pairs successfully.",
+ "description": "A single attribute associated with the authenticated user.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfListOfAttribute"
+ "$ref": "#/components/schemas/Attribute"
}
}
}
@@ -316,7 +248,7 @@
}
},
"404": {
- "description": "Not found.",
+ "description": "Requested attribute key not found.",
"content": {
"application/json": {
"schema": {
@@ -338,17 +270,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Attributes/{attributeKey}": {
+ "/v2/Repositories/{repositoryId}/AuditReasons": {
"get": {
"tags": [
- "Attributes"
+ "AuditReasons"
],
- "summary": "Returns an attribute object associated with the authenticated user.",
- "description": "- Returns the attribute associated with the key. Alternatively, return the attribute associated with the key within \"Everyone\" group.\n- Optional query parameters: everyone (bool, default false). When true, the server only searches for the attribute value with the given key upon the authenticated users attributes. If false, only the authenticated users attributes will be queried.",
- "operationId": "GetTrusteeAttributeValueByKey",
+ "summary": "Returns the audit reasons associated with the authenticated user.",
+ "description": "- Returns the audit reasons associated with the authenticated user. Inherited audit reasons are included.\n- Only includes audit reasons associated with available API functionalities, like delete entry and export document.\n- If the authenticated user does not have the appropriate Laserfiche feature right, the audit reasons associated with that feature right will not be included.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListAuditReasons",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -358,32 +290,73 @@
"x-position": 1
},
{
- "name": "attributeKey",
- "in": "path",
- "required": true,
- "description": "The requested attribute key.",
+ "name": "Prefer",
+ "x-originalName": "prefer",
+ "in": "header",
+ "description": "An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.",
"schema": {
- "type": "string"
+ "type": "string",
+ "nullable": true
},
"x-position": 2
},
{
- "name": "everyone",
+ "name": "$select",
"in": "query",
- "description": "Boolean value that indicates whether to return attributes associated with everyone or the currently authenticated user.",
+ "description": "Limits the properties returned in the result.",
"schema": {
- "type": "boolean"
+ "type": "string",
+ "nullable": true
},
"x-position": 3
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 5
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "Limits the number of items returned from a collection.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 6
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "Excludes the specified number of items of the queried collection from the result.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 7
+ },
+ {
+ "name": "$count",
+ "in": "query",
+ "description": "Indicates whether the total count of items within a collection are returned in the result.",
+ "schema": {
+ "type": "boolean"
+ },
+ "x-position": 8
}
],
"responses": {
"200": {
- "description": "Get trustee attribute value successfully.",
+ "description": "A collection of audit reasons.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Attribute"
+ "$ref": "#/components/schemas/AuditReasonCollectionResponse"
}
}
}
@@ -419,7 +392,7 @@
}
},
"404": {
- "description": "Requested attribute key not found.",
+ "description": "Not found.",
"content": {
"application/json": {
"schema": {
@@ -441,17 +414,17 @@
}
}
},
- "/v1/Repositories/{repoId}/FieldDefinitions/{fieldDefinitionId}": {
+ "/v2/Repositories/{repositoryId}/FieldDefinitions/{fieldId}": {
"get": {
"tags": [
"FieldDefinitions"
],
"summary": "Returns a single field definition object.",
- "description": "- Returns a single field definition associated with the specified ID. \n- Useful when a route provides a minimal amount of details and more information about the specific field definition is needed.\n- Allowed OData query options: Select",
- "operationId": "GetFieldDefinitionById",
+ "description": "- Returns a single field definition associated with the specified ID. \n- Useful when a route provides a minimal amount of details and more information about the specific field definition is needed.\n- Allowed OData query options: Select\n- Required OAuth scope: repository.Read",
+ "operationId": "GetFieldDefinition",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -461,7 +434,7 @@
"x-position": 1
},
{
- "name": "fieldDefinitionId",
+ "name": "fieldId",
"in": "path",
"required": true,
"description": "The requested field definition ID.",
@@ -474,7 +447,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -495,11 +468,11 @@
],
"responses": {
"200": {
- "description": "Get field definition successfully.",
+ "description": "A single field definition.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/WFieldInfo"
+ "$ref": "#/components/schemas/FieldDefinition"
}
}
}
@@ -557,17 +530,17 @@
}
}
},
- "/v1/Repositories/{repoId}/FieldDefinitions": {
+ "/v2/Repositories/{repositoryId}/FieldDefinitions": {
"get": {
"tags": [
"FieldDefinitions"
],
"summary": "Returns the paged listing of the field definitions available in a repository.",
- "description": "- Returns a paged listing of field definitions available in the specified repository.\n- Useful when trying to find a list of all field definitions available, rather than only those assigned to a specific entry/template.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetFieldDefinitions",
+ "description": "- Returns a paged listing of field definitions available in the specified repository.\n- Useful when trying to find a list of all field definitions available, rather than only those assigned to a specific entry/template.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListFieldDefinitions",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -590,7 +563,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -650,11 +623,11 @@
],
"responses": {
"200": {
- "description": "Get field definitions successfully.",
+ "description": "A collection of field definitions.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfWFieldInfo"
+ "$ref": "#/components/schemas/FieldDefinitionCollectionResponse"
}
}
}
@@ -712,17 +685,17 @@
}
}
},
- "/v1/Repositories/{repoId}/LinkDefinitions": {
+ "/v2/Repositories/{repositoryId}/LinkDefinitions": {
"get": {
"tags": [
"LinkDefinitions"
],
"summary": "Returns the link definitions associated with a repository.",
- "description": "- Returns the link definitions in the repository.\n- Provide a repository ID and get a paged listing of link definitions available in the repository. Useful when trying to display all link definitions available, not only links assigned to a specific entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetLinkDefinitions",
+ "description": "- Returns the link definitions in the repository.\n- Provide a repository ID and get a paged listing of link definitions available in the repository. Useful when trying to display all link definitions available, not only links assigned to a specific entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListLinkDefinitions",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -794,11 +767,11 @@
],
"responses": {
"200": {
- "description": "Get link definitions successfully.",
+ "description": "A collection of link definitions.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfEntryLinkTypeInfo"
+ "$ref": "#/components/schemas/LinkDefinitionCollectionResponse"
}
}
}
@@ -856,17 +829,17 @@
}
}
},
- "/v1/Repositories/{repoId}/LinkDefinitions/{linkTypeId}": {
+ "/v2/Repositories/{repositoryId}/LinkDefinitions/{linkDefinitionId}": {
"get": {
"tags": [
"LinkDefinitions"
],
"summary": "Returns a single link definition object.",
- "description": "- Returns a single link definition associated with the specified ID.\n- Provide a link type ID and get the associated link definition. Useful when a route provides a minimal amount of details and more information about the specific link definition is needed.\n- Allowed OData query options: Select",
- "operationId": "GetLinkDefinitionById",
+ "description": "- Returns a single link definition associated with the specified ID.\n- Provide a link definition ID and get the associated link definition. Useful when a route provides a minimal amount of details and more information about the specific link definition is needed.\n- Allowed OData query options: Select\n- Required OAuth scope: repository.Read",
+ "operationId": "GetLinkDefinition",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -876,10 +849,10 @@
"x-position": 1
},
{
- "name": "linkTypeId",
+ "name": "linkDefinitionId",
"in": "path",
"required": true,
- "description": "The requested link type ID.",
+ "description": "The requested link definition ID.",
"schema": {
"type": "integer",
"format": "int32"
@@ -899,11 +872,11 @@
],
"responses": {
"200": {
- "description": "Get link definition successfully.",
+ "description": "A single link definition.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/EntryLinkTypeInfo"
+ "$ref": "#/components/schemas/LinkDefinition"
}
}
}
@@ -939,7 +912,7 @@
}
},
"404": {
- "description": "Requested link type definition ID not found",
+ "description": "Requested link definition ID not found",
"content": {
"application/json": {
"schema": {
@@ -961,17 +934,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}": {
- "get": {
+ "/v2/Repositories/{repositoryId}/Entries/CreateMultipartUploadUrls": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Returns a single entry object.",
- "description": "- Returns a single entry object.\n- Provide an entry ID, and get the entry associated with that ID. Useful when detailed information about the entry is required, such as metadata, path information, etc.\n- Allowed OData query options: Select. If the entry is a subtype (Folder, Document, or Shortcut), the entry will automatically be converted to include those model-specific properties.",
- "operationId": "GetEntry",
+ "summary": "Requests Upload URLs to upload a large file in chunks.",
+ "description": "- Requests Upload URLs to upload a large file in chunks.\n- Returns an UploadId and an array of URLs to which the file chunks should be written in the same order.\n- To request a new batch of Upload URLs for the same file, set the value of UploadId to the one returned when the first batch of Upload URLs was requested. For requesting the first batch of Upload URLs, leave UploadId empty or null.\n- Example: if a file is going to be uploaded in 10 chunks, the 10 Upload URLs can be retrieved by two successive calls to this api, each call requesting 5 Upload URLs. For this, the first call should have StartingPartNumber=1 and NumberOfParts=5, and the second call should have StartingPartNumber=6 and NumberOfParts=5, along with UploadId returned in the first call.\n- Each Upload URL expires after 15 minutes.\n- Each file chunk written to an Upload URL should be at least 5 MB and at most 5 GB. There is no minimum size limit for the last chunk.\n- The value of NumberOfParts must be in the range [1, 100], meaning that in each call to this api, a maximum of 100 Upload URLs can be requested. \n- The total number of Upload URLs for a single file is 1000, which means (StartingPartNumber + NumberOfParts) should be less than or equal to 1001.\n- Required OAuth scope: repository.Write",
+ "operationId": "CreateMultipartUploadUrls",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -979,36 +952,58 @@
"type": "string"
},
"x-position": 1
- },
- {
- "name": "entryId",
- "in": "path",
- "required": true,
- "description": "The requested entry ID.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 2
- },
- {
- "name": "$select",
- "in": "query",
- "description": "Limits the properties returned in the result.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 3
}
],
+ "requestBody": {
+ "x-name": "request",
+ "description": "The request body.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateMultipartUploadUrlsRequest"
+ },
+ "examples": {
+ "1": {
+ "summary": "Request the first batch of URLs",
+ "description": "The body of the CreateMultipartUploadUrls request for requesting a batch of 5 URLs, as the first batch.",
+ "value": {
+ "startingPartNumber": 1,
+ "numberOfParts": 5,
+ "fileName": "Sample.pdf",
+ "mimeType": "application/pdf"
+ }
+ },
+ "2": {
+ "summary": "Request the second batch of URLs",
+ "description": "The body of the CreateMultipartUploadUrls request for requesting a batch of 5 URLs, as the second batch. The value of UploadId should be the same as the one received in the response of the first request. Any value sent for FileName or MimeType is ignored.",
+ "value": {
+ "uploadId": "VXBsb2FkSWRGcm9tRmlyc3RSZXF1ZXN0",
+ "startingPartNumber": 6,
+ "numberOfParts": 5
+ }
+ },
+ "3": {
+ "summary": "Request the third batch of URLs",
+ "description": "The body of the CreateMultipartUploadUrls request for requesting a batch of 5 URLs, as the third batch. The value of UploadId should be the same as the one received in the response of the first request. Any value sent for FileName or MimeType is ignored.",
+ "value": {
+ "uploadId": "VXBsb2FkSWRGcm9tRmlyc3RSZXF1ZXN0",
+ "startingPartNumber": 11,
+ "numberOfParts": 5
+ }
+ }
+ }
+ }
+ },
+ "required": true,
+ "x-position": 2
+ },
"responses": {
"200": {
- "description": "Get entry successfully.",
+ "description": "A response containing an upload id and an array of upload URLs.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Entry"
+ "$ref": "#/components/schemas/CreateMultipartUploadUrlsResponse"
}
}
}
@@ -1044,7 +1039,17 @@
}
},
"404": {
- "description": "Requested entry id not found.",
+ "description": "Requested repository not found.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "413": {
+ "description": "Request is too large.",
"content": {
"application/json": {
"schema": {
@@ -1064,17 +1069,19 @@
}
}
}
- },
- "delete": {
+ }
+ },
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/ImportUploadedParts": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Deletes an entry asynchronously.",
- "description": "- Begins a task to delete an entry, and returns an operationToken.\n- Provide an entry ID, and queue a delete task to remove it from the repository (includes nested objects if the entry is a Folder type). The entry will not be deleted immediately.\n- Optionally include an audit reason ID and comment in the JSON body. This route returns an operationToken, and will run as an asynchronous operation. Check the progress via the Tasks/{operationToken} route.",
- "operationId": "DeleteEntryInfo",
+ "summary": "Starts an asynchronous import task to import a document into a folder.",
+ "description": "- Imports a new file in the specified folder. The file should be already written (in chunks) to the upload URLs obtained by calling the Upload api.\n- This route does not support partial success.\n- Required OAuth scope: repository.Write",
+ "operationId": "StartImportUploadedParts",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -1087,33 +1094,44 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested entry ID.",
+ "description": "The entry ID of the folder that the document will be created in.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
+ },
+ {
+ "name": "culture",
+ "in": "query",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.",
+ "schema": {
+ "type": "string",
+ "default": "",
+ "nullable": true
+ },
+ "x-position": 4
}
],
"requestBody": {
"x-name": "request",
- "description": "The submitted audit reason.",
+ "description": "The request body.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/DeleteEntryWithAuditReason"
+ "$ref": "#/components/schemas/StartImportUploadedPartsRequest"
}
}
},
"x-position": 3
},
"responses": {
- "201": {
- "description": "Delete entry operation start successfully.",
+ "202": {
+ "description": "A long operation task id.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AcceptedOperation"
+ "$ref": "#/components/schemas/StartTaskResponse"
}
}
}
@@ -1149,7 +1167,7 @@
}
},
"404": {
- "description": "Not found.",
+ "description": "Requested repository not found.",
"content": {
"application/json": {
"schema": {
@@ -1169,7 +1187,17 @@
}
},
"429": {
- "description": "Operation limit or request limit reached.",
+ "description": "Rate limit is reached.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Import operation failed due to an internal server error.",
"content": {
"application/json": {
"schema": {
@@ -1179,17 +1207,19 @@
}
}
}
- },
- "patch": {
+ }
+ },
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/ExportAsync": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Moves and/or renames an entry.",
- "description": "- Moves and/or renames an entry.\n- Move and/or rename an entry by passing in the new parent folder ID or name in the JSON body.\n- Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.",
- "operationId": "MoveOrRenameEntry",
+ "summary": "Starts an asynchronous export task to export an entry.",
+ "description": "- Starts an asynchronous export operation to export an entry.\n- If successful, it returns a taskId which can be used to check the status of the export operation or download the export result, otherwise, it returns an error.\n- Required OAuth scope: repository.Read",
+ "operationId": "StartExportEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -1202,7 +1232,7 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested entry ID.",
+ "description": "The ID of entry to export.",
"schema": {
"type": "integer",
"format": "int32"
@@ -1210,69 +1240,83 @@
"x-position": 2
},
{
- "name": "autoRename",
- "in": "query",
- "description": "An optional query parameter used to indicate if the entry should be automatically\n renamed if another entry already exists with the same name in the folder. The default value is false.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 4
- },
- {
- "name": "culture",
+ "name": "pageRange",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used.\n The value should be a standard language tag.",
+ "description": "A comma-separated range of pages to include. Ex: 1,3,4 or 1-3,5-7,9. This value is ignored when part=Edoc.",
"schema": {
"type": "string",
- "default": "",
"nullable": true
},
- "x-position": 5
+ "x-position": 3
}
],
"requestBody": {
"x-name": "request",
- "description": "The request containing the folder ID that the entry will be moved to and the new name\n the entry will be renamed to.",
+ "description": "The request body.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PatchEntryRequest"
+ "$ref": "#/components/schemas/StartExportEntryRequest"
},
"examples": {
"1": {
- "summary": "Move an entry",
- "description": "We can move an entry by specifying the parent folder id in the request body.",
+ "summary": "Export the image part of a Laserfiche Document",
+ "description": "The body of the export request includes:
The audit event information to associate with the export operation.
part: the part of the document to export. Options include: Image, Text, Edoc.
imageOptions: The options applied when exporting as Image.
format: the image format to export as. Options include: MultiPageTIFF, SinglePageTIFF, PNG, PDF, JPEG. The default value is MultiPageTIFF. MultiPageTIFF format is a single multi-page TIFF file. SinglePageTIFF format is multiple single-page TIFF files (in a single zip file).
jpegCompressionLevel: the quality level for JPEG compression when exporting images. The value must be between 0 and 100 (inclusive). The default value is 70.
includeAnnotations: indicates if the annotations need to be included. The default value is true.
convertPdfAnnotations: indicates if the annotations on the image need to be converted to PDF annotations when exporting to PDF format. The default value is true. This option is only applicable when exporting to PDF format and includeAnnotations is true.
pagePrefix: the page prefix of the individual files, when exporting to multi-file format (e.g.zip). The value must have a length of atmost 10 characters and only valid characters that can be included in file names are allowed. The default value is \", Page \".
includeRedactions: indicates if redactions are included. The default value is true.
watermark: the watermark element added to the image. This includes the following properties:
text: the text of the watermark. The value must be a string with a length of atmost 100 characters and must not be all whitespace characters. Using emojis in the text is not supported.
position: the position of the watermark. The default value is DeadCenter. Assuming that the page is divided into a 3x3 grid, then position can be specified using the following values:
rotationAngle: the rotation angle of the watermark. The value must be between 0 and 360 (inclusive). The default value is 0.
pageSpanPercentage: the percentage of the page that the watermark spans on. The value must be between 1 and 100 (inclusive). The default value is 50.
",
"value": {
- "parentId": 123
+ "auditReasonId": 0,
+ "auditReasonComment": "",
+ "part": "Image",
+ "imageOptions": {
+ "format": "MultiPageTIFF",
+ "jpegCompressionLevel": 70,
+ "includeAnnotations": true,
+ "convertPdfAnnotations": true,
+ "pagePrefix": ", Page ",
+ "includeRedactions": true,
+ "watermark": {
+ "text": "",
+ "position": "DeadCenter",
+ "rotationAngle": 0,
+ "pageSpanPercentage": 50
+ }
+ }
}
},
"2": {
- "summary": "Rename an entry",
- "description": "We can rename an entry by specifying the new name of the entry in the request body.",
+ "summary": "Export the text part of a Laserfiche Document",
+ "description": "The body of the export request includes:
The audit event information to associate with the export operation.
part: the part of the document to export. Options include: Image, Text, Edoc.
textOptions: The options applied when exporting as Text.
includeRedactions: indicates if redactions are included. The default value is true.
redactionCharacter: the character that replaces the original character in a redacted text. The value must be a string of length 1 and must not be a whitespace character. The default value is \"X\".
",
"value": {
- "name": "NewName"
+ "auditReasonId": 0,
+ "auditReasonComment": "",
+ "part": "Text",
+ "textOptions": {
+ "includeRedactions": true,
+ "redactionCharacter": "X"
+ }
}
},
"3": {
- "summary": "Move and Rename an entry",
- "description": "We can move and rename an entry by specifying the parent folder id and the new name of the entry in the request body.",
+ "summary": "Export the edoc part of a Laserfiche Document",
+ "description": "The body of the export request includes:
The audit event information to associate with the export operation.
part: the part of the document to export. Options include: Image, Text, Edoc.
",
"value": {
- "parentId": 123,
- "name": "NewName"
+ "auditReasonId": 0,
+ "auditReasonComment": "",
+ "part": "Edoc"
}
}
}
}
},
- "x-position": 3
+ "required": true,
+ "x-position": 4
},
"responses": {
- "200": {
- "description": "Moves and/or renames an entry successfully.",
+ "202": {
+ "description": "A long operation task id.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/Entry"
+ "$ref": "#/components/schemas/StartTaskResponse"
}
}
}
@@ -1308,17 +1352,7 @@
}
},
"404": {
- "description": "Request entry id not found.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "409": {
- "description": "Entry name conflicts.",
+ "description": "Requested repository not found.",
"content": {
"application/json": {
"schema": {
@@ -1337,8 +1371,8 @@
}
}
},
- "423": {
- "description": "Entry is locked.",
+ "429": {
+ "description": "Rate limit is reached.",
"content": {
"application/json": {
"schema": {
@@ -1347,8 +1381,8 @@
}
}
},
- "429": {
- "description": "Rate limit is reached.",
+ "500": {
+ "description": "Export operation failed due to an internal server error.",
"content": {
"application/json": {
"schema": {
@@ -1360,17 +1394,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/ByPath": {
- "get": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/CopyAsync": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Returns a single entry object using the entry path.",
- "description": "- Returns a single entry object using the entry path.\n- Optional query parameter: fallbackToClosestAncestor. Use the fallbackToClosestAncestor query parameter to return the closest existing ancestor if the initial entry path is not found.",
- "operationId": "GetEntryByPath",
+ "summary": "Starts an asynchronous copy task to copy an entry into a folder.",
+ "description": "- Copy a new child entry in the designated folder async, and potentially return a taskId.\n- Provide the parent folder ID, and copy an entry as a child of the designated folder.\n- The status of the operation can be checked via the Tasks route.\n- Token substitution in the name of the copied entry is not supported.\n- Required OAuth scope: repository.Write",
+ "operationId": "StartCopyEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -1380,34 +1414,59 @@
"x-position": 1
},
{
- "name": "fullPath",
- "in": "query",
+ "name": "entryId",
+ "in": "path",
"required": true,
- "description": "The requested entry path.",
+ "description": "The folder ID that the entry will be created in.",
"schema": {
- "type": "string",
- "nullable": true
+ "type": "integer",
+ "format": "int32"
},
"x-position": 2
},
{
- "name": "fallbackToClosestAncestor",
+ "name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate whether or not the closest ancestor in the path should be returned if the initial entry path is not found. The default value is false.",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.",
"schema": {
- "type": "boolean",
- "default": false
+ "type": "string",
+ "default": "",
+ "nullable": true
},
- "x-position": 3
+ "x-position": 4
}
],
+ "requestBody": {
+ "x-name": "request",
+ "description": "The request body.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/StartCopyEntryRequest"
+ },
+ "examples": {
+ "1": {
+ "summary": "Copy an entry",
+ "description": "We can copy an entry (marked by sourceId property) to a destination (marked in URL).",
+ "value": {
+ "sourceId": 123,
+ "name": "CopiedEntry",
+ "autoRename": false
+ }
+ }
+ }
+ }
+ },
+ "required": true,
+ "x-position": 3
+ },
"responses": {
- "200": {
- "description": "Get entry successfully.",
+ "202": {
+ "description": "A long operation task id.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/FindEntryResult"
+ "$ref": "#/components/schemas/StartTaskResponse"
}
}
}
@@ -1443,7 +1502,17 @@
}
},
"404": {
- "description": "Requested entry path not found",
+ "description": "Requested repository not found.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "413": {
+ "description": "Request is too large.",
"content": {
"application/json": {
"schema": {
@@ -1453,7 +1522,7 @@
}
},
"429": {
- "description": "Rate limit is reached.",
+ "description": "Operation limit or request limit reached.",
"content": {
"application/json": {
"schema": {
@@ -1465,17 +1534,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Folder/children": {
- "get": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}": {
+ "delete": {
"tags": [
"Entries"
],
- "summary": "Returns the children entries of a folder.",
- "description": "- Returns the children entries of a folder in the repository.\n- Provide an entry ID (must be a folder), and get a paged listing of entries in that folder. Used as a way of navigating through the repository.\n- Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: \"PropertyName direction,PropertyName2 direction\". Sort order can be either value \"asc\" or \"desc\". Optional query parameters: groupByOrderType (bool). This query parameter decides if results are returned in groups based on their entry type. Entries returned in the listing are not automatically converted to their subtype (Folder, Shortcut, Document), so clients who want model-specific information should request it via the GET entry by ID route.\n- Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names.\n- If field values are requested, only the first value is returned if it is a multi value field.\n- Null or Empty field values should not be used to determine if a field is assigned to the entry.",
- "operationId": "GetEntryListing",
+ "summary": "Starts an asynchronous delete task to delete an entry.",
+ "description": "- Begins a task to delete an entry, and returns a taskId.\n- Provide an entry ID, and queue a delete task to remove it from the repository (includes nested objects if the entry is a Folder type). The entry will not be deleted immediately.\n- Optionally include an audit reason ID and comment in the JSON body. This route returns a taskId, and will run as an asynchronous operation. Check the progress via the Tasks route.\n- Required OAuth scope: repository.Write",
+ "operationId": "StartDeleteEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -1488,125 +1557,146 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The folder ID.",
+ "description": "The requested entry ID.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
+ }
+ ],
+ "requestBody": {
+ "x-name": "request",
+ "description": "The submitted audit reason.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/StartDeleteEntryRequest"
+ }
+ }
},
- {
- "name": "groupByEntryType",
- "in": "query",
- "description": "An optional query parameter used to indicate if the result should be grouped by entry type or not.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 3
- },
- {
- "name": "fields",
- "in": "query",
- "style": "form",
- "explode": true,
- "description": "Optional array of field names. Field values corresponding to the given field names will be returned for each entry. ",
- "schema": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
+ "x-position": 3
+ },
+ "responses": {
+ "202": {
+ "description": "A long operation task id.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/StartTaskResponse"
+ }
}
- },
- "x-position": 4
+ }
},
- {
- "name": "formatFields",
- "in": "query",
- "description": "Boolean for if field values should be formatted. Only applicable if Fields are specified.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 5
+ "400": {
+ "description": "Invalid or bad request.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
- {
- "name": "Prefer",
- "x-originalName": "prefer",
- "in": "header",
- "description": "An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 6
+ "401": {
+ "description": "Access token is invalid or expired.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
- {
- "name": "culture",
- "in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise\n culture will not be used for formatting.",
- "schema": {
- "type": "string",
- "default": "",
- "nullable": true
- },
- "x-position": 7
+ "403": {
+ "description": "Access denied for the operation.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
- {
- "name": "$select",
- "in": "query",
- "description": "Limits the properties returned in the result.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 8
+ "404": {
+ "description": "Requested repository not found.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
- {
- "name": "$orderby",
- "in": "query",
- "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 10
+ "413": {
+ "description": "Request is too large.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
+ "429": {
+ "description": "Operation limit or request limit reached.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ }
+ }
+ },
+ "get": {
+ "tags": [
+ "Entries"
+ ],
+ "summary": "Returns a single entry object.",
+ "description": "- Returns a single entry object.\n- Provide an entry ID, and get the entry associated with that ID. Useful when detailed information about the entry is required, such as metadata, path information, etc.\n- If the entry is a subtype (Folder, Document, or Shortcut), the entry will automatically be converted to include those model-specific properties.\n- Allowed OData query options: Select.\n- Required OAuth scope: repository.Read",
+ "operationId": "GetEntry",
+ "parameters": [
{
- "name": "$top",
- "in": "query",
- "description": "Limits the number of items returned from a collection.",
+ "name": "repositoryId",
+ "in": "path",
+ "required": true,
+ "description": "The requested repository ID.",
"schema": {
- "type": "integer",
- "format": "int32"
+ "type": "string"
},
- "x-position": 11
+ "x-position": 1
},
{
- "name": "$skip",
- "in": "query",
- "description": "Excludes the specified number of items of the queried collection from the result.",
+ "name": "entryId",
+ "in": "path",
+ "required": true,
+ "description": "The requested entry ID.",
"schema": {
"type": "integer",
"format": "int32"
},
- "x-position": 12
+ "x-position": 2
},
{
- "name": "$count",
+ "name": "$select",
"in": "query",
- "description": "Indicates whether the total count of items within a collection are returned in the result.",
+ "description": "Limits the properties returned in the result.",
"schema": {
- "type": "boolean"
+ "type": "string",
+ "nullable": true
},
- "x-position": 13
+ "x-position": 3
}
],
"responses": {
"200": {
- "description": "Get the children entries of a Folder successfully.",
+ "description": "A single entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfEntry"
+ "$ref": "#/components/schemas/Entry"
}
}
}
@@ -1642,7 +1732,7 @@
}
},
"404": {
- "description": "Request entry id not found.",
+ "description": "Requested entry id not found.",
"content": {
"application/json": {
"schema": {
@@ -1663,16 +1753,16 @@
}
}
},
- "post": {
+ "patch": {
"tags": [
"Entries"
],
- "summary": "Creates/copies a new child entry in a folder.",
- "description": "- Create/copy a new child entry in the designated folder.\n- Provide the parent folder ID, and based on the request body, copy or create a folder/shortcut as a child entry of the designated folder.\n- Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.",
- "operationId": "CreateOrCopyEntry",
+ "summary": "Update an entry. (Move and/or Rename)",
+ "description": "- Update an entry. (Move and/or Rename)\n- Move an entry to a new folder by setting the ParentId in the request body.\n- Rename an entry by setting the Name in the request body.\n- Required OAuth scope: repository.Write",
+ "operationId": "UpdateEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -1685,76 +1775,67 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The folder ID that the entry will be created in.",
+ "description": "The requested entry ID.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
},
- {
- "name": "autoRename",
- "in": "query",
- "description": "An optional query parameter used to indicate if the new entry should be automatically\n renamed if an entry already exists with the given name in the folder. The default value is false.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 4
- },
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
"nullable": true
},
- "x-position": 5
+ "x-position": 4
}
],
"requestBody": {
"x-name": "request",
- "description": "The entry to create.",
+ "description": "The request containing the folder ID that the entry will be moved to and the new name the entry will be renamed to.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PostEntryChildrenRequest"
+ "$ref": "#/components/schemas/UpdateEntryRequest"
},
"examples": {
"1": {
- "summary": "Create a folder",
- "description": "We can create a new folder with the given name.",
+ "summary": "Move an entry",
+ "description": "We can move an entry by specifying the parent folder id in the request body.",
"value": {
- "entryType": "Folder",
- "name": "NewFolder"
+ "parentId": 123
}
},
"2": {
- "summary": "Create a shortcut",
- "description": "We can create a new shortcut with the given name to the entry with the targetId.",
+ "summary": "Rename an entry",
+ "description": "We can rename an entry by specifying the new name of the entry in the request body.",
"value": {
- "entryType": "Shortcut",
- "name": "NewShortcut",
- "targetId": 123
+ "name": "NewName",
+ "autoRename": false
}
},
"3": {
- "summary": "Copy an entry",
- "description": "We can copy an entry (marked by sourceId property) to a destination (marked in URL).",
+ "summary": "Move and Rename an entry",
+ "description": "We can move and rename an entry by specifying the parent folder id and the new name of the entry in the request body.",
"value": {
- "sourceId": 123,
- "name": "CopiedEntry"
+ "parentId": 123,
+ "name": "NewName",
+ "autoRename": false
}
}
}
}
},
+ "required": true,
"x-position": 3
},
"responses": {
- "201": {
- "description": "Created a new child entry successfully.",
+ "200": {
+ "description": "The updated entry.",
"content": {
"application/json": {
"schema": {
@@ -1823,6 +1904,16 @@
}
}
},
+ "423": {
+ "description": "Entry is locked.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
"429": {
"description": "Rate limit is reached.",
"content": {
@@ -1836,17 +1927,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/fields": {
- "get": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/Import": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Returns the fields assigned to an entry.",
- "description": "- Returns the fields assigned to an entry.\n- Provide an entry ID, and get a paged listing of all fields assigned to that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetFieldValues",
+ "summary": "Imports a file into a folder (max length: 100 MB).",
+ "description": "- Import a new document in the specified folder, and optionally assigns metadata.\n- The import may fail if the file is greater than 100 MB or time out if it takes longer than 60 seconds. These values are subject to change at anytime. Use the long operation asynchronous import if you run into these restrictions.\n- Required OAuth scope: repository.Write",
+ "operationId": "ImportEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -1859,102 +1950,54 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested entry ID.",
+ "description": "The entry ID of the folder that the document will be created in.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
},
- {
- "name": "Prefer",
- "x-originalName": "prefer",
- "in": "header",
- "description": "An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 3
- },
- {
- "name": "formatValue",
- "in": "query",
- "description": "An optional query parameter used to indicate if the field values should be formatted.\n The default value is false.",
- "schema": {
- "type": "boolean",
- "default": false
- },
- "x-position": 4
- },
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag. The formatValue query parameter must be set to true, otherwise\n culture will not be used for formatting.",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.",
"schema": {
"type": "string",
"default": "",
"nullable": true
},
- "x-position": 5
- },
- {
- "name": "$select",
- "in": "query",
- "description": "Limits the properties returned in the result.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 6
- },
- {
- "name": "$orderby",
- "in": "query",
- "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 8
- },
- {
- "name": "$top",
- "in": "query",
- "description": "Limits the number of items returned from a collection.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 9
- },
- {
- "name": "$skip",
- "in": "query",
- "description": "Excludes the specified number of items of the queried collection from the result.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 10
- },
- {
- "name": "$count",
- "in": "query",
- "description": "Indicates whether the total count of items within a collection are returned in the result.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 11
+ "x-position": 3
}
],
+ "requestBody": {
+ "content": {
+ "multipart/form-data": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "file",
+ "request"
+ ],
+ "properties": {
+ "file": {
+ "type": "string",
+ "format": "binary"
+ },
+ "request": {
+ "$ref": "#/components/schemas/ImportEntryRequest"
+ }
+ }
+ }
+ }
+ }
+ },
"responses": {
- "200": {
- "description": "Get field values successfully.",
+ "201": {
+ "description": "The created entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfFieldValue"
+ "$ref": "#/components/schemas/Entry"
}
}
}
@@ -1999,8 +2042,28 @@
}
}
},
- "429": {
- "description": "Rate limit is reached.",
+ "413": {
+ "description": "Request is too large.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limit is reached.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Document creation is completely failed.",
"content": {
"application/json": {
"schema": {
@@ -2010,17 +2073,19 @@
}
}
}
- },
- "put": {
+ }
+ },
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Export": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Updates the field values assigned to an entry.",
- "description": "- Update the field values assigned to an entry.\n- Provide the new field values to assign to the entry, and remove/reset all previously assigned field values. \n- This is an overwrite action. The request body must include all desired field values, including any existing field values that should remain assigned to the entry. Field values that are not included in the request will be deleted from the entry. If the field value that is not included is part of a template, it will still be assigned (as required by the template), but its value will be reset.",
- "operationId": "AssignFieldValues",
+ "summary": "Exports an entry.",
+ "description": "- Export an entry.\n- The export may time out if it takes longer than 60 seconds. This value is subject to change at anytime. Use the long operation asynchronous export if you run into this restriction.\n- Required OAuth scope: repository.Read",
+ "operationId": "ExportEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -2033,7 +2098,7 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The entry ID of the entry that will have its fields updated.",
+ "description": "The ID of entry to export.",
"schema": {
"type": "integer",
"format": "int32"
@@ -2041,39 +2106,83 @@
"x-position": 2
},
{
- "name": "culture",
+ "name": "pageRange",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used.\n The value should be a standard language tag. This may be used when setting field values with tokens.",
+ "description": "A comma-separated range of pages to include. Ex: 1,3,4 or 1-3,5-7,9. This value is ignored when exporting as Edoc.",
"schema": {
"type": "string",
- "default": "",
"nullable": true
},
- "x-position": 4
+ "x-position": 3
}
],
"requestBody": {
- "x-name": "fieldsToUpdate",
- "description": "",
+ "x-name": "request",
+ "description": "The request body.",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/FieldToUpdate"
+ "$ref": "#/components/schemas/ExportEntryRequest"
+ },
+ "examples": {
+ "1": {
+ "summary": "Export the image part of a Laserfiche Document",
+ "description": "The body of the export request includes:
The audit event information to associate with the export operation.
part: the part of the document to export. Options include: Image, Text, Edoc.
imageOptions: The options applied when exporting as Image.
format: the image format to export as. Options include: MultiPageTIFF, SinglePageTIFF, PNG, PDF, JPEG. The default value is MultiPageTIFF. MultiPageTIFF format is a single multi-page TIFF file. SinglePageTIFF format is multiple single-page TIFF files (in a single zip file).
jpegCompressionLevel: the quality level for JPEG compression when exporting images. The value must be between 0 and 100 (inclusive). The default value is 70.
includeAnnotations: indicates if the annotations need to be included. The default value is true.
convertPdfAnnotations: indicates if the annotations on the image need to be converted to PDF annotations when exporting to PDF format. The default value is true. This option is only applicable when exporting to PDF format and includeAnnotations is true.
pagePrefix: the page prefix of the individual files, when exporting to multi-file format (e.g.zip). The value must have a length of atmost 10 characters and only valid characters that can be included in file names are allowed. The default value is \", Page \".
includeRedactions: indicates if redactions are included. The default value is true.
watermark: the watermark element added to the image. This includes the following properties:
text: the text of the watermark. The value must be a string with a length of atmost 100 characters and must not be all whitespace characters. Using emojis in the text is not supported.
position: the position of the watermark. The default value is DeadCenter. Assuming that the page is divided into a 3x3 grid, then position can be specified using the following values:
rotationAngle: the rotation angle of the watermark. The value must be between 0 and 360 (inclusive). The default value is 0.
pageSpanPercentage: the percentage of the page that the watermark spans on. The value must be between 1 and 100 (inclusive). The default value is 50.
",
+ "value": {
+ "auditReasonId": 0,
+ "auditReasonComment": "",
+ "part": "Image",
+ "imageOptions": {
+ "format": "MultiPageTIFF",
+ "jpegCompressionLevel": 70,
+ "includeAnnotations": true,
+ "convertPdfAnnotations": true,
+ "pagePrefix": ", Page ",
+ "includeRedactions": true,
+ "watermark": {
+ "text": "",
+ "position": "DeadCenter",
+ "rotationAngle": 0,
+ "pageSpanPercentage": 50
+ }
+ }
+ }
+ },
+ "2": {
+ "summary": "Export the text part of a Laserfiche Document",
+ "description": "The body of the export request includes:
The audit event information to associate with the export operation.
part: the part of the document to export. Options include: Image, Text, Edoc.
textOptions: The options applied when exporting as Text.
includeRedactions: indicates if redactions are included. The default value is true.
redactionCharacter: the character that replaces the original character in a redacted text. The value must be a string of length 1 and must not be a whitespace character. The default value is \"X\".
",
+ "value": {
+ "auditReasonId": 0,
+ "auditReasonComment": "",
+ "part": "Text",
+ "textOptions": {
+ "includeRedactions": true,
+ "redactionCharacter": "X"
+ }
+ }
+ },
+ "3": {
+ "summary": "Export the edoc part of a Laserfiche Document",
+ "description": "The body of the export request includes:
The audit event information to associate with the export operation.
part: the part of the document to export. Options include: Image, Text, Edoc.
",
+ "value": {
+ "auditReasonId": 0,
+ "auditReasonComment": "",
+ "part": "Edoc"
+ }
}
}
}
},
- "x-position": 3
+ "required": true,
+ "x-position": 4
},
"responses": {
"200": {
- "description": "Update field values successfully.",
+ "description": "A link to download the exported entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueOfIListOfFieldValue"
+ "$ref": "#/components/schemas/ExportEntryResponse"
}
}
}
@@ -2109,7 +2218,7 @@
}
},
"404": {
- "description": "Requested entry id not found.",
+ "description": "Request entry id not found.",
"content": {
"application/json": {
"schema": {
@@ -2147,21 +2256,135 @@
}
}
}
+ },
+ "500": {
+ "description": "Export operation failed due to an internal server error.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
}
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/tags": {
+ "/v2/Repositories/{repositoryId}/Entries/ByPath": {
"get": {
"tags": [
"Entries"
],
- "summary": "Returns the tags assigned to an entry.",
- "description": "- Returns the tags assigned to an entry.\n- Provide an entry ID, and get a paged listing of tags assigned to that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetTagsAssignedToEntry",
+ "summary": "Returns a single entry object using the entry path.",
+ "description": "- Returns a single entry object using the entry path.\n- Optional query parameter: fallbackToClosestAncestor. Use the fallbackToClosestAncestor query parameter to return the closest existing ancestor if the initial entry path is not found.\n- Required OAuth scope: repository.Read",
+ "operationId": "GetEntryByPath",
+ "parameters": [
+ {
+ "name": "repositoryId",
+ "in": "path",
+ "required": true,
+ "description": "The requested repository ID.",
+ "schema": {
+ "type": "string"
+ },
+ "x-position": 1
+ },
+ {
+ "name": "fullPath",
+ "in": "query",
+ "required": true,
+ "description": "The requested entry path.",
+ "schema": {
+ "type": "string"
+ },
+ "x-position": 2
+ },
+ {
+ "name": "fallbackToClosestAncestor",
+ "in": "query",
+ "description": "An optional query parameter used to indicate whether or not the closest ancestor in the path should be returned if the initial entry path is not found. The default value is false.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "x-position": 3
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The found entry or ancestor entry.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetEntryByPathResponse"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid or bad request.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Access token is invalid or expired.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Access denied for the operation.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Requested entry path not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limit is reached.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/Children": {
+ "get": {
+ "tags": [
+ "Entries"
+ ],
+ "summary": "Returns the children entries of a folder.",
+ "description": "- Returns the children entries of a folder in the repository.\n- Provide an entry ID (must be a folder), and get a paged listing of entries in that folder. Used as a way of navigating through the repository.\n- Entries returned in the listing are not automatically converted to their subtype (Folder, Shortcut, Document), so clients who want model-specific information should request it via the GET entry by ID route.\n- Optional query parameters: groupByEntryType (bool). This query parameter decides if results are returned in groups based on their entry type. \n- Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names. If field values are requested, only the first value is returned if it is a multi value field. The remaining field values can be retrieved via the GET fields route. Null or Empty field values should not be used to determine if a field is assigned to the entry.\n- Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: \"PropertyName direction,PropertyName2 direction\". Sort order can be either value \"asc\" or \"desc\".\n- Required OAuth scope: repository.Read",
+ "operationId": "ListEntries",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -2174,13 +2397,48 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested entry ID.",
+ "description": "The folder ID.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
},
+ {
+ "name": "groupByEntryType",
+ "in": "query",
+ "description": "Indicates if the result should be grouped by entry type or not. The default value is false.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "x-position": 3
+ },
+ {
+ "name": "fields",
+ "in": "query",
+ "style": "form",
+ "explode": true,
+ "description": "Optional array of field names. Field values corresponding to the given field names will be returned for each entry.",
+ "schema": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ },
+ "x-position": 4
+ },
+ {
+ "name": "formatFieldValues",
+ "in": "query",
+ "description": "Indicates if field values should be formatted. Only applicable if Fields are specified. The default value is false.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "x-position": 5
+ },
{
"name": "Prefer",
"x-originalName": "prefer",
@@ -2190,7 +2448,18 @@
"type": "string",
"nullable": true
},
- "x-position": 3
+ "x-position": 6
+ },
+ {
+ "name": "culture",
+ "in": "query",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise culture will not be used for formatting.",
+ "schema": {
+ "type": "string",
+ "default": "",
+ "nullable": true
+ },
+ "x-position": 7
},
{
"name": "$select",
@@ -2200,7 +2469,7 @@
"type": "string",
"nullable": true
},
- "x-position": 4
+ "x-position": 8
},
{
"name": "$orderby",
@@ -2210,7 +2479,7 @@
"type": "string",
"nullable": true
},
- "x-position": 6
+ "x-position": 10
},
{
"name": "$top",
@@ -2220,7 +2489,7 @@
"type": "integer",
"format": "int32"
},
- "x-position": 7
+ "x-position": 11
},
{
"name": "$skip",
@@ -2230,7 +2499,7 @@
"type": "integer",
"format": "int32"
},
- "x-position": 8
+ "x-position": 12
},
{
"name": "$count",
@@ -2239,16 +2508,16 @@
"schema": {
"type": "boolean"
},
- "x-position": 9
+ "x-position": 13
}
],
"responses": {
"200": {
- "description": "Get entry tags successfully.",
+ "description": "A collection of children entries of a folder.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfWTagInfo"
+ "$ref": "#/components/schemas/EntryCollectionResponse"
}
}
}
@@ -2305,16 +2574,16 @@
}
}
},
- "put": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Assigns tags to an entry.",
- "description": "- Assign tags to an entry.\n- Provide an entry ID and a list of tags to assign to that entry.\n- This is an overwrite action. The request must include all tags to assign to the entry, including existing tags that should remain assigned to the entry.",
- "operationId": "AssignTags",
+ "summary": "Creates a new child entry in a folder.",
+ "description": "- Create a new child entry in the designated folder.\n- Provide the parent folder ID, and based on the request body, create a folder/shortcut as a child entry of the designated folder.\n- Required OAuth scope: repository.Write",
+ "operationId": "CreateEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -2327,33 +2596,66 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested entry ID.",
+ "description": "The folder ID that the entry will be created in.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
+ },
+ {
+ "name": "culture",
+ "in": "query",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.",
+ "schema": {
+ "type": "string",
+ "default": "",
+ "nullable": true
+ },
+ "x-position": 4
}
],
"requestBody": {
- "x-name": "tagsToAdd",
- "description": "The tags to add.",
+ "x-name": "request",
+ "description": "The request body.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PutTagRequest"
+ "$ref": "#/components/schemas/CreateEntryRequest"
+ },
+ "examples": {
+ "1": {
+ "summary": "Create a folder",
+ "description": "We can create a new folder with the given name.",
+ "value": {
+ "entryType": "Folder",
+ "name": "NewFolder",
+ "autoRename": false
+ }
+ },
+ "2": {
+ "summary": "Create a shortcut",
+ "description": "We can create a new shortcut with the given name to the entry with the targetId.",
+ "value": {
+ "entryType": "Shortcut",
+ "name": "NewShortcut",
+ "autoRename": false,
+ "targetId": 123
+ }
+ }
}
}
},
+ "required": true,
"x-position": 3
},
"responses": {
- "200": {
- "description": "Assign tags to an entry successfully.",
+ "201": {
+ "description": "The created entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueOfIListOfWTagInfo"
+ "$ref": "#/components/schemas/Entry"
}
}
}
@@ -2389,7 +2691,7 @@
}
},
"404": {
- "description": "Request id not found.",
+ "description": "Request entry id not found.",
"content": {
"application/json": {
"schema": {
@@ -2398,8 +2700,8 @@
}
}
},
- "413": {
- "description": "Request is too large.",
+ "409": {
+ "description": "Entry name conflicts.",
"content": {
"application/json": {
"schema": {
@@ -2408,8 +2710,8 @@
}
}
},
- "423": {
- "description": "Entry is locked.",
+ "413": {
+ "description": "Request is too large.",
"content": {
"application/json": {
"schema": {
@@ -2431,20 +2733,20 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/links": {
- "put": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Fields": {
+ "get": {
"tags": [
"Entries"
],
- "summary": "Assigns links to an entry.",
- "description": "- Assign links to an entry.\n- Provide an entry ID and a list of links to assign to that entry.\n- This is an overwrite action. The request must include all links to assign to the entry, including existing links that should remain assigned to the entry.",
- "operationId": "AssignEntryLinks",
+ "summary": "Returns the fields assigned to an entry.",
+ "description": "- Returns the fields assigned to an entry.\n- Provide an entry ID, and get a paged listing of all fields assigned to that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListFields",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
- "description": "The request repository ID.",
+ "description": "The requested repository ID.",
"schema": {
"type": "string"
},
@@ -2460,29 +2762,213 @@
"format": "int32"
},
"x-position": 2
+ },
+ {
+ "name": "Prefer",
+ "x-originalName": "prefer",
+ "in": "header",
+ "description": "An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 3
+ },
+ {
+ "name": "formatFieldValues",
+ "in": "query",
+ "description": "An optional query parameter used to indicate if the field values should be formatted. The default value is false.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "x-position": 4
+ },
+ {
+ "name": "culture",
+ "in": "query",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise culture will not be used for formatting.",
+ "schema": {
+ "type": "string",
+ "default": "",
+ "nullable": true
+ },
+ "x-position": 5
+ },
+ {
+ "name": "$select",
+ "in": "query",
+ "description": "Limits the properties returned in the result.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 6
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 8
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "Limits the number of items returned from a collection.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 9
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "Excludes the specified number of items of the queried collection from the result.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 10
+ },
+ {
+ "name": "$count",
+ "in": "query",
+ "description": "Indicates whether the total count of items within a collection are returned in the result.",
+ "schema": {
+ "type": "boolean"
+ },
+ "x-position": 11
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "A collection of fields assigned to the entry.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/FieldCollectionResponse"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Invalid or bad request.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Access token is invalid or expired.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "403": {
+ "description": "Access denied for the operation.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Request entry id not found.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "429": {
+ "description": "Rate limit is reached.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ }
+ }
+ },
+ "put": {
+ "tags": [
+ "Entries"
+ ],
+ "summary": "Updates the field values assigned to an entry.",
+ "description": "- Update the field values assigned to an entry.\n- Provide the new field values to assign to the entry, and remove/reset all previously assigned field values.\n- This is an overwrite action. The request body must include all desired field values, including any existing field values that should remain assigned to the entry. Field values that are not included in the request will be deleted from the entry. If the field value that is not included is part of a template, it will still be assigned (as required by the template), but its value will be reset.\n- Required OAuth scope: repository.Write",
+ "operationId": "SetFields",
+ "parameters": [
+ {
+ "name": "repositoryId",
+ "in": "path",
+ "required": true,
+ "description": "The requested repository ID.",
+ "schema": {
+ "type": "string"
+ },
+ "x-position": 1
+ },
+ {
+ "name": "entryId",
+ "in": "path",
+ "required": true,
+ "description": "The entry ID of the entry that will have its fields updated.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 2
+ },
+ {
+ "name": "culture",
+ "in": "query",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.",
+ "schema": {
+ "type": "string",
+ "default": "",
+ "nullable": true
+ },
+ "x-position": 4
}
],
"requestBody": {
- "x-name": "linksToAdd",
+ "x-name": "request",
+ "description": "The request body.",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/PutLinksRequest"
- }
+ "$ref": "#/components/schemas/SetFieldsRequest"
}
}
},
+ "required": true,
"x-position": 3
},
"responses": {
"200": {
- "description": "Assign links to an entry successfully.",
+ "description": "A collection of fields assigned to the entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueOfIListOfWEntryLinkInfo"
+ "$ref": "#/components/schemas/FieldCollectionResponse"
}
}
}
@@ -2518,7 +3004,7 @@
}
},
"404": {
- "description": "Request entry id not found.",
+ "description": "Requested entry id not found.",
"content": {
"application/json": {
"schema": {
@@ -2558,17 +3044,19 @@
}
}
}
- },
+ }
+ },
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Tags": {
"get": {
"tags": [
"Entries"
],
- "summary": "Returns the links assigned to an entry.",
- "description": "- Returns the links assigned to an entry.\n- Provide an entry ID, and get a paged listing of links assigned to that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetLinkValuesFromEntry",
+ "summary": "Returns the tags assigned to an entry.",
+ "description": "- Returns the tags assigned to an entry.\n- Provide an entry ID, and get a paged listing of tags assigned to that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListTags",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -2592,7 +3080,7 @@
"name": "Prefer",
"x-originalName": "prefer",
"in": "header",
- "description": "An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.",
+ "description": "An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.",
"schema": {
"type": "string",
"nullable": true
@@ -2651,11 +3139,11 @@
],
"responses": {
"200": {
- "description": "Get links successfully.",
+ "description": "A collection of tags assigned to the entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfWEntryLinkInfo"
+ "$ref": "#/components/schemas/TagCollectionResponse"
}
}
}
@@ -2711,19 +3199,17 @@
}
}
}
- }
- },
- "/v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Folder/CopyAsync": {
- "post": {
+ },
+ "put": {
"tags": [
"Entries"
],
- "summary": "Copies an entry into a folder asynchronously.",
- "description": "- Copy a new child entry in the designated folder async, and potentially return an operationToken.\n- Provide the parent folder ID, and copy an entry as a child of the designated folder.\n- Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed. \n- The status of the operation can be checked via the Tasks/{operationToken} route.\n- Token substitution in the name of the copied entry is not supported.",
- "operationId": "CopyEntryAsync",
+ "summary": "Assigns tags to an entry.",
+ "description": "- Assign tags to an entry.\n- Provide an entry ID and a list of tags to assign to that entry.\n- This is an overwrite action. The request must include all tags to assign to the entry, including existing tags that should remain assigned to the entry.\n- Required OAuth scope: repository.Write",
+ "operationId": "SetTags",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -2736,63 +3222,34 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The folder ID that the entry will be created in.",
+ "description": "The requested entry ID.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
- },
- {
- "name": "autoRename",
- "in": "query",
- "description": "An optional query parameter used to indicate if the new entry should be automatically\n renamed if an entry already exists with the given name in the folder. The default value is false.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 4
- },
- {
- "name": "culture",
- "in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used.\n The value should be a standard language tag.",
- "schema": {
- "type": "string",
- "default": "",
- "nullable": true
- },
- "x-position": 5
}
],
"requestBody": {
"x-name": "request",
- "description": "Copy entry request.",
+ "description": "The tags to add.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CopyAsyncRequest"
- },
- "examples": {
- "1": {
- "summary": "Copy an entry",
- "description": "We can copy an entry (marked by sourceId property) to a destination (marked in URL).",
- "value": {
- "sourceId": 123,
- "name": "CopiedEntry"
- }
- }
+ "$ref": "#/components/schemas/SetTagsRequest"
}
}
},
+ "required": true,
"x-position": 3
},
"responses": {
- "201": {
- "description": "Copy entry operation is started successfully.",
+ "200": {
+ "description": "A collection of tags assigned to the entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AcceptedOperation"
+ "$ref": "#/components/schemas/TagCollectionResponse"
}
}
}
@@ -2828,7 +3285,7 @@
}
},
"404": {
- "description": "Not found.",
+ "description": "Request id not found.",
"content": {
"application/json": {
"schema": {
@@ -2847,8 +3304,18 @@
}
}
},
+ "423": {
+ "description": "Entry is locked.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
"429": {
- "description": "Operation limit or request limit reached.",
+ "description": "Rate limit is reached.",
"content": {
"application/json": {
"schema": {
@@ -2860,20 +3327,20 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Document/edoc": {
- "delete": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Links": {
+ "put": {
"tags": [
"Entries"
],
- "summary": "Deletes the edoc associated with an entry.",
- "description": "- Delete the edoc associated with the provided entry ID.",
- "operationId": "DeleteDocument",
+ "summary": "Assigns links to an entry.",
+ "description": "- Assign links to an entry.\n- Provide an entry ID and a list of links to assign to that entry.\n- This is an overwrite action. The request must include all links to assign to the entry, including existing links that should remain assigned to the entry.\n- Required OAuth scope: repository.Write",
+ "operationId": "SetLinks",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
- "description": "The requested repository ID.",
+ "description": "The request repository ID.",
"schema": {
"type": "string"
},
@@ -2883,7 +3350,7 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested document ID.",
+ "description": "The requested entry ID.",
"schema": {
"type": "integer",
"format": "int32"
@@ -2891,13 +3358,26 @@
"x-position": 2
}
],
+ "requestBody": {
+ "x-name": "request",
+ "description": "The request body.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SetLinksRequest"
+ }
+ }
+ },
+ "required": true,
+ "x-position": 3
+ },
"responses": {
"200": {
- "description": "Deleted edoc successfully.",
+ "description": "A collection of links assigned to the entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueOfBoolean"
+ "$ref": "#/components/schemas/LinkCollectionResponse"
}
}
}
@@ -2942,6 +3422,16 @@
}
}
},
+ "413": {
+ "description": "Request is too large.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
"423": {
"description": "Entry is locked.",
"content": {
@@ -2964,16 +3454,16 @@
}
}
},
- "head": {
+ "get": {
"tags": [
"Entries"
],
- "summary": "Returns information about the edoc content of an entry.",
- "description": "- Returns information about the edoc content of an entry, without downloading the edoc in its entirety.\n- Provide an entry ID, and get back the Content-Type and Content-Length in the response headers.\n- This route does not provide a way to download the actual edoc. Instead, it just gives metadata information about the edoc associated with the entry.\n- If an error occurs, the error message can be found in the X-APIServer-Error HTTP response header.",
- "operationId": "GetDocumentContentType",
+ "summary": "Returns the links assigned to an entry.",
+ "description": "- Returns the links assigned to an entry.\n- Provide an entry ID, and get a paged listing of links assigned to that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListLinks",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -2986,48 +3476,149 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested document ID.",
+ "description": "The requested entry ID.",
"schema": {
"type": "integer",
"format": "int32"
},
"x-position": 2
+ },
+ {
+ "name": "Prefer",
+ "x-originalName": "prefer",
+ "in": "header",
+ "description": "An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 3
+ },
+ {
+ "name": "$select",
+ "in": "query",
+ "description": "Limits the properties returned in the result.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 4
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 6
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "Limits the number of items returned from a collection.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 7
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "Excludes the specified number of items of the queried collection from the result.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 8
+ },
+ {
+ "name": "$count",
+ "in": "query",
+ "description": "Indicates whether the total count of items within a collection are returned in the result.",
+ "schema": {
+ "type": "boolean"
+ },
+ "x-position": 9
}
],
"responses": {
"200": {
- "description": "Get edoc info successfully."
+ "description": "A collection of links assigned to the entry.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LinkCollectionResponse"
+ }
+ }
+ }
},
"400": {
- "description": "Invalid or bad request."
+ "description": "Invalid or bad request.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
"401": {
- "description": "Access token is invalid or expired."
+ "description": "Access token is invalid or expired.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
"403": {
- "description": "Access denied for the operation."
+ "description": "Access denied for the operation.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
"404": {
- "description": "Request entry id not found."
- },
- "423": {
- "description": "Entry is locked."
+ "description": "Request entry id not found.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
},
"429": {
- "description": "Rate limit is reached."
+ "description": "Rate limit is reached.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
}
}
- },
- "get": {
+ }
+ },
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/Copy": {
+ "post": {
"tags": [
"Entries"
],
- "summary": "Returns an entry's edoc resource in a stream format.",
- "description": "- Returns an entry's edoc resource in a stream format.\n- Provide an entry ID, and get the edoc resource as part of the response content.\n- Optional header: Range. Use the Range header (single range with byte unit) to retrieve partial content of the edoc, rather than the entire edoc.",
- "operationId": "ExportDocument",
+ "summary": "Copies a new child entry in a folder.",
+ "description": "- Copy a new child entry in the designated folder.\n- Provide the parent folder ID, and based on the request body, copy a child entry of the designated folder.\n- Required OAuth scope: repository.Write",
+ "operationId": "CopyEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -3040,7 +3631,7 @@
"name": "entryId",
"in": "path",
"required": true,
- "description": "The requested document ID.",
+ "description": "The folder ID that the entry will be created in.",
"schema": {
"type": "integer",
"format": "int32"
@@ -3048,36 +3639,48 @@
"x-position": 2
},
{
- "name": "Range",
- "x-originalName": "range",
- "in": "header",
- "description": "An optional header used to retrieve partial content of the edoc. Only supports single\n range with byte unit.",
+ "name": "culture",
+ "in": "query",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.",
"schema": {
"type": "string",
+ "default": "",
"nullable": true
},
- "x-position": 3
+ "x-position": 4
}
],
- "responses": {
- "200": {
- "description": "Get edoc successfully.",
- "content": {
- "application/octet-stream": {
- "schema": {
- "type": "string",
- "format": "binary"
+ "requestBody": {
+ "x-name": "request",
+ "description": "The request body.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CopyEntryRequest"
+ },
+ "examples": {
+ "1": {
+ "summary": "Copy an entry",
+ "description": "We can copy an entry (marked by sourceId property) to a destination (marked in URL).",
+ "value": {
+ "sourceId": 123,
+ "name": "CopiedEntry",
+ "autoRename": false
+ }
}
}
}
},
- "206": {
- "description": "Get edoc range successfully.",
+ "required": true,
+ "x-position": 3
+ },
+ "responses": {
+ "201": {
+ "description": "The copied entry.",
"content": {
- "application/octet-stream": {
+ "application/json": {
"schema": {
- "type": "string",
- "format": "binary"
+ "$ref": "#/components/schemas/Entry"
}
}
}
@@ -3113,7 +3716,7 @@
}
},
"404": {
- "description": "Request entry id not found.",
+ "description": "Request entry ID not found.",
"content": {
"application/json": {
"schema": {
@@ -3122,8 +3725,18 @@
}
}
},
- "423": {
- "description": "Entry is locked.",
+ "409": {
+ "description": "Entry name conflicts.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ProblemDetails"
+ }
+ }
+ }
+ },
+ "413": {
+ "description": "Request is too large.",
"content": {
"application/json": {
"schema": {
@@ -3145,17 +3758,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Document/pages": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Document/Edoc": {
"delete": {
"tags": [
"Entries"
],
- "summary": "Deletes the pages associated with an entry.",
- "description": "- Delete the pages associated with the provided entry ID. If no pageRange is specified, all pages will be deleted.\n- Optional parameter: pageRange (default empty). The value should be a comma-seperated string which contains non-overlapping single values, or page ranges. Ex: \"1,2,3\", \"1-3,5\", \"2-7,10-12.\"",
- "operationId": "DeletePages",
+ "summary": "Deletes the edoc associated with an entry.",
+ "description": "- Delete the edoc associated with the provided entry ID.\n- Required OAuth scope: repository.Write ",
+ "operationId": "DeleteElectronicDocument",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -3174,25 +3787,15 @@
"format": "int32"
},
"x-position": 2
- },
- {
- "name": "pageRange",
- "in": "query",
- "description": "The pages to be deleted.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 3
}
],
"responses": {
"200": {
- "description": "Deleted pages successfully.",
+ "description": "The updated entry.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueOfBoolean"
+ "$ref": "#/components/schemas/Entry"
}
}
}
@@ -3260,17 +3863,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Document/GetEdocWithAuditReason": {
- "post": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Document/Pages": {
+ "delete": {
"tags": [
"Entries"
],
- "summary": "Returns an entry's edoc resource in a stream format, including an audit reason.",
- "description": "- Returns an entry's edoc resource in a stream format while including an audit reason.\n- Provide an entry ID and audit reason/comment in the request body, and get the edoc resource as part of the response content.\n- Optional header: Range. Use the Range header (single range with byte unit) to retrieve partial content of the edoc, rather than the entire edoc. This route is identical to the GET edoc route, but allows clients to include an audit reason when downloading the edoc.",
- "operationId": "ExportDocumentWithAuditReason",
+ "summary": "Deletes the pages associated with an entry.",
+ "description": "- Delete the pages associated with the provided entry ID. If no pageRange is specified, all pages will be deleted.\n- Optional parameter: pageRange (default empty). The value should be a comma-separated string which contains non-overlapping single values, or page ranges. Ex: \"1,2,3\", \"1-3,5\", \"2-7,10-12.\"\n- Required OAuth scope: repository.Write",
+ "operationId": "DeletePages",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -3291,47 +3894,23 @@
"x-position": 2
},
{
- "name": "Range",
- "x-originalName": "range",
- "in": "header",
- "description": "An optional header used to retrieve partial content of the edoc. Only supports single\n range with byte unit.",
+ "name": "pageRange",
+ "in": "query",
+ "description": "The pages to be deleted.",
"schema": {
"type": "string",
"nullable": true
},
- "x-position": 4
+ "x-position": 3
}
],
- "requestBody": {
- "x-name": "request",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetEdocWithAuditReasonRequest"
- }
- }
- },
- "x-position": 3
- },
"responses": {
"200": {
- "description": "Get edoc successfully.",
- "content": {
- "application/octet-stream": {
- "schema": {
- "type": "string",
- "format": "binary"
- }
- }
- }
- },
- "206": {
- "description": "Get edoc range successfully.",
+ "description": "The updated entry.",
"content": {
- "application/octet-stream": {
+ "application/json": {
"schema": {
- "type": "string",
- "format": "binary"
+ "$ref": "#/components/schemas/Entry"
}
}
}
@@ -3376,16 +3955,6 @@
}
}
},
- "413": {
- "description": "Request is too large.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
"423": {
"description": "Entry is locked.",
"content": {
@@ -3409,17 +3978,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/fields/GetDynamicFieldLogicValue": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Fields/GetDynamicFieldLogicValue": {
"post": {
"tags": [
"Entries"
],
"summary": "Returns the dynamic field logic values assigned to an entry.",
- "description": "- Returns dynamic field logic values with the current values of the fields in the template.\n- Provide an entry ID and field values in the JSON body to get dynamic field logic values.\n Independent and non-dynamic fields in the request body will be ignored, and only related dynamic field logic values for the assigned template will be returned.",
- "operationId": "GetDynamicFieldValues",
+ "description": "- Returns dynamic field logic values with the current values of the fields in the template.\n- Provide an entry ID and field values in the JSON body to get dynamic field logic values.\n- Independent and non-dynamic fields in the request body will be ignored, and only related dynamic field logic values for the assigned template will be returned.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListDynamicFieldValues",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -3442,18 +4011,20 @@
],
"requestBody": {
"x-name": "request",
+ "description": "The request body.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/GetDynamicFieldLogicValueRequest"
+ "$ref": "#/components/schemas/ListDynamicFieldValuesRequest"
}
}
},
+ "required": true,
"x-position": 3
},
"responses": {
"200": {
- "description": "Get dynamic field logic values successfully.",
+ "description": "A collection of dynamic field values.",
"content": {
"application/json": {
"schema": {
@@ -3531,17 +4102,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Entries/{entryId}/template": {
+ "/v2/Repositories/{repositoryId}/Entries/{entryId}/Template": {
"delete": {
"tags": [
"Entries"
],
"summary": "Removes the currently assigned template from an entry.",
- "description": "- Remove the currently assigned template from the specified entry.\n- Provide an entry ID to clear template value on.\n- If the entry does not have a template assigned, no change will be made.",
- "operationId": "DeleteAssignedTemplate",
+ "description": "- Remove the currently assigned template from the specified entry.\n- Provide an entry ID to clear template value on.\n- If the entry does not have a template assigned, no change will be made.\n- Required OAuth scope: repository.Write",
+ "operationId": "RemoveTemplate",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -3564,7 +4135,7 @@
],
"responses": {
"200": {
- "description": "Remove the currently assigned template successfully.",
+ "description": "The updated entry.",
"content": {
"application/json": {
"schema": {
@@ -3640,11 +4211,11 @@
"Entries"
],
"summary": "Assigns a template to an entry.",
- "description": "- Assign a template to an entry.\n- Provide an entry ID, template name, and a list of template fields to assign to that entry.\n- Only template values will be modified. Any existing independent fields on the entry will not be modified, nor will they be added if included in the request. The only modification to fields will only occur on templated fields. If the previously assigned template includes common template fields as the newly assigned template, the common field values will not be modified.",
- "operationId": "WriteTemplateValueToEntry",
+ "description": "- Assign a template to an entry.\n- Provide an entry ID, template name, and a list of template fields to assign to that entry.\n- Only template values will be modified. Any existing independent fields on the entry will not be modified, nor will they be added if included in the request. The only modification to fields will only occur on templated fields. If the previously assigned template includes common template fields as the newly assigned template, the common field values will not be modified.\n- Required OAuth scope: repository.Write",
+ "operationId": "SetTemplate",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -3667,7 +4238,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used.\n The value should be a standard language tag. This may be used when setting field values with tokens.",
+ "description": "An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.",
"schema": {
"type": "string",
"default": "",
@@ -3682,7 +4253,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/PutTemplateRequest"
+ "$ref": "#/components/schemas/SetTemplateRequest"
},
"examples": {
"1": {
@@ -3697,42 +4268,33 @@
"description": "If the template contains fields Today and Address, we can set the template to an entry using the above request with specified fields values.",
"value": {
"templateName": "sample template 2",
- "fields": {
- "Today": {
+ "fields": [
+ {
+ "name": "Today",
"values": [
- {
- "value": "2020-02-18T00:00:00",
- "position": 1
- }
+ "2020-02-18T00:00:00"
]
},
- "Address": {
+ {
+ "name": "Address",
"values": [
- {
- "value": "3545 Long Beach Blvd. Long Beach CA, 90807 U.S.A.",
- "position": 1
- },
- {
- "value": "306, 1 Valleybrook Drive North York, Toronto, Ontario M3B2S7 CANADA",
- "position": 2
- },
- {
- "value": "2307, Westlands Centre 20 Westlands Road Quarry Bay, Hong Kong",
- "position": 3
- }
+ "3545 Long Beach Blvd. Long Beach CA, 90807 U.S.A.",
+ "306, 1 Valleybrook Drive North York, Toronto, Ontario M3B2S7 CANADA",
+ "2307, Westlands Centre 20 Westlands Road Quarry Bay, Hong Kong"
]
}
- }
+ ]
}
}
}
}
},
+ "required": true,
"x-position": 3
},
"responses": {
"200": {
- "description": "Assign a template successfully.",
+ "description": "The updated entry.",
"content": {
"application/json": {
"schema": {
@@ -3814,24 +4376,21 @@
}
}
},
- "/v1/Repositories": {
+ "/v2/Repositories": {
"get": {
"tags": [
"Repositories"
],
"summary": "Returns the list of repositories accessible to the user.",
- "description": "- Returns the repository resource list that current user has access to.",
- "operationId": "GetRepositoryList",
+ "description": "- Returns the repository resource list that current user has access to.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListRepositories",
"responses": {
"200": {
- "description": "Get the respository resource list successfully.",
+ "description": "A collection of respositories.",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/RepositoryInfo"
- }
+ "$ref": "#/components/schemas/RepositoryCollectionResponse"
}
}
}
@@ -3879,101 +4438,17 @@
}
}
},
- "/v1/Repositories/{repoId}/AuditReasons": {
- "get": {
+ "/v2/Repositories/{repositoryId}/Searches/SearchAsync": {
+ "post": {
"tags": [
- "AuditReasons"
+ "Searches"
],
- "summary": "Returns the audit reasons associated with the authenticated user.",
- "description": "- Returns the audit reasons associated with the authenticated user. Inherited audit reasons are included.\n- Only includes audit reasons associated with available API functionalities, like delete entry and export document.\n- If the authenticated user does not have the appropriate Laserfiche feature right, the audit reasons associated with that feature right will not be included.",
- "operationId": "GetAuditReasons",
+ "summary": "Starts an asynchronous search task.",
+ "description": "- Runs a search operation on the repository.\n- The status for search operations must be checked via the Tasks route.\n- Optional body parameters: FuzzyType: (default none), which can be used to determine what is considered a match by number of letters or percentage. FuzzyFactor: integer value that determines the degree to which a search will be considered a match (integer value for NumberOfLetters, or int value representing a percentage).\n- Required OAuth scope: repository.Read",
+ "operationId": "StartSearchEntry",
"parameters": [
{
- "name": "repoId",
- "in": "path",
- "required": true,
- "description": "The requested repository ID.",
- "schema": {
- "type": "string"
- },
- "x-position": 1
- }
- ],
- "responses": {
- "200": {
- "description": "Get audit reasons successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/AuditReasons"
- }
- }
- }
- },
- "400": {
- "description": "Invalid or bad request.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "401": {
- "description": "Access token is invalid or expired.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "403": {
- "description": "Access denied for the operation.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "404": {
- "description": "Not found.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "429": {
- "description": "Rate limit is reached.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- }
- }
- }
- },
- "/v1/Repositories/{repoId}/Searches": {
- "post": {
- "tags": [
- "Searches"
- ],
- "summary": "Runs a search in the specified repository.",
- "description": "- Runs a search operation on the repository.\n- Optional body parameters: FuzzyType: (default none), which can be used to determine what is considered a match by number of letters or percentage. FuzzyFactor: integer value that determines the degree to which a search will be considered a match (integer value for NumberOfLetters, or int value representing a percentage). The status for search operations must be checked via the Search specific status checking route. ",
- "operationId": "CreateSearchOperation",
- "parameters": [
- {
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -3989,7 +4464,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AdvancedSearchRequest"
+ "$ref": "#/components/schemas/StartSearchEntryRequest"
},
"examples": {
"1": {
@@ -4013,15 +4488,16 @@
}
}
},
+ "required": true,
"x-position": 2
},
"responses": {
- "201": {
- "description": "Search operation start successfully.",
+ "202": {
+ "description": "A long operation task id.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/AcceptedOperation"
+ "$ref": "#/components/schemas/StartTaskResponse"
}
}
}
@@ -4057,7 +4533,7 @@
}
},
"404": {
- "description": "Not found.",
+ "description": "Requested repository not found.",
"content": {
"application/json": {
"schema": {
@@ -4089,17 +4565,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Searches/{searchToken}": {
+ "/v2/Repositories/{repositoryId}/Searches/{taskId}/Results": {
"get": {
"tags": [
"Searches"
],
- "summary": "Returns the status of a search operation.",
- "description": "- Returns search status.\n- Provide a token (returned in the create search asynchronous route), and get the search status, progress, and any errors that may have occurred. When the search is completed, the Location header can be inspected as a link to the search results.\n- OperationStatus can be one of the following : NotStarted, InProgress, Completed, Failed, or Canceled.",
- "operationId": "GetSearchStatus",
+ "summary": "Returns the results listing associated with a search task.",
+ "description": "- Returns a search result listing if the search is completed.\n- Search results expire after 5 minutes, but can be refreshed by retrieving the results again.\n- Optional query parameter: groupByOrderType (default false). This query parameter decides whether or not results are returned in groups based on their entry type.\n- Optional query parameter: refresh (default false). If the search listing should be refreshed to show updated values.\n- Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names. If field values are requested, only the first value is returned if it is a multi value field. The remaining field values can be retrieved via the GET fields route. Null or Empty field values should not be used to determine if a field is assigned to the entry.\n- Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: \"PropertyName direction,PropertyName2 direction\". sort order can be either \"asc\" or \"desc\".\n- Required OAuth scope: repository.Read",
+ "operationId": "ListSearchResults",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -4109,43 +4585,139 @@
"x-position": 1
},
{
- "name": "searchToken",
+ "name": "taskId",
"in": "path",
"required": true,
- "description": "The requested searchToken.",
+ "description": "The requested task ID.",
"schema": {
"type": "string"
},
"x-position": 2
+ },
+ {
+ "name": "groupByEntryType",
+ "in": "query",
+ "description": "Indicates if the result should be grouped by entry type or not. The default value is false.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "x-position": 3
+ },
+ {
+ "name": "refresh",
+ "in": "query",
+ "description": "Indicates if the search listing should be refreshed to show updated values. The default value is false.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "x-position": 4
+ },
+ {
+ "name": "fields",
+ "in": "query",
+ "style": "form",
+ "explode": true,
+ "description": "Optional array of field names. Field values corresponding to the given field names will be returned for each search result. ",
+ "schema": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ },
+ "x-position": 5
+ },
+ {
+ "name": "formatFieldValues",
+ "in": "query",
+ "description": "Indicates if field values should be formatted. Only applicable if Fields are specified. The default value is false.",
+ "schema": {
+ "type": "boolean",
+ "default": false
+ },
+ "x-position": 6
+ },
+ {
+ "name": "Prefer",
+ "x-originalName": "prefer",
+ "in": "header",
+ "description": "An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 7
+ },
+ {
+ "name": "culture",
+ "in": "query",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise culture will not be used for formatting.",
+ "schema": {
+ "type": "string",
+ "default": "",
+ "nullable": true
+ },
+ "x-position": 8
+ },
+ {
+ "name": "$select",
+ "in": "query",
+ "description": "Limits the properties returned in the result.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 9
+ },
+ {
+ "name": "$orderby",
+ "in": "query",
+ "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ },
+ "x-position": 11
+ },
+ {
+ "name": "$top",
+ "in": "query",
+ "description": "Limits the number of items returned from a collection.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 12
+ },
+ {
+ "name": "$skip",
+ "in": "query",
+ "description": "Excludes the specified number of items of the queried collection from the result.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 13
+ },
+ {
+ "name": "$count",
+ "in": "query",
+ "description": "Indicates whether the total count of items within a collection are returned in the result.",
+ "schema": {
+ "type": "boolean"
+ },
+ "x-position": 14
}
],
"responses": {
"200": {
- "description": "Search has failed. Check the errors property to find out why.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OperationProgress"
- }
- }
- }
- },
- "201": {
- "description": "Search is completed.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OperationProgress"
- }
- }
- }
- },
- "202": {
- "description": "Search is still in progress or not started.",
+ "description": "A collection of entry search results.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OperationProgress"
+ "$ref": "#/components/schemas/EntryCollectionResponse"
}
}
}
@@ -4181,7 +4753,7 @@
}
},
"404": {
- "description": "Request search token not found.",
+ "description": "Request taskId not found.",
"content": {
"application/json": {
"schema": {
@@ -4201,17 +4773,19 @@
}
}
}
- },
- "delete": {
+ }
+ },
+ "/v2/Repositories/{repositoryId}/Searches/{taskId}/Results/{rowNumber}/ContextHits": {
+ "get": {
"tags": [
"Searches"
],
- "summary": "Cancels or closes a search operation.",
- "description": "- Cancels a currently running search.\n- Closes a completed search.",
- "operationId": "CancelOrCloseSearch",
+ "summary": "Returns the context hits associated with a search result entry.",
+ "description": "- Returns the context hits associated with a search result entry.\n- Given a taskId, and rowNumber associated with a search entry in the listing, return the context hits for that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListSearchContextHits",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -4221,326 +4795,25 @@
"x-position": 1
},
{
- "name": "searchToken",
+ "name": "taskId",
"in": "path",
"required": true,
- "description": "The requested searchToken.",
+ "description": "The requested task ID.",
"schema": {
"type": "string"
},
"x-position": 2
- }
- ],
- "responses": {
- "200": {
- "description": "Cancel or closed search successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ODataValueOfBoolean"
- }
- }
- }
- },
- "400": {
- "description": "Invalid or bad request.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
},
- "401": {
- "description": "Access token is invalid or expired.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "403": {
- "description": "Access denied for the operation.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "404": {
- "description": "Request search token not found.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "429": {
- "description": "Rate limit is reached.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- }
- }
- }
- },
- "/v1/Repositories/{repoId}/Searches/{searchToken}/Results": {
- "get": {
- "tags": [
- "Searches"
- ],
- "summary": "Returns the results listing associated with a search operation.",
- "description": "- Returns a search result listing if the search is completed.\n- Optional query parameter: groupByOrderType (default false). This query parameter decides whether or not results are returned in groups based on their entry type.\n- Optional query parameter: refresh (default false). If the search listing should be refreshed to show updated values.\n- Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: \"PropertyName direction,PropertyName2 direction\". sort order can be either \"asc\" or \"desc\". Search results expire after 5 minutes, but can be refreshed by retrieving the results again.\n- Optionally returns field values for the entries in the search result listing. Each field name needs to be specified in the request. Maximum limit of 10 field names.\n- If field values are requested, only the first value is returned if it is a multi value field.\n- Null or Empty field values should not be used to determine if a field is assigned to the entry.",
- "operationId": "GetSearchResults",
- "parameters": [
- {
- "name": "repoId",
- "in": "path",
- "required": true,
- "description": "The requested repository ID.",
- "schema": {
- "type": "string"
- },
- "x-position": 1
- },
- {
- "name": "searchToken",
- "in": "path",
- "required": true,
- "description": "The requested searchToken.",
- "schema": {
- "type": "string"
- },
- "x-position": 2
- },
- {
- "name": "groupByEntryType",
- "in": "query",
- "description": "An optional query parameter used to indicate if the result should be grouped by entry type or not.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 3
- },
- {
- "name": "refresh",
- "in": "query",
- "description": "If the search listing should be refreshed to show updated values.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 4
- },
- {
- "name": "fields",
- "in": "query",
- "style": "form",
- "explode": true,
- "description": "Optional array of field names. Field values corresponding to the given field names will be returned for each search result. ",
- "schema": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- },
- "x-position": 5
- },
- {
- "name": "formatFields",
- "in": "query",
- "description": "Boolean for if field values should be formatted. Only applicable if Fields are specified.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 6
- },
- {
- "name": "Prefer",
- "x-originalName": "prefer",
- "in": "header",
- "description": "An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 7
- },
- {
- "name": "culture",
- "in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise\n culture will not be used for formatting.",
- "schema": {
- "type": "string",
- "default": "",
- "nullable": true
- },
- "x-position": 8
- },
- {
- "name": "$select",
- "in": "query",
- "description": "Limits the properties returned in the result.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 9
- },
- {
- "name": "$orderby",
- "in": "query",
- "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.",
- "schema": {
- "type": "string",
- "nullable": true
- },
- "x-position": 11
- },
- {
- "name": "$top",
- "in": "query",
- "description": "Limits the number of items returned from a collection.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 12
- },
- {
- "name": "$skip",
- "in": "query",
- "description": "Excludes the specified number of items of the queried collection from the result.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 13
- },
- {
- "name": "$count",
- "in": "query",
- "description": "Indicates whether the total count of items within a collection are returned in the result.",
- "schema": {
- "type": "boolean"
- },
- "x-position": 14
- }
- ],
- "responses": {
- "200": {
- "description": "Get search result successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfEntry"
- }
- }
- }
- },
- "400": {
- "description": "Invalid or bad request.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "401": {
- "description": "Access token is invalid or expired.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "403": {
- "description": "Access denied for the operation.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "404": {
- "description": "Request search token not found.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "429": {
- "description": "Rate limit is reached.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- }
- }
- }
- },
- "/v1/Repositories/{repoId}/Searches/{searchToken}/Results/{rowNumber}/ContextHits": {
- "get": {
- "tags": [
- "Searches"
- ],
- "summary": "Returns the context hits associated with a search result entry.",
- "description": "- Returns the context hits associated with a search result entry.\n- Given a searchToken, and rowNumber associated with a search entry in the listing, return the context hits for that entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetSearchContextHits",
- "parameters": [
- {
- "name": "repoId",
- "in": "path",
- "required": true,
- "description": "The requested repository ID.",
- "schema": {
- "type": "string"
- },
- "x-position": 1
- },
- {
- "name": "searchToken",
- "in": "path",
- "required": true,
- "description": "The requested searchToken.",
- "schema": {
- "type": "string"
- },
- "x-position": 2
- },
- {
- "name": "rowNumber",
- "in": "path",
- "required": true,
- "description": "The search result listing row number to get context hits for.",
- "schema": {
- "type": "integer",
- "format": "int32"
- },
- "x-position": 3
+ {
+ "name": "rowNumber",
+ "in": "path",
+ "required": true,
+ "description": "The search result listing row number to get context hits for.",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "x-position": 3
},
{
"name": "Prefer",
@@ -4605,11 +4878,11 @@
],
"responses": {
"200": {
- "description": "Get search context hits successfully.",
+ "description": "A collection of context hits for a search result.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfContextHit"
+ "$ref": "#/components/schemas/SearchContextHitCollectionResponse"
}
}
}
@@ -4645,7 +4918,7 @@
}
},
"404": {
- "description": "Request search token not found.",
+ "description": "Request taskId not found.",
"content": {
"application/json": {
"schema": {
@@ -4667,17 +4940,17 @@
}
}
},
- "/v1/Repositories/{repoId}/SimpleSearches": {
+ "/v2/Repositories/{repositoryId}/SimpleSearches": {
"post": {
"tags": [
"SimpleSearches"
],
"summary": "Runs a \"simple\" search operation.",
- "description": "- Runs a \"simple\" search operation on the repository.\n- Returns a truncated search result listing.\n- Search result listing may be truncated, depending on number of results. Additionally, searches may time out if they take too long. Use the other search route to run full searches.\n- Optionally returns field values for the entries in the search result listing. Each field name needs to be specified in the request. Maximum limit of 10 field names.\n- If field values are requested, only the first value is returned if it is a multi value field.\n- Null or Empty field values should not be used to determine if a field is assigned to the entry.",
- "operationId": "CreateSimpleSearchOperation",
+ "description": "- Runs a \"simple\" search operation on the repository.\n- Returns a truncated search result listing.\n- Search result listing may be truncated, depending on number of results. Additionally, searches may time out if they take too long. Use the other search route to run full searches.\n- Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names. If field values are requested, only the first value is returned if it is a multi value field. The remaining field values can be retrieved via the GET fields route. Null or Empty field values should not be used to determine if a field is assigned to the entry.\n- Required OAuth scope: repository.Read",
+ "operationId": "SearchEntry",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -4702,18 +4975,19 @@
"x-position": 2
},
{
- "name": "formatFields",
+ "name": "formatFieldValues",
"in": "query",
- "description": "Boolean for if field values should be formatted. Only applicable if Fields are specified.",
+ "description": "Indicates if field values should be formatted. Only applicable if Fields are specified. The default value is false.",
"schema": {
- "type": "boolean"
+ "type": "boolean",
+ "default": false
},
"x-position": 3
},
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise\n culture will not be used for formatting.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise culture will not be used for formatting.",
"schema": {
"type": "string",
"default": "",
@@ -4752,7 +5026,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/SimpleSearchRequest"
+ "$ref": "#/components/schemas/SearchEntryRequest"
},
"examples": {
"1": {
@@ -4765,28 +5039,26 @@
}
}
},
+ "required": true,
"x-position": 4
},
"responses": {
"200": {
- "description": "Simple search run successfully.",
+ "description": "A collection of entry search results.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfEntry"
+ "$ref": "#/components/schemas/EntryCollectionResponse"
}
}
}
},
- "204": {
- "description": "No search results found."
- },
"206": {
- "description": "There are more search results.",
+ "description": "A truncated collection of entry search results.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfEntry"
+ "$ref": "#/components/schemas/EntryCollectionResponse"
}
}
}
@@ -4854,17 +5126,17 @@
}
}
},
- "/v1/Repositories/{repoId}/TagDefinitions": {
+ "/v2/Repositories/{repositoryId}/TagDefinitions": {
"get": {
"tags": [
"TagDefinitions"
],
"summary": "Returns the tag definitions associated with a repository.",
- "description": "- Returns all tag definitions in the repository.\n- Provide a repository ID and get a paged listing of tag definitions available in the repository. Useful when trying to display all tag definitions available, not only tags assigned to a specific entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetTagDefinitions",
+ "description": "- Returns all tag definitions in the repository.\n- Provide a repository ID and get a paged listing of tag definitions available in the repository. Useful when trying to display all tag definitions available, not only tags assigned to a specific entry.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListTagDefinitions",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -4887,7 +5159,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -4947,11 +5219,11 @@
],
"responses": {
"200": {
- "description": "Get tag definitions successfully.",
+ "description": "A collection of tag definitions.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfWTagInfo"
+ "$ref": "#/components/schemas/TagDefinitionCollectionResponse"
}
}
}
@@ -5009,17 +5281,17 @@
}
}
},
- "/v1/Repositories/{repoId}/TagDefinitions/{tagId}": {
+ "/v2/Repositories/{repositoryId}/TagDefinitions/{tagId}": {
"get": {
"tags": [
"TagDefinitions"
],
"summary": "Returns a single tag definition object.",
- "description": "- Returns a single tag definition.\n- Provide a tag definition ID, and get the single tag definition associated with that ID. Useful when another route provides a minimal amount of details, and more information about the specific tag is needed.\n- Allowed OData query options: Select",
- "operationId": "GetTagDefinitionById",
+ "description": "- Returns a single tag definition.\n- Provide a tag definition ID, and get the single tag definition associated with that ID. Useful when another route provides a minimal amount of details, and more information about the specific tag is needed.\n- Allowed OData query options: Select\n- Required OAuth scope: repository.Read",
+ "operationId": "GetTagDefinition",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -5042,7 +5314,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -5063,11 +5335,11 @@
],
"responses": {
"200": {
- "description": "Get tag definition successfully.",
+ "description": "A single tag definition.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/WTagInfo"
+ "$ref": "#/components/schemas/TagDefinition"
}
}
}
@@ -5125,17 +5397,17 @@
}
}
},
- "/v1/Repositories/{repoId}/Tasks/{operationToken}": {
+ "/v2/Repositories/{repositoryId}/Tasks": {
"get": {
"tags": [
"Tasks"
],
- "summary": "Returns the status of an operation.",
- "description": "- Returns the status of an operation.\n- Provide an operationToken (returned in other asynchronous routes) to get the operation status, progress, and any errors that may have occurred. When the operation is completed, the Location header can be inspected as a link to the modified resources (if relevant).\n- OperationStatus can be one of the following values: NotStarted, InProgress, Completed, or Failed.",
- "operationId": "GetOperationStatusAndProgress",
+ "summary": "Returns the status of a set of one or more tasks.",
+ "description": "- Returns the status of a set of one or more tasks.\n- Provide a comma-separated list of task IDs to get the task status, progress, and any errors that may have occurred.\n- Leave the taskIds query parameter empty, to get the list of all the task IDs associated with the current access token.\n- TaskStatus can be one of the following values: NotStarted, InProgress, Completed, Cancelled, or Failed.\n- This API employs long polling technique and could return the result immediately (e.g. if the export operation is failed or completed successfully) or after atmost 60 seconds.\n- Required OAuth scope: None",
+ "operationId": "ListTasks",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID",
@@ -5145,43 +5417,28 @@
"x-position": 1
},
{
- "name": "operationToken",
- "in": "path",
- "required": true,
- "description": "The operation token",
+ "name": "taskIds",
+ "in": "query",
+ "style": "form",
+ "explode": true,
+ "description": "An array of task IDs. Leave this parameter empty to get the list of all the tasks associated with the current access token.",
"schema": {
- "type": "string"
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
},
"x-position": 2
}
],
"responses": {
"200": {
- "description": "Get completed or failed operation status with no result successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OperationProgress"
- }
- }
- }
- },
- "201": {
- "description": "Get completed operation status with operation result url in Location header.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/OperationProgress"
- }
- }
- }
- },
- "202": {
- "description": "Get not started or in progress operation status successfully.",
+ "description": "A collection of task progresses.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/OperationProgress"
+ "$ref": "#/components/schemas/TaskCollectionResponse"
}
}
}
@@ -5217,7 +5474,7 @@
}
},
"404": {
- "description": "Request operationToken not found.",
+ "description": "Repository is not found.",
"content": {
"application/json": {
"schema": {
@@ -5242,12 +5499,12 @@
"tags": [
"Tasks"
],
- "summary": "Cancels an operation.",
- "description": "- Cancels an operation.\n- Provide an operationToken to cancel the operation, if possible. Should be used if an operation was created in error, or is no longer necessary.\n- Rollbacks must be done manually. For example, if a copy operation is started and is halfway complete when canceled, the client application is responsible for cleaning up the files that were successfully copied before the operation was canceled.",
- "operationId": "CancelOperation",
+ "summary": "Starts the cancellation for a set of one or more tasks.",
+ "description": "- Starts the cancellation for a set of one or more tasks.\n- Provide comma-separated list of task IDs to cancel. Should be used if an operation was created in error, or is no longer necessary.\n- Check the status of the task to determine if the task has been cancelled successfully.\n- Leave the taskIds query parameter empty, to cancel the list of all the task IDs associated with the current access token.\n- Rollbacks must be done manually. For example, if a copy operation is started and is halfway complete when canceled, the client application is responsible for cleaning up the files that were successfully copied before the operation was canceled.\n- Required OAuth scope: None",
+ "operationId": "CancelTasks",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID",
@@ -5257,19 +5514,31 @@
"x-position": 1
},
{
- "name": "operationToken",
- "in": "path",
- "required": true,
- "description": "The operation token",
+ "name": "taskIds",
+ "in": "query",
+ "style": "form",
+ "explode": true,
+ "description": "An array of task IDs. Leave this parameter empty to cancel the list of all the tasks associated with the current access token.",
"schema": {
- "type": "string"
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
},
"x-position": 2
}
],
"responses": {
- "204": {
- "description": "Cancel operation successfully."
+ "200": {
+ "description": "A collection of task cancellation results.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CancelTasksResponse"
+ }
+ }
+ }
},
"400": {
"description": "Invalid or bad request.",
@@ -5302,7 +5571,7 @@
}
},
"404": {
- "description": "Request operationToken not found.",
+ "description": "Repository is not found.",
"content": {
"application/json": {
"schema": {
@@ -5324,17 +5593,17 @@
}
}
},
- "/v1/Repositories/{repoId}/TemplateDefinitions": {
+ "/v2/Repositories/{repositoryId}/TemplateDefinitions": {
"get": {
"tags": [
"TemplateDefinitions"
],
"summary": "Returns the template definitions associated with a repository.",
- "description": "- Returns all template definitions (including field definitions) in the repository. If a template name query parameter is given, then a single template definition is returned.\n- Provide a repository ID, and get a paged listing of template definitions available in the repository. Useful when trying to find a list of all template definitions available, rather than a specific one.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetTemplateDefinitions",
+ "description": "- Returns all template definitions (including field definitions) in the repository. If a template name query parameter is given, then a single template definition is returned.\n- Provide a repository ID, and get a paged listing of template definitions available in the repository. Useful when trying to find a list of all template definitions available, rather than a specific one.\n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListTemplateDefinitions",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -5367,7 +5636,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -5427,11 +5696,11 @@
],
"responses": {
"200": {
- "description": "Get template definitions successfully.",
+ "description": "A collection of template definitions.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfWTemplateInfo"
+ "$ref": "#/components/schemas/TemplateDefinitionCollectionResponse"
}
}
}
@@ -5489,17 +5758,17 @@
}
}
},
- "/v1/Repositories/{repoId}/TemplateDefinitions/{templateId}": {
+ "/v2/Repositories/{repositoryId}/TemplateDefinitions/{templateId}": {
"get": {
"tags": [
"TemplateDefinitions"
],
"summary": "Returns a single template definition object.",
- "description": "- Returns a single template definition (including field definitions, if relevant).\n- Provide a template definition ID, and get the single template definition associated with that ID. Useful when a route provides a minimal amount of details, and more information about the specific template is needed.\n- Allowed OData query options: Select",
- "operationId": "GetTemplateDefinitionById",
+ "description": "- Returns a single template definition (including field definitions, if relevant).\n- Provide a template definition ID, and get the single template definition associated with that ID. Useful when a route provides a minimal amount of details, and more information about the specific template is needed.\n- Allowed OData query options: Select\n- Required OAuth scope: repository.Read",
+ "operationId": "GetTemplateDefinition",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -5522,7 +5791,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -5543,11 +5812,11 @@
],
"responses": {
"200": {
- "description": "Get template definition successfully.",
+ "description": "A single template definition.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/WTemplateInfo"
+ "$ref": "#/components/schemas/TemplateDefinition"
}
}
}
@@ -5605,17 +5874,17 @@
}
}
},
- "/v1/Repositories/{repoId}/TemplateDefinitions/{templateId}/Fields": {
+ "/v2/Repositories/{repositoryId}/TemplateDefinitions/{templateId}/FieldDefinitions": {
"get": {
"tags": [
"TemplateDefinitions"
],
"summary": "Returns the field definitions assigned to a template definition (by template definition ID).",
- "description": "- Returns the field definitions assigned to a template definition.\n- Provide a template definition ID, and get a paged listing of the field definitions assigned to that template. \n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetTemplateFieldDefinitions",
+ "description": "- Returns the field definitions assigned to a template definition.\n- Provide a template definition ID, and get a paged listing of the field definitions assigned to that template. \n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListTemplateFieldDefinitionsByTemplateId",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -5649,7 +5918,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -5709,11 +5978,11 @@
],
"responses": {
"200": {
- "description": "Get template field definitions successfully.",
+ "description": "A collection of template field definitions.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfTemplateFieldInfo"
+ "$ref": "#/components/schemas/TemplateFieldDefinitionCollectionResponse"
}
}
}
@@ -5771,17 +6040,17 @@
}
}
},
- "/v1/Repositories/{repoId}/TemplateDefinitions/Fields": {
+ "/v2/Repositories/{repositoryId}/TemplateDefinitions/FieldDefinitions": {
"get": {
"tags": [
"TemplateDefinitions"
],
"summary": "Returns the field definitions assigned to a template definition (by template definition name).",
- "description": "- Returns the field definitions assigned to a template definition.\n- Provide a template definition name, and get a paged listing of the field definitions assigned to that template. \n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.",
- "operationId": "GetTemplateFieldDefinitionsByTemplateName",
+ "description": "- Returns the field definitions assigned to a template definition.\n- Provide a template definition name, and get a paged listing of the field definitions assigned to that template. \n- Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.\n- Required OAuth scope: repository.Read",
+ "operationId": "ListTemplateFieldDefinitionsByTemplateName",
"parameters": [
{
- "name": "repoId",
+ "name": "repositoryId",
"in": "path",
"required": true,
"description": "The requested repository ID.",
@@ -5796,8 +6065,7 @@
"required": true,
"description": "A required query parameter for the requested template name.",
"schema": {
- "type": "string",
- "nullable": true
+ "type": "string"
},
"x-position": 2
},
@@ -5815,7 +6083,7 @@
{
"name": "culture",
"in": "query",
- "description": "An optional query parameter used to indicate the locale that should be used for formatting.\n The value should be a standard language tag.",
+ "description": "An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.",
"schema": {
"type": "string",
"default": "",
@@ -5875,11 +6143,11 @@
],
"responses": {
"200": {
- "description": "Get template field definitions successfully.",
+ "description": "A collection of template field definitions.",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ODataValueContextOfIListOfTemplateFieldInfo"
+ "$ref": "#/components/schemas/TemplateFieldDefinitionCollectionResponse"
}
}
}
@@ -5936,433 +6204,51 @@
}
}
}
- },
- "/v1/Repositories/{repoId}/ServerSession/Invalidate": {
- "post": {
- "tags": [
- "ServerSession"
- ],
- "summary": "Deprecated. Do not call this api.",
- "description": "- Deprecated.\n- Invalidates the server session.\n- Acts as a \"logout\" operation, and invalidates the session associated with the provided access token. This method should be used when the client wants to clean up the current session.\n- Only available in Laserfiche Cloud.",
- "operationId": "InvalidateServerSession",
- "parameters": [
- {
- "name": "repoId",
- "in": "path",
- "required": true,
- "description": "The requested repository ID.",
- "schema": {
- "type": "string"
- },
- "x-position": 1
- }
- ],
- "responses": {
- "200": {
- "description": "Invalidate the server session successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ODataValueOfBoolean"
- }
- }
- }
- },
- "400": {
- "description": "Invalid or bad request.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "401": {
- "description": "Access token is invalid or expired.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "403": {
- "description": "Access denied for the operation.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "404": {
- "description": "Not found.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "429": {
- "description": "Rate limit is reached.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- }
- },
- "deprecated": true
- }
- },
- "/v1/Repositories/{repoId}/ServerSession/Refresh": {
- "post": {
- "tags": [
- "ServerSession"
- ],
- "summary": "Deprecated. Do not call this api.",
- "description": "- Deprecated.\n- Refreshes the session associated with the access token. This is only necessary if you want to keep the same session alive, otherwise a new session will be automatically created when the session expires.\n- When a client application wants to keep a session alive that has been idle for an hour, this route can be used to refresh the expiration timer associated with the access token.\n- Only available in Laserfiche Cloud.",
- "operationId": "RefreshServerSession",
- "parameters": [
- {
- "name": "repoId",
- "in": "path",
- "required": true,
- "description": "The requested repository ID.",
- "schema": {
- "type": "string"
- },
- "x-position": 1
- }
- ],
- "responses": {
- "200": {
- "description": "Refresh the session successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ODataValueOfDateTime"
- }
- }
- }
- },
- "400": {
- "description": "Invalid or bad request.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "401": {
- "description": "Access token is invalid or expired.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "403": {
- "description": "Access denied for the operation.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "404": {
- "description": "Not found.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "429": {
- "description": "Rate limit is reached.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- }
- },
- "deprecated": true
- }
- },
- "/v1/Repositories/{repoId}/ServerSession/Create": {
- "post": {
- "tags": [
- "ServerSession"
- ],
- "summary": "Deprecated. Do not call this api.",
- "description": "- Deprecated. This function is a no-op, always returns 200.\n- Only available in Laserfiche Cloud.",
- "operationId": "CreateServerSession",
- "parameters": [
- {
- "name": "repoId",
- "in": "path",
- "required": true,
- "description": "The requested repository ID.",
- "schema": {
- "type": "string"
- },
- "x-position": 1
- }
- ],
- "responses": {
- "200": {
- "description": "Create the session successfully.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ODataValueOfBoolean"
- }
- }
- }
- },
- "401": {
- "description": "Access token is invalid or expired.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- },
- "403": {
- "description": "Access denied for the operation.",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/ProblemDetails"
- }
- }
- }
- }
- },
- "deprecated": true
- }
}
},
"components": {
"schemas": {
- "CreateEntryResult": {
+ "AttributeCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of Attribute.",
"additionalProperties": false,
"properties": {
- "operations": {
- "$ref": "#/components/schemas/CreateEntryOperations"
- },
- "documentLink": {
+ "@odata.nextLink": {
"type": "string",
- "description": "A link to get the created entry.",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
"nullable": true
+ },
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Attribute"
+ }
}
}
},
- "CreateEntryOperations": {
+ "Attribute": {
"type": "object",
- "description": "The results of each operation needed in order to create the electronic document with optional template and fields.",
+ "description": "Represents a trustee attribute.",
"additionalProperties": false,
"properties": {
- "entryCreate": {
- "$ref": "#/components/schemas/EntryCreate"
- },
- "setEdoc": {
- "$ref": "#/components/schemas/SetEdoc"
- },
- "setTemplate": {
- "$ref": "#/components/schemas/SetTemplate"
- },
- "setFields": {
- "$ref": "#/components/schemas/SetFields"
- },
- "setTags": {
- "$ref": "#/components/schemas/SetTags"
- },
- "setLinks": {
- "$ref": "#/components/schemas/SetLinks"
- }
- }
- },
- "EntryCreate": {
- "type": "object",
- "description": "The result of trying to create the entry.",
- "additionalProperties": false,
- "properties": {
- "exceptions": {
- "type": "array",
- "description": "The list of exceptions that occured when trying to perform the operation.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/APIServerException"
- }
- },
- "entryId": {
- "type": "integer",
- "description": "The id of the created entry. If the id is 0, then the entry was not created.",
- "format": "int32"
- }
- }
- },
- "APIServerException": {
- "type": "object",
- "properties": {
- "operationId": {
- "type": "string",
- "description": "The id of the operation that threw the exception.",
- "nullable": true
- },
- "message": {
- "type": "string",
- "description": "The explaination of the exception that occurred.",
- "nullable": true
- },
- "errorCode": {
- "type": "integer",
- "description": "The code associated with the exception.",
- "format": "int32",
- "nullable": true
- },
- "errorClass": {
- "type": "string",
- "description": "The class of exceptions this belongs to.",
- "nullable": true
- },
- "statusCode": {
- "type": "integer",
- "description": "The HTTP status code returned.",
- "format": "int32",
- "nullable": true
- },
- "errorSource": {
+ "key": {
"type": "string",
- "description": "The source of where the exception occurred.",
+ "description": "The attribute key.",
"nullable": true
- }
- }
- },
- "SetEdoc": {
- "type": "object",
- "description": "The result of trying to create the electronic document.",
- "additionalProperties": false,
- "properties": {
- "exceptions": {
- "type": "array",
- "description": "The list of exceptions that occured when trying to perform the operation.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/APIServerException"
- }
- }
- }
- },
- "SetTemplate": {
- "type": "object",
- "description": "The result of trying to assign a template to the entry.",
- "additionalProperties": false,
- "properties": {
- "exceptions": {
- "type": "array",
- "description": "The list of exceptions that occured when trying to perform the operation.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/APIServerException"
- }
},
- "template": {
+ "value": {
"type": "string",
- "description": "The name of the template assigned to the entry. If this is null, then no template was assigned.",
+ "description": "The attribute value.",
"nullable": true
}
}
},
- "SetFields": {
- "type": "object",
- "description": "The result of trying to assign fields to the entry.",
- "additionalProperties": false,
- "properties": {
- "exceptions": {
- "type": "array",
- "description": "The list of exceptions that occured when trying to perform the operation.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/APIServerException"
- }
- },
- "fieldCount": {
- "type": "integer",
- "description": "The number of fields assigned to the entry.",
- "format": "int32"
- }
- }
- },
- "SetTags": {
- "type": "object",
- "description": "The result of trying to assign fields to the entry.",
- "additionalProperties": false,
- "properties": {
- "exceptions": {
- "type": "array",
- "description": "The list of exceptions that occured when trying to perform the operation.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/APIServerException"
- }
- },
- "assignedTags": {
- "type": "array",
- "description": "The tags that were assigned to the entry",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- }
- },
- "SetLinks": {
- "type": "object",
- "description": "The result of trying to assign a entry link to the entry.",
- "additionalProperties": false,
- "properties": {
- "exceptions": {
- "type": "array",
- "description": "The list of exceptions that occured when trying to perform the operation.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/APIServerException"
- }
- },
- "otherEntryIds": {
- "type": "array",
- "description": "The ids of the other entries linked to the entry",
- "nullable": true,
- "items": {
- "type": "integer",
- "format": "int32"
- }
- }
- }
- },
"ProblemDetails": {
"type": "object",
"description": "A machine-readable format for specifying errors in HTTP API responses based on https://tools.ietf.org/html/rfc7807.",
@@ -6411,838 +6297,897 @@
"errorCode": {
"type": "integer",
"description": "The error code.",
- "format": "int32"
+ "format": "int32",
+ "nullable": true
},
"traceId": {
"type": "string",
"description": "The trace id.",
"nullable": true
+ },
+ "instanceDetail": {
+ "type": "string",
+ "description": "The instance detail.",
+ "nullable": true
}
}
},
- "IHeaderDictionary": {
+ "AuditReasonCollectionResponse": {
"type": "object",
- "x-abstract": true,
+ "description": "Response containing a collection of AuditReason.",
"additionalProperties": false,
"properties": {
- "Item": {
- "type": "array",
- "items": {}
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
},
- "ContentLength": {
+ "@odata.count": {
"type": "integer",
- "format": "int64",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
"nullable": true
},
- "Accept": {
- "type": "array",
- "items": {}
- },
- "AcceptCharset": {
+ "value": {
"type": "array",
- "items": {}
+ "items": {
+ "$ref": "#/components/schemas/AuditReason"
+ }
+ }
+ }
+ },
+ "AuditReason": {
+ "type": "object",
+ "description": "Represents a user-defined audit reason for an audit event.",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "The audit reason id.",
+ "format": "int32"
},
- "AcceptEncoding": {
- "type": "array",
- "items": {}
+ "name": {
+ "type": "string",
+ "description": "The audit reason text.",
+ "nullable": true
},
- "AcceptLanguage": {
- "type": "array",
- "items": {}
+ "auditEventType": {
+ "description": "The audit event type for this audit reason.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/AuditEventType"
+ }
+ ]
+ }
+ }
+ },
+ "AuditEventType": {
+ "type": "string",
+ "description": "Enumeration of Laserfiche audit event types.",
+ "x-enumNames": [
+ "DeleteEntry",
+ "ExportDocument"
+ ],
+ "enum": [
+ "DeleteEntry",
+ "ExportDocument"
+ ]
+ },
+ "FieldDefinition": {
+ "type": "object",
+ "description": "Represents a field definition.",
+ "additionalProperties": false,
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the field.",
+ "nullable": true
},
- "AcceptRanges": {
- "type": "array",
- "items": {}
+ "displayName": {
+ "type": "string",
+ "description": "The localized name of the field.",
+ "nullable": true
},
- "AccessControlAllowCredentials": {
- "type": "array",
- "items": {}
+ "id": {
+ "type": "integer",
+ "description": "The ID of the field.",
+ "format": "int32"
},
- "AccessControlAllowHeaders": {
- "type": "array",
- "items": {}
+ "description": {
+ "type": "string",
+ "description": "The description of the field.",
+ "nullable": true
},
- "AccessControlAllowMethods": {
- "type": "array",
- "items": {}
+ "fieldType": {
+ "description": "The type of the field.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/FieldType"
+ }
+ ]
},
- "AccessControlAllowOrigin": {
- "type": "array",
- "items": {}
+ "length": {
+ "type": "integer",
+ "description": "The length of the field for variable length data types.",
+ "format": "int32"
},
- "AccessControlExposeHeaders": {
- "type": "array",
- "items": {}
+ "defaultValue": {
+ "type": "string",
+ "description": "The default value of the field for new entries that are assigned to a template the represented field is a member of.",
+ "nullable": true
},
- "AccessControlMaxAge": {
- "type": "array",
- "items": {}
+ "isMultiValue": {
+ "type": "boolean",
+ "description": "A boolean indicating if the represented template field supports multiple values."
},
- "AccessControlRequestHeaders": {
- "type": "array",
- "items": {}
+ "isRequired": {
+ "type": "boolean",
+ "description": "A boolean indicating if the represented field must have a value set on entries assigned to a template that the field is a member of."
},
- "AccessControlRequestMethod": {
- "type": "array",
- "items": {}
+ "constraint": {
+ "type": "string",
+ "description": "The constraint for values stored in the represented field.",
+ "nullable": true
},
- "Age": {
- "type": "array",
- "items": {}
+ "constraintError": {
+ "type": "string",
+ "description": "The error string that will be returned when the field constraint is violated when setting a value for this field.",
+ "nullable": true
},
- "Allow": {
+ "listValues": {
"type": "array",
- "items": {}
+ "description": "The list of items assigned to the represented field.",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
},
- "AltSvc": {
- "type": "array",
- "items": {}
+ "format": {
+ "description": "The display format of the represented field.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/FieldFormat"
+ }
+ ]
},
- "Authorization": {
- "type": "array",
- "items": {}
+ "currency": {
+ "type": "string",
+ "description": "The name of the currency that will be using when formatting the represented field when the Format property is set to the Currency member of the WFieldFormat enumeration.",
+ "nullable": true
},
- "Baggage": {
- "type": "array",
- "items": {}
+ "formatPattern": {
+ "type": "string",
+ "description": "The custom format pattern for fields that are configured to use a custom format.",
+ "nullable": true
+ }
+ }
+ },
+ "FieldType": {
+ "type": "string",
+ "description": "Enumeration of Laserfiche template field types.",
+ "x-enumNames": [
+ "DateTime",
+ "Blob",
+ "Date",
+ "ShortInteger",
+ "LongInteger",
+ "List",
+ "Number",
+ "String",
+ "Time"
+ ],
+ "enum": [
+ "DateTime",
+ "Blob",
+ "Date",
+ "ShortInteger",
+ "LongInteger",
+ "List",
+ "Number",
+ "String",
+ "Time"
+ ]
+ },
+ "FieldFormat": {
+ "type": "string",
+ "description": "Enumeration of Laserfiche template field formats.",
+ "x-enumNames": [
+ "None",
+ "ShortDate",
+ "LongDate",
+ "ShortDateTime",
+ "LongDateTime",
+ "ShortTime",
+ "LongTime",
+ "GeneralNumber",
+ "Currency",
+ "Percent",
+ "Scientific",
+ "Custom"
+ ],
+ "enum": [
+ "None",
+ "ShortDate",
+ "LongDate",
+ "ShortDateTime",
+ "LongDateTime",
+ "ShortTime",
+ "LongTime",
+ "GeneralNumber",
+ "Currency",
+ "Percent",
+ "Scientific",
+ "Custom"
+ ]
+ },
+ "FieldDefinitionCollectionResponse": {
+ "type": "object",
+ "description": "Response containing a collection of FieldDefinition.",
+ "additionalProperties": false,
+ "properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
},
- "CacheControl": {
- "type": "array",
- "items": {}
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
},
- "Connection": {
+ "value": {
"type": "array",
- "items": {}
+ "items": {
+ "$ref": "#/components/schemas/FieldDefinition"
+ }
+ }
+ }
+ },
+ "LinkDefinitionCollectionResponse": {
+ "type": "object",
+ "description": "Response containing a collection of LinkDefinition.",
+ "additionalProperties": false,
+ "properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
},
- "ContentDisposition": {
- "type": "array",
- "items": {}
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
},
- "ContentEncoding": {
+ "value": {
"type": "array",
- "items": {}
+ "items": {
+ "$ref": "#/components/schemas/LinkDefinition"
+ }
+ }
+ }
+ },
+ "LinkDefinition": {
+ "type": "object",
+ "description": "Represents an entry link definition.",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "The ID of the link definition.",
+ "format": "int32"
},
- "ContentLanguage": {
- "type": "array",
- "items": {}
+ "sourceLabel": {
+ "type": "string",
+ "description": "The label for the source entry in the link definition.",
+ "nullable": true
},
- "ContentLocation": {
- "type": "array",
- "items": {}
+ "targetLabel": {
+ "type": "string",
+ "description": "The label for the target entry in the link definition.",
+ "nullable": true
},
- "ContentMD5": {
- "type": "array",
- "items": {}
+ "description": {
+ "type": "string",
+ "description": "The description of the link definition.",
+ "nullable": true
+ }
+ }
+ },
+ "CreateMultipartUploadUrlsResponse": {
+ "type": "object",
+ "description": "Response for CreateMultipartUploadUrls.",
+ "additionalProperties": false,
+ "properties": {
+ "uploadId": {
+ "type": "string",
+ "description": "A unique identifier for the whole upload process.",
+ "nullable": true
},
- "ContentRange": {
+ "urls": {
"type": "array",
- "items": {}
+ "description": "A list of URLs to which the file chunk should be written.",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "CreateMultipartUploadUrlsRequest": {
+ "type": "object",
+ "description": "Request body for creating multipart upload urls.",
+ "additionalProperties": false,
+ "required": [
+ "numberOfParts"
+ ],
+ "properties": {
+ "uploadId": {
+ "type": "string",
+ "description": "A unique identifier for the whole upload process.",
+ "default": "",
+ "nullable": true
},
- "ContentSecurityPolicy": {
- "type": "array",
- "items": {}
+ "startingPartNumber": {
+ "type": "integer",
+ "description": "Determines the starting position of the requested parts among all the parts associated with this upload. The default value is 1.",
+ "format": "int32",
+ "default": 1
},
- "ContentSecurityPolicyReportOnly": {
- "type": "array",
- "items": {}
+ "numberOfParts": {
+ "type": "integer",
+ "description": "The value must be in the range [1, 100], meaning that in each call to the CreateMultipartUploadUrls api, a maximum of 100 Upload URLs can be requested. Further, each file chunk written to an Upload URL should be at least 5 MB. There is no minimum size limit for the last chunk.",
+ "format": "int32"
},
- "ContentType": {
- "type": "array",
- "items": {}
+ "fileName": {
+ "type": "string",
+ "description": "The name of the file to be uploaded. The file extension in the name will be used as the extension of the imported entry.",
+ "nullable": true
},
- "CorrelationContext": {
- "type": "array",
- "items": {}
+ "mimeType": {
+ "type": "string",
+ "description": "The mime-type of the file to be uploaded.",
+ "nullable": true
+ }
+ }
+ },
+ "StartTaskResponse": {
+ "type": "object",
+ "description": "Response containing a long operation task id.",
+ "additionalProperties": false,
+ "properties": {
+ "taskId": {
+ "type": "string",
+ "description": "A task ID that can be used to check on the status of the task.",
+ "nullable": true
+ }
+ }
+ },
+ "StartImportUploadedPartsRequest": {
+ "type": "object",
+ "description": "Request body for starting an asynchronous import entry task.",
+ "additionalProperties": false,
+ "required": [
+ "uploadId",
+ "partETags",
+ "name"
+ ],
+ "properties": {
+ "uploadId": {
+ "type": "string",
+ "description": "The UploadId received when calling the CreateMultipartUploadUrls API to request upload URLs.",
+ "minLength": 1
},
- "Cookie": {
+ "partETags": {
"type": "array",
- "items": {}
+ "description": "The array of the ETag values received when writing the file chunks into the upload URLs.",
+ "items": {
+ "type": "string"
+ }
},
- "Date": {
- "type": "array",
- "items": {}
+ "name": {
+ "type": "string",
+ "description": "The name for the imported entry.",
+ "minLength": 1
},
- "ETag": {
- "type": "array",
- "items": {}
+ "autoRename": {
+ "type": "boolean",
+ "description": "Indicates if the entry should be automatically renamed if an entry already exists with the given name in the folder. The default value is false.",
+ "default": false
},
- "Expires": {
- "type": "array",
- "items": {}
+ "pdfOptions": {
+ "description": "The options applied when importing a PDF.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ImportEntryRequestPdfOptions"
+ }
+ ]
},
- "Expect": {
- "type": "array",
- "items": {}
+ "importAsElectronicDocument": {
+ "type": "boolean",
+ "description": "Indicates if the document should be imported as an electronic document (true) or as image pages (false). The default value is false. This option is only applicable when importing the following document types: txt, tif, tiff, bmp, pcx, jpg, jpeg, gif, png.",
+ "default": false
},
- "From": {
- "type": "array",
- "items": {}
+ "metadata": {
+ "description": "The metadata that will be assigned to the entry.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ImportEntryRequestMetadata"
+ }
+ ]
},
- "GrpcAcceptEncoding": {
- "type": "array",
- "items": {}
+ "volumeName": {
+ "type": "string",
+ "description": "The name of the volume to use. Will use the default parent entry volume if not specified. This is ignored in Laserfiche Cloud.",
+ "nullable": true
+ }
+ }
+ },
+ "ImportEntryRequestPdfOptions": {
+ "type": "object",
+ "description": "PDF-related options for importing an entry.",
+ "additionalProperties": false,
+ "properties": {
+ "generateText": {
+ "type": "boolean",
+ "description": "Indicates if the import operation should generate text. The default value is false.",
+ "default": false
},
- "GrpcEncoding": {
- "type": "array",
- "items": {}
+ "generatePages": {
+ "type": "boolean",
+ "description": "Indicates if the import operation should generate image pages. The default value is false.",
+ "default": false
},
- "GrpcMessage": {
- "type": "array",
- "items": {}
- },
- "GrpcStatus": {
- "type": "array",
- "items": {}
- },
- "GrpcTimeout": {
- "type": "array",
- "items": {}
- },
- "Host": {
- "type": "array",
- "items": {}
- },
- "KeepAlive": {
- "type": "array",
- "items": {}
- },
- "IfMatch": {
- "type": "array",
- "items": {}
- },
- "IfModifiedSince": {
- "type": "array",
- "items": {}
- },
- "IfNoneMatch": {
- "type": "array",
- "items": {}
- },
- "IfRange": {
- "type": "array",
- "items": {}
- },
- "IfUnmodifiedSince": {
- "type": "array",
- "items": {}
- },
- "LastModified": {
- "type": "array",
- "items": {}
- },
- "Link": {
- "type": "array",
- "items": {}
- },
- "Location": {
- "type": "array",
- "items": {}
- },
- "MaxForwards": {
- "type": "array",
- "items": {}
- },
- "Origin": {
- "type": "array",
- "items": {}
- },
- "Pragma": {
- "type": "array",
- "items": {}
- },
- "ProxyAuthenticate": {
- "type": "array",
- "items": {}
- },
- "ProxyAuthorization": {
- "type": "array",
- "items": {}
- },
- "ProxyConnection": {
- "type": "array",
- "items": {}
- },
- "Range": {
- "type": "array",
- "items": {}
- },
- "Referer": {
- "type": "array",
- "items": {}
- },
- "RetryAfter": {
- "type": "array",
- "items": {}
- },
- "RequestId": {
- "type": "array",
- "items": {}
- },
- "SecWebSocketAccept": {
- "type": "array",
- "items": {}
- },
- "SecWebSocketKey": {
- "type": "array",
- "items": {}
- },
- "SecWebSocketProtocol": {
- "type": "array",
- "items": {}
- },
- "SecWebSocketVersion": {
- "type": "array",
- "items": {}
- },
- "SecWebSocketExtensions": {
- "type": "array",
- "items": {}
- },
- "Server": {
- "type": "array",
- "items": {}
- },
- "SetCookie": {
- "type": "array",
- "items": {}
- },
- "StrictTransportSecurity": {
- "type": "array",
- "items": {}
- },
- "TE": {
- "type": "array",
- "items": {}
- },
- "Trailer": {
- "type": "array",
- "items": {}
- },
- "TransferEncoding": {
- "type": "array",
- "items": {}
- },
- "Translate": {
- "type": "array",
- "items": {}
- },
- "TraceParent": {
- "type": "array",
- "items": {}
- },
- "TraceState": {
- "type": "array",
- "items": {}
- },
- "Upgrade": {
- "type": "array",
- "items": {}
- },
- "UpgradeInsecureRequests": {
- "type": "array",
- "items": {}
- },
- "UserAgent": {
- "type": "array",
- "items": {}
- },
- "Vary": {
- "type": "array",
- "items": {}
- },
- "Via": {
- "type": "array",
- "items": {}
- },
- "Warning": {
- "type": "array",
- "items": {}
- },
- "WebSocketSubProtocols": {
- "type": "array",
- "items": {}
- },
- "WWWAuthenticate": {
- "type": "array",
- "items": {}
- },
- "XContentTypeOptions": {
- "type": "array",
- "items": {}
- },
- "XFrameOptions": {
- "type": "array",
- "items": {}
+ "generatePagesImageType": {
+ "description": "The image type used when generating image pages. The default value is StandardColor. This option is only applicable when GeneratePages is true.",
+ "default": "StandardColor",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/GeneratePagesImageType"
+ }
+ ]
},
- "XPoweredBy": {
- "type": "array",
- "items": {}
+ "keepPdfAfterImport": {
+ "type": "boolean",
+ "description": "Indicates if the PDF file should be retained as an electronic document after generating image pages. The default value is true. This option is only applicable when GeneratePages is true.",
+ "default": true
+ }
+ }
+ },
+ "GeneratePagesImageType": {
+ "type": "string",
+ "description": "Enumeration for the image types when generating pages.",
+ "x-enumNames": [
+ "BlackAndWhite",
+ "StandardColor",
+ "HighQualityColor"
+ ],
+ "enum": [
+ "BlackAndWhite",
+ "StandardColor",
+ "HighQualityColor"
+ ]
+ },
+ "ImportEntryRequestMetadata": {
+ "type": "object",
+ "description": "Represents the metadata that will be assigned to the imported entry.",
+ "additionalProperties": false,
+ "properties": {
+ "templateName": {
+ "type": "string",
+ "description": "The name of the template assigned to the entry.",
+ "nullable": true
},
- "XRequestedWith": {
+ "fields": {
"type": "array",
- "items": {}
+ "description": "The fields that will be assigned to the entry.",
+ "nullable": true,
+ "items": {
+ "$ref": "#/components/schemas/FieldToUpdate"
+ }
},
- "XUACompatible": {
+ "tags": {
"type": "array",
- "items": {}
+ "description": "The tags that will be assigned to the entry.",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
},
- "XXSSProtection": {
+ "links": {
"type": "array",
- "items": {}
+ "description": "The links that will be assigned to the entry.",
+ "nullable": true,
+ "items": {
+ "$ref": "#/components/schemas/LinkToUpdate"
+ }
}
}
},
"FieldToUpdate": {
"type": "object",
- "description": "The request body containing fields that will be assigned to the entry.",
+ "description": "Represents a field that will be assigned to the entry.",
"additionalProperties": false,
+ "required": [
+ "name"
+ ],
"properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the field that will be assigned to the entry.",
+ "minLength": 1
+ },
"values": {
"type": "array",
"description": "The field values that will be assigned to the field.",
"nullable": true,
"items": {
- "$ref": "#/components/schemas/ValueToUpdate"
+ "type": "string"
}
}
}
},
- "ValueToUpdate": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "value": {
- "type": "string",
- "description": "The value assigned to the field at the position specified.",
- "nullable": true
- },
- "position": {
- "type": "integer",
- "description": "The position of the value in the field. This is 1-indexed for multi value field. It will be ignored for single value field.",
- "format": "int32"
- }
- }
- },
"LinkToUpdate": {
"type": "object",
+ "description": "Represents a link that will be assigned to the entry.",
"additionalProperties": false,
+ "required": [
+ "linkDefinitionId",
+ "otherEntryId"
+ ],
"properties": {
- "linkTypeId": {
+ "linkDefinitionId": {
"type": "integer",
- "description": "The id of the link assigned to the entry.",
+ "description": "The id of the link definition to be assigned to the entry.",
"format": "int32"
},
- "otherSourceId": {
+ "otherEntryId": {
"type": "integer",
- "description": "The id of the other source linked to the entry.",
+ "description": "The id of the other entry to be linked to the entry.",
"format": "int32"
},
"isSource": {
"type": "boolean",
- "description": "Whether the entry is the source for the link."
- }
- }
- },
- "PostEntryWithEdocMetadataRequest": {
- "type": "object",
- "additionalProperties": false,
+ "description": "Whether the entry is the source for the link. The default value is true.",
+ "default": true
+ },
+ "customProperties": {
+ "type": "object",
+ "description": "Custom properties (key, value pairs) to be added to the link.",
+ "nullable": true,
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "StartExportEntryRequest": {
+ "type": "object",
+ "description": "Request body for starting an asynchronous export entry task.",
+ "additionalProperties": false,
+ "required": [
+ "part"
+ ],
"properties": {
- "template": {
+ "auditReasonId": {
+ "type": "integer",
+ "description": "The reason id for this audit event.",
+ "format": "int32"
+ },
+ "auditReasonComment": {
"type": "string",
- "description": "The name of the template assigned to the entry.",
+ "description": "The comment for this audit event.",
+ "default": "",
"nullable": true
},
- "metadata": {
- "$ref": "#/components/schemas/PutFieldValsRequest"
+ "part": {
+ "description": "Specifies the part of the document to export.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestPart"
+ }
+ ]
},
- "volumeName": {
- "type": "string",
- "description": "The name of the volume to use. Will use the default parent entry volume if not specified. This is ignored in Laserfiche Cloud.",
- "nullable": true
+ "imageOptions": {
+ "description": "The options applied when exporting as Image.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestImageOptions"
+ }
+ ]
+ },
+ "textOptions": {
+ "description": "The options applied when exporting as Text.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestTextOptions"
+ }
+ ]
}
}
},
- "PutFieldValsRequest": {
- "allOf": [
- {
- "$ref": "#/components/schemas/SimpleImportMetadata"
+ "ExportEntryRequestPart": {
+ "type": "string",
+ "description": "Enumeration of the entry parts to export.",
+ "x-enumNames": [
+ "Image",
+ "Text",
+ "Edoc"
+ ],
+ "enum": [
+ "Image",
+ "Text",
+ "Edoc"
+ ]
+ },
+ "ExportEntryRequestImageOptions": {
+ "type": "object",
+ "description": "Represents the options when exporting the image part of an entry.",
+ "additionalProperties": false,
+ "properties": {
+ "format": {
+ "description": "The image format to export as. Options include: MultiPageTIFF, SinglePageTIFF, PNG, PDF and JPEG. The default value is MultiPageTIFF. MultiPageTIFF format is a single multi-page TIFF file. SinglePageTIFF format is multiple single-page TIFF files (in a single zip file).",
+ "default": "MultiPageTIFF",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestImageFormat"
+ }
+ ]
},
- {
- "type": "object",
- "description": "The request body containing fields that will be assigned to the entry.",
- "additionalProperties": false,
- "properties": {
- "links": {
- "type": "array",
- "description": "The links that will be assigned to the entry.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/LinkToUpdate"
- }
+ "jPEGCompressionLevel": {
+ "type": "integer",
+ "description": "The quality level for JPEG compression when exporting images. The value must be between 0 and 100 (inclusive). The default value is 70.",
+ "format": "int32",
+ "default": 70
+ },
+ "includeAnnotations": {
+ "type": "boolean",
+ "description": "Indicates if the annotations need to be included. The default value is true.",
+ "default": true
+ },
+ "convertPdfAnnotations": {
+ "type": "boolean",
+ "description": "Indicates if the annotations on the image need to be converted to PDF annotations when exporting to PDF format. The default value is true. This option is only applicable when exporting to PDF format and IncludeAnnotations is true.",
+ "default": true
+ },
+ "pagePrefix": {
+ "type": "string",
+ "description": "The page prefix of the individual files, when exporting to multi-file format (e.g.zip). The value must have a length of atmost 10 characters and only valid characters that can be included in file names are allowed. The default value is \", Page \".",
+ "default": ", Page ",
+ "nullable": true
+ },
+ "includeRedactions": {
+ "type": "boolean",
+ "description": "Indicates if redactions are included. The default value is true.",
+ "default": true
+ },
+ "watermark": {
+ "description": "The watermark element added to each image. No watermark will be added by default.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestWatermark"
}
- }
+ ]
}
+ }
+ },
+ "ExportEntryRequestImageFormat": {
+ "type": "string",
+ "description": "Enumeration of formats when exporting the image part of an entry.",
+ "x-enumNames": [
+ "MultiPageTIFF",
+ "SinglePageTIFF",
+ "PNG",
+ "PDF",
+ "JPEG"
+ ],
+ "enum": [
+ "MultiPageTIFF",
+ "SinglePageTIFF",
+ "PNG",
+ "PDF",
+ "JPEG"
]
},
- "ODataValueContextOfListOfAttribute": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfListOfAttribute"
+ "ExportEntryRequestWatermark": {
+ "type": "object",
+ "description": "Represents the watermark added to the images when exporting an entry.",
+ "additionalProperties": false,
+ "properties": {
+ "text": {
+ "type": "string",
+ "description": "The text of the watermark. The value must be a string with a length of atmost 100 characters and must not be all whitespace characters.",
+ "default": "",
+ "nullable": true
},
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
+ "position": {
+ "description": "The position of the watermark. The default value is DeadCenter.",
+ "default": "DeadCenter",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/WatermarkPosition"
}
- }
+ ]
+ },
+ "rotationAngle": {
+ "type": "integer",
+ "description": "The rotation angle of the watermark. The value must be between 0 and 360 (inclusive). The default value is 0.",
+ "format": "int32",
+ "default": 0
+ },
+ "pageSpanPercentage": {
+ "type": "integer",
+ "description": "The percentage of the page that the watermark spans on. The value must be between 1 and 100 (inclusive). The default value is 50.",
+ "format": "int32",
+ "default": 50
}
+ }
+ },
+ "WatermarkPosition": {
+ "type": "string",
+ "description": "An enumeration of possible positions on a page for watermarks.",
+ "x-enumNames": [
+ "TopLeft",
+ "TopCenter",
+ "TopRight",
+ "MiddleLeft",
+ "DeadCenter",
+ "MiddleRight",
+ "BottomLeft",
+ "BottomCenter",
+ "BottomRight"
+ ],
+ "enum": [
+ "TopLeft",
+ "TopCenter",
+ "TopRight",
+ "MiddleLeft",
+ "DeadCenter",
+ "MiddleRight",
+ "BottomLeft",
+ "BottomCenter",
+ "BottomRight"
]
},
- "ODataValueOfListOfAttribute": {
+ "ExportEntryRequestTextOptions": {
"type": "object",
+ "description": "Represents the options when exporting the text part of an entry.",
"additionalProperties": false,
"properties": {
- "value": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Attribute"
- }
+ "includeRedactions": {
+ "type": "boolean",
+ "description": "Indicates if redactions are included. The default value is true.",
+ "default": true
+ },
+ "redactionCharacter": {
+ "type": "string",
+ "description": "The character that replaces the original character in a redacted text. The value must be a string of length 1 and must not be a whitespace character. The default value is 'X'.",
+ "default": "X",
+ "nullable": true
}
}
},
- "Attribute": {
+ "StartCopyEntryRequest": {
"type": "object",
+ "description": "Request body for starting an asynchronous copy entry task.",
"additionalProperties": false,
+ "required": [
+ "name",
+ "sourceId"
+ ],
"properties": {
- "key": {
+ "name": {
"type": "string",
- "nullable": true
+ "description": "The name of the entry.",
+ "minLength": 1
},
- "value": {
+ "autoRename": {
+ "type": "boolean",
+ "description": "Indicates if the entry should be automatically renamed if an entry already exists with the given name in the folder. The default value is false.",
+ "default": false
+ },
+ "sourceId": {
+ "type": "integer",
+ "description": "The source entry Id to copy.",
+ "format": "int32"
+ },
+ "volumeName": {
"type": "string",
+ "description": "The name of the volume to use. Will use the default parent entry volume if not specified. This is ignored in Laserfiche Cloud.",
"nullable": true
}
}
},
- "WFieldInfo": {
+ "StartDeleteEntryRequest": {
"type": "object",
+ "description": "Request body for starting an asynchronous delete entry task.",
"additionalProperties": false,
"properties": {
- "name": {
- "type": "string",
- "description": "The name of the field.",
+ "auditReasonId": {
+ "type": "integer",
+ "description": "The reason id for this audit event.",
+ "format": "int32",
"nullable": true
},
- "displayName": {
+ "auditReasonComment": {
"type": "string",
- "description": "The localized name of the field.",
+ "description": "The comment for this audit event.",
"nullable": true
- },
+ }
+ }
+ },
+ "Entry": {
+ "type": "object",
+ "description": "Base type for all types which represent entry objects in a Laserfiche repository.",
+ "x-abstract": true,
+ "additionalProperties": false,
+ "properties": {
"id": {
"type": "integer",
- "description": "The ID of the field.",
+ "description": "The ID of the entry.",
"format": "int32"
},
- "description": {
+ "name": {
"type": "string",
- "description": "The description of the field.",
+ "description": "The name of the entry.",
"nullable": true
},
- "fieldType": {
- "description": "The type of the field.",
- "oneOf": [
- {
- "$ref": "#/components/schemas/WFieldType"
- }
- ]
- },
- "length": {
+ "parentId": {
"type": "integer",
- "description": "The length of the field for variable length data types.",
- "format": "int32"
+ "description": "The ID of the parent entry.",
+ "format": "int32",
+ "nullable": true
},
- "defaultValue": {
+ "fullPath": {
"type": "string",
- "description": "The default value of the field for new entries that are assigned\nto a template the represented field is a member of.",
+ "description": "The full path in the Laserfiche repository to the entry.",
"nullable": true
},
- "isMultiValue": {
- "type": "boolean",
- "description": "A boolean indicating if the represented template field supports multiple values."
- },
- "isRequired": {
- "type": "boolean",
- "description": "A boolean indicating if the represented field must have a value set\non entries assigned to a template that the field is a member of."
- },
- "constraint": {
+ "folderPath": {
"type": "string",
- "description": "The constraint for values stored in the represented field.",
+ "description": "The path in the Laserfiche repository to the parent folder.",
"nullable": true
},
- "constraintError": {
+ "creator": {
"type": "string",
- "description": "The error string that will be returned when the field constraint\nis violated when setting a value for this field.",
+ "description": "The name of the user that created this entry.",
"nullable": true
},
- "listValues": {
- "type": "array",
- "description": "The list of items assigned to the represented field.",
- "nullable": true,
- "items": {
- "type": "string"
- }
+ "creationTime": {
+ "type": "string",
+ "description": "The creation time of the entry.",
+ "format": "date-time"
},
- "format": {
- "description": "The display format of the represented field.",
+ "lastModifiedTime": {
+ "type": "string",
+ "description": "The last modification time of the entry.",
+ "format": "date-time"
+ },
+ "entryType": {
+ "description": "The type of the entry.",
"oneOf": [
{
- "$ref": "#/components/schemas/WFieldFormat"
+ "$ref": "#/components/schemas/EntryType"
}
]
},
- "currency": {
- "type": "string",
- "description": "The name of the currency that will be using when formatting\nthe represented field when the Format property is set to the\nCurrency member of the WFieldFormat enumeration.",
- "nullable": true
+ "isContainer": {
+ "type": "boolean",
+ "description": "A boolean indicating if this entry is a container object; it can have other entries as children."
},
- "formatPattern": {
+ "isLeaf": {
+ "type": "boolean",
+ "description": "A boolean indicating if this entry is a leaf object; it cannot have other entries as children."
+ },
+ "templateName": {
"type": "string",
- "description": "The custom format pattern for fields that are configured to\nuse a custom format.",
- "nullable": true
- }
- }
- },
- "WFieldType": {
- "type": "string",
- "description": "Enumeration of Laserfiche template field types.",
- "x-enumNames": [
- "DateTime",
- "Blob",
- "Date",
- "ShortInteger",
- "LongInteger",
- "List",
- "Number",
- "String",
- "Time"
- ],
- "enum": [
- "DateTime",
- "Blob",
- "Date",
- "ShortInteger",
- "LongInteger",
- "List",
- "Number",
- "String",
- "Time"
- ]
- },
- "WFieldFormat": {
- "type": "string",
- "description": "Enumeration of Laserfiche template field formats.",
- "x-enumNames": [
- "None",
- "ShortDate",
- "LongDate",
- "ShortDateTime",
- "LongDateTime",
- "ShortTime",
- "LongTime",
- "GeneralNumber",
- "Currency",
- "Percent",
- "Scientific",
- "Custom"
- ],
- "enum": [
- "None",
- "ShortDate",
- "LongDate",
- "ShortDateTime",
- "LongDateTime",
- "ShortTime",
- "LongTime",
- "GeneralNumber",
- "Currency",
- "Percent",
- "Scientific",
- "Custom"
- ]
- },
- "ODataValueContextOfIListOfWFieldInfo": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfWFieldInfo"
- },
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
- }
- }
- ]
- },
- "ODataValueOfIListOfWFieldInfo": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "value": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/WFieldInfo"
- }
- }
- }
- },
- "ODataValueContextOfIListOfEntryLinkTypeInfo": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfEntryLinkTypeInfo"
- },
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
- }
- }
- ]
- },
- "ODataValueOfIListOfEntryLinkTypeInfo": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "value": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/EntryLinkTypeInfo"
- }
- }
- }
- },
- "EntryLinkTypeInfo": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "linkTypeId": {
- "type": "integer",
- "description": "The ID of the entry link type.",
- "format": "int32"
- },
- "sourceLabel": {
- "type": "string",
- "description": "The label for the source entry in the link type.",
- "nullable": true
- },
- "targetLabel": {
- "type": "string",
- "description": "The label for the target entry in the link type.",
- "nullable": true
- },
- "linkTypeDescription": {
- "type": "string",
- "description": "The description of the link type.",
- "nullable": true
- }
- }
- },
- "Entry": {
- "type": "object",
- "x-abstract": true,
- "additionalProperties": false,
- "properties": {
- "id": {
- "type": "integer",
- "description": "The ID of the entry.",
- "format": "int32"
- },
- "name": {
- "type": "string",
- "description": "The name of the entry.",
- "nullable": true
- },
- "parentId": {
- "type": "integer",
- "description": "The ID of the parent entry.",
- "format": "int32",
- "nullable": true
- },
- "fullPath": {
- "type": "string",
- "description": "The full path in the Laserfiche repository to the entry.",
- "nullable": true
- },
- "folderPath": {
- "type": "string",
- "description": "The path in the Laserfiche repository to the parent folder.",
- "nullable": true
- },
- "creator": {
- "type": "string",
- "description": "The name of the user that created this entry.",
- "nullable": true
- },
- "creationTime": {
- "type": "string",
- "description": "The creation time of the entry.",
- "format": "date-time"
- },
- "lastModifiedTime": {
- "type": "string",
- "description": "The last modification time of the entry.",
- "format": "date-time"
- },
- "entryType": {
- "description": "The type of the entry.",
- "oneOf": [
- {
- "$ref": "#/components/schemas/EntryType"
- }
- ]
- },
- "isContainer": {
- "type": "boolean",
- "description": "A boolean indicating if this entry is a container object; it can have other entries as children."
- },
- "isLeaf": {
- "type": "boolean",
- "description": "A boolean indicating if this entry is a leaf object; it cannot have other entries as children."
- },
- "templateName": {
- "type": "string",
- "description": "The name of the template assigned to this entry.",
+ "description": "The name of the template assigned to this entry.",
"nullable": true
},
"templateId": {
@@ -7266,21 +7211,22 @@
"rowNumber": {
"type": "integer",
"description": "Row number assigned to this entry in the listing.",
- "format": "int32"
+ "format": "int32",
+ "nullable": true
},
"fields": {
"type": "array",
"description": "The fields assigned to this entry.",
"nullable": true,
"items": {
- "$ref": "#/components/schemas/EntryFieldValue"
+ "$ref": "#/components/schemas/Field"
}
}
}
},
"EntryType": {
"type": "string",
- "description": "",
+ "description": "Enumeration of entry types.",
"x-enumNames": [
"Folder",
"RecordSeries",
@@ -7294,33 +7240,25 @@
"Shortcut"
]
},
- "EntryFieldValue": {
+ "Field": {
"type": "object",
+ "description": "Represents a field set on an entry.",
"additionalProperties": false,
"properties": {
- "fieldName": {
+ "name": {
"type": "string",
"description": "The name of the field.",
"nullable": true
},
- "values": {
- "type": "array",
- "description": "The values assigned to the field.",
- "nullable": true,
- "items": {
- "type": "object",
- "additionalProperties": {}
- }
- },
"fieldType": {
"description": "The type of the field. The possible field types are listed below.",
"oneOf": [
{
- "$ref": "#/components/schemas/WFieldType"
+ "$ref": "#/components/schemas/FieldType"
}
]
},
- "fieldId": {
+ "id": {
"type": "integer",
"description": "The ID of the field.",
"format": "int32"
@@ -7336,6 +7274,20 @@
"hasMoreValues": {
"type": "boolean",
"description": "A boolean indicating if there are more field values."
+ },
+ "groupId": {
+ "type": "integer",
+ "description": "The group id of the multi value field group. If the field is not a part of a multi value field group, then there is no group id.",
+ "format": "int32",
+ "nullable": true
+ },
+ "values": {
+ "type": "array",
+ "description": "The values assigned to the field.",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
}
}
},
@@ -7346,6 +7298,7 @@
},
{
"type": "object",
+ "description": "Represents a Laserfiche record series.",
"additionalProperties": false
}
]
@@ -7357,11 +7310,12 @@
},
{
"type": "object",
+ "description": "Represents a document in a Laserfiche repository.",
"additionalProperties": false,
"properties": {
- "elecDocumentSize": {
+ "electronicDocumentSize": {
"type": "integer",
- "description": "The size of the electronic document attached to the represented document,\nif there is one, in bytes.",
+ "description": "The size of the electronic document attached to the represented document, if there is one, in bytes.",
"format": "int64"
},
"extension": {
@@ -7394,24 +7348,11 @@
"isUnderVersionControl": {
"type": "boolean",
"description": "A boolean indicating if the represented document is under version control."
- },
- "edoc": {
- "description": "The electronic document attached to the represented document.",
- "nullable": true,
- "oneOf": [
- {
- "$ref": "#/components/schemas/Edoc"
- }
- ]
}
}
}
]
},
- "Edoc": {
- "type": "object",
- "additionalProperties": false
- },
"Shortcut": {
"allOf": [
{
@@ -7419,6 +7360,7 @@
},
{
"type": "object",
+ "description": "Represents an entry shortcut in a Laserfiche repository.",
"additionalProperties": false,
"properties": {
"targetId": {
@@ -7448,84 +7390,527 @@
{
"$ref": "#/components/schemas/Entry"
},
- {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "isRecordFolder": {
- "type": "boolean",
- "description": "A boolean indicating if the folder that this instance represents is known\nto be a record folder."
- },
- "isUnderRecordSeries": {
- "type": "boolean",
- "description": "A boolean indicating if the folder that this instance represents is known\nto directly or indirectly under a record series in the repository."
- },
- "children": {
- "type": "array",
- "description": "The entries in this folder.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/Entry"
- }
- }
- }
+ {
+ "type": "object",
+ "description": "Represents a folder (standard or record folder) in a Laserfiche repository.",
+ "additionalProperties": false,
+ "properties": {
+ "isRecordFolder": {
+ "type": "boolean",
+ "description": "A boolean indicating if the folder that this instance represents is known to be a record folder."
+ },
+ "isUnderRecordSeries": {
+ "type": "boolean",
+ "description": "A boolean indicating if the folder that this instance represents is known to directly or indirectly under a record series in the repository."
+ }
+ }
+ }
+ ]
+ },
+ "IHeaderDictionary": {
+ "type": "object",
+ "x-abstract": true,
+ "additionalProperties": false,
+ "properties": {
+ "Item": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentLength": {
+ "type": "integer",
+ "format": "int64",
+ "nullable": true
+ },
+ "Accept": {
+ "type": "array",
+ "items": {}
+ },
+ "AcceptCharset": {
+ "type": "array",
+ "items": {}
+ },
+ "AcceptEncoding": {
+ "type": "array",
+ "items": {}
+ },
+ "AcceptLanguage": {
+ "type": "array",
+ "items": {}
+ },
+ "AcceptRanges": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlAllowCredentials": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlAllowHeaders": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlAllowMethods": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlAllowOrigin": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlExposeHeaders": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlMaxAge": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlRequestHeaders": {
+ "type": "array",
+ "items": {}
+ },
+ "AccessControlRequestMethod": {
+ "type": "array",
+ "items": {}
+ },
+ "Age": {
+ "type": "array",
+ "items": {}
+ },
+ "Allow": {
+ "type": "array",
+ "items": {}
+ },
+ "AltSvc": {
+ "type": "array",
+ "items": {}
+ },
+ "Authorization": {
+ "type": "array",
+ "items": {}
+ },
+ "Baggage": {
+ "type": "array",
+ "items": {}
+ },
+ "CacheControl": {
+ "type": "array",
+ "items": {}
+ },
+ "Connection": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentDisposition": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentEncoding": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentLanguage": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentLocation": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentMD5": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentRange": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentSecurityPolicy": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentSecurityPolicyReportOnly": {
+ "type": "array",
+ "items": {}
+ },
+ "ContentType": {
+ "type": "array",
+ "items": {}
+ },
+ "CorrelationContext": {
+ "type": "array",
+ "items": {}
+ },
+ "Cookie": {
+ "type": "array",
+ "items": {}
+ },
+ "Date": {
+ "type": "array",
+ "items": {}
+ },
+ "ETag": {
+ "type": "array",
+ "items": {}
+ },
+ "Expires": {
+ "type": "array",
+ "items": {}
+ },
+ "Expect": {
+ "type": "array",
+ "items": {}
+ },
+ "From": {
+ "type": "array",
+ "items": {}
+ },
+ "GrpcAcceptEncoding": {
+ "type": "array",
+ "items": {}
+ },
+ "GrpcEncoding": {
+ "type": "array",
+ "items": {}
+ },
+ "GrpcMessage": {
+ "type": "array",
+ "items": {}
+ },
+ "GrpcStatus": {
+ "type": "array",
+ "items": {}
+ },
+ "GrpcTimeout": {
+ "type": "array",
+ "items": {}
+ },
+ "Host": {
+ "type": "array",
+ "items": {}
+ },
+ "KeepAlive": {
+ "type": "array",
+ "items": {}
+ },
+ "IfMatch": {
+ "type": "array",
+ "items": {}
+ },
+ "IfModifiedSince": {
+ "type": "array",
+ "items": {}
+ },
+ "IfNoneMatch": {
+ "type": "array",
+ "items": {}
+ },
+ "IfRange": {
+ "type": "array",
+ "items": {}
+ },
+ "IfUnmodifiedSince": {
+ "type": "array",
+ "items": {}
+ },
+ "LastModified": {
+ "type": "array",
+ "items": {}
+ },
+ "Link": {
+ "type": "array",
+ "items": {}
+ },
+ "Location": {
+ "type": "array",
+ "items": {}
+ },
+ "MaxForwards": {
+ "type": "array",
+ "items": {}
+ },
+ "Origin": {
+ "type": "array",
+ "items": {}
+ },
+ "Pragma": {
+ "type": "array",
+ "items": {}
+ },
+ "ProxyAuthenticate": {
+ "type": "array",
+ "items": {}
+ },
+ "ProxyAuthorization": {
+ "type": "array",
+ "items": {}
+ },
+ "ProxyConnection": {
+ "type": "array",
+ "items": {}
+ },
+ "Range": {
+ "type": "array",
+ "items": {}
+ },
+ "Referer": {
+ "type": "array",
+ "items": {}
+ },
+ "RetryAfter": {
+ "type": "array",
+ "items": {}
+ },
+ "RequestId": {
+ "type": "array",
+ "items": {}
+ },
+ "SecWebSocketAccept": {
+ "type": "array",
+ "items": {}
+ },
+ "SecWebSocketKey": {
+ "type": "array",
+ "items": {}
+ },
+ "SecWebSocketProtocol": {
+ "type": "array",
+ "items": {}
+ },
+ "SecWebSocketVersion": {
+ "type": "array",
+ "items": {}
+ },
+ "SecWebSocketExtensions": {
+ "type": "array",
+ "items": {}
+ },
+ "Server": {
+ "type": "array",
+ "items": {}
+ },
+ "SetCookie": {
+ "type": "array",
+ "items": {}
+ },
+ "StrictTransportSecurity": {
+ "type": "array",
+ "items": {}
+ },
+ "TE": {
+ "type": "array",
+ "items": {}
+ },
+ "Trailer": {
+ "type": "array",
+ "items": {}
+ },
+ "TransferEncoding": {
+ "type": "array",
+ "items": {}
+ },
+ "Translate": {
+ "type": "array",
+ "items": {}
+ },
+ "TraceParent": {
+ "type": "array",
+ "items": {}
+ },
+ "TraceState": {
+ "type": "array",
+ "items": {}
+ },
+ "Upgrade": {
+ "type": "array",
+ "items": {}
+ },
+ "UpgradeInsecureRequests": {
+ "type": "array",
+ "items": {}
+ },
+ "UserAgent": {
+ "type": "array",
+ "items": {}
+ },
+ "Vary": {
+ "type": "array",
+ "items": {}
+ },
+ "Via": {
+ "type": "array",
+ "items": {}
+ },
+ "Warning": {
+ "type": "array",
+ "items": {}
+ },
+ "WebSocketSubProtocols": {
+ "type": "array",
+ "items": {}
+ },
+ "WWWAuthenticate": {
+ "type": "array",
+ "items": {}
+ },
+ "XContentTypeOptions": {
+ "type": "array",
+ "items": {}
+ },
+ "XFrameOptions": {
+ "type": "array",
+ "items": {}
+ },
+ "XPoweredBy": {
+ "type": "array",
+ "items": {}
+ },
+ "XRequestedWith": {
+ "type": "array",
+ "items": {}
+ },
+ "XUACompatible": {
+ "type": "array",
+ "items": {}
+ },
+ "XXSSProtection": {
+ "type": "array",
+ "items": {}
}
- ]
+ }
},
- "FindEntryResult": {
+ "ImportEntryRequest": {
"type": "object",
+ "description": "Request body for importing an entry.",
"additionalProperties": false,
+ "required": [
+ "name"
+ ],
"properties": {
- "entry": {
- "description": "The entry found by path. This property is set if entry is found.",
+ "name": {
+ "type": "string",
+ "description": "The name for the imported entry."
+ },
+ "autoRename": {
+ "type": "boolean",
+ "description": "Indicates if the entry should be automatically renamed if an entry already exists with the given name in the folder. The default value is false.",
+ "default": false
+ },
+ "pdfOptions": {
+ "description": "The options applied when importing a PDF.",
"nullable": true,
"oneOf": [
{
- "$ref": "#/components/schemas/Entry"
+ "$ref": "#/components/schemas/ImportEntryRequestPdfOptions"
}
]
},
- "ancestorEntry": {
- "description": "The closest entry ancestor. This property is set if entry is not found and fallbackToClosestAncestor is set to true.",
+ "importAsElectronicDocument": {
+ "type": "boolean",
+ "description": "Indicates if the document should be imported as an electronic document (true) or as image pages (false). The default value is false. This option is only applicable when importing the following document types: txt, tif, tiff, bmp, pcx, jpg, jpeg, gif, png.",
+ "default": false
+ },
+ "metadata": {
+ "description": "The metadata that will be assigned to the entry.",
"nullable": true,
"oneOf": [
{
- "$ref": "#/components/schemas/Entry"
+ "$ref": "#/components/schemas/ImportEntryRequestMetadata"
}
]
+ },
+ "volumeName": {
+ "type": "string",
+ "description": "The name of the volume to use. Will use the default parent entry volume if not specified. This is ignored in Laserfiche Cloud.",
+ "nullable": true
}
}
},
- "AcceptedOperation": {
+ "ExportEntryResponse": {
"type": "object",
+ "description": "Response containing a link to download the exported entry.",
"additionalProperties": false,
"properties": {
- "token": {
- "type": "string",
- "description": "A token that can be used to check on the status of the operation.",
- "nullable": true
+ "value": {
+ "type": "string"
}
}
},
- "DeleteEntryWithAuditReason": {
+ "ExportEntryRequest": {
"type": "object",
+ "description": "Request body for exporting an entry.",
"additionalProperties": false,
+ "required": [
+ "part"
+ ],
"properties": {
"auditReasonId": {
"type": "integer",
"description": "The reason id for this audit event.",
- "format": "int32",
- "nullable": true
+ "format": "int32"
},
- "comment": {
+ "auditReasonComment": {
"type": "string",
"description": "The comment for this audit event.",
+ "default": "",
"nullable": true
+ },
+ "part": {
+ "description": "The part of the document to export. Options include: Image, Text, Edoc.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestPart"
+ }
+ ]
+ },
+ "imageOptions": {
+ "description": "The options applied when exporting as Image.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestImageOptions"
+ }
+ ]
+ },
+ "textOptions": {
+ "description": "The options applied when exporting as Text.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/ExportEntryRequestTextOptions"
+ }
+ ]
+ }
+ }
+ },
+ "GetEntryByPathResponse": {
+ "type": "object",
+ "description": "Response containing an entry or ancestor entry found by entry path.",
+ "additionalProperties": false,
+ "properties": {
+ "entry": {
+ "description": "The entry found by path. This property is set if entry is found.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/Entry"
+ }
+ ]
+ },
+ "ancestorEntry": {
+ "description": "The closest entry ancestor. This property is set if entry is not found and fallbackToClosestAncestor is set to true.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/Entry"
+ }
+ ]
}
}
},
- "PatchEntryRequest": {
+ "UpdateEntryRequest": {
"type": "object",
+ "description": "Request body for updating an entry.",
"additionalProperties": false,
"properties": {
"parentId": {
@@ -7538,37 +7923,30 @@
"type": "string",
"description": "The name that will be assigned to the entry.",
"nullable": true
- }
- }
- },
- "ODataValueContextOfIListOfEntry": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfEntry"
},
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
- }
+ "autoRename": {
+ "type": "boolean",
+ "description": "Indicates if the entry should be automatically renamed if an entry already exists with the given name in the folder. The default value is false.",
+ "default": false
}
- ]
+ }
},
- "ODataValueOfIListOfEntry": {
+ "EntryCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of Entry.",
"additionalProperties": false,
"properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
+ },
"value": {
"type": "array",
"items": {
@@ -7577,99 +7955,72 @@
}
}
},
- "ODataValueContextOfIListOfFieldValue": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfFieldValue"
- },
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
- }
- }
- ]
- },
- "ODataValueOfIListOfFieldValue": {
+ "FieldCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of Field.",
"additionalProperties": false,
"properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
+ },
"value": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/FieldValue"
+ "$ref": "#/components/schemas/Field"
}
}
}
},
- "FieldValue": {
- "allOf": [
- {
- "$ref": "#/components/schemas/EntryFieldValue"
- },
- {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "groupId": {
- "type": "integer",
- "description": "The group id of the multi value field group. If the field is not a part of a multi value field group, then there is no group id.",
- "format": "int32",
- "nullable": true
- }
- }
- }
- ]
- },
- "ODataValueContextOfIListOfWTagInfo": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfWTagInfo"
- },
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
+ "SetFieldsRequest": {
+ "type": "object",
+ "description": "Request body for assigning fields to an entry.",
+ "additionalProperties": false,
+ "properties": {
+ "fields": {
+ "type": "array",
+ "description": "The fields that will be assigned to the entry.",
+ "nullable": true,
+ "items": {
+ "$ref": "#/components/schemas/FieldToUpdate"
}
}
- ]
+ }
},
- "ODataValueOfIListOfWTagInfo": {
+ "TagCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of Tag.",
"additionalProperties": false,
"properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
+ },
"value": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/WTagInfo"
+ "$ref": "#/components/schemas/Tag"
}
}
}
},
- "WTagInfo": {
+ "Tag": {
"type": "object",
+ "description": "Represents a tag set on an entry.",
"additionalProperties": false,
"properties": {
"id": {
@@ -7694,34 +8045,35 @@
},
"isSecure": {
"type": "boolean",
- "description": "A boolean indicating whether or not the tag definition is classified\nas a security tag (true) or an informational tag (false)."
+ "description": "A boolean indicating whether or not the tag definition is classified as a security tag (true) or an informational tag (false)."
},
"watermark": {
"description": "The watermark properties associated with the tag definition.",
"nullable": true,
"oneOf": [
{
- "$ref": "#/components/schemas/Watermark"
+ "$ref": "#/components/schemas/TagDefinitionWatermark"
}
]
}
}
},
- "Watermark": {
+ "TagDefinitionWatermark": {
"type": "object",
+ "description": "Represents a watermark associated with a tag defintion.",
"additionalProperties": false,
"properties": {
- "watermarkText": {
+ "text": {
"type": "string",
"description": "The watermark text associated with the tag defintion.",
"nullable": true
},
- "watermarkTextSize": {
+ "pageSpanPercentage": {
"type": "integer",
- "description": "The size of the watermark text, in points, associated with the tag definition.",
+ "description": "The percentage of the page that the watermark associated with the tag definition spans on.",
"format": "int32"
},
- "watermarkPosition": {
+ "position": {
"description": "The position of the watermark on the page.",
"oneOf": [
{
@@ -7729,50 +8081,25 @@
}
]
},
- "watermarkRotationAngle": {
+ "rotationAngle": {
"type": "integer",
"description": "The rotation angle, in degrees, of the watermark associated with the tag definition.",
"format": "int32"
},
- "isWatermarkMandatory": {
+ "isMandatory": {
"type": "boolean",
"description": "A boolean indicating whether or not the watermark associated with the tag is mandatory."
},
- "watermarkIntensity": {
+ "opacity": {
"type": "integer",
- "description": "The intensity of the watermark associated with the tag definition. Valid value \nranges from 0 to 100, with -1 as the default values.",
+ "description": "The opacity of the watermark associated with the tag definition. Valid value ranges from 0 to 100, with -1 as the default values.",
"format": "int32"
}
}
},
- "WatermarkPosition": {
- "type": "string",
- "description": "",
- "x-enumNames": [
- "TopLeft",
- "TopCenter",
- "TopRight",
- "MiddleLeft",
- "DeadCenter",
- "MiddleRight",
- "BottomLeft",
- "BottomCenter",
- "BottomRight"
- ],
- "enum": [
- "TopLeft",
- "TopCenter",
- "TopRight",
- "MiddleLeft",
- "DeadCenter",
- "MiddleRight",
- "BottomLeft",
- "BottomCenter",
- "BottomRight"
- ]
- },
- "PutTagRequest": {
+ "SetTagsRequest": {
"type": "object",
+ "description": "Request body for assigning tags to an entry.",
"additionalProperties": false,
"properties": {
"tags": {
@@ -7785,27 +8112,45 @@
}
}
},
- "ODataValueOfIListOfWEntryLinkInfo": {
+ "LinkCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of Link.",
"additionalProperties": false,
"properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
+ },
"value": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/WEntryLinkInfo"
+ "$ref": "#/components/schemas/Link"
}
}
}
},
- "WEntryLinkInfo": {
+ "Link": {
"type": "object",
+ "description": "Represents a link between a source entry and a target entry.",
"additionalProperties": false,
"properties": {
- "linkId": {
+ "id": {
"type": "integer",
- "description": "The ID of the entry link.",
+ "description": "The ID of the represented link.",
"format": "int32"
},
+ "description": {
+ "type": "string",
+ "description": "The description for the represented link.",
+ "nullable": true
+ },
"sourceId": {
"type": "integer",
"description": "The ID of the source entry of the represented link.",
@@ -7818,76 +8163,47 @@
},
"sourceLabel": {
"type": "string",
- "description": "The label for the source entry in the link type.",
- "nullable": true
- },
- "targetId": {
- "type": "integer",
- "description": "The ID of the target entry of the represented link.",
- "format": "int32"
- },
- "targetFullPath": {
- "type": "string",
- "description": "The full path to the target entry of the represented link.",
- "nullable": true
- },
- "targetLabel": {
- "type": "string",
- "description": "The label for the target entry in the link type.",
- "nullable": true
- },
- "description": {
- "type": "string",
- "description": "The descriptive text for the represented entry link.",
+ "description": "The label for the source entry in the link definition.",
"nullable": true
},
- "linkTypeDescription": {
+ "sourceLink": {
"type": "string",
- "description": "The description of the link type.",
+ "description": "The navigation link to the source entry.",
"nullable": true
},
- "linkTypeId": {
+ "targetId": {
"type": "integer",
- "description": "The ID of the entry link type.",
+ "description": "The ID of the target entry of the represented link.",
"format": "int32"
},
- "linkProperties": {
- "type": "object",
- "description": "The properties for the entry link.",
- "nullable": true,
- "additionalProperties": {
- "type": "string"
- }
+ "targetFullPath": {
+ "type": "string",
+ "description": "The full path to the target entry of the represented link.",
+ "nullable": true
},
- "sourceLink": {
+ "targetLabel": {
"type": "string",
- "description": "The navigation link to the source entry.",
+ "description": "The label for the target entry in the link definition.",
"nullable": true
},
"targetLink": {
"type": "string",
"description": "The navigation link to the target entry.",
"nullable": true
- }
- }
- },
- "PutLinksRequest": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "targetId": {
- "type": "integer",
- "description": "The target entry ID to create a link to.",
- "format": "int32"
},
- "linkTypeId": {
+ "linkDefinitionId": {
"type": "integer",
- "description": "The link type ID to create the link with.",
+ "description": "The ID of the link definition.",
"format": "int32"
},
+ "linkDefinitionDescription": {
+ "type": "string",
+ "description": "The description of the link definition.",
+ "nullable": true
+ },
"customProperties": {
"type": "object",
- "description": "Custom properties (key, value pairs) to be added to the link",
+ "description": "The custom properties for the represented link.",
"nullable": true,
"additionalProperties": {
"type": "string"
@@ -7895,45 +8211,76 @@
}
}
},
- "ODataValueContextOfIListOfWEntryLinkInfo": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfWEntryLinkInfo"
- },
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
+ "SetLinksRequest": {
+ "type": "object",
+ "description": "Request body for assigning links to an entry.",
+ "additionalProperties": false,
+ "properties": {
+ "links": {
+ "type": "array",
+ "description": "The links that will be assigned to the entry.",
+ "nullable": true,
+ "items": {
+ "$ref": "#/components/schemas/LinkToUpdate"
}
}
- ]
+ }
},
- "PostEntryChildrenRequest": {
+ "CopyEntryRequest": {
"type": "object",
+ "description": "Request body for copying an entry.",
"additionalProperties": false,
+ "required": [
+ "name",
+ "sourceId"
+ ],
"properties": {
"name": {
"type": "string",
"description": "The name of the entry.",
+ "minLength": 1
+ },
+ "autoRename": {
+ "type": "boolean",
+ "description": "Indicates if the entry should be automatically renamed if an entry already exists with the given name in the folder. The default value is false.",
+ "default": false
+ },
+ "sourceId": {
+ "type": "integer",
+ "description": "The source entry Id to copy.",
+ "format": "int32"
+ },
+ "volumeName": {
+ "type": "string",
+ "description": "The name of the volume to use. Will use the default parent entry volume if not specified. This is ignored in Laserfiche Cloud.",
"nullable": true
+ }
+ }
+ },
+ "CreateEntryRequest": {
+ "type": "object",
+ "description": "Request body for creating an entry.",
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "entryType"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the entry.",
+ "minLength": 1
+ },
+ "autoRename": {
+ "type": "boolean",
+ "description": "Indicates if the entry should be automatically renamed if an entry already exists with the given name in the folder. The default value is false.",
+ "default": false
},
"entryType": {
"description": "The type of the entry.",
- "nullable": true,
"oneOf": [
{
- "$ref": "#/components/schemas/PostEntryChildrenEntryType"
+ "$ref": "#/components/schemas/CreateEntryRequestEntryType"
}
]
},
@@ -7942,11 +8289,6 @@
"description": "The TargetId is only needed for creating a shortcut. This will be the entry ID of the shortcut target.",
"format": "int32"
},
- "sourceId": {
- "type": "integer",
- "description": "The SourceId is needed for some operations that require a source/destination. One example is the Copy operation.",
- "format": "int32"
- },
"volumeName": {
"type": "string",
"description": "The name of the volume to use. Will use the default parent entry volume if not specified. This is ignored in Laserfiche Cloud.",
@@ -7954,9 +8296,9 @@
}
}
},
- "PostEntryChildrenEntryType": {
+ "CreateEntryRequestEntryType": {
"type": "string",
- "description": "",
+ "description": "Enumeration of entry types for CreateEntry.",
"x-enumNames": [
"Folder",
"Shortcut"
@@ -7966,55 +8308,13 @@
"Shortcut"
]
},
- "CopyAsyncRequest": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the entry."
- },
- "sourceId": {
- "type": "integer",
- "description": "The source entry Id to copy.",
- "format": "int32"
- },
- "volumeName": {
- "type": "string",
- "description": "The name of the volume to use. Will use the default parent entry volume if not specified. This is ignored in Laserfiche Cloud.",
- "nullable": true
- }
- }
- },
- "ODataValueOfBoolean": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "value": {
- "type": "boolean"
- }
- }
- },
- "GetEdocWithAuditReasonRequest": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "auditReasonId": {
- "type": "integer",
- "description": "The reason id for this audit event.",
- "format": "int32",
- "nullable": true
- },
- "comment": {
- "type": "string",
- "description": "The comment for this audit event.",
- "nullable": true
- }
- }
- },
- "GetDynamicFieldLogicValueRequest": {
+ "ListDynamicFieldValuesRequest": {
"type": "object",
+ "description": "Request body for listing dynamic field values for an entry.",
"additionalProperties": false,
+ "required": [
+ "templateId"
+ ],
"properties": {
"templateId": {
"type": "integer",
@@ -8031,95 +8331,79 @@
}
}
},
- "PutTemplateRequest": {
+ "SetTemplateRequest": {
"type": "object",
+ "description": "Request body for assigning a template and template fields to an entry.",
"additionalProperties": false,
+ "required": [
+ "templateName"
+ ],
"properties": {
"templateName": {
"type": "string",
"description": "The template that will be assigned to the entry.",
- "nullable": true
+ "minLength": 1
},
"fields": {
- "type": "object",
+ "type": "array",
"description": "The template fields that will be assigned to the entry.",
"nullable": true,
- "additionalProperties": {
+ "items": {
"$ref": "#/components/schemas/FieldToUpdate"
}
}
}
},
- "RepositoryInfo": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "repoId": {
- "type": "string",
- "description": "The repository id.",
- "nullable": true
- },
- "repoName": {
- "type": "string",
- "description": "The repository name.",
- "nullable": true
- },
- "webclientUrl": {
- "type": "string",
- "description": "The corresponding repository WebClient url.",
- "nullable": true
- }
- }
- },
- "AuditReasons": {
+ "RepositoryCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of Repository.",
"additionalProperties": false,
"properties": {
- "deleteEntry": {
- "type": "array",
- "description": "The audit reasons associated with delete entry.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/WAuditReason"
- }
- },
- "exportDocument": {
+ "value": {
"type": "array",
- "description": "The audit reasons associated with export document.",
- "nullable": true,
"items": {
- "$ref": "#/components/schemas/WAuditReason"
+ "$ref": "#/components/schemas/Repository"
}
}
}
},
- "WAuditReason": {
+ "Repository": {
"type": "object",
+ "description": "Represents a Laserfiche repository.",
"additionalProperties": false,
"properties": {
"id": {
- "type": "integer",
- "description": "The audit reason id.",
- "format": "int32"
+ "type": "string",
+ "description": "The repository id.",
+ "nullable": true
},
"name": {
"type": "string",
- "description": "The audit reason text.",
+ "description": "The repository name.",
+ "nullable": true
+ },
+ "webClientUrl": {
+ "type": "string",
+ "description": "The corresponding repository Web Client url.",
"nullable": true
}
}
},
- "AdvancedSearchRequest": {
+ "StartSearchEntryRequest": {
"type": "object",
+ "description": "Request body for starting an asynchronous search entry task.",
"additionalProperties": false,
+ "required": [
+ "searchCommand"
+ ],
"properties": {
"searchCommand": {
"type": "string",
- "description": "Search command for advanced search",
- "nullable": true
+ "description": "The search command to run. The search command should follow the Laserfiche search syntax. https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#Search_Syntax.htm",
+ "minLength": 1
},
"fuzzyType": {
- "description": "Fuzzy type (None, Percentage, or NumberOfLetters)",
+ "description": "Fuzzy type (None, Percentage, or NumberOfLetters).",
"oneOf": [
{
"$ref": "#/components/schemas/FuzzyType"
@@ -8128,158 +8412,61 @@
},
"fuzzyFactor": {
"type": "integer",
- "description": "Fuzzy factor (percentage as int or int value)",
- "format": "int32"
- }
- }
- },
- "FuzzyType": {
- "type": "string",
- "description": "",
- "x-enumNames": [
- "None",
- "Percentage",
- "NumberOfLetters"
- ],
- "enum": [
- "None",
- "Percentage",
- "NumberOfLetters"
- ]
- },
- "OperationProgress": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "operationToken": {
- "type": "string",
- "description": "The operation token of the operation associated with this OperationProgress.",
- "nullable": true
- },
- "operationType": {
- "type": "string",
- "description": "The type of the operation associated with this OperationProgress.",
- "nullable": true
- },
- "percentComplete": {
- "type": "integer",
- "description": "Determines what percentage of the execution of the associated operation is completed.",
- "format": "int32"
- },
- "status": {
- "description": "The status of the operation associated with this OperationProgress.",
- "oneOf": [
- {
- "$ref": "#/components/schemas/OperationStatus"
- }
- ]
- },
- "errors": {
- "type": "array",
- "description": "The list of errors occurred during the execution of the associated operation.",
- "nullable": true,
- "items": {
- "$ref": "#/components/schemas/OperationErrorItem"
- }
- },
- "redirectUri": {
- "type": "string",
- "description": "The URI which can be used (via api call) to access the result(s) of the associated operation.",
- "nullable": true
- },
- "entryId": {
- "type": "integer",
- "description": "The ID of the entry affected (e.g. created or modified) by the execution of the associated operation.",
- "format": "int32"
- },
- "startTimestamp": {
- "type": "string",
- "description": "The timestamp representing when the associated operation's execution is started.",
- "format": "date-time"
- },
- "statusTimestamp": {
- "type": "string",
- "description": "The timestamp representing the last time when the associated task's status has changed.",
- "format": "date-time"
- }
- }
- },
- "OperationStatus": {
- "type": "string",
- "description": "",
- "x-enumNames": [
- "NotStarted",
- "InProgress",
- "Completed",
- "Failed",
- "Cancelled"
- ],
- "enum": [
- "NotStarted",
- "InProgress",
- "Completed",
- "Failed",
- "Cancelled"
- ]
- },
- "OperationErrorItem": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "objectId": {
- "type": "integer",
- "description": "The ID of the entry to which the error is related. ",
+ "description": "Fuzzy factor (percentage as int or int value).",
"format": "int32"
- },
- "errorMessage": {
- "type": "string",
- "description": "The short description of the error.",
- "nullable": true
}
}
- },
- "ODataValueContextOfIListOfContextHit": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfContextHit"
- },
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
- }
- }
+ },
+ "FuzzyType": {
+ "type": "string",
+ "description": "",
+ "x-enumNames": [
+ "None",
+ "Percentage",
+ "NumberOfLetters"
+ ],
+ "enum": [
+ "None",
+ "Percentage",
+ "NumberOfLetters"
]
},
- "ODataValueOfIListOfContextHit": {
+ "SearchContextHitCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of SearchContextHit.",
"additionalProperties": false,
"properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
+ },
"value": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/ContextHit"
+ "$ref": "#/components/schemas/SearchContextHit"
}
}
}
},
- "ContextHit": {
+ "SearchContextHit": {
"type": "object",
+ "description": "Represents a context hit for a search result.",
"additionalProperties": false,
"properties": {
"hitType": {
- "$ref": "#/components/schemas/HitType"
+ "description": "The type of context hit this instance represents.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/HitType"
+ }
+ ]
},
"isAnnotationHit": {
"type": "boolean",
@@ -8392,55 +8579,275 @@
"Attachment"
]
},
- "SimpleSearchRequest": {
+ "SearchEntryRequest": {
"type": "object",
+ "description": "Request body for searching entries.",
"additionalProperties": false,
+ "required": [
+ "searchCommand"
+ ],
"properties": {
"searchCommand": {
"type": "string",
- "description": "Search command for simple search",
+ "description": "The search command to run. The search command should follow the Laserfiche search syntax. https://doc.laserfiche.com/laserfiche.documentation/en-us/Default.htm#Search_Syntax.htm",
+ "minLength": 1
+ }
+ }
+ },
+ "TagDefinitionCollectionResponse": {
+ "type": "object",
+ "description": "Response containing a collection of TagDefinition.",
+ "additionalProperties": false,
+ "properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
"nullable": true
+ },
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/TagDefinition"
+ }
}
}
},
- "ODataValueContextOfIListOfWTemplateInfo": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfWTemplateInfo"
+ "TagDefinition": {
+ "type": "object",
+ "description": "Represents an entry tag definition.",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "The ID of the tag definition.",
+ "format": "int32"
},
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
+ "name": {
+ "type": "string",
+ "description": "The name of the tag definition.",
+ "nullable": true
+ },
+ "displayName": {
+ "type": "string",
+ "description": "The localized name of the tag definition.",
+ "nullable": true
+ },
+ "description": {
+ "type": "string",
+ "description": "The description of the tag definition.",
+ "nullable": true
+ },
+ "isSecure": {
+ "type": "boolean",
+ "description": "A boolean indicating whether or not the tag definition is classified as a security tag (true) or an informational tag (false)."
+ },
+ "watermark": {
+ "description": "The watermark properties associated with the tag definition.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TagDefinitionWatermark"
+ }
+ ]
+ }
+ }
+ },
+ "TaskCollectionResponse": {
+ "type": "object",
+ "description": "Response containing a collection of TaskProgress.",
+ "additionalProperties": false,
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/TaskProgress"
+ }
+ }
+ }
+ },
+ "TaskProgress": {
+ "type": "object",
+ "description": "Represents the progress of a long operation task.",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The task ID of the task associated with this TaskProgress.",
+ "nullable": true
+ },
+ "taskType": {
+ "description": "The type of the task associated with this TaskProgress.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TaskType"
+ }
+ ]
+ },
+ "percentComplete": {
+ "type": "integer",
+ "description": "Determines what percentage of the execution of the associated task is completed.",
+ "format": "int32"
+ },
+ "status": {
+ "description": "The status of the task associated with this TaskProgress.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TaskStatus"
}
+ ]
+ },
+ "errors": {
+ "type": "array",
+ "description": "The list of errors occurred during the execution of the associated task.",
+ "nullable": true,
+ "items": {
+ "$ref": "#/components/schemas/ProblemDetails"
}
+ },
+ "result": {
+ "description": "The result of the execution of the associated task.",
+ "nullable": true,
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TaskResult"
+ }
+ ]
+ },
+ "startTime": {
+ "type": "string",
+ "description": "The time representing when the associated task's execution started.",
+ "format": "date-time"
+ },
+ "lastUpdateTime": {
+ "type": "string",
+ "description": "The time representing when the associated task's status last changed.",
+ "format": "date-time"
}
+ }
+ },
+ "TaskType": {
+ "type": "string",
+ "description": "An enumeration of possible types for a long operation task.",
+ "x-enumNames": [
+ "CopyEntry",
+ "DeleteEntry",
+ "ExportEntry",
+ "ImportUploadedParts",
+ "SearchEntry"
+ ],
+ "enum": [
+ "CopyEntry",
+ "DeleteEntry",
+ "ExportEntry",
+ "ImportUploadedParts",
+ "SearchEntry"
+ ]
+ },
+ "TaskStatus": {
+ "type": "string",
+ "description": "An enumeration of possible statuses for a long operation task.",
+ "x-enumNames": [
+ "NotStarted",
+ "InProgress",
+ "Completed",
+ "Failed",
+ "Cancelled"
+ ],
+ "enum": [
+ "NotStarted",
+ "InProgress",
+ "Completed",
+ "Failed",
+ "Cancelled"
]
},
- "ODataValueOfIListOfWTemplateInfo": {
+ "TaskResult": {
+ "type": "object",
+ "description": "Represents the result of a long operation task.",
+ "additionalProperties": false,
+ "properties": {
+ "entryId": {
+ "type": "integer",
+ "description": "The ID of the entry which is affected (e.g. created or modified) by the execution of the associated task.",
+ "format": "int32"
+ },
+ "uri": {
+ "type": "string",
+ "description": "The URI which can be used (via api call) to access the result(s) of the associated task.",
+ "nullable": true
+ }
+ }
+ },
+ "CancelTasksResponse": {
+ "type": "object",
+ "description": "Response containing a collection of CancelTaskResult.",
+ "additionalProperties": false,
+ "properties": {
+ "value": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/CancelTaskResult"
+ }
+ }
+ }
+ },
+ "CancelTaskResult": {
+ "type": "object",
+ "description": "Represents the result of cancelling a long operation task.",
+ "additionalProperties": false,
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "The ID of the task which has been subject to cancellation.",
+ "nullable": true
+ },
+ "taskType": {
+ "description": "The type of the task which has been subject to cancellation.",
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/TaskType"
+ }
+ ]
+ },
+ "result": {
+ "type": "boolean",
+ "description": "Indicates if the request to cancel the task has been received."
+ }
+ }
+ },
+ "TemplateDefinitionCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of TemplateDefinition.",
"additionalProperties": false,
"properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
+ },
"value": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/WTemplateInfo"
+ "$ref": "#/components/schemas/TemplateDefinition"
}
}
}
},
- "WTemplateInfo": {
+ "TemplateDefinition": {
"type": "object",
+ "description": "Represents a template definition.",
"additionalProperties": false,
"properties": {
"id": {
@@ -8474,76 +8881,70 @@
},
"fieldCount": {
"type": "integer",
- "description": "The number of fields assigned to the template.",
+ "description": "The number of field definitions assigned to the template definition.",
"format": "int32"
}
}
},
"LFColor": {
"type": "object",
+ "description": "Represents an RGB color value with alpha channel.",
"additionalProperties": false,
"properties": {
"a": {
"type": "integer",
+ "description": "The alpha channel component, from 0-255.",
"format": "byte"
},
"r": {
"type": "integer",
+ "description": "The red channel component, from 0-255.",
"format": "byte"
},
"g": {
"type": "integer",
+ "description": "The green channel component, from 0-255.",
"format": "byte"
},
"b": {
"type": "integer",
+ "description": "The blue channel component from 0-255.",
"format": "byte"
}
}
},
- "ODataValueContextOfIListOfTemplateFieldInfo": {
- "allOf": [
- {
- "$ref": "#/components/schemas/ODataValueOfIListOfTemplateFieldInfo"
- },
- {
- "type": "object",
- "description": "A wrapper around the ODataValue with extra odata.nextLink and odata.count.",
- "additionalProperties": false,
- "properties": {
- "@odata.nextLink": {
- "type": "string",
- "description": "It contains a URL that allows retrieving the next subset of the requested collection.",
- "nullable": true
- },
- "@odata.count": {
- "type": "integer",
- "description": "It contains the count of a collection of entities or a collection of entity references.",
- "format": "int32"
- }
- }
- }
- ]
- },
- "ODataValueOfIListOfTemplateFieldInfo": {
+ "TemplateFieldDefinitionCollectionResponse": {
"type": "object",
+ "description": "Response containing a collection of TemplateFieldDefinition.",
"additionalProperties": false,
"properties": {
+ "@odata.nextLink": {
+ "type": "string",
+ "description": "A URL to retrieve the next page of the requested collection.",
+ "nullable": true
+ },
+ "@odata.count": {
+ "type": "integer",
+ "description": "The total count of items within a collection.",
+ "format": "int32",
+ "nullable": true
+ },
"value": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/TemplateFieldInfo"
+ "$ref": "#/components/schemas/TemplateFieldDefinition"
}
}
}
},
- "TemplateFieldInfo": {
+ "TemplateFieldDefinition": {
"allOf": [
{
- "$ref": "#/components/schemas/WFieldInfo"
+ "$ref": "#/components/schemas/FieldDefinition"
},
{
"type": "object",
+ "description": "Represents a template field definition.",
"additionalProperties": false,
"properties": {
"rule": {
@@ -8571,11 +8972,12 @@
},
"Rule": {
"type": "object",
+ "description": "Represents a form logic rule associated with a Laserfiche template and field definition.",
"additionalProperties": false,
"properties": {
"ancestors": {
"type": "array",
- "description": "The IDs of the parent fields in the template according to the\nform logic rule.",
+ "description": "The IDs of the parent fields in the template according to the form logic rule.",
"nullable": true,
"items": {
"type": "integer",
@@ -8583,38 +8985,6 @@
}
}
}
- },
- "ODataValueOfDateTime": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "value": {
- "type": "string",
- "format": "date-time"
- }
- }
- },
- "SimpleImportMetadata": {
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "fields": {
- "type": "object",
- "description": "The fields that will be assigned to the entry.",
- "nullable": true,
- "additionalProperties": {
- "$ref": "#/components/schemas/FieldToUpdate"
- }
- },
- "tags": {
- "type": "array",
- "description": "The tags that will be assigned to the entry.",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- }
}
},
"securitySchemes": {
@@ -8628,8 +8998,8 @@
"description": "
Note: Please enter below the clientId/clientSecret of a registered web application, or the clientId of a SPA. For SPA, the clientSecret field must be left empty. The app, either a web application or SPA, must have the following uri defined as its redirect uri.
",
"flows": {
"authorizationCode": {
- "authorizationUrl": "https://signin.laserfiche.com/oauth/Authorize",
- "tokenUrl": "https://signin.laserfiche.com/oauth/Token",
+ "authorizationUrl": "https://signin.a.clouddev.laserfiche.com/oauth/Authorize",
+ "tokenUrl": "https://signin.a.clouddev.laserfiche.com/oauth/Token",
"scopes": {
"repository.Read": "Allows the app to read the content of Laserfiche repositories on behalf of the signed-in user.",
"repository.Write": "Allows the app to modify the content of Laserfiche repositories on behalf of the signed-in user."
diff --git a/src/Clients/AttributesClient.cs b/src/Clients/AttributesClient.cs
index 9e60d97a..959b7646 100644
--- a/src/Clients/AttributesClient.cs
+++ b/src/Clients/AttributesClient.cs
@@ -15,7 +15,7 @@ partial interface IAttributesClient
///
/// A delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// The requested repository ID.
+ /// The requested repository ID.
/// Boolean value that indicates whether to return attributes key value pairs associated with everyone or the currently authenticated user.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
/// Limits the properties returned in the result.
@@ -25,7 +25,7 @@ partial interface IAttributesClient
/// Indicates whether the total count of items within a collection are returned in the result.
/// Optionally specify the maximum number of items to retrieve.
/// A server side error occurred.
- Task GetTrusteeAttributeKeyValuePairsForEachAsync(Func> callback, string repoId, bool? everyone = null, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListAttributesForEachAsync(Func> callback, string repositoryId, bool? everyone = null, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the attribute key value pairs associated with the authenticated user using a nextlink.
@@ -35,26 +35,26 @@ partial interface IAttributesClient
/// Optional cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get trustee attribute key value pairs successfully.
/// A server side error occurred.
- Task GetTrusteeAttributeKeyValuePairsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListAttributesNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
}
partial class AttributesClient
{
- public async Task GetTrusteeAttributeKeyValuePairsForEachAsync(Func> callback, string repoId, bool? everyone = null, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListAttributesForEachAsync(Func> callback, string repositoryId, bool? everyone = null, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
// Initial request
- var response = await GetTrusteeAttributeKeyValuePairsAsync(repoId, everyone, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
+ var response = await ListAttributesAsync(repositoryId, everyone, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
// Further requests
while (!cancellationToken.IsCancellationRequested && response != null && await callback(response).ConfigureAwait(false))
{
- response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), GetTrusteeAttributeKeyValuePairsSendAsync, cancellationToken).ConfigureAwait(false);
+ response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), ListAttributesSendAsync, cancellationToken).ConfigureAwait(false);
}
}
- public async Task GetTrusteeAttributeKeyValuePairsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListAttributesNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
- return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), GetTrusteeAttributeKeyValuePairsSendAsync, cancellationToken).ConfigureAwait(false);
+ return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), ListAttributesSendAsync, cancellationToken).ConfigureAwait(false);
}
}
}
diff --git a/src/Clients/BaseClient.cs b/src/Clients/BaseClient.cs
index 32e64c8f..c38f6274 100644
--- a/src/Clients/BaseClient.cs
+++ b/src/Clients/BaseClient.cs
@@ -1,10 +1,11 @@
-using System.Globalization;
+using System;
+using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Reflection;
-using System.Threading.Tasks;
using System.Threading;
-using System;
+using System.Threading.Tasks;
+using System.Runtime.Serialization;
namespace Laserfiche.Repository.Api.Client
{
@@ -57,7 +58,7 @@ protected string MergeMaxSizeIntoPrefer(int? maxSize, string prefer)
}
// Copied from auto generated code
- private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo)
+ private string ConvertToString(object value, CultureInfo cultureInfo)
{
if (value == null)
{
@@ -71,12 +72,12 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu
{
var field = IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
if (field != null &&
- CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) is System.Runtime.Serialization.EnumMemberAttribute attribute)
+ CustomAttributeExtensions.GetCustomAttribute(field, typeof(EnumMemberAttribute)) is EnumMemberAttribute attribute)
{
return attribute.Value ?? name;
}
- var converted = Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo));
+ var converted = Convert.ToString(Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType()), cultureInfo));
return converted ?? string.Empty;
}
}
@@ -90,8 +91,8 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu
}
else if (value.GetType().IsArray)
{
- var array = Enumerable.OfType
/// A delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// The requested repository ID.
+ /// The requested repository ID.
/// The folder ID.
/// An optional query parameter used to indicate if the result should be grouped by entry type or not.
/// Optional array of field names. Field values corresponding to the given field names will be returned for each entry.
- /// Boolean for if field values should be formatted. Only applicable if Fields are specified.
+ /// Boolean for if field values should be formatted. Only applicable if Fields are specified.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
/// An optional query parameter used to indicate the locale that should be used for formatting.
- /// The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise
+ /// The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise
/// culture will not be used for formatting.
/// Limits the properties returned in the result.
/// Specifies the order in which items are returned. The maximum number of expressions is 5.
@@ -41,14 +41,14 @@ partial interface IEntriesClient
/// Indicates whether the total count of items within a collection are returned in the result.
/// Optionally specify the maximum number of items to retrieve.
/// A server side error occurred.
- Task GetEntryListingForEachAsync(Func> callback, string repoId, int entryId, bool? groupByEntryType = null, IEnumerable fields = null, bool? formatFields = null, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListEntriesForEachAsync(Func> callback, string repositoryId, int entryId, bool? groupByEntryType = null, IEnumerable fields = null, bool? formatFieldValues = null, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the fields assigned to an entry using paging. Page results are returned to the .
///
/// A delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// The requested repository ID.
+ /// The requested repository ID.
/// The requested entry ID.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
/// An optional query parameter used to indicate if the field values should be formatted.
@@ -63,14 +63,14 @@ partial interface IEntriesClient
/// Indicates whether the total count of items within a collection are returned in the result.
/// Optionally specify the maximum number of items to retrieve.
/// A server side error occurred.
- Task GetFieldValuesForEachAsync(Func> callback, string repoId, int entryId, string prefer = null, bool? formatValue = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListFieldsForEachAsync(Func> callback, string repositoryId, int entryId, string prefer = null, bool? formatValue = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the links assigned to an entry using paging. Page results are returned to the .
///
/// A delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// The requested repository ID.
+ /// The requested repository ID.
/// The requested entry ID.
/// An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.
/// Limits the properties returned in the result.
@@ -80,14 +80,14 @@ partial interface IEntriesClient
/// Indicates whether the total count of items within a collection are returned in the result.
/// Optionally specify the maximum number of items to retrieve.
/// A server side error occurred.
- Task GetLinkValuesFromEntryForEachAsync(Func> callback, string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListLinksForEachAsync(Func> callback, string repositoryId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the tags assigned to an entry using paging. Page results are returned to the .
///
/// A delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// The requested repository ID.
+ /// The requested repository ID.
/// The requested entry ID.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
/// Limits the properties returned in the result.
@@ -97,7 +97,7 @@ partial interface IEntriesClient
/// Indicates whether the total count of items within a collection are returned in the result.
/// Optionally specify the maximum number of items to retrieve.
/// A server side error occurred.
- Task GetTagsAssignedToEntryForEachAsync(Func> callback, string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListTagsForEachAsync(Func> callback, string repositoryId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the children entries of a folder in the repository using a nextlink.
@@ -107,7 +107,7 @@ partial interface IEntriesClient
/// Optional cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get the children entries of a Folder successfully.
/// A server side error occurred.
- Task GetEntryListingNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListEntriesNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the fields assigned to an entry using a nextlink.
@@ -117,7 +117,7 @@ partial interface IEntriesClient
/// Optional cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get field values successfully.
/// A server side error occurred.
- Task GetFieldValuesNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListFieldsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the links assigned to an entry using a nextlink.
@@ -127,7 +127,7 @@ partial interface IEntriesClient
/// Optional cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get links successfully.
/// A server side error occurred.
- Task GetLinkValuesFromEntryNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListLinksNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns the tags assigned to an entry using a nextlink
@@ -137,7 +137,7 @@ partial interface IEntriesClient
/// Optional cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get entry tags successfully.
/// A server side error occurred.
- Task GetTagsAssignedToEntryNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListTagsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
}
partial class EntriesClient
@@ -153,72 +153,72 @@ public async Task GetEntryAsync(string uriString, CancellationToken cance
}
}
- public async Task GetEntryListingForEachAsync(Func> callback, string repoId, int entryId, bool? groupByEntryType = null, IEnumerable fields = null, bool? formatFields = null, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListEntriesForEachAsync(Func> callback, string repositoryId, int entryId, bool? groupByEntryType = null, IEnumerable fields = null, bool? formatFieldValues = null, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
// Initial request
- var response = await GetEntryListingAsync(repoId, entryId, groupByEntryType, fields, formatFields, MergeMaxSizeIntoPrefer(maxPageSize, prefer), culture, select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
+ var response = await ListEntriesAsync(repositoryId, entryId, groupByEntryType, fields, formatFieldValues, MergeMaxSizeIntoPrefer(maxPageSize, prefer), culture, select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
// Further requests
while (!cancellationToken.IsCancellationRequested && response != null && await callback(response).ConfigureAwait(false))
{
- response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), GetEntryListingSendAsync, cancellationToken).ConfigureAwait(false);
+ response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), ListEntriesSendAsync, cancellationToken).ConfigureAwait(false);
}
}
- public async Task GetFieldValuesForEachAsync(Func> callback, string repoId, int entryId, string prefer = null, bool? formatValue = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListFieldsForEachAsync(Func> callback, string repositoryId, int entryId, string prefer = null, bool? formatValue = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
// Initial request
- var response = await GetFieldValuesAsync(repoId, entryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), formatValue, culture, select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
+ var response = await ListFieldsAsync(repositoryId, entryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), formatValue, culture, select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
// Further requests
while (!cancellationToken.IsCancellationRequested && response != null && await callback(response).ConfigureAwait(false))
{
- response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), GetFieldValuesSendAsync, cancellationToken).ConfigureAwait(false);
+ response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), ListFieldsSendAsync, cancellationToken).ConfigureAwait(false);
}
}
- public async Task GetLinkValuesFromEntryForEachAsync(Func> callback, string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListLinksForEachAsync(Func> callback, string repositoryId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
// Initial request
- var response = await GetLinkValuesFromEntryAsync(repoId, entryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
+ var response = await ListLinksAsync(repositoryId, entryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
// Further requests
while (!cancellationToken.IsCancellationRequested && response != null && await callback(response).ConfigureAwait(false))
{
- response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), GetLinkValuesFromEntrySendAsync, cancellationToken).ConfigureAwait(false);
+ response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), ListLinksSendAsync, cancellationToken).ConfigureAwait(false);
}
}
- public async Task GetTagsAssignedToEntryForEachAsync(Func> callback, string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListTagsForEachAsync(Func> callback, string repositoryId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
// Initial request
- var response = await GetTagsAssignedToEntryAsync(repoId, entryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
+ var response = await ListTagsAsync(repositoryId, entryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
// Further requests
while (!cancellationToken.IsCancellationRequested && response != null && await callback(response).ConfigureAwait(false))
{
- response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), GetTagsAssignedToEntrySendAsync, cancellationToken).ConfigureAwait(false);
+ response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), ListTagsSendAsync, cancellationToken).ConfigureAwait(false);
}
}
- public async Task GetEntryListingNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListEntriesNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
- return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), GetEntryListingSendAsync, cancellationToken).ConfigureAwait(false);
+ return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), ListEntriesSendAsync, cancellationToken).ConfigureAwait(false);
}
- public async Task GetFieldValuesNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListFieldsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
- return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), GetFieldValuesSendAsync, cancellationToken).ConfigureAwait(false);
+ return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), ListFieldsSendAsync, cancellationToken).ConfigureAwait(false);
}
- public async Task GetLinkValuesFromEntryNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListLinksNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
- return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), GetLinkValuesFromEntrySendAsync, cancellationToken).ConfigureAwait(false);
+ return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), ListLinksSendAsync, cancellationToken).ConfigureAwait(false);
}
- public async Task GetTagsAssignedToEntryNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListTagsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
- return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), GetTagsAssignedToEntrySendAsync, cancellationToken).ConfigureAwait(false);
+ return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), ListTagsSendAsync, cancellationToken).ConfigureAwait(false);
}
}
}
diff --git a/src/Clients/Extensions/ApiExceptionExtensions.cs b/src/Clients/Extensions/ApiExceptionExtensions.cs
index 6e319c78..93b2aaa3 100644
--- a/src/Clients/Extensions/ApiExceptionExtensions.cs
+++ b/src/Clients/Extensions/ApiExceptionExtensions.cs
@@ -21,21 +21,5 @@ internal static ApiException Create(int statusCode, IReadOnlyDictionary> headers, CreateEntryResult createEntryResult, Exception innerException)
- {
- if (createEntryResult == null)
- {
- return ApiException.Create(statusCode, headers, innerException);
- }
-
- ProblemDetails problemDetails = ProblemDetails.Create(statusCode, headers);
- problemDetails.Title = createEntryResult.GetSummary();
- problemDetails.Extensions = new Dictionary(StringComparer.OrdinalIgnoreCase)
- {
- [createEntryResult.GetType().Name] = createEntryResult
- };
- return ApiException.Create(statusCode, headers, problemDetails, innerException);
- }
}
}
diff --git a/src/Clients/FieldDefinitionsClient.cs b/src/Clients/FieldDefinitionsClient.cs
index 7a29d646..defeb96d 100644
--- a/src/Clients/FieldDefinitionsClient.cs
+++ b/src/Clients/FieldDefinitionsClient.cs
@@ -15,7 +15,7 @@ partial interface IFieldDefinitionsClient
///
/// A delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// The requested repository ID.
+ /// The requested repository ID.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
/// An optional query parameter used to indicate the locale that should be used for formatting.
/// The value should be a standard language tag.
@@ -26,7 +26,7 @@ partial interface IFieldDefinitionsClient
/// Indicates whether the total count of items within a collection are returned in the result.
/// Optionally specify the maximum number of items to retrieve.
/// A server side error occurred.
- Task GetFieldDefinitionsForEachAsync(Func> callback, string repoId, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListFieldDefinitionsForEachAsync(Func> callback, string repositoryId, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns a collection of field definitions using a nextlink.
@@ -36,27 +36,27 @@ partial interface IFieldDefinitionsClient
/// Optional cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get field definitions successfully.
/// A server side error occurred.
- Task GetFieldDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListFieldDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
}
partial class FieldDefinitionsClient
{
- public async Task GetFieldDefinitionsForEachAsync(Func> callback, string repoId, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListFieldDefinitionsForEachAsync(Func> callback, string repositoryId, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
// Initial request
- var response = await GetFieldDefinitionsAsync(repoId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), culture, select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
+ var response = await ListFieldDefinitionsAsync(repositoryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), culture, select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
// Further requests
while (!cancellationToken.IsCancellationRequested && response != null && await callback(response).ConfigureAwait(false))
{
- response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), GetFieldDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
+ response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), ListFieldDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
}
}
- public async Task GetFieldDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListFieldDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
- return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), GetFieldDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
+ return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), ListFieldDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
}
}
}
diff --git a/src/Clients/LinkDefinitionsClient.cs b/src/Clients/LinkDefinitionsClient.cs
index 6a87c96d..e4e98e9e 100644
--- a/src/Clients/LinkDefinitionsClient.cs
+++ b/src/Clients/LinkDefinitionsClient.cs
@@ -15,7 +15,7 @@ partial interface ILinkDefinitionsClient
///
/// A delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// The requested repository ID.
+ /// The requested repository ID.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
/// Limits the properties returned in the result.
/// Specifies the order in which items are returned. The maximum number of expressions is 5.
@@ -24,7 +24,7 @@ partial interface ILinkDefinitionsClient
/// Indicates whether the total count of items within a collection are returned in the result.
/// Optionally specify the maximum number of items to retrieve.
/// A server side error occurred.
- Task GetLinkDefinitionsForEachAsync(Func> callback, string repoId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListLinkDefinitionsForEachAsync(Func> callback, string repositoryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default);
///
/// Returns a collection of link definitions using a nextlink.
@@ -34,27 +34,27 @@ partial interface ILinkDefinitionsClient
/// Optional cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get link definitions successfully.
/// A server side error occurred.
- Task GetLinkDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
+ Task ListLinkDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default);
}
partial class LinkDefinitionsClient
{
- public async Task GetLinkDefinitionsForEachAsync(Func> callback, string repoId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListLinkDefinitionsForEachAsync(Func> callback, string repositoryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
// Initial request
- var response = await GetLinkDefinitionsAsync(repoId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
+ var response = await ListLinkDefinitionsAsync(repositoryId, MergeMaxSizeIntoPrefer(maxPageSize, prefer), select, orderby, top, skip, count, cancellationToken).ConfigureAwait(false);
// Further requests
while (!cancellationToken.IsCancellationRequested && response != null && await callback(response).ConfigureAwait(false))
{
- response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), GetLinkDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
+ response = await GetNextLinkAsync(_httpClient, response.OdataNextLink, MergeMaxSizeIntoPrefer(maxPageSize, prefer), ListLinkDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
}
}
- public async Task GetLinkDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
+ public async Task ListLinkDefinitionsNextLinkAsync(string nextLink, int? maxPageSize = null, CancellationToken cancellationToken = default)
{
- return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), GetLinkDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
+ return await GetNextLinkAsync(_httpClient, nextLink, MergeMaxSizeIntoPrefer(maxPageSize, null), ListLinkDefinitionsSendAsync, cancellationToken).ConfigureAwait(false);
}
}
}
diff --git a/src/Clients/RepositoriesClient.cs b/src/Clients/RepositoriesClient.cs
index 9ab7255c..5e0e59c2 100644
--- a/src/Clients/RepositoriesClient.cs
+++ b/src/Clients/RepositoriesClient.cs
@@ -1,6 +1,7 @@
using System;
-using System.Collections.Generic;
using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
namespace Laserfiche.Repository.Api.Client
{
@@ -13,7 +14,7 @@ public partial class RepositoriesClient
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
/// Get the respository resource list successfully.
/// A server side error occurred.
- public static async System.Threading.Tasks.Task> GetSelfHostedRepositoryListAsync(string baseUrl, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async Task GetSelfHostedRepositoryListAsync(string baseUrl, CancellationToken cancellationToken = default)
{
using (HttpClient client_ = new HttpClient())
{
@@ -21,7 +22,7 @@ public partial class RepositoriesClient
baseUrl = baseUrl.TrimEnd('/') + "/";
client_.BaseAddress = new Uri(baseUrl);
RepositoriesClient repositoriesClient = new RepositoriesClient(client_);
- return await repositoriesClient.GetRepositoryListAsync(cancellationToken).ConfigureAwait(false);
+ return await repositoriesClient.ListRepositoriesAsync(cancellationToken).ConfigureAwait(false);
}
}
}
diff --git a/src/Clients/RepositoryClients.cs b/src/Clients/RepositoryClients.cs
index cf6efeea..847d5d1d 100644
--- a/src/Clients/RepositoryClients.cs
+++ b/src/Clients/RepositoryClients.cs
@@ -34,200 +34,21 @@ namespace Laserfiche.Repository.Api.Client
using System = global::System;
[GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
- public partial interface IEntriesClient
+ public partial interface IAttributesClient
{
///
- /// Creates a new document in a folder.
- ///
- ///
- /// - Creates a new document in the specified folder with file (no more than 100 MB).
- /// - Optionally sets metadata and electronic document component.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed. With this route, partial success is possible. The response returns multiple operation (entryCreate operation, setEdoc operation, setLinks operation, etc..) objects, which contain information about any errors that may have occurred during the creation. As long as the entryCreate operation succeeds, the entry will be created, even if all other operations fail.
- ///
- /// The requested repository ID.
- /// The entry ID of the folder that the document will be created in.
- /// The created document's file name.
- /// An optional query parameter used to indicate if the new document should be automatically
- /// renamed if an entry already exists with the given name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag. This may be used when setting field values with tokens.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Document creation is success.
- /// A server side error occurred.
- Task ImportDocumentAsync(string repoId, int parentEntryId, string fileName, bool? autoRename = null, string culture = null, FileParameter electronicDocument = null, PostEntryWithEdocMetadataRequest request = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns a single entry object.
- ///
- ///
- /// - Returns a single entry object.
- /// - Provide an entry ID, and get the entry associated with that ID. Useful when detailed information about the entry is required, such as metadata, path information, etc.
- /// - Allowed OData query options: Select. If the entry is a subtype (Folder, Document, or Shortcut), the entry will automatically be converted to include those model-specific properties.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// Limits the properties returned in the result.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get entry successfully.
- /// A server side error occurred.
- Task GetEntryAsync(string repoId, int entryId, string select = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Deletes an entry asynchronously.
- ///
- ///
- /// - Begins a task to delete an entry, and returns an operationToken.
- /// - Provide an entry ID, and queue a delete task to remove it from the repository (includes nested objects if the entry is a Folder type). The entry will not be deleted immediately.
- /// - Optionally include an audit reason ID and comment in the JSON body. This route returns an operationToken, and will run as an asynchronous operation. Check the progress via the Tasks/{operationToken} route.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// The submitted audit reason.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Delete entry operation start successfully.
- /// A server side error occurred.
- Task DeleteEntryInfoAsync(string repoId, int entryId, DeleteEntryWithAuditReason request = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Moves and/or renames an entry.
- ///
- ///
- /// - Moves and/or renames an entry.
- /// - Move and/or rename an entry by passing in the new parent folder ID or name in the JSON body.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// The request containing the folder ID that the entry will be moved to and the new name
- /// the entry will be renamed to.
- /// An optional query parameter used to indicate if the entry should be automatically
- /// renamed if another entry already exists with the same name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Moves and/or renames an entry successfully.
- /// A server side error occurred.
- Task MoveOrRenameEntryAsync(string repoId, int entryId, PatchEntryRequest request = null, bool? autoRename = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns a single entry object using the entry path.
- ///
- ///
- /// - Returns a single entry object using the entry path.
- /// - Optional query parameter: fallbackToClosestAncestor. Use the fallbackToClosestAncestor query parameter to return the closest existing ancestor if the initial entry path is not found.
- ///
- /// The requested repository ID.
- /// The requested entry path.
- /// An optional query parameter used to indicate whether or not the closest ancestor in the path should be returned if the initial entry path is not found. The default value is false.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get entry successfully.
- /// A server side error occurred.
- Task GetEntryByPathAsync(string repoId, string fullPath, bool? fallbackToClosestAncestor = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns the children entries of a folder.
- ///
- ///
- /// - Returns the children entries of a folder in the repository.
- /// - Provide an entry ID (must be a folder), and get a paged listing of entries in that folder. Used as a way of navigating through the repository.
- /// - Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: "PropertyName direction,PropertyName2 direction". Sort order can be either value "asc" or "desc". Optional query parameters: groupByOrderType (bool). This query parameter decides if results are returned in groups based on their entry type. Entries returned in the listing are not automatically converted to their subtype (Folder, Shortcut, Document), so clients who want model-specific information should request it via the GET entry by ID route.
- /// - Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names.
- /// - If field values are requested, only the first value is returned if it is a multi value field.
- /// - Null or Empty field values should not be used to determine if a field is assigned to the entry.
- ///
- /// The requested repository ID.
- /// The folder ID.
- /// An optional query parameter used to indicate if the result should be grouped by entry type or not.
- /// Optional array of field names. Field values corresponding to the given field names will be returned for each entry.
- /// Boolean for if field values should be formatted. Only applicable if Fields are specified.
- /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
- /// An optional query parameter used to indicate the locale that should be used for formatting.
- /// The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise
- /// culture will not be used for formatting.
- /// Limits the properties returned in the result.
- /// Specifies the order in which items are returned. The maximum number of expressions is 5.
- /// Limits the number of items returned from a collection.
- /// Excludes the specified number of items of the queried collection from the result.
- /// Indicates whether the total count of items within a collection are returned in the result.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get the children entries of a Folder successfully.
- /// A server side error occurred.
- Task GetEntryListingAsync(string repoId, int entryId, bool? groupByEntryType = null, IEnumerable fields = null, bool? formatFields = null, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Creates/copies a new child entry in a folder.
- ///
- ///
- /// - Create/copy a new child entry in the designated folder.
- /// - Provide the parent folder ID, and based on the request body, copy or create a folder/shortcut as a child entry of the designated folder.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.
- ///
- /// The requested repository ID.
- /// The folder ID that the entry will be created in.
- /// The entry to create.
- /// An optional query parameter used to indicate if the new entry should be automatically
- /// renamed if an entry already exists with the given name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Created a new child entry successfully.
- /// A server side error occurred.
- Task CreateOrCopyEntryAsync(string repoId, int entryId, PostEntryChildrenRequest request = null, bool? autoRename = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns the fields assigned to an entry.
- ///
- ///
- /// - Returns the fields assigned to an entry.
- /// - Provide an entry ID, and get a paged listing of all fields assigned to that entry.
- /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
- /// An optional query parameter used to indicate if the field values should be formatted.
- /// The default value is false.
- /// An optional query parameter used to indicate the locale that should be used for formatting.
- /// The value should be a standard language tag. The formatValue query parameter must be set to true, otherwise
- /// culture will not be used for formatting.
- /// Limits the properties returned in the result.
- /// Specifies the order in which items are returned. The maximum number of expressions is 5.
- /// Limits the number of items returned from a collection.
- /// Excludes the specified number of items of the queried collection from the result.
- /// Indicates whether the total count of items within a collection are returned in the result.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get field values successfully.
- /// A server side error occurred.
- Task GetFieldValuesAsync(string repoId, int entryId, string prefer = null, bool? formatValue = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Updates the field values assigned to an entry.
- ///
- ///
- /// - Update the field values assigned to an entry.
- /// - Provide the new field values to assign to the entry, and remove/reset all previously assigned field values.
- /// - This is an overwrite action. The request body must include all desired field values, including any existing field values that should remain assigned to the entry. Field values that are not included in the request will be deleted from the entry. If the field value that is not included is part of a template, it will still be assigned (as required by the template), but its value will be reset.
- ///
- /// The requested repository ID.
- /// The entry ID of the entry that will have its fields updated.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag. This may be used when setting field values with tokens.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Update field values successfully.
- /// A server side error occurred.
- Task AssignFieldValuesAsync(string repoId, int entryId, IDictionary fieldsToUpdate = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns the tags assigned to an entry.
+ /// Returns the attribute key value pairs associated with the authenticated user.
///
///
- /// - Returns the tags assigned to an entry.
- /// - Provide an entry ID, and get a paged listing of tags assigned to that entry.
- /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Returns the attribute key value pairs associated with the authenticated user. Alternatively, return only the attribute key value pairs that are associated with the "Everyone" group.
+ /// - Attribute keys can be used with subsequent calls to get specific attribute values.
+ /// - Optional query parameters: everyone (bool, default false). When true, this route does not return the attributes that are tied to the currently authenticated user, but rather the attributes assigned to the "Everyone" group. Note when this is true, the response does not include both the "Everyone" groups attribute and the currently authenticated user, but only the "Everyone" groups.
+ /// - Default page size: 100. Allowed OData query options: Select, Count, OrderBy, Skip, Top, SkipToken, Prefer.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The requested entry ID.
+ /// The requested repository ID.
+ /// Indicates if attributes associated with the "Everyone" group or the currently authenticated user is returned. The default value is false.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
/// Limits the properties returned in the result.
/// Specifies the order in which items are returned. The maximum number of expressions is 5.
@@ -235,219 +56,35 @@ public partial interface IEntriesClient
/// Excludes the specified number of items of the queried collection from the result.
/// Indicates whether the total count of items within a collection are returned in the result.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get entry tags successfully.
- /// A server side error occurred.
- Task GetTagsAssignedToEntryAsync(string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Assigns tags to an entry.
- ///
- ///
- /// - Assign tags to an entry.
- /// - Provide an entry ID and a list of tags to assign to that entry.
- /// - This is an overwrite action. The request must include all tags to assign to the entry, including existing tags that should remain assigned to the entry.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// The tags to add.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Assign tags to an entry successfully.
- /// A server side error occurred.
- Task AssignTagsAsync(string repoId, int entryId, PutTagRequest tagsToAdd = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Assigns links to an entry.
- ///
- ///
- /// - Assign links to an entry.
- /// - Provide an entry ID and a list of links to assign to that entry.
- /// - This is an overwrite action. The request must include all links to assign to the entry, including existing links that should remain assigned to the entry.
- ///
- /// The request repository ID.
- /// The requested entry ID.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Assign links to an entry successfully.
- /// A server side error occurred.
- Task AssignEntryLinksAsync(string repoId, int entryId, IEnumerable linksToAdd = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns the links assigned to an entry.
- ///
- ///
- /// - Returns the links assigned to an entry.
- /// - Provide an entry ID, and get a paged listing of links assigned to that entry.
- /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.
- /// Limits the properties returned in the result.
- /// Specifies the order in which items are returned. The maximum number of expressions is 5.
- /// Limits the number of items returned from a collection.
- /// Excludes the specified number of items of the queried collection from the result.
- /// Indicates whether the total count of items within a collection are returned in the result.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get links successfully.
- /// A server side error occurred.
- Task GetLinkValuesFromEntryAsync(string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Copies an entry into a folder asynchronously.
- ///
- ///
- /// - Copy a new child entry in the designated folder async, and potentially return an operationToken.
- /// - Provide the parent folder ID, and copy an entry as a child of the designated folder.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.
- /// - The status of the operation can be checked via the Tasks/{operationToken} route.
- /// - Token substitution in the name of the copied entry is not supported.
- ///
- /// The requested repository ID.
- /// The folder ID that the entry will be created in.
- /// Copy entry request.
- /// An optional query parameter used to indicate if the new entry should be automatically
- /// renamed if an entry already exists with the given name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Copy entry operation is started successfully.
- /// A server side error occurred.
- Task CopyEntryAsync(string repoId, int entryId, CopyAsyncRequest request = null, bool? autoRename = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Deletes the edoc associated with an entry.
- ///
- ///
- /// - Delete the edoc associated with the provided entry ID.
- ///
- /// The requested repository ID.
- /// The requested document ID.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Deleted edoc successfully.
- /// A server side error occurred.
- Task DeleteDocumentAsync(string repoId, int entryId, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns information about the edoc content of an entry.
- ///
- ///
- /// - Returns information about the edoc content of an entry, without downloading the edoc in its entirety.
- /// - Provide an entry ID, and get back the Content-Type and Content-Length in the response headers.
- /// - This route does not provide a way to download the actual edoc. Instead, it just gives metadata information about the edoc associated with the entry.
- /// - If an error occurs, the error message can be found in the X-APIServer-Error HTTP response header.
- ///
- /// The requested repository ID.
- /// The requested document ID.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get edoc info successfully.
- /// A server side error occurred.
- Task GetDocumentContentTypeAsync(string repoId, int entryId, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns an entry's edoc resource in a stream format.
- ///
- ///
- /// - Returns an entry's edoc resource in a stream format.
- /// - Provide an entry ID, and get the edoc resource as part of the response content.
- /// - Optional header: Range. Use the Range header (single range with byte unit) to retrieve partial content of the edoc, rather than the entire edoc.
- ///
- /// The requested repository ID.
- /// The requested document ID.
- /// An optional header used to retrieve partial content of the edoc. Only supports single
- /// range with byte unit.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get edoc successfully.
- /// A server side error occurred.
- Task ExportDocumentAsync(string repoId, int entryId, string range = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Deletes the pages associated with an entry.
- ///
- ///
- /// - Delete the pages associated with the provided entry ID. If no pageRange is specified, all pages will be deleted.
- /// - Optional parameter: pageRange (default empty). The value should be a comma-seperated string which contains non-overlapping single values, or page ranges. Ex: "1,2,3", "1-3,5", "2-7,10-12."
- ///
- /// The requested repository ID.
- /// The requested document ID.
- /// The pages to be deleted.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Deleted pages successfully.
- /// A server side error occurred.
- Task DeletePagesAsync(string repoId, int entryId, string pageRange = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns an entry's edoc resource in a stream format, including an audit reason.
- ///
- ///
- /// - Returns an entry's edoc resource in a stream format while including an audit reason.
- /// - Provide an entry ID and audit reason/comment in the request body, and get the edoc resource as part of the response content.
- /// - Optional header: Range. Use the Range header (single range with byte unit) to retrieve partial content of the edoc, rather than the entire edoc. This route is identical to the GET edoc route, but allows clients to include an audit reason when downloading the edoc.
- ///
- /// The requested repository ID.
- /// The requested document ID.
- /// An optional header used to retrieve partial content of the edoc. Only supports single
- /// range with byte unit.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get edoc successfully.
- /// A server side error occurred.
- Task ExportDocumentWithAuditReasonAsync(string repoId, int entryId, GetEdocWithAuditReasonRequest request = null, string range = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Returns the dynamic field logic values assigned to an entry.
- ///
- ///
- /// - Returns dynamic field logic values with the current values of the fields in the template.
- /// - Provide an entry ID and field values in the JSON body to get dynamic field logic values.
- /// Independent and non-dynamic fields in the request body will be ignored, and only related dynamic field logic values for the assigned template will be returned.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get dynamic field logic values successfully.
- /// A server side error occurred.
- Task>> GetDynamicFieldValuesAsync(string repoId, int entryId, GetDynamicFieldLogicValueRequest request = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Removes the currently assigned template from an entry.
- ///
- ///
- /// - Remove the currently assigned template from the specified entry.
- /// - Provide an entry ID to clear template value on.
- /// - If the entry does not have a template assigned, no change will be made.
- ///
- /// The requested repository ID.
- /// The ID of the entry that will have its template removed.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Remove the currently assigned template successfully.
+ /// A collection of attributes associated with the authenticated user.
/// A server side error occurred.
- Task DeleteAssignedTemplateAsync(string repoId, int entryId, CancellationToken cancellationToken = default(CancellationToken));
+ Task ListAttributesAsync(string repositoryId, bool? everyone = null, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Assigns a template to an entry.
+ /// Returns an attribute object associated with the authenticated user.
///
///
- /// - Assign a template to an entry.
- /// - Provide an entry ID, template name, and a list of template fields to assign to that entry.
- /// - Only template values will be modified. Any existing independent fields on the entry will not be modified, nor will they be added if included in the request. The only modification to fields will only occur on templated fields. If the previously assigned template includes common template fields as the newly assigned template, the common field values will not be modified.
+ /// - Returns the attribute associated with the key. Alternatively, return the attribute associated with the key within "Everyone" group.
+ /// - Optional query parameters: everyone (bool, default false). When true, the server only searches for the attribute value with the given key upon the authenticated users attributes. If false, only the authenticated users attributes will be queried.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The ID of entry that will have its template updated.
- /// The template and template fields that will be assigned to the entry.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag. This may be used when setting field values with tokens.
+ /// The requested repository ID.
+ /// The requested attribute key.
+ /// Indicates if attributes associated with the "Everyone" group or the currently authenticated user is returned. The default value is false.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Assign a template successfully.
+ /// A single attribute associated with the authenticated user.
/// A server side error occurred.
- Task WriteTemplateValueToEntryAsync(string repoId, int entryId, PutTemplateRequest request = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task GetAttributeAsync(string repositoryId, string attributeKey, bool? everyone = null, CancellationToken cancellationToken = default(CancellationToken));
}
[GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
- public partial class EntriesClient : BaseClient, IEntriesClient
+ public partial class AttributesClient : BaseClient, IAttributesClient
{
private HttpClient _httpClient;
private Lazy _settings;
- public EntriesClient(HttpClient httpClient)
+ public AttributesClient(HttpClient httpClient)
{
_httpClient = httpClient;
_settings = new Lazy(CreateSerializerSettings);
@@ -467,79 +104,70 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
partial void ProcessResponse(HttpClient client, HttpResponseMessage response);
///
- /// Creates a new document in a folder.
+ /// Returns the attribute key value pairs associated with the authenticated user.
///
///
- /// - Creates a new document in the specified folder with file (no more than 100 MB).
- /// - Optionally sets metadata and electronic document component.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed. With this route, partial success is possible. The response returns multiple operation (entryCreate operation, setEdoc operation, setLinks operation, etc..) objects, which contain information about any errors that may have occurred during the creation. As long as the entryCreate operation succeeds, the entry will be created, even if all other operations fail.
+ /// - Returns the attribute key value pairs associated with the authenticated user. Alternatively, return only the attribute key value pairs that are associated with the "Everyone" group.
+ /// - Attribute keys can be used with subsequent calls to get specific attribute values.
+ /// - Optional query parameters: everyone (bool, default false). When true, this route does not return the attributes that are tied to the currently authenticated user, but rather the attributes assigned to the "Everyone" group. Note when this is true, the response does not include both the "Everyone" groups attribute and the currently authenticated user, but only the "Everyone" groups.
+ /// - Default page size: 100. Allowed OData query options: Select, Count, OrderBy, Skip, Top, SkipToken, Prefer.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The entry ID of the folder that the document will be created in.
- /// The created document's file name.
- /// An optional query parameter used to indicate if the new document should be automatically
- /// renamed if an entry already exists with the given name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag. This may be used when setting field values with tokens.
+ /// The requested repository ID.
+ /// Indicates if attributes associated with the "Everyone" group or the currently authenticated user is returned. The default value is false.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Document creation is success.
+ /// A collection of attributes associated with the authenticated user.
/// A server side error occurred.
- public virtual async Task ImportDocumentAsync(string repoId, int parentEntryId, string fileName, bool? autoRename = null, string culture = null, FileParameter electronicDocument = null, PostEntryWithEdocMetadataRequest request = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task ListAttributesAsync(string repositoryId, bool? everyone = null, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
-
- if (parentEntryId == null)
- throw new ArgumentNullException("parentEntryId");
-
- if (fileName == null)
- throw new ArgumentNullException("fileName");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{parentEntryId}/{fileName}?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{parentEntryId}", Uri.EscapeDataString(ConvertToString(parentEntryId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{fileName}", Uri.EscapeDataString(ConvertToString(fileName, CultureInfo.InvariantCulture)));
- if (autoRename != null)
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/Attributes?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
+ if (everyone != null)
{
- urlBuilder_.Append(Uri.EscapeDataString("autoRename") + "=").Append(Uri.EscapeDataString(ConvertToString(autoRename, CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(Uri.EscapeDataString("everyone") + "=").Append(Uri.EscapeDataString(ConvertToString(everyone, CultureInfo.InvariantCulture))).Append("&");
}
- if (culture != null)
+ if (select != null)
{
- urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
}
- urlBuilder_.Length--;
-
- var client_ = _httpClient;
+ if (orderby != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$orderby") + "=").Append(Uri.EscapeDataString(ConvertToString(orderby, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (top != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$top") + "=").Append(Uri.EscapeDataString(ConvertToString(top, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (skip != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$skip") + "=").Append(Uri.EscapeDataString(ConvertToString(skip, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (count != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$count") + "=").Append(Uri.EscapeDataString(ConvertToString(count, CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
+
+ var client_ = _httpClient;
bool[] disposeClient_ = new bool[]{ false };
try
{
using (var request_ = new HttpRequestMessage())
{
- var boundary_ = Guid.NewGuid().ToString();
- var content_ = new MultipartFormDataContent(boundary_);
- content_.Headers.Remove("Content-Type");
- content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_);
-
- if (electronicDocument == null)
- throw new ArgumentNullException("electronicDocument");
- else
- {
- var content_electronicDocument_ = new StreamContent(electronicDocument.Data);
- if (!string.IsNullOrEmpty(electronicDocument.ContentType))
- content_electronicDocument_.Headers.ContentType = MediaTypeHeaderValue.Parse(electronicDocument.ContentType);
- content_.Add(content_electronicDocument_, "electronicDocument", electronicDocument.FileName ?? "electronicDocument");
- }
- if (request == null)
- throw new ArgumentNullException("request");
- else
- {
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value);
- content_.Add(new StringContent(json_), "request");
- }
- request_.Content = content_;
- request_.Method = new HttpMethod("POST");
+ if (prefer != null)
+ request_.Headers.TryAddWithoutValidation("Prefer", ConvertToString(prefer, CultureInfo.InvariantCulture));
+ request_.Method = new HttpMethod("GET");
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -549,7 +177,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await ImportDocumentSendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await ListAttributesSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -559,7 +187,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task ImportDocumentSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task ListAttributesSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -575,9 +203,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -587,7 +215,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
else
if (status_ == 400)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -616,26 +244,6 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
else
if (status_ == 404)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 409)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 413)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -655,16 +263,6 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
- if (status_ == 500)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw ApiExceptionExtensions.Create(status_, headers_, responseData_, JsonSerializerSettings, null);
@@ -678,34 +276,34 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
///
- /// Returns a single entry object.
+ /// Returns an attribute object associated with the authenticated user.
///
///
- /// - Returns a single entry object.
- /// - Provide an entry ID, and get the entry associated with that ID. Useful when detailed information about the entry is required, such as metadata, path information, etc.
- /// - Allowed OData query options: Select. If the entry is a subtype (Folder, Document, or Shortcut), the entry will automatically be converted to include those model-specific properties.
+ /// - Returns the attribute associated with the key. Alternatively, return the attribute associated with the key within "Everyone" group.
+ /// - Optional query parameters: everyone (bool, default false). When true, the server only searches for the attribute value with the given key upon the authenticated users attributes. If false, only the authenticated users attributes will be queried.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The requested entry ID.
- /// Limits the properties returned in the result.
+ /// The requested repository ID.
+ /// The requested attribute key.
+ /// Indicates if attributes associated with the "Everyone" group or the currently authenticated user is returned. The default value is false.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get entry successfully.
+ /// A single attribute associated with the authenticated user.
/// A server side error occurred.
- public virtual async Task GetEntryAsync(string repoId, int entryId, string select = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task GetAttributeAsync(string repositoryId, string attributeKey, bool? everyone = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
- if (entryId == null)
- throw new ArgumentNullException("entryId");
+ if (attributeKey == null)
+ throw new ArgumentNullException("attributeKey");
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (select != null)
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/Attributes/{attributeKey}?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
+ urlBuilder_.Replace("{attributeKey}", Uri.EscapeDataString(ConvertToString(attributeKey, CultureInfo.InvariantCulture)));
+ if (everyone != null)
{
- urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(Uri.EscapeDataString("everyone") + "=").Append(Uri.EscapeDataString(ConvertToString(everyone, CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
@@ -725,7 +323,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await GetEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await GetAttributeSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -735,7 +333,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task GetEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task GetAttributeSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -753,7 +351,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -823,375 +421,207 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- ///
- /// Deletes an entry asynchronously.
- ///
- ///
- /// - Begins a task to delete an entry, and returns an operationToken.
- /// - Provide an entry ID, and queue a delete task to remove it from the repository (includes nested objects if the entry is a Folder type). The entry will not be deleted immediately.
- /// - Optionally include an audit reason ID and comment in the JSON body. This route returns an operationToken, and will run as an asynchronous operation. Check the progress via the Tasks/{operationToken} route.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// The submitted audit reason.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Delete entry operation start successfully.
- /// A server side error occurred.
- public virtual async Task DeleteEntryInfoAsync(string repoId, int entryId, DeleteEntryWithAuditReason request = null, CancellationToken cancellationToken = default(CancellationToken))
+ protected struct ObjectResponseResult
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
-
- if (entryId == null)
- throw new ArgumentNullException("entryId");
-
- var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
-
- var client_ = _httpClient;
- bool[] disposeClient_ = new bool[]{ false };
- try
+ public ObjectResponseResult(T responseObject, string responseText)
{
- using (var request_ = new HttpRequestMessage())
- {
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value);
- var content_ = new StringContent(json_);
- content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new HttpMethod("DELETE");
- request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
+ this.Object = responseObject;
+ this.Text = responseText;
+ }
- PrepareRequest(client_, request_, urlBuilder_);
+ public T Object { get; }
- var url_ = urlBuilder_.ToString();
- request_.RequestUri = new Uri(url_, UriKind.RelativeOrAbsolute);
+ public string Text { get; }
+ }
- PrepareRequest(client_, request_, url_);
+ public bool ReadResponseAsString { get; set; }
- return await DeleteEntryInfoSendAsync(request_, client_, disposeClient_, cancellationToken);
- }
- }
- finally
+ protected virtual async Task> ReadObjectResponseAsync(HttpResponseMessage response, IReadOnlyDictionary> headers, CancellationToken cancellationToken)
+ {
+ if (response == null || response.Content == null)
{
- if (disposeClient_[0])
- client_.Dispose();
+ return new ObjectResponseResult(default(T), string.Empty);
}
- }
- protected virtual async Task DeleteEntryInfoSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
- {
- var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
- var disposeResponse_ = true;
- try
+ if (ReadResponseAsString)
{
- var headers_ = Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
- if (response_.Content != null && response_.Content.Headers != null)
- {
- foreach (var item_ in response_.Content.Headers)
- headers_[item_.Key] = item_.Value;
- }
-
- ProcessResponse(client_, response_);
-
- var status_ = (int)response_.StatusCode;
- if (status_ == 201)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- return objectResponse_.Object;
- }
- else
- if (status_ == 400)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 401)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 403)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 404)
+ var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings);
+ return new ObjectResponseResult(typedBody, responseText);
}
- else
- if (status_ == 413)
+ catch (Newtonsoft.Json.JsonException exception)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, responseText, JsonSerializerSettings, exception);
}
- else
- if (status_ == 429)
+ }
+ else
+ {
+ try
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
+ using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
+ using (var streamReader = new StreamReader(responseStream))
+ using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
{
- throw ApiExceptionExtensions.Create(status_, headers_, null);
+ var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
+ var typedBody = serializer.Deserialize(jsonTextReader);
+ return new ObjectResponseResult(typedBody, string.Empty);
}
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
- else
+ catch (Newtonsoft.Json.JsonException exception)
{
- var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw ApiExceptionExtensions.Create(status_, headers_, responseData_, JsonSerializerSettings, null);
+ var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, exception);
}
}
- finally
- {
- if (disposeResponse_)
- response_.Dispose();
- }
}
- ///
- /// Moves and/or renames an entry.
- ///
- ///
- /// - Moves and/or renames an entry.
- /// - Move and/or rename an entry by passing in the new parent folder ID or name in the JSON body.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// The request containing the folder ID that the entry will be moved to and the new name
- /// the entry will be renamed to.
- /// An optional query parameter used to indicate if the entry should be automatically
- /// renamed if another entry already exists with the same name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Moves and/or renames an entry successfully.
- /// A server side error occurred.
- public virtual async Task MoveOrRenameEntryAsync(string repoId, int entryId, PatchEntryRequest request = null, bool? autoRename = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken))
+ private string ConvertToString(object value, CultureInfo cultureInfo)
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ if (value == null)
+ {
+ return "";
+ }
- if (entryId == null)
- throw new ArgumentNullException("entryId");
+ if (value is Enum)
+ {
+ var name = Enum.GetName(value.GetType(), value);
+ if (name != null)
+ {
+ var field = IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
+ if (field != null)
+ {
+ var attribute = CustomAttributeExtensions.GetCustomAttribute(field, typeof(EnumMemberAttribute))
+ as EnumMemberAttribute;
+ if (attribute != null)
+ {
+ return attribute.Value != null ? attribute.Value : name;
+ }
+ }
- var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (autoRename != null)
+ var converted = Convert.ToString(Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType()), cultureInfo));
+ return converted == null ? string.Empty : converted;
+ }
+ }
+ else if (value is bool)
{
- urlBuilder_.Append(Uri.EscapeDataString("autoRename") + "=").Append(Uri.EscapeDataString(ConvertToString(autoRename, CultureInfo.InvariantCulture))).Append("&");
+ return Convert.ToString((bool)value, cultureInfo).ToLowerInvariant();
}
- if (culture != null)
+ else if (value is byte[])
{
- urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
+ return Convert.ToBase64String((byte[]) value);
}
- urlBuilder_.Length--;
-
- var client_ = _httpClient;
- bool[] disposeClient_ = new bool[]{ false };
- try
+ else if (value.GetType().IsArray)
{
- using (var request_ = new HttpRequestMessage())
- {
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value);
- var content_ = new StringContent(json_);
- content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new HttpMethod("PATCH");
- request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
+ var array = Enumerable.OfType((Array) value);
+ return string.Join(",", Enumerable.Select(array, o => ConvertToString(o, cultureInfo)));
+ }
- PrepareRequest(client_, request_, urlBuilder_);
+ var result = Convert.ToString(value, cultureInfo);
+ return result == null ? "" : result;
+ }
+ }
- var url_ = urlBuilder_.ToString();
- request_.RequestUri = new Uri(url_, UriKind.RelativeOrAbsolute);
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial interface IAuditReasonsClient
+ {
- PrepareRequest(client_, request_, url_);
+ ///
+ /// Returns the audit reasons associated with the authenticated user.
+ ///
+ ///
+ /// - Returns the audit reasons associated with the authenticated user. Inherited audit reasons are included.
+ /// - Only includes audit reasons associated with available API functionalities, like delete entry and export document.
+ /// - If the authenticated user does not have the appropriate Laserfiche feature right, the audit reasons associated with that feature right will not be included.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of audit reasons.
+ /// A server side error occurred.
+ Task ListAuditReasonsAsync(string repositoryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
- return await MoveOrRenameEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
- }
- }
- finally
- {
- if (disposeClient_[0])
- client_.Dispose();
- }
+ }
+
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class AuditReasonsClient : BaseClient, IAuditReasonsClient
+ {
+ private HttpClient _httpClient;
+ private Lazy _settings;
+
+ public AuditReasonsClient(HttpClient httpClient)
+ {
+ _httpClient = httpClient;
+ _settings = new Lazy(CreateSerializerSettings);
}
- protected virtual async Task MoveOrRenameEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
- var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
- var disposeResponse_ = true;
- try
- {
- var headers_ = Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
- if (response_.Content != null && response_.Content.Headers != null)
- {
- foreach (var item_ in response_.Content.Headers)
- headers_[item_.Key] = item_.Value;
- }
+ var settings = new Newtonsoft.Json.JsonSerializerSettings();
+ UpdateJsonSerializerSettings(settings);
+ return settings;
+ }
- ProcessResponse(client_, response_);
+ protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
- var status_ = (int)response_.StatusCode;
- if (status_ == 200)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- return objectResponse_.Object;
- }
- else
- if (status_ == 400)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 401)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 403)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 404)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 409)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 413)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 423)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 429)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- {
- var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw ApiExceptionExtensions.Create(status_, headers_, responseData_, JsonSerializerSettings, null);
- }
- }
- finally
- {
- if (disposeResponse_)
- response_.Dispose();
- }
- }
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, string url);
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, StringBuilder urlBuilder);
+ partial void ProcessResponse(HttpClient client, HttpResponseMessage response);
///
- /// Returns a single entry object using the entry path.
+ /// Returns the audit reasons associated with the authenticated user.
///
///
- /// - Returns a single entry object using the entry path.
- /// - Optional query parameter: fallbackToClosestAncestor. Use the fallbackToClosestAncestor query parameter to return the closest existing ancestor if the initial entry path is not found.
+ /// - Returns the audit reasons associated with the authenticated user. Inherited audit reasons are included.
+ /// - Only includes audit reasons associated with available API functionalities, like delete entry and export document.
+ /// - If the authenticated user does not have the appropriate Laserfiche feature right, the audit reasons associated with that feature right will not be included.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The requested entry path.
- /// An optional query parameter used to indicate whether or not the closest ancestor in the path should be returned if the initial entry path is not found. The default value is false.
+ /// The requested repository ID.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get entry successfully.
+ /// A collection of audit reasons.
/// A server side error occurred.
- public virtual async Task GetEntryByPathAsync(string repoId, string fullPath, bool? fallbackToClosestAncestor = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task ListAuditReasonsAsync(string repositoryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/ByPath?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Append(Uri.EscapeDataString("fullPath") + "=").Append(Uri.EscapeDataString(fullPath != null ? ConvertToString(fullPath, CultureInfo.InvariantCulture) : "")).Append("&");
- if (fallbackToClosestAncestor != null)
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/AuditReasons?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
+ if (select != null)
{
- urlBuilder_.Append(Uri.EscapeDataString("fallbackToClosestAncestor") + "=").Append(Uri.EscapeDataString(ConvertToString(fallbackToClosestAncestor, CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (orderby != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$orderby") + "=").Append(Uri.EscapeDataString(ConvertToString(orderby, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (top != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$top") + "=").Append(Uri.EscapeDataString(ConvertToString(top, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (skip != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$skip") + "=").Append(Uri.EscapeDataString(ConvertToString(skip, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (count != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$count") + "=").Append(Uri.EscapeDataString(ConvertToString(count, CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
@@ -1201,6 +631,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
using (var request_ = new HttpRequestMessage())
{
+
+ if (prefer != null)
+ request_.Headers.TryAddWithoutValidation("Prefer", ConvertToString(prefer, CultureInfo.InvariantCulture));
request_.Method = new HttpMethod("GET");
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
@@ -1211,7 +644,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await GetEntryByPathSendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await ListAuditReasonsSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -1221,7 +654,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task GetEntryByPathSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task ListAuditReasonsSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -1239,7 +672,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -1309,81 +742,215 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- ///
- /// Returns the children entries of a folder.
- ///
- ///
- /// - Returns the children entries of a folder in the repository.
- /// - Provide an entry ID (must be a folder), and get a paged listing of entries in that folder. Used as a way of navigating through the repository.
- /// - Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: "PropertyName direction,PropertyName2 direction". Sort order can be either value "asc" or "desc". Optional query parameters: groupByOrderType (bool). This query parameter decides if results are returned in groups based on their entry type. Entries returned in the listing are not automatically converted to their subtype (Folder, Shortcut, Document), so clients who want model-specific information should request it via the GET entry by ID route.
- /// - Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names.
- /// - If field values are requested, only the first value is returned if it is a multi value field.
- /// - Null or Empty field values should not be used to determine if a field is assigned to the entry.
- ///
- /// The requested repository ID.
- /// The folder ID.
- /// An optional query parameter used to indicate if the result should be grouped by entry type or not.
- /// Optional array of field names. Field values corresponding to the given field names will be returned for each entry.
- /// Boolean for if field values should be formatted. Only applicable if Fields are specified.
- /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
- /// An optional query parameter used to indicate the locale that should be used for formatting.
- /// The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise
- /// culture will not be used for formatting.
- /// Limits the properties returned in the result.
- /// Specifies the order in which items are returned. The maximum number of expressions is 5.
- /// Limits the number of items returned from a collection.
- /// Excludes the specified number of items of the queried collection from the result.
- /// Indicates whether the total count of items within a collection are returned in the result.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get the children entries of a Folder successfully.
- /// A server side error occurred.
- public virtual async Task GetEntryListingAsync(string repoId, int entryId, bool? groupByEntryType = null, IEnumerable fields = null, bool? formatFields = null, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
+ protected struct ObjectResponseResult
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ public ObjectResponseResult(T responseObject, string responseText)
+ {
+ this.Object = responseObject;
+ this.Text = responseText;
+ }
- if (entryId == null)
- throw new ArgumentNullException("entryId");
+ public T Object { get; }
- var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Folder/children?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (groupByEntryType != null)
+ public string Text { get; }
+ }
+
+ public bool ReadResponseAsString { get; set; }
+
+ protected virtual async Task> ReadObjectResponseAsync(HttpResponseMessage response, IReadOnlyDictionary> headers, CancellationToken cancellationToken)
+ {
+ if (response == null || response.Content == null)
{
- urlBuilder_.Append(Uri.EscapeDataString("groupByEntryType") + "=").Append(Uri.EscapeDataString(ConvertToString(groupByEntryType, CultureInfo.InvariantCulture))).Append("&");
+ return new ObjectResponseResult(default(T), string.Empty);
}
- if (fields != null)
+
+ if (ReadResponseAsString)
{
- foreach (var item_ in fields) { urlBuilder_.Append(Uri.EscapeDataString("fields") + "=").Append(Uri.EscapeDataString(ConvertToString(item_, CultureInfo.InvariantCulture))).Append("&"); }
+ var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings);
+ return new ObjectResponseResult(typedBody, responseText);
+ }
+ catch (Newtonsoft.Json.JsonException exception)
+ {
+ var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, responseText, JsonSerializerSettings, exception);
+ }
}
- if (formatFields != null)
+ else
{
- urlBuilder_.Append(Uri.EscapeDataString("formatFields") + "=").Append(Uri.EscapeDataString(ConvertToString(formatFields, CultureInfo.InvariantCulture))).Append("&");
+ try
+ {
+ using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
+ using (var streamReader = new StreamReader(responseStream))
+ using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
+ {
+ var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
+ var typedBody = serializer.Deserialize(jsonTextReader);
+ return new ObjectResponseResult(typedBody, string.Empty);
+ }
+ }
+ catch (Newtonsoft.Json.JsonException exception)
+ {
+ var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, exception);
+ }
}
- if (culture != null)
+ }
+
+ private string ConvertToString(object value, CultureInfo cultureInfo)
+ {
+ if (value == null)
{
- urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
+ return "";
}
- if (select != null)
+
+ if (value is Enum)
{
- urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
+ var name = Enum.GetName(value.GetType(), value);
+ if (name != null)
+ {
+ var field = IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
+ if (field != null)
+ {
+ var attribute = CustomAttributeExtensions.GetCustomAttribute(field, typeof(EnumMemberAttribute))
+ as EnumMemberAttribute;
+ if (attribute != null)
+ {
+ return attribute.Value != null ? attribute.Value : name;
+ }
+ }
+
+ var converted = Convert.ToString(Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType()), cultureInfo));
+ return converted == null ? string.Empty : converted;
+ }
}
- if (orderby != null)
+ else if (value is bool)
{
- urlBuilder_.Append(Uri.EscapeDataString("$orderby") + "=").Append(Uri.EscapeDataString(ConvertToString(orderby, CultureInfo.InvariantCulture))).Append("&");
+ return Convert.ToString((bool)value, cultureInfo).ToLowerInvariant();
}
- if (top != null)
+ else if (value is byte[])
{
- urlBuilder_.Append(Uri.EscapeDataString("$top") + "=").Append(Uri.EscapeDataString(ConvertToString(top, CultureInfo.InvariantCulture))).Append("&");
+ return Convert.ToBase64String((byte[]) value);
}
- if (skip != null)
+ else if (value.GetType().IsArray)
{
- urlBuilder_.Append(Uri.EscapeDataString("$skip") + "=").Append(Uri.EscapeDataString(ConvertToString(skip, CultureInfo.InvariantCulture))).Append("&");
+ var array = Enumerable.OfType((Array) value);
+ return string.Join(",", Enumerable.Select(array, o => ConvertToString(o, cultureInfo)));
}
- if (count != null)
+
+ var result = Convert.ToString(value, cultureInfo);
+ return result == null ? "" : result;
+ }
+ }
+
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial interface IFieldDefinitionsClient
+ {
+
+ ///
+ /// Returns a single field definition object.
+ ///
+ ///
+ /// - Returns a single field definition associated with the specified ID.
+ /// - Useful when a route provides a minimal amount of details and more information about the specific field definition is needed.
+ /// - Allowed OData query options: Select
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested field definition ID.
+ /// An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.
+ /// Limits the properties returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A single field definition.
+ /// A server side error occurred.
+ Task GetFieldDefinitionAsync(string repositoryId, int fieldId, string culture = null, string select = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns the paged listing of the field definitions available in a repository.
+ ///
+ ///
+ /// - Returns a paged listing of field definitions available in the specified repository.
+ /// - Useful when trying to find a list of all field definitions available, rather than only those assigned to a specific entry/template.
+ /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of field definitions.
+ /// A server side error occurred.
+ Task ListFieldDefinitionsAsync(string repositoryId, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ }
+
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class FieldDefinitionsClient : BaseClient, IFieldDefinitionsClient
+ {
+ private HttpClient _httpClient;
+ private Lazy _settings;
+
+ public FieldDefinitionsClient(HttpClient httpClient)
+ {
+ _httpClient = httpClient;
+ _settings = new Lazy(CreateSerializerSettings);
+ }
+
+ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
+ {
+ var settings = new Newtonsoft.Json.JsonSerializerSettings();
+ UpdateJsonSerializerSettings(settings);
+ return settings;
+ }
+
+ protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
+
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, string url);
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, StringBuilder urlBuilder);
+ partial void ProcessResponse(HttpClient client, HttpResponseMessage response);
+
+ ///
+ /// Returns a single field definition object.
+ ///
+ ///
+ /// - Returns a single field definition associated with the specified ID.
+ /// - Useful when a route provides a minimal amount of details and more information about the specific field definition is needed.
+ /// - Allowed OData query options: Select
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested field definition ID.
+ /// An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.
+ /// Limits the properties returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A single field definition.
+ /// A server side error occurred.
+ public virtual async Task GetFieldDefinitionAsync(string repositoryId, int fieldId, string culture = null, string select = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
+
+ if (fieldId == null)
+ throw new ArgumentNullException("fieldId");
+
+ var urlBuilder_ = new StringBuilder();
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/FieldDefinitions/{fieldId}?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
+ urlBuilder_.Replace("{fieldId}", Uri.EscapeDataString(ConvertToString(fieldId, CultureInfo.InvariantCulture)));
+ if (culture != null)
{
- urlBuilder_.Append(Uri.EscapeDataString("$count") + "=").Append(Uri.EscapeDataString(ConvertToString(count, CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (select != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
@@ -1393,9 +960,6 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
using (var request_ = new HttpRequestMessage())
{
-
- if (prefer != null)
- request_.Headers.TryAddWithoutValidation("Prefer", ConvertToString(prefer, CultureInfo.InvariantCulture));
request_.Method = new HttpMethod("GET");
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
@@ -1406,7 +970,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await GetEntryListingSendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await GetFieldDefinitionSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -1416,7 +980,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task GetEntryListingSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task GetFieldDefinitionSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -1434,7 +998,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -1505,43 +1069,57 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
///
- /// Creates/copies a new child entry in a folder.
+ /// Returns the paged listing of the field definitions available in a repository.
///
///
- /// - Create/copy a new child entry in the designated folder.
- /// - Provide the parent folder ID, and based on the request body, copy or create a folder/shortcut as a child entry of the designated folder.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.
+ /// - Returns a paged listing of field definitions available in the specified repository.
+ /// - Useful when trying to find a list of all field definitions available, rather than only those assigned to a specific entry/template.
+ /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The folder ID that the entry will be created in.
- /// The entry to create.
- /// An optional query parameter used to indicate if the new entry should be automatically
- /// renamed if an entry already exists with the given name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag.
+ /// The requested repository ID.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Created a new child entry successfully.
+ /// A collection of field definitions.
/// A server side error occurred.
- public virtual async Task CreateOrCopyEntryAsync(string repoId, int entryId, PostEntryChildrenRequest request = null, bool? autoRename = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task ListFieldDefinitionsAsync(string repositoryId, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
-
- if (entryId == null)
- throw new ArgumentNullException("entryId");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Folder/children?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (autoRename != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("autoRename") + "=").Append(Uri.EscapeDataString(ConvertToString(autoRename, CultureInfo.InvariantCulture))).Append("&");
- }
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/FieldDefinitions?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
if (culture != null)
{
urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
}
+ if (select != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (orderby != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$orderby") + "=").Append(Uri.EscapeDataString(ConvertToString(orderby, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (top != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$top") + "=").Append(Uri.EscapeDataString(ConvertToString(top, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (skip != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$skip") + "=").Append(Uri.EscapeDataString(ConvertToString(skip, CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (count != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("$count") + "=").Append(Uri.EscapeDataString(ConvertToString(count, CultureInfo.InvariantCulture))).Append("&");
+ }
urlBuilder_.Length--;
var client_ = _httpClient;
@@ -1550,11 +1128,10 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
using (var request_ = new HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value);
- var content_ = new StringContent(json_);
- content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new HttpMethod("POST");
+
+ if (prefer != null)
+ request_.Headers.TryAddWithoutValidation("Prefer", ConvertToString(prefer, CultureInfo.InvariantCulture));
+ request_.Method = new HttpMethod("GET");
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -1564,7 +1141,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await CreateOrCopyEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await ListFieldDefinitionsSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -1574,7 +1151,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task CreateOrCopyEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task ListFieldDefinitionsSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -1590,9 +1167,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -1640,7 +1217,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
- if (status_ == 409)
+ if (status_ == 429)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -1650,82 +1227,217 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
- if (status_ == 413)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw ApiExceptionExtensions.Create(status_, headers_, responseData_, JsonSerializerSettings, null);
}
- else
- if (status_ == 429)
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+
+ protected struct ObjectResponseResult
+ {
+ public ObjectResponseResult(T responseObject, string responseText)
+ {
+ this.Object = responseObject;
+ this.Text = responseText;
+ }
+
+ public T Object { get; }
+
+ public string Text { get; }
+ }
+
+ public bool ReadResponseAsString { get; set; }
+
+ protected virtual async Task> ReadObjectResponseAsync(HttpResponseMessage response, IReadOnlyDictionary> headers, CancellationToken cancellationToken)
+ {
+ if (response == null || response.Content == null)
+ {
+ return new ObjectResponseResult(default(T), string.Empty);
+ }
+
+ if (ReadResponseAsString)
+ {
+ var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
+ var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings);
+ return new ObjectResponseResult(typedBody, responseText);
+ }
+ catch (Newtonsoft.Json.JsonException exception)
+ {
+ var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, responseText, JsonSerializerSettings, exception);
+ }
+ }
+ else
+ {
+ try
+ {
+ using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
+ using (var streamReader = new StreamReader(responseStream))
+ using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
{
- throw ApiExceptionExtensions.Create(status_, headers_, null);
+ var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
+ var typedBody = serializer.Deserialize(jsonTextReader);
+ return new ObjectResponseResult(typedBody, string.Empty);
}
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
- else
+ catch (Newtonsoft.Json.JsonException exception)
{
- var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw ApiExceptionExtensions.Create(status_, headers_, responseData_, JsonSerializerSettings, null);
+ var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, exception);
}
}
- finally
+ }
+
+ private string ConvertToString(object value, CultureInfo cultureInfo)
+ {
+ if (value == null)
{
- if (disposeResponse_)
- response_.Dispose();
+ return "";
+ }
+
+ if (value is Enum)
+ {
+ var name = Enum.GetName(value.GetType(), value);
+ if (name != null)
+ {
+ var field = IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
+ if (field != null)
+ {
+ var attribute = CustomAttributeExtensions.GetCustomAttribute(field, typeof(EnumMemberAttribute))
+ as EnumMemberAttribute;
+ if (attribute != null)
+ {
+ return attribute.Value != null ? attribute.Value : name;
+ }
+ }
+
+ var converted = Convert.ToString(Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType()), cultureInfo));
+ return converted == null ? string.Empty : converted;
+ }
+ }
+ else if (value is bool)
+ {
+ return Convert.ToString((bool)value, cultureInfo).ToLowerInvariant();
+ }
+ else if (value is byte[])
+ {
+ return Convert.ToBase64String((byte[]) value);
+ }
+ else if (value.GetType().IsArray)
+ {
+ var array = Enumerable.OfType((Array) value);
+ return string.Join(",", Enumerable.Select(array, o => ConvertToString(o, cultureInfo)));
}
+
+ var result = Convert.ToString(value, cultureInfo);
+ return result == null ? "" : result;
}
+ }
+
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial interface ILinkDefinitionsClient
+ {
///
- /// Returns the fields assigned to an entry.
+ /// Returns the link definitions associated with a repository.
///
///
- /// - Returns the fields assigned to an entry.
- /// - Provide an entry ID, and get a paged listing of all fields assigned to that entry.
- /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Returns the link definitions in the repository.
+ /// - Provide a repository ID and get a paged listing of link definitions available in the repository. Useful when trying to display all link definitions available, not only links assigned to a specific entry.
+ /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The requested entry ID.
+ /// The requested repository ID.
/// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
- /// An optional query parameter used to indicate if the field values should be formatted.
- /// The default value is false.
- /// An optional query parameter used to indicate the locale that should be used for formatting.
- /// The value should be a standard language tag. The formatValue query parameter must be set to true, otherwise
- /// culture will not be used for formatting.
/// Limits the properties returned in the result.
/// Specifies the order in which items are returned. The maximum number of expressions is 5.
/// Limits the number of items returned from a collection.
/// Excludes the specified number of items of the queried collection from the result.
/// Indicates whether the total count of items within a collection are returned in the result.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get field values successfully.
+ /// A collection of link definitions.
+ /// A server side error occurred.
+ Task ListLinkDefinitionsAsync(string repositoryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns a single link definition object.
+ ///
+ ///
+ /// - Returns a single link definition associated with the specified ID.
+ /// - Provide a link definition ID and get the associated link definition. Useful when a route provides a minimal amount of details and more information about the specific link definition is needed.
+ /// - Allowed OData query options: Select
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested link definition ID.
+ /// Limits the properties returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A single link definition.
/// A server side error occurred.
- public virtual async Task GetFieldValuesAsync(string repoId, int entryId, string prefer = null, bool? formatValue = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
+ Task GetLinkDefinitionAsync(string repositoryId, int linkDefinitionId, string select = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ }
+
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class LinkDefinitionsClient : BaseClient, ILinkDefinitionsClient
+ {
+ private HttpClient _httpClient;
+ private Lazy _settings;
+
+ public LinkDefinitionsClient(HttpClient httpClient)
+ {
+ _httpClient = httpClient;
+ _settings = new Lazy(CreateSerializerSettings);
+ }
+
+ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ var settings = new Newtonsoft.Json.JsonSerializerSettings();
+ UpdateJsonSerializerSettings(settings);
+ return settings;
+ }
- if (entryId == null)
- throw new ArgumentNullException("entryId");
+ protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
+
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, string url);
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, StringBuilder urlBuilder);
+ partial void ProcessResponse(HttpClient client, HttpResponseMessage response);
+
+ ///
+ /// Returns the link definitions associated with a repository.
+ ///
+ ///
+ /// - Returns the link definitions in the repository.
+ /// - Provide a repository ID and get a paged listing of link definitions available in the repository. Useful when trying to display all link definitions available, not only links assigned to a specific entry.
+ /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of link definitions.
+ /// A server side error occurred.
+ public virtual async Task ListLinkDefinitionsAsync(string repositoryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/fields?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (formatValue != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("formatValue") + "=").Append(Uri.EscapeDataString(ConvertToString(formatValue, CultureInfo.InvariantCulture))).Append("&");
- }
- if (culture != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
- }
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/LinkDefinitions?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
if (select != null)
{
urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
@@ -1767,7 +1479,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await GetFieldValuesSendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await ListLinkDefinitionsSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -1777,7 +1489,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task GetFieldValuesSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task ListLinkDefinitionsSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -1795,7 +1507,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -1866,35 +1578,35 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
///
- /// Updates the field values assigned to an entry.
+ /// Returns a single link definition object.
///
///
- /// - Update the field values assigned to an entry.
- /// - Provide the new field values to assign to the entry, and remove/reset all previously assigned field values.
- /// - This is an overwrite action. The request body must include all desired field values, including any existing field values that should remain assigned to the entry. Field values that are not included in the request will be deleted from the entry. If the field value that is not included is part of a template, it will still be assigned (as required by the template), but its value will be reset.
+ /// - Returns a single link definition associated with the specified ID.
+ /// - Provide a link definition ID and get the associated link definition. Useful when a route provides a minimal amount of details and more information about the specific link definition is needed.
+ /// - Allowed OData query options: Select
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The entry ID of the entry that will have its fields updated.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag. This may be used when setting field values with tokens.
+ /// The requested repository ID.
+ /// The requested link definition ID.
+ /// Limits the properties returned in the result.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Update field values successfully.
+ /// A single link definition.
/// A server side error occurred.
- public virtual async Task AssignFieldValuesAsync(string repoId, int entryId, IDictionary fieldsToUpdate = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task GetLinkDefinitionAsync(string repositoryId, int linkDefinitionId, string select = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
- if (entryId == null)
- throw new ArgumentNullException("entryId");
+ if (linkDefinitionId == null)
+ throw new ArgumentNullException("linkDefinitionId");
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/fields?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (culture != null)
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/LinkDefinitions/{linkDefinitionId}?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
+ urlBuilder_.Replace("{linkDefinitionId}", Uri.EscapeDataString(ConvertToString(linkDefinitionId, CultureInfo.InvariantCulture)));
+ if (select != null)
{
- urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
@@ -1904,11 +1616,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
using (var request_ = new HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(fieldsToUpdate, _settings.Value);
- var content_ = new StringContent(json_);
- content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new HttpMethod("PUT");
+ request_.Method = new HttpMethod("GET");
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -1918,7 +1626,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await AssignFieldValuesSendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await GetLinkDefinitionSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -1928,7 +1636,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task AssignFieldValuesSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task GetLinkDefinitionSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -1946,7 +1654,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -1994,26 +1702,6 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
- if (status_ == 413)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- if (status_ == 423)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
if (status_ == 429)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
@@ -2036,234 +1724,642 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- ///
- /// Returns the tags assigned to an entry.
- ///
- ///
- /// - Returns the tags assigned to an entry.
- /// - Provide an entry ID, and get a paged listing of tags assigned to that entry.
- /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
- ///
- /// The requested repository ID.
- /// The requested entry ID.
- /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
- /// Limits the properties returned in the result.
- /// Specifies the order in which items are returned. The maximum number of expressions is 5.
- /// Limits the number of items returned from a collection.
- /// Excludes the specified number of items of the queried collection from the result.
- /// Indicates whether the total count of items within a collection are returned in the result.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get entry tags successfully.
- /// A server side error occurred.
- public virtual async Task GetTagsAssignedToEntryAsync(string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
+ protected struct ObjectResponseResult
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
-
- if (entryId == null)
- throw new ArgumentNullException("entryId");
-
- var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/tags?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (select != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
- }
- if (orderby != null)
+ public ObjectResponseResult(T responseObject, string responseText)
{
- urlBuilder_.Append(Uri.EscapeDataString("$orderby") + "=").Append(Uri.EscapeDataString(ConvertToString(orderby, CultureInfo.InvariantCulture))).Append("&");
+ this.Object = responseObject;
+ this.Text = responseText;
}
- if (top != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$top") + "=").Append(Uri.EscapeDataString(ConvertToString(top, CultureInfo.InvariantCulture))).Append("&");
- }
- if (skip != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$skip") + "=").Append(Uri.EscapeDataString(ConvertToString(skip, CultureInfo.InvariantCulture))).Append("&");
- }
- if (count != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$count") + "=").Append(Uri.EscapeDataString(ConvertToString(count, CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
-
- var client_ = _httpClient;
- bool[] disposeClient_ = new bool[]{ false };
- try
- {
- using (var request_ = new HttpRequestMessage())
- {
-
- if (prefer != null)
- request_.Headers.TryAddWithoutValidation("Prefer", ConvertToString(prefer, CultureInfo.InvariantCulture));
- request_.Method = new HttpMethod("GET");
- request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
- PrepareRequest(client_, request_, urlBuilder_);
+ public T Object { get; }
- var url_ = urlBuilder_.ToString();
- request_.RequestUri = new Uri(url_, UriKind.RelativeOrAbsolute);
+ public string Text { get; }
+ }
- PrepareRequest(client_, request_, url_);
+ public bool ReadResponseAsString { get; set; }
- return await GetTagsAssignedToEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
- }
- }
- finally
+ protected virtual async Task> ReadObjectResponseAsync(HttpResponseMessage response, IReadOnlyDictionary> headers, CancellationToken cancellationToken)
+ {
+ if (response == null || response.Content == null)
{
- if (disposeClient_[0])
- client_.Dispose();
+ return new ObjectResponseResult(default(T), string.Empty);
}
- }
- protected virtual async Task GetTagsAssignedToEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
- {
- var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
- var disposeResponse_ = true;
- try
+ if (ReadResponseAsString)
{
- var headers_ = Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
- if (response_.Content != null && response_.Content.Headers != null)
- {
- foreach (var item_ in response_.Content.Headers)
- headers_[item_.Key] = item_.Value;
- }
-
- ProcessResponse(client_, response_);
-
- var status_ = (int)response_.StatusCode;
- if (status_ == 200)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- return objectResponse_.Object;
- }
- else
- if (status_ == 400)
+ var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings);
+ return new ObjectResponseResult(typedBody, responseText);
}
- else
- if (status_ == 401)
+ catch (Newtonsoft.Json.JsonException exception)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, responseText, JsonSerializerSettings, exception);
}
- else
- if (status_ == 403)
+ }
+ else
+ {
+ try
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
+ using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
+ using (var streamReader = new StreamReader(responseStream))
+ using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
{
- throw ApiExceptionExtensions.Create(status_, headers_, null);
+ var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
+ var typedBody = serializer.Deserialize(jsonTextReader);
+ return new ObjectResponseResult(typedBody, string.Empty);
}
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
- else
- if (status_ == 404)
+ catch (Newtonsoft.Json.JsonException exception)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
+ throw ApiExceptionExtensions.Create((int)response.StatusCode, headers, exception);
}
- else
- if (status_ == 429)
+ }
+ }
+
+ private string ConvertToString(object value, CultureInfo cultureInfo)
+ {
+ if (value == null)
+ {
+ return "";
+ }
+
+ if (value is Enum)
+ {
+ var name = Enum.GetName(value.GetType(), value);
+ if (name != null)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
+ var field = IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
+ if (field != null)
{
- throw ApiExceptionExtensions.Create(status_, headers_, null);
+ var attribute = CustomAttributeExtensions.GetCustomAttribute(field, typeof(EnumMemberAttribute))
+ as EnumMemberAttribute;
+ if (attribute != null)
+ {
+ return attribute.Value != null ? attribute.Value : name;
+ }
}
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
- {
- var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw ApiExceptionExtensions.Create(status_, headers_, responseData_, JsonSerializerSettings, null);
+
+ var converted = Convert.ToString(Convert.ChangeType(value, Enum.GetUnderlyingType(value.GetType()), cultureInfo));
+ return converted == null ? string.Empty : converted;
}
}
- finally
+ else if (value is bool)
{
- if (disposeResponse_)
- response_.Dispose();
+ return Convert.ToString((bool)value, cultureInfo).ToLowerInvariant();
+ }
+ else if (value is byte[])
+ {
+ return Convert.ToBase64String((byte[]) value);
+ }
+ else if (value.GetType().IsArray)
+ {
+ var array = Enumerable.OfType((Array) value);
+ return string.Join(",", Enumerable.Select(array, o => ConvertToString(o, cultureInfo)));
}
+
+ var result = Convert.ToString(value, cultureInfo);
+ return result == null ? "" : result;
}
+ }
+
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial interface IEntriesClient
+ {
///
- /// Assigns tags to an entry.
+ /// Requests Upload URLs to upload a large file in chunks.
///
///
- /// - Assign tags to an entry.
- /// - Provide an entry ID and a list of tags to assign to that entry.
- /// - This is an overwrite action. The request must include all tags to assign to the entry, including existing tags that should remain assigned to the entry.
+ /// - Requests Upload URLs to upload a large file in chunks.
+ /// - Returns an UploadId and an array of URLs to which the file chunks should be written in the same order.
+ /// - To request a new batch of Upload URLs for the same file, set the value of UploadId to the one returned when the first batch of Upload URLs was requested. For requesting the first batch of Upload URLs, leave UploadId empty or null.
+ /// - Example: if a file is going to be uploaded in 10 chunks, the 10 Upload URLs can be retrieved by two successive calls to this api, each call requesting 5 Upload URLs. For this, the first call should have StartingPartNumber=1 and NumberOfParts=5, and the second call should have StartingPartNumber=6 and NumberOfParts=5, along with UploadId returned in the first call.
+ /// - Each Upload URL expires after 15 minutes.
+ /// - Each file chunk written to an Upload URL should be at least 5 MB and at most 5 GB. There is no minimum size limit for the last chunk.
+ /// - The value of NumberOfParts must be in the range [1, 100], meaning that in each call to this api, a maximum of 100 Upload URLs can be requested.
+ /// - The total number of Upload URLs for a single file is 1000, which means (StartingPartNumber + NumberOfParts) should be less than or equal to 1001.
+ /// - Required OAuth scope: repository.Write
///
- /// The requested repository ID.
- /// The requested entry ID.
- /// The tags to add.
+ /// The requested repository ID.
+ /// The request body.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Assign tags to an entry successfully.
+ /// A response containing an upload id and an array of upload URLs.
/// A server side error occurred.
- public virtual async Task AssignTagsAsync(string repoId, int entryId, PutTagRequest tagsToAdd = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ Task CreateMultipartUploadUrlsAsync(string repositoryId, CreateMultipartUploadUrlsRequest request, CancellationToken cancellationToken = default(CancellationToken));
- if (entryId == null)
- throw new ArgumentNullException("entryId");
+ ///
+ /// Starts an asynchronous import task to import a document into a folder.
+ ///
+ ///
+ /// - Imports a new file in the specified folder. The file should be already written (in chunks) to the upload URLs obtained by calling the Upload api.
+ /// - This route does not support partial success.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The entry ID of the folder that the document will be created in.
+ /// The request body.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A long operation task id.
+ /// A server side error occurred.
+ Task StartImportUploadedPartsAsync(string repositoryId, int entryId, StartImportUploadedPartsRequest request = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
- var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/tags");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
+ ///
+ /// Starts an asynchronous export task to export an entry.
+ ///
+ ///
+ /// - Starts an asynchronous export operation to export an entry.
+ /// - If successful, it returns a taskId which can be used to check the status of the export operation or download the export result, otherwise, it returns an error.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The ID of entry to export.
+ /// The request body.
+ /// A comma-separated range of pages to include. Ex: 1,3,4 or 1-3,5-7,9. This value is ignored when part=Edoc.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A long operation task id.
+ /// A server side error occurred.
+ Task StartExportEntryAsync(string repositoryId, int entryId, StartExportEntryRequest request, string pageRange = null, CancellationToken cancellationToken = default(CancellationToken));
- var client_ = _httpClient;
- bool[] disposeClient_ = new bool[]{ false };
- try
- {
- using (var request_ = new HttpRequestMessage())
- {
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(tagsToAdd, _settings.Value);
- var content_ = new StringContent(json_);
- content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new HttpMethod("PUT");
- request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
+ ///
+ /// Starts an asynchronous copy task to copy an entry into a folder.
+ ///
+ ///
+ /// - Copy a new child entry in the designated folder async, and potentially return a taskId.
+ /// - Provide the parent folder ID, and copy an entry as a child of the designated folder.
+ /// - The status of the operation can be checked via the Tasks route.
+ /// - Token substitution in the name of the copied entry is not supported.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The folder ID that the entry will be created in.
+ /// The request body.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A long operation task id.
+ /// A server side error occurred.
+ Task StartCopyEntryAsync(string repositoryId, int entryId, StartCopyEntryRequest request, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
- PrepareRequest(client_, request_, urlBuilder_);
+ ///
+ /// Starts an asynchronous delete task to delete an entry.
+ ///
+ ///
+ /// - Begins a task to delete an entry, and returns a taskId.
+ /// - Provide an entry ID, and queue a delete task to remove it from the repository (includes nested objects if the entry is a Folder type). The entry will not be deleted immediately.
+ /// - Optionally include an audit reason ID and comment in the JSON body. This route returns a taskId, and will run as an asynchronous operation. Check the progress via the Tasks route.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// The submitted audit reason.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A long operation task id.
+ /// A server side error occurred.
+ Task StartDeleteEntryAsync(string repositoryId, int entryId, StartDeleteEntryRequest request = null, CancellationToken cancellationToken = default(CancellationToken));
- var url_ = urlBuilder_.ToString();
- request_.RequestUri = new Uri(url_, UriKind.RelativeOrAbsolute);
+ ///
+ /// Returns a single entry object.
+ ///
+ ///
+ /// - Returns a single entry object.
+ /// - Provide an entry ID, and get the entry associated with that ID. Useful when detailed information about the entry is required, such as metadata, path information, etc.
+ /// - If the entry is a subtype (Folder, Document, or Shortcut), the entry will automatically be converted to include those model-specific properties.
+ /// - Allowed OData query options: Select.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// Limits the properties returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A single entry.
+ /// A server side error occurred.
+ Task GetEntryAsync(string repositoryId, int entryId, string select = null, CancellationToken cancellationToken = default(CancellationToken));
- PrepareRequest(client_, request_, url_);
+ ///
+ /// Update an entry. (Move and/or Rename)
+ ///
+ ///
+ /// - Update an entry. (Move and/or Rename)
+ /// - Move an entry to a new folder by setting the ParentId in the request body.
+ /// - Rename an entry by setting the Name in the request body.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// The request containing the folder ID that the entry will be moved to and the new name the entry will be renamed to.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The updated entry.
+ /// A server side error occurred.
+ Task UpdateEntryAsync(string repositoryId, int entryId, UpdateEntryRequest request, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
- return await AssignTagsSendAsync(request_, client_, disposeClient_, cancellationToken);
- }
- }
- finally
- {
- if (disposeClient_[0])
- client_.Dispose();
- }
- }
+ ///
+ /// Imports a file into a folder (max length: 100 MB).
+ ///
+ ///
+ /// - Import a new document in the specified folder, and optionally assigns metadata.
+ /// - The import may fail if the file is greater than 100 MB or time out if it takes longer than 60 seconds. These values are subject to change at anytime. Use the long operation asynchronous import if you run into these restrictions.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The entry ID of the folder that the document will be created in.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The created entry.
+ /// A server side error occurred.
+ Task ImportEntryAsync(string repositoryId, int entryId, string culture = null, FileParameter file = null, ImportEntryRequest request = null, CancellationToken cancellationToken = default(CancellationToken));
- protected virtual async Task AssignTagsSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ ///
+ /// Exports an entry.
+ ///
+ ///
+ /// - Export an entry.
+ /// - The export may time out if it takes longer than 60 seconds. This value is subject to change at anytime. Use the long operation asynchronous export if you run into this restriction.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The ID of entry to export.
+ /// The request body.
+ /// A comma-separated range of pages to include. Ex: 1,3,4 or 1-3,5-7,9. This value is ignored when exporting as Edoc.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A link to download the exported entry.
+ /// A server side error occurred.
+ Task ExportEntryAsync(string repositoryId, int entryId, ExportEntryRequest request, string pageRange = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns a single entry object using the entry path.
+ ///
+ ///
+ /// - Returns a single entry object using the entry path.
+ /// - Optional query parameter: fallbackToClosestAncestor. Use the fallbackToClosestAncestor query parameter to return the closest existing ancestor if the initial entry path is not found.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested entry path.
+ /// An optional query parameter used to indicate whether or not the closest ancestor in the path should be returned if the initial entry path is not found. The default value is false.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The found entry or ancestor entry.
+ /// A server side error occurred.
+ Task GetEntryByPathAsync(string repositoryId, string fullPath, bool? fallbackToClosestAncestor = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns the children entries of a folder.
+ ///
+ ///
+ /// - Returns the children entries of a folder in the repository.
+ /// - Provide an entry ID (must be a folder), and get a paged listing of entries in that folder. Used as a way of navigating through the repository.
+ /// - Entries returned in the listing are not automatically converted to their subtype (Folder, Shortcut, Document), so clients who want model-specific information should request it via the GET entry by ID route.
+ /// - Optional query parameters: groupByEntryType (bool). This query parameter decides if results are returned in groups based on their entry type.
+ /// - Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names. If field values are requested, only the first value is returned if it is a multi value field. The remaining field values can be retrieved via the GET fields route. Null or Empty field values should not be used to determine if a field is assigned to the entry.
+ /// - Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: "PropertyName direction,PropertyName2 direction". Sort order can be either value "asc" or "desc".
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The folder ID.
+ /// Indicates if the result should be grouped by entry type or not. The default value is false.
+ /// Optional array of field names. Field values corresponding to the given field names will be returned for each entry.
+ /// Indicates if field values should be formatted. Only applicable if Fields are specified. The default value is false.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise culture will not be used for formatting.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of children entries of a folder.
+ /// A server side error occurred.
+ Task ListEntriesAsync(string repositoryId, int entryId, bool? groupByEntryType = null, IEnumerable fields = null, bool? formatFieldValues = null, string prefer = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Creates a new child entry in a folder.
+ ///
+ ///
+ /// - Create a new child entry in the designated folder.
+ /// - Provide the parent folder ID, and based on the request body, create a folder/shortcut as a child entry of the designated folder.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The folder ID that the entry will be created in.
+ /// The request body.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The created entry.
+ /// A server side error occurred.
+ Task CreateEntryAsync(string repositoryId, int entryId, CreateEntryRequest request, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns the fields assigned to an entry.
+ ///
+ ///
+ /// - Returns the fields assigned to an entry.
+ /// - Provide an entry ID, and get a paged listing of all fields assigned to that entry.
+ /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// An optional query parameter used to indicate if the field values should be formatted. The default value is false.
+ /// An optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFieldValues query parameter must be set to true, otherwise culture will not be used for formatting.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of fields assigned to the entry.
+ /// A server side error occurred.
+ Task ListFieldsAsync(string repositoryId, int entryId, string prefer = null, bool? formatFieldValues = null, string culture = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Updates the field values assigned to an entry.
+ ///
+ ///
+ /// - Update the field values assigned to an entry.
+ /// - Provide the new field values to assign to the entry, and remove/reset all previously assigned field values.
+ /// - This is an overwrite action. The request body must include all desired field values, including any existing field values that should remain assigned to the entry. Field values that are not included in the request will be deleted from the entry. If the field value that is not included is part of a template, it will still be assigned (as required by the template), but its value will be reset.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The entry ID of the entry that will have its fields updated.
+ /// The request body.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of fields assigned to the entry.
+ /// A server side error occurred.
+ Task SetFieldsAsync(string repositoryId, int entryId, SetFieldsRequest request, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns the tags assigned to an entry.
+ ///
+ ///
+ /// - Returns the tags assigned to an entry.
+ /// - Provide an entry ID, and get a paged listing of tags assigned to that entry.
+ /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of tags assigned to the entry.
+ /// A server side error occurred.
+ Task ListTagsAsync(string repositoryId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Assigns tags to an entry.
+ ///
+ ///
+ /// - Assign tags to an entry.
+ /// - Provide an entry ID and a list of tags to assign to that entry.
+ /// - This is an overwrite action. The request must include all tags to assign to the entry, including existing tags that should remain assigned to the entry.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// The tags to add.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of tags assigned to the entry.
+ /// A server side error occurred.
+ Task SetTagsAsync(string repositoryId, int entryId, SetTagsRequest request, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Assigns links to an entry.
+ ///
+ ///
+ /// - Assign links to an entry.
+ /// - Provide an entry ID and a list of links to assign to that entry.
+ /// - This is an overwrite action. The request must include all links to assign to the entry, including existing links that should remain assigned to the entry.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The request repository ID.
+ /// The requested entry ID.
+ /// The request body.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of links assigned to the entry.
+ /// A server side error occurred.
+ Task SetLinksAsync(string repositoryId, int entryId, SetLinksRequest request, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns the links assigned to an entry.
+ ///
+ ///
+ /// - Returns the links assigned to an entry.
+ /// - Provide an entry ID, and get a paged listing of links assigned to that entry.
+ /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.
+ /// Limits the properties returned in the result.
+ /// Specifies the order in which items are returned. The maximum number of expressions is 5.
+ /// Limits the number of items returned from a collection.
+ /// Excludes the specified number of items of the queried collection from the result.
+ /// Indicates whether the total count of items within a collection are returned in the result.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of links assigned to the entry.
+ /// A server side error occurred.
+ Task ListLinksAsync(string repositoryId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Copies a new child entry in a folder.
+ ///
+ ///
+ /// - Copy a new child entry in the designated folder.
+ /// - Provide the parent folder ID, and based on the request body, copy a child entry of the designated folder.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The folder ID that the entry will be created in.
+ /// The request body.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The copied entry.
+ /// A server side error occurred.
+ Task CopyEntryAsync(string repositoryId, int entryId, CopyEntryRequest request, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Deletes the edoc associated with an entry.
+ ///
+ ///
+ /// - Delete the edoc associated with the provided entry ID.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The requested document ID.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The updated entry.
+ /// A server side error occurred.
+ Task DeleteElectronicDocumentAsync(string repositoryId, int entryId, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Deletes the pages associated with an entry.
+ ///
+ ///
+ /// - Delete the pages associated with the provided entry ID. If no pageRange is specified, all pages will be deleted.
+ /// - Optional parameter: pageRange (default empty). The value should be a comma-separated string which contains non-overlapping single values, or page ranges. Ex: "1,2,3", "1-3,5", "2-7,10-12."
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The requested document ID.
+ /// The pages to be deleted.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The updated entry.
+ /// A server side error occurred.
+ Task DeletePagesAsync(string repositoryId, int entryId, string pageRange = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Returns the dynamic field logic values assigned to an entry.
+ ///
+ ///
+ /// - Returns dynamic field logic values with the current values of the fields in the template.
+ /// - Provide an entry ID and field values in the JSON body to get dynamic field logic values.
+ /// - Independent and non-dynamic fields in the request body will be ignored, and only related dynamic field logic values for the assigned template will be returned.
+ /// - Required OAuth scope: repository.Read
+ ///
+ /// The requested repository ID.
+ /// The requested entry ID.
+ /// The request body.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A collection of dynamic field values.
+ /// A server side error occurred.
+ Task>> ListDynamicFieldValuesAsync(string repositoryId, int entryId, ListDynamicFieldValuesRequest request, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Removes the currently assigned template from an entry.
+ ///
+ ///
+ /// - Remove the currently assigned template from the specified entry.
+ /// - Provide an entry ID to clear template value on.
+ /// - If the entry does not have a template assigned, no change will be made.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The ID of the entry that will have its template removed.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The updated entry.
+ /// A server side error occurred.
+ Task RemoveTemplateAsync(string repositoryId, int entryId, CancellationToken cancellationToken = default(CancellationToken));
+
+ ///
+ /// Assigns a template to an entry.
+ ///
+ ///
+ /// - Assign a template to an entry.
+ /// - Provide an entry ID, template name, and a list of template fields to assign to that entry.
+ /// - Only template values will be modified. Any existing independent fields on the entry will not be modified, nor will they be added if included in the request. The only modification to fields will only occur on templated fields. If the previously assigned template includes common template fields as the newly assigned template, the common field values will not be modified.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The ID of entry that will have its template updated.
+ /// The template and template fields that will be assigned to the entry.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// The updated entry.
+ /// A server side error occurred.
+ Task SetTemplateAsync(string repositoryId, int entryId, SetTemplateRequest request, string culture = null, CancellationToken cancellationToken = default(CancellationToken));
+
+ }
+
+ [GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class EntriesClient : BaseClient, IEntriesClient
+ {
+ private HttpClient _httpClient;
+ private Lazy _settings;
+
+ public EntriesClient(HttpClient httpClient)
+ {
+ _httpClient = httpClient;
+ _settings = new Lazy(CreateSerializerSettings);
+ }
+
+ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
+ {
+ var settings = new Newtonsoft.Json.JsonSerializerSettings();
+ UpdateJsonSerializerSettings(settings);
+ return settings;
+ }
+
+ protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
+
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, string url);
+ partial void PrepareRequest(HttpClient client, HttpRequestMessage request, StringBuilder urlBuilder);
+ partial void ProcessResponse(HttpClient client, HttpResponseMessage response);
+
+ ///
+ /// Requests Upload URLs to upload a large file in chunks.
+ ///
+ ///
+ /// - Requests Upload URLs to upload a large file in chunks.
+ /// - Returns an UploadId and an array of URLs to which the file chunks should be written in the same order.
+ /// - To request a new batch of Upload URLs for the same file, set the value of UploadId to the one returned when the first batch of Upload URLs was requested. For requesting the first batch of Upload URLs, leave UploadId empty or null.
+ /// - Example: if a file is going to be uploaded in 10 chunks, the 10 Upload URLs can be retrieved by two successive calls to this api, each call requesting 5 Upload URLs. For this, the first call should have StartingPartNumber=1 and NumberOfParts=5, and the second call should have StartingPartNumber=6 and NumberOfParts=5, along with UploadId returned in the first call.
+ /// - Each Upload URL expires after 15 minutes.
+ /// - Each file chunk written to an Upload URL should be at least 5 MB and at most 5 GB. There is no minimum size limit for the last chunk.
+ /// - The value of NumberOfParts must be in the range [1, 100], meaning that in each call to this api, a maximum of 100 Upload URLs can be requested.
+ /// - The total number of Upload URLs for a single file is 1000, which means (StartingPartNumber + NumberOfParts) should be less than or equal to 1001.
+ /// - Required OAuth scope: repository.Write
+ ///
+ /// The requested repository ID.
+ /// The request body.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ /// A response containing an upload id and an array of upload URLs.
+ /// A server side error occurred.
+ public virtual async Task CreateMultipartUploadUrlsAsync(string repositoryId, CreateMultipartUploadUrlsRequest request, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
+
+ if (request == null)
+ throw new ArgumentNullException("request");
+
+ var urlBuilder_ = new StringBuilder();
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/Entries/CreateMultipartUploadUrls");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
+
+ var client_ = _httpClient;
+ bool[] disposeClient_ = new bool[]{ false };
+ try
+ {
+ using (var request_ = new HttpRequestMessage())
+ {
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value);
+ var content_ = new StringContent(json_);
+ content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new HttpMethod("POST");
+ request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new Uri(url_, UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ return await CreateMultipartUploadUrlsSendAsync(request_, client_, disposeClient_, cancellationToken);
+ }
+ }
+ finally
+ {
+ if (disposeClient_[0])
+ client_.Dispose();
+ }
+ }
+
+ protected virtual async Task CreateMultipartUploadUrlsSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -2281,7 +2377,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -2339,16 +2435,6 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
- if (status_ == 423)
- {
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw ApiExceptionExtensions.Create(status_, headers_, null);
- }
- throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
- }
- else
if (status_ == 429)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
@@ -2372,30 +2458,37 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
///
- /// Assigns links to an entry.
+ /// Starts an asynchronous import task to import a document into a folder.
///
///
- /// - Assign links to an entry.
- /// - Provide an entry ID and a list of links to assign to that entry.
- /// - This is an overwrite action. The request must include all links to assign to the entry, including existing links that should remain assigned to the entry.
+ /// - Imports a new file in the specified folder. The file should be already written (in chunks) to the upload URLs obtained by calling the Upload api.
+ /// - This route does not support partial success.
+ /// - Required OAuth scope: repository.Write
///
- /// The request repository ID.
- /// The requested entry ID.
+ /// The requested repository ID.
+ /// The entry ID of the folder that the document will be created in.
+ /// The request body.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag. This may be used when setting field values with tokens.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Assign links to an entry successfully.
+ /// A long operation task id.
/// A server side error occurred.
- public virtual async Task AssignEntryLinksAsync(string repoId, int entryId, IEnumerable linksToAdd = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task StartImportUploadedPartsAsync(string repositoryId, int entryId, StartImportUploadedPartsRequest request = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
if (entryId == null)
throw new ArgumentNullException("entryId");
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/links");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/ImportUploadedParts?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
+ if (culture != null)
+ {
+ urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
bool[] disposeClient_ = new bool[]{ false };
@@ -2403,11 +2496,11 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
using (var request_ = new HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(linksToAdd, _settings.Value);
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value);
var content_ = new StringContent(json_);
content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new HttpMethod("PUT");
+ request_.Method = new HttpMethod("POST");
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -2417,7 +2510,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await AssignEntryLinksSendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await StartImportUploadedPartsSendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -2427,7 +2520,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task AssignEntryLinksSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task StartImportUploadedPartsSendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -2443,9 +2536,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 202)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -2503,7 +2596,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
- if (status_ == 423)
+ if (status_ == 429)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -2513,7 +2606,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
- if (status_ == 429)
+ if (status_ == 500)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -2536,55 +2629,38 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
///
- /// Returns the links assigned to an entry.
+ /// Starts an asynchronous export task to export an entry.
///
///
- /// - Returns the links assigned to an entry.
- /// - Provide an entry ID, and get a paged listing of links assigned to that entry.
- /// - Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
+ /// - Starts an asynchronous export operation to export an entry.
+ /// - If successful, it returns a taskId which can be used to check the status of the export operation or download the export result, otherwise, it returns an error.
+ /// - Required OAuth scope: repository.Read
///
- /// The requested repository ID.
- /// The requested entry ID.
- /// An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.
- /// Limits the properties returned in the result.
- /// Specifies the order in which items are returned. The maximum number of expressions is 5.
- /// Limits the number of items returned from a collection.
- /// Excludes the specified number of items of the queried collection from the result.
- /// Indicates whether the total count of items within a collection are returned in the result.
+ /// The requested repository ID.
+ /// The ID of entry to export.
+ /// The request body.
+ /// A comma-separated range of pages to include. Ex: 1,3,4 or 1-3,5-7,9. This value is ignored when part=Edoc.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Get links successfully.
+ /// A long operation task id.
/// A server side error occurred.
- public virtual async Task GetLinkValuesFromEntryAsync(string repoId, int entryId, string prefer = null, string select = null, string orderby = null, int? top = null, int? skip = null, bool? count = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task StartExportEntryAsync(string repositoryId, int entryId, StartExportEntryRequest request, string pageRange = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
if (entryId == null)
throw new ArgumentNullException("entryId");
+ if (request == null)
+ throw new ArgumentNullException("request");
+
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/links?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/Entries/{entryId}/ExportAsync?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (select != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$select") + "=").Append(Uri.EscapeDataString(ConvertToString(select, CultureInfo.InvariantCulture))).Append("&");
- }
- if (orderby != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$orderby") + "=").Append(Uri.EscapeDataString(ConvertToString(orderby, CultureInfo.InvariantCulture))).Append("&");
- }
- if (top != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$top") + "=").Append(Uri.EscapeDataString(ConvertToString(top, CultureInfo.InvariantCulture))).Append("&");
- }
- if (skip != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("$skip") + "=").Append(Uri.EscapeDataString(ConvertToString(skip, CultureInfo.InvariantCulture))).Append("&");
- }
- if (count != null)
+ if (pageRange != null)
{
- urlBuilder_.Append(Uri.EscapeDataString("$count") + "=").Append(Uri.EscapeDataString(ConvertToString(count, CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(Uri.EscapeDataString("pageRange") + "=").Append(Uri.EscapeDataString(ConvertToString(pageRange, CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
@@ -2594,10 +2670,11 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
{
using (var request_ = new HttpRequestMessage())
{
-
- if (prefer != null)
- request_.Headers.TryAddWithoutValidation("Prefer", ConvertToString(prefer, CultureInfo.InvariantCulture));
- request_.Method = new HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value);
+ var content_ = new StringContent(json_);
+ content_.Headers.ContentType = MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new HttpMethod("POST");
request_.Headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -2607,7 +2684,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await GetLinkValuesFromEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await StartExportEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -2617,7 +2694,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task GetLinkValuesFromEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task StartExportEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -2633,9 +2710,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 202)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw ApiExceptionExtensions.Create(status_, headers_, null);
@@ -2683,6 +2760,16 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
+ if (status_ == 413)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw ApiExceptionExtensions.Create(status_, headers_, null);
+ }
+ throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ }
+ else
if (status_ == 429)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
@@ -2693,6 +2780,16 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
}
else
+ if (status_ == 500)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw ApiExceptionExtensions.Create(status_, headers_, null);
+ }
+ throw ApiExceptionExtensions.Create(status_, headers_, objectResponse_.Object, null);
+ }
+ else
{
var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw ApiExceptionExtensions.Create(status_, headers_, responseData_, JsonSerializerSettings, null);
@@ -2706,41 +2803,37 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
///
- /// Copies an entry into a folder asynchronously.
+ /// Starts an asynchronous copy task to copy an entry into a folder.
///
///
- /// - Copy a new child entry in the designated folder async, and potentially return an operationToken.
+ /// - Copy a new child entry in the designated folder async, and potentially return a taskId.
/// - Provide the parent folder ID, and copy an entry as a child of the designated folder.
- /// - Optional parameter: autoRename (default false). If an entry already exists with the given name, the entry will be automatically renamed.
- /// - The status of the operation can be checked via the Tasks/{operationToken} route.
- /// - Token substitution in the name of the copied entry is not supported.
+ /// - The status of the operation can be checked via the Tasks route.
+ /// - Token substitution in the name of the copied entry is not supported.
+ /// - Required OAuth scope: repository.Write
///
- /// The requested repository ID.
+ /// The requested repository ID.
/// The folder ID that the entry will be created in.
- /// Copy entry request.
- /// An optional query parameter used to indicate if the new entry should be automatically
- /// renamed if an entry already exists with the given name in the folder. The default value is false.
- /// An optional query parameter used to indicate the locale that should be used.
- /// The value should be a standard language tag.
+ /// The request body.
+ /// An optional query parameter used to indicate the locale that should be used. The value should be a standard language tag.
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
- /// Copy entry operation is started successfully.
+ /// A long operation task id.
/// A server side error occurred.
- public virtual async Task CopyEntryAsync(string repoId, int entryId, CopyAsyncRequest request = null, bool? autoRename = null, string culture = null, CancellationToken cancellationToken = default(CancellationToken))
+ public virtual async Task StartCopyEntryAsync(string repositoryId, int entryId, StartCopyEntryRequest request, string culture = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (repoId == null)
- throw new ArgumentNullException("repoId");
+ if (repositoryId == null)
+ throw new ArgumentNullException("repositoryId");
if (entryId == null)
throw new ArgumentNullException("entryId");
+ if (request == null)
+ throw new ArgumentNullException("request");
+
var urlBuilder_ = new StringBuilder();
- urlBuilder_.Append("v1/Repositories/{repoId}/Entries/{entryId}/Laserfiche.Repository.Folder/CopyAsync?");
- urlBuilder_.Replace("{repoId}", Uri.EscapeDataString(ConvertToString(repoId, CultureInfo.InvariantCulture)));
+ urlBuilder_.Append("v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/CopyAsync?");
+ urlBuilder_.Replace("{repositoryId}", Uri.EscapeDataString(ConvertToString(repositoryId, CultureInfo.InvariantCulture)));
urlBuilder_.Replace("{entryId}", Uri.EscapeDataString(ConvertToString(entryId, CultureInfo.InvariantCulture)));
- if (autoRename != null)
- {
- urlBuilder_.Append(Uri.EscapeDataString("autoRename") + "=").Append(Uri.EscapeDataString(ConvertToString(autoRename, CultureInfo.InvariantCulture))).Append("&");
- }
if (culture != null)
{
urlBuilder_.Append(Uri.EscapeDataString("culture") + "=").Append(Uri.EscapeDataString(ConvertToString(culture, CultureInfo.InvariantCulture))).Append("&");
@@ -2767,7 +2860,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
PrepareRequest(client_, request_, url_);
- return await CopyEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
+ return await StartCopyEntrySendAsync(request_, client_, disposeClient_, cancellationToken);
}
}
finally
@@ -2777,7 +2870,7 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
}
}
- protected virtual async Task CopyEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
+ protected virtual async Task StartCopyEntrySendAsync(HttpRequestMessage request_, HttpClient client_, bool[] disposeClient_, CancellationToken cancellationToken = default(CancellationToken))
{
var response_ = await client_.SendAsync(request_, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
var disposeResponse_ = true;
@@ -2793,9 +2886,9 @@ private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 202)
{
- var objectResponse_ = await ReadObjectResponseAsync