Harthelm Docs
REST APIMembers

Decline a workspace's ownership

Only the user the transfer offers the ownership to (404 for everyone else); the owner stays. 409 `owner-transfer-closed` when it was accepted, declined or cancelled.

Generated from openapi/harthelm.yaml at v1.5.0
POST
/owner-transfers/{transfer}/decline

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

transfer*string

An ownership transfer's id.

Formatuuid

Response Body

The declined transfer.

application/json
  1. response

A workspace's ownership offered to a user: pending until that user accepts or declines it, or a workspace admin cancels it. While it is pending the old owner stays the owner.

id*string
Formatuuid
workspace_id*ID

Numeric resource id.

Formatint64
Range1 <= value
workspace_name*string
team_id*ID

Numeric resource id.

Formatint64
Range1 <= value
team_name*string
from?

The owner when the transfer was offered; absent when the workspace had none.

to*

The owner when the transfer was offered; absent when the workspace had none.

offered_by?

The owner when the transfer was offered; absent when the workspace had none.

state*OwnerTransferState
Value in"pending""accepted""declined""cancelled"
provider?string

The Git provider of the workspace's origin repository; accepting needs a connection to it (Settings, Git connections). Absent for a workspace without a provider origin.

provider_name?string
reason?string

Why a cancelled transfer ended: cancelled by a workspace admin, replaced by an offer to someone else, owner_changed because an admin took the ownership, departed because the old or the new owner left the team.

Value in"cancelled""replaced""owner_changed""departed"
created_at*string
Formatdate-time
closed_at?string

When it was accepted, declined or cancelled.

Formatdate-time
closed_by?

The owner when the transfer was offered; absent when the workspace had none.

curl -X POST 'https://console.example.com/api/v1/owner-transfers/497f6eca-6276-4993-bfeb-53cbbbba6f08/decline'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "workspace_id": 1,  "workspace_name": "string",  "team_id": 1,  "team_name": "string",  "from": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "to": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "offered_by": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  },  "state": "pending",  "provider": "string",  "provider_name": "string",  "reason": "cancelled",  "created_at": "2019-08-24T14:15:22Z",  "closed_at": "2019-08-24T14:15:22Z",  "closed_by": {    "id": 1,    "name": "string",    "email": "string",    "picture_url": "string"  }}