Skip to main content

Replication targets

A replication target is your own storage the workspace's archived data is copied to; list the targets and how their latest copies went.

ReplicationTarget object​

A replication target is storage you own that the workspace's archived data is copied to, for the organizations it covers.

idstring

The target's id.

target_typestring

The kind of storage it is, such as s3, s3_compatible, azure_blob, azure_files, gcs or b2.

namestring

The target's name.

descriptionstring or null

The target's description; null when it has none.

enabledboolean

Whether data is copied to the target.

scopeScope

Which organizations' data is copied to the target, all or selected. A target saved without organizations copies nothing and reads as selected with none.

configmap of string

The target's storage settings by name, such as bucket, s3_region or azure_container. Settings that are not storage settings are left out, and so is an s3_endpoint carrying a user name or a query. Its contents are not part of the API contract and may change.

credential_namesarray of string

The names of the credentials stored on the target, such as s3_secret_access_key, in order. The credentials themselves are never sent.

job_statusReplicationJobStatus or null

How the target's latest run went; null until it has run.

List replication targets​

GET/workspaces/{workspace_id}/replication-targets
Preview

Returns the workspace's replication targets you can see, in id order: where each copies data, its storage settings, which credentials it stores and how its latest run went. Needs archive.config.read: held over every organization, it lists every target; held at some organizations, it lists the targets that name one of them. A target's organizations are cut to those you can see. Credentials are named, never sent.

curl -X GET \  "https://engine.sparklogs.app/app-api/workspaces/5e1f0a00-0000-4000-8000-000000000001/replication-targets" \  -H "Authorization: Bearer $SPARKLOGS_TOKEN"

Access

Works with
Signed-in person, Personal token, OAuth token, Workspace token
Scope
any of admin:readadmin:write
Privilege
archive.config.read

Needs archive.config.read. archive.config.read applies at each organization a grant covers and every organization below it. A caller who reaches no organization gets an empty list.

Behavior

Retry
Safe to send again

Path parameters

workspace_iduuidrequired

The workspace's id.

Query parameters

fieldsarray of string

Comma-separated top-level fields of each object to return instead of the default set.

Sent by default: idtarget_typenamedescriptionenabledscopeconfigcredential_namesjob_status

Response 200

replication_targetsarray of ReplicationTargetrequired

Every one of the replication targets you can see.

messagestringrequired

What the call did, as a short phrase for a person to read. Its wording may change: act on the HTTP status.

Errors

StatusCodeWhenSend again?
400APP_API_ERR_BAD_PARAMETERSA query parameter it does not take, one given twice, or fields naming a field it does not have.No
403APP_API_ERR_NO_PRIVILEGEtoken_scopeno_privilegeYou do not hold archive.config.read. The same refusal comes when the path names a workspace other than the token's own.No

Plus the errors every call can return.