Zu den Hauptinhalten
  • Bestellungen schnell und einfach aufgeben
  • Bestellungen anzeigen und den Versandstatus verfolgen
  • Profitieren Sie von exklusiven Prämien und Rabatten für Mitglieder
  • Erstellen Sie eine Liste Ihrer Produkte, auf die Sie jederzeit zugreifen können.
  • Verwalten Sie mit der Unternehmensverwaltung Ihre Dell EMC Seiten, Produkte und produktspezifischen Kontakte.

PowerScale OneFS API Reference

PDF

Copy a file

Copies a file to the specified destination path.

Request syntax

PUT /namespace/<access_point>/<file_path>[?overwrite=<Boolean>] HTTP/1.1
x-isi-ifs-copy-source: /namespace/<access_point>/<source_path>
Host <hostname>[:<port>]
Date: <date>
Authorization: <signature>

Request query parameters

Parameter Name Description Default Type Required
overwrite Specifies if the existing file should be overwritten when a file with the same name exists. False Boolean No

Request headers

Header Name Description Default Type Required
x-isi-ifs-copy-source Specifies the full path of the source.

The source and destination paths must be in the same access point.

N/A String Yes

Response headers

This call returns common response headers.

Response body

No message body is returned upon success. For this operation, the HTTP status code 200 OK may not indicate a complete success.

If the response body contains a JSON message, the operation has partially failed. If the server fails to initiate a copy due to an error (such as an invalid copy source), an error is returned. If the server initiates the copy, and then fails, "copy_errors" are returned in structured JSON format. Because the copy operation is synchronous, the client cannot stop an ongoing copy operation or check the status of a copy operation asynchronously.

Example request 1

This example shows a successful copy.

PUT /namespace/ifs/folder1/myfile HTTP/1.1
x-isi-ifs-copy-source: /namespace/ifs/source1/myfile
Host my_cluster:8080
Content-Length: <length>
Date: Thu, 22 Sep 2011 12:00:00 GMT
Authorization: <signature>

Example response 1

HTTP/1.1 200 Ok
Date: Thu, 22 Sep 2011 12:00:00 GMT
Content-Length: <length>
Connection: close
Server: Apache2/2.2.19

Example request 2

This example shows a failed copy, where the file is not overwritten.

PUT /namespace/accesspoint1/directory1/file2_copy HTTP/1.1
Host  10.245.105.110:8080
x-isi-ifs-copy-source: /namespace/accesspoint1/directory1/file2
Date:  Wed, 20 Mar 2013 21:33:55 GMT
Authorization: <signature>

Example response 2

HTTP/1.1 200 OK
Date:  Wed, 20 Mar 2013 21:33:55 GMT
Server:  Apache/2.2.21 (FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8x mod_webkit2/1.0 mod_fastcgi/2.4.6
Allow:  DELETE, GET, HEAD, POST, PUT
x-isi-ifs-spec-version:  1.0
Keep-Alive:  timeout=15, max=500
Connection:  Keep-Alive
Transfer-Encoding:  chunked
Content-Type:  application/json

{
   "copy_errors":[
      {
         "error_src":"target side",
         "message":"target exists(not copied)",
         "source":"/accesspoint1/directory1/file2",
         "target":"/accesspoint1/directory1/file2_copy"
      }
   ],
   "success":false
}

Diesen Inhalt bewerten

Präzise
Nützlich
Leicht verständlich
War dieser Artikel hilfreich?
0/3000 characters
  Bitte geben Sie eine Bewertung ab (1 bis 5 Sterne).
  Bitte geben Sie eine Bewertung ab (1 bis 5 Sterne).
  Bitte geben Sie eine Bewertung ab (1 bis 5 Sterne).
  Bitte geben Sie an, ob der Artikel hilfreich war.
  Die folgenden Sonderzeichen dürfen in Kommentaren nicht verwendet werden: <>()\