# プロジェクトをアーカイブ

正規URL： https://sosoapi.ai/ja/docs/mcp/archive-project

`sosoapi_archive_project`

Scheduled Postsを変更せず、プロジェクトをアーカイブします。投稿を停止するには、該当するScheduled Postを別途キャンセルしてください。ワークスペースのオーナーのみ実行できます。expected_lifecycle_versionとidempotency_keyを指定してください。

## プロファイルと通信方式

プロファイル： full

通信方式： stdio, http

coreまたはfullで表示ツールを選べますが権限は変わりません。ローカルアップロードはstdioのみでHTTPは非対応です。SOSOAPI_OUTPUT_SCHEMAS=1で検出時に出力スキーマを含めます。設定に関係なく構造化結果を返します。

## 権限と副作用

注釈はクライアントがツールを説明するためのものです。各呼び出しでは引き続き認証、ロール、リソースアクセス、機能権限を確認します。

```json
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
```

`/studio-api/projects/archive` — agent:operate; synchronous_http_response

## 入力フィールド

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "expected_lifecycle_version": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 8,
      "maxLength": 160
    }
  },
  "required": [
    "id",
    "expected_lifecycle_version",
    "idempotency_key"
  ],
  "additionalProperties": false
}
```

## 構造化された出力

このスキーマは、成功時のツール結果に含まれるstructuredContentを説明します。MCPレスポンスはcontentも含み、失敗時にisErrorを設定する場合があります。公開では、受理やテキスト応答を確認済みと扱わず、投稿の最終結果を取得してください。権限・再試行ルールはリンク先のAPI操作をご覧ください。

```json
{
  "type": "object",
  "properties": {
    "project": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "workspace_id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "operational_state": {
          "type": "string",
          "enum": [
            "active",
            "archived"
          ]
        },
        "lifecycle_version": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "defaults_version": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "archived_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "archived_by": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "archived_by_api_key_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "version": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "id",
        "workspace_id",
        "name",
        "operational_state",
        "lifecycle_version",
        "defaults_version",
        "archived_at",
        "archived_by",
        "archived_by_api_key_id",
        "created_at",
        "updated_at"
      ],
      "additionalProperties": false
    },
    "receipt_id": {
      "type": "string",
      "format": "uuid"
    },
    "applied": {
      "type": "boolean"
    },
    "deduped": {
      "type": "boolean"
    },
    "held_schedule_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "project",
    "receipt_id",
    "applied",
    "deduped",
    "held_schedule_count"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}
```

## ツール呼び出しの例

スキーマ確認済みの架空値の例です。認可されたID、準備済みメディア、確認済みの公開日時に置き換え、書き込み前に適格性を確認してください。このページはAPIを呼びません。

```json
{
  "name": "sosoapi_archive_project",
  "arguments": {
    "id": "11111111-1111-4111-8111-111111111111",
    "expected_lifecycle_version": 1,
    "idempotency_key": "example-intent-0001"
  }
}
```

structuredContent

```json
{
  "project": {
    "id": "11111111-1111-4111-8111-111111111111",
    "workspace_id": "11111111-1111-4111-8111-111111111111",
    "name": "example",
    "operational_state": "active",
    "lifecycle_version": 1,
    "defaults_version": 1,
    "archived_at": null,
    "archived_by": null,
    "archived_by_api_key_id": null,
    "created_at": "example",
    "updated_at": "example"
  },
  "receipt_id": "11111111-1111-4111-8111-111111111111",
  "applied": false,
  "deduped": false,
  "held_schedule_count": 0
}
```

## 基礎となるAPI操作

- [/studio-api/projects/archive](https://sosoapi.ai/ja/docs/api/studio-api-projects-archive)
