Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Retry a data copy

Goes on with a failed copy of data into an environment, from where it stopped. It also needs data:read on the environment the data comes from.

POST/_luna/orgs/{org}/projects/{project}/environments/{env}/copy
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:environments:write
Path parameters
orgstringrequired

The organisation, by its slug.

projectstringrequired

The project, by its slug.

envstringrequired

The environment, by its name or its id.

Responses
200

The environment with the copy under way again.

idstringrequired
namestringrequired
tenantstringrequired

The environment's default tenant. Deploys, secrets, keys and telemetry name it.

createdMsinteger<int64>required
min 0
createdBystringrequired

Who made it: an email address or a key's label.

expiresMsinteger<int64> | null

When it is deleted, in milliseconds since the Unix epoch. Null when it stays.

min 0
fromstring | null

The environment it was copied from.

copyCopyProgress | null
Show properties
One of:
CopyProgress
fromstringrequired

The environment the data comes from.

statestringrequired

counting, copying, done or failed.

atMsinteger<int64>required

The moment of the source the copy is of, in milliseconds since the Unix epoch.

min 0
totalinteger<int64> | null

How many lunas there are to copy. Null until they have been counted.

min 0
doneinteger<int64>required

How many lunas are dealt with: copied or skipped.

min 0
copiedinteger<int64>required
min 0
skippedinteger<int64>required

Lunas passed over because they were made after atMs or copied by an earlier try.

min 0
errorstring | null

Why a failed copy stopped.

startedMsinteger<int64>required
min 0
finishedMsinteger<int64> | null
min 0
null
null
versioninteger<int64> | null

The version of the code copied into it, when it was made from another environment.

min 0
default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Request
curl -X POST 'https://luna.example.com/_luna/orgs/string/projects/string/environments/string/copy' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "id": "string",
  "name": "string",
  "tenant": "string",
  "createdMs": 0,
  "createdBy": "string",
  "expiresMs": 0,
  "from": "string",
  "copy": {
    "from": "string",
    "state": "string",
    "atMs": 0,
    "total": 0,
    "done": 0,
    "copied": 0,
    "skipped": 0,
    "error": "string",
    "startedMs": 0,
    "finishedMs": 0
  },
  "version": 0
}

Was this page helpful?