openapi: 3.2.0 info: title: Sakura Internet Commonserviceitem API contact: url: https://help.sakura.ad.jp/contact/ version: '1.0' description: 'Operations tagged Commonserviceitem across 4 of this provider''s published API definitions: eventbus-api.yaml, simplemq-sacloud-api.yaml, sakura-internet-eventbus-openapi.yml, sakura-internet-simplemq-sacloud-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1 description: さくらのクラウドAPIエンドポイント security: - ApiKeyAuth: [] tags: - name: Commonserviceitem paths: /commonserviceitem: get: summary: 実行設定・スケジュール・トリガーの一覧取得 operationId: listCommonServiceItems description: 'Provider.Classでeventbusschedule、eventbustriggerまたはeventbusprocessconfigurationを指定してフィルタ可能。 クエリパラメータに下記のようにフィルタを設定することでスケジュール、トリガーまたは実行設定のリソースのみを取得できます `/commonserviceitem?{"Filter":{"Provider.Class":"eventbusschedule"}}` `/commonserviceitem?{"Filter":{"Provider.Class":"eventbustrigger"}}` `/commonserviceitem?{"Filter":{"Provider.Class":"eventbusprocessconfiguration"}}`' responses: '200': description: 成功 content: application/json: schema: type: object required: - CommonServiceItems properties: From: type: integer Count: type: integer Total: type: integer CommonServiceItems: type: array items: $ref: '#/components/schemas/CommonServiceItem' is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 400 Bad Request error_code: bad_request error_msg: 不適切な要求です。パラメータの指定誤り、入力規則違反です。入力内容をご確認ください。 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 401 Unauthorized error_code: unauthorized error_msg: error-unauthorized '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Commonserviceitem post: summary: 実行設定・スケジュール・トリガーの作成 operationId: createCommonServiceItem requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateCommonServiceItemRequest' responses: '201': description: 成功 content: application/json: schema: type: object required: - CommonServiceItem properties: CommonServiceItem: $ref: '#/components/schemas/CommonServiceItem' Success: type: boolean is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 400 Bad Request error_code: bad_request error_msg: 不適切な要求です。パラメータの指定誤り、入力規則違反です。入力内容をご確認ください。 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 401 Unauthorized error_code: unauthorized error_msg: error-unauthorized '409': description: リソース名の重複、及びリソース作成数上限の超過 content: application/json: schema: $ref: '#/components/schemas/Error' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 409 Conflict error_code: limit_count_in_account error_msg: 要求を受け付けできません。プロジェクトあたりのリソース数上限により、リソースの割り当てに失敗しました。 '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Commonserviceitem servers: - url: https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1 description: さくらのクラウドAPIエンドポイント /commonserviceitem/{id}: get: summary: 実行設定・スケジュール・トリガーの取得 operationId: readCommonServiceItem parameters: - $ref: '#/components/parameters/resourceIdPathParam' responses: '200': description: 成功 content: application/json: schema: type: object required: - CommonServiceItem properties: CommonServiceItem: $ref: '#/components/schemas/CommonServiceItem' is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: リソースが存在しない content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Commonserviceitem put: summary: 実行設定・スケジュール・トリガーの更新 operationId: updateCommonServiceItem parameters: - $ref: '#/components/parameters/resourceIdPathParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateCommonServiceItemRequest' responses: '200': description: 成功 content: application/json: schema: type: object required: - CommonServiceItem properties: CommonServiceItem: $ref: '#/components/schemas/CommonServiceItem' Success: type: boolean is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: リソースが存在しない content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Commonserviceitem delete: summary: 実行設定・スケジュール・トリガーの削除 operationId: deleteCommonServiceItem parameters: - $ref: '#/components/parameters/resourceIdPathParam' responses: '200': description: 成功 content: application/json: schema: type: object required: - CommonServiceItem properties: CommonServiceItem: $ref: '#/components/schemas/CommonServiceItem' Success: type: boolean is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: リソースが存在しない content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Commonserviceitem servers: - url: https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1 description: さくらのクラウドAPIエンドポイント /commonserviceitem/{id}/eventbus/processconfiguration/set-secret: put: summary: 実行設定のSecret設定 operationId: setProcessConfigurationSecret parameters: - $ref: '#/components/parameters/resourceIdPathParam' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SetSecretRequest' responses: '200': description: 成功 content: application/json: schema: type: object properties: process: type: object properties: result: type: string is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: リソースが存在しない content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Commonserviceitem servers: - url: https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1 description: さくらのクラウドAPIエンドポイント /commonserviceitem/{id}/simplemq/message-count: get: summary: メッセージ数の取得 operationId: readMessageCount parameters: - $ref: '#/components/parameters/resourceIdPathParam_2' responses: '200': description: 成功 content: application/json: schema: type: object required: - SimpleMQ properties: SimpleMQ: type: object required: - count properties: result: type: string default: success count: type: integer is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 400 Bad Request error_code: bad_request error_msg: 不適切な要求です。パラメータの指定誤り、入力規則違反です。入力内容をご確認ください。 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 401 Unauthorized error_code: unauthorized error_msg: error-unauthorized '404': description: キューが存在しない content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 404 Not Found error_code: not_found error_msg: 対象が見つかりません。対象は利用できない状態か、IDまたはパスに誤りがあります。 '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error_2' tags: - Commonserviceitem servers: - url: https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1 description: さくらのクラウドAPIエンドポイント /commonserviceitem/{id}/simplemq/rotate-apikey: put: summary: APIキーの再発行 description: 発行済みのAPIキーを無効化し、新たにAPIキーを発行します。 operationId: rotateAPIKey parameters: - $ref: '#/components/parameters/resourceIdPathParam_2' responses: '200': description: 成功 content: application/json: schema: type: object required: - SimpleMQ properties: SimpleMQ: type: object required: - apikey properties: result: type: string default: success apikey: type: string is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 400 Bad Request error_code: bad_request error_msg: 不適切な要求です。パラメータの指定誤り、入力規則違反です。入力内容をご確認ください。 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 401 Unauthorized error_code: unauthorized error_msg: error-unauthorized '404': description: キューが存在しない content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 404 Not Found error_code: not_found error_msg: 対象が見つかりません。対象は利用できない状態か、IDまたはパスに誤りがあります。 '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error_2' tags: - Commonserviceitem servers: - url: https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1 description: さくらのクラウドAPIエンドポイント /commonserviceitem/{id}/simplemq/messages: delete: summary: キュー内メッセージの全件削除 operationId: clearQueue parameters: - $ref: '#/components/parameters/resourceIdPathParam_2' responses: '200': description: 成功 content: application/json: schema: type: object properties: SimpleMQ: type: object properties: result: type: string default: success is_ok: type: boolean '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 400 Bad Request error_code: bad_request error_msg: 不適切な要求です。パラメータの指定誤り、入力規則違反です。入力内容をご確認ください。 '401': description: 認証エラー content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 401 Unauthorized error_code: unauthorized error_msg: error-unauthorized '404': description: キューが存在しない content: application/json: schema: $ref: '#/components/schemas/Error_2' example: is_fatal: true serial: 749ad39e1eea340c4d75bf5a4dd4bd11 status: 404 Not Found error_code: not_found error_msg: 対象が見つかりません。対象は利用できない状態か、IDまたはパスに誤りがあります。 '500': description: サーバーエラー content: application/json: schema: $ref: '#/components/schemas/Error_2' tags: - Commonserviceitem servers: - url: https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1 description: さくらのクラウドAPIエンドポイント components: schemas: ScheduleSettings: type: object required: - ProcessConfigurationID - StartsAt properties: ProcessConfigurationID: type: string description: 実行設定ID RecurringStep: type: integer description: 実行間隔 RecurringUnit: type: string enum: - min - hour - day description: 実行間隔単位 Crontab: type: string description: crontab形式 StartsAt: oneOf: - type: integer format: int64 - type: string description: 'スケジュール開始時刻(エポックミリ秒) リクエスト時はintegerで指定する必要があります。 レスポンスはstringで返却されます。' Error: type: object properties: is_fatal: type: boolean serial: type: string status: type: string error_code: type: string error_msg: type: string Provider: type: object required: - Class properties: ID: type: integer Class: type: string enum: - eventbusprocessconfiguration - eventbusschedule - eventbustrigger Name: type: string ServiceClass: type: string ProcessConfigurationSettings: type: object required: - Destination - Parameters properties: Destination: type: string enum: - simplenotification - simplemq - autoscale description: ジョブの宛先(simplenotification/simplemq/autoscale) Parameters: type: string description: Destinationごとのパラメータ(group_id, message, queue_name, content等) CreateCommonServiceItemRequest: type: object required: - CommonServiceItem properties: CommonServiceItem: type: object required: - Name - Settings - Provider properties: Name: type: string description: リソース名 Description: type: string nullable: true Settings: $ref: '#/components/schemas/Settings' Provider: $ref: '#/components/schemas/Provider' Icon: $ref: '#/components/schemas/Icon' Tags: type: array items: type: string CommonServiceItem: type: object required: - ID - Name - Settings - SettingsHash - Availability - CreatedAt - ModifiedAt - Provider - Tags properties: ID: type: string description: リソースID Name: type: string description: リソース名 Description: type: string nullable: true Settings: $ref: '#/components/schemas/Settings' SettingsHash: type: string Status: $ref: '#/components/schemas/Status' ServiceClass: type: string nullable: true Availability: type: string CreatedAt: type: string format: date-time ModifiedAt: type: string format: date-time Provider: $ref: '#/components/schemas/Provider' Icon: $ref: '#/components/schemas/Icon' Tags: type: array items: type: string TriggerConditionEq: type: object required: - Key - Op - Values properties: Key: type: string pattern: ^(?!data$)[a-z0-9]{1,20}$ Op: type: string enum: - eq Values: type: array minItems: 1 maxItems: 1 items: type: string TriggerConditionIn: type: object required: - Key - Op - Values properties: Key: type: string pattern: ^(?!data$)[a-z0-9]{1,20}$ Op: type: string enum: - in Values: type: array minItems: 1 items: type: string SimpleMQSecret: type: object required: - APIKey properties: APIKey: type: string description: SimpleMQのキューのAPIキー Settings: oneOf: - $ref: '#/components/schemas/ProcessConfigurationSettings' - $ref: '#/components/schemas/ScheduleSettings' - $ref: '#/components/schemas/TriggerSettings' description: 実行設定(ProcessConfiguration)、トリガー(Trigger)またはスケジュール(Schedule)用設定 SetSecretRequest: type: object required: - Secret properties: Secret: oneOf: - $ref: '#/components/schemas/SacloudAPISecret' - $ref: '#/components/schemas/SimpleMQSecret' description: 設定するシークレット値 Status: type: object nullable: true properties: Success: type: boolean Message: type: string UpdatedAt: type: string SacloudAPISecret: type: object required: - AccessToken - AccessTokenSecret properties: AccessToken: type: string description: さくらのクラウドのアクセストークン AccessTokenSecret: type: string description: さくらのクラウドのアクセストークンシークレット example: AccessToken: アクセストークン AccessTokenSecret: アクセストークンシークレット TriggerSettings: type: object properties: Source: type: string Types: type: array nullable: true items: type: string Conditions: type: array nullable: true items: discriminator: propertyName: Op mapping: eq: '#/components/schemas/TriggerConditionEq' in: '#/components/schemas/TriggerConditionIn' oneOf: - $ref: '#/components/schemas/TriggerConditionEq' - $ref: '#/components/schemas/TriggerConditionIn' ProcessConfigurationID: type: string required: - Source - ProcessConfigurationID UpdateCommonServiceItemRequest: type: object required: - CommonServiceItem properties: CommonServiceItem: type: object properties: Name: type: string description: リソース名 Description: type: string nullable: true Settings: $ref: '#/components/schemas/Settings' Provider: $ref: '#/components/schemas/Provider' Icon: $ref: '#/components/schemas/Icon' Tags: type: array items: type: string Icon: type: object nullable: true properties: ID: type: string URL: type: string Name: type: string Scope: type: string Tags: type: array items: type: string Error_2: type: object properties: is_fatal: type: boolean serial: type: string example: 749ad39e1eea340c4d75bf5a4dd4bd11 status: type: string error_code: type: string error_msg: type: string QueueName: description: キュー名 (アカウント内で一意の値) type: string minLength: 5 maxLength: 64 pattern: ^[0-9a-zA-Z]+(-[0-9a-zA-Z]+)*$ example: my-own-queue-00 ConfigQueueRequest: type: object required: - CommonServiceItem properties: CommonServiceItem: type: object required: - Settings properties: Description: type: string Settings: $ref: '#/components/schemas/Settings_2' Tags: type: array items: type: string Icon: $ref: '#/components/schemas/Icon_2' CommonServiceItem_2: type: object required: - ID - Name - Settings - SettingsHash - Status - ServiceClass - Availability - CreatedAt - ModifiedAt - Provider - Tags properties: ID: oneOf: - type: string example: '113700153028' - type: integer example: 113700153028 Name: type: string example: sample-queue-1 description: リソース名 Description: oneOf: - type: string - type: 'null' Settings: $ref: '#/components/schemas/Settings_2' SettingsHash: type: string Status: $ref: '#/components/schemas/Status_2' ServiceClass: type: string example: cloud/simplemq/1 Availability: type: string example: available CreatedAt: type: string format: date-time ModifiedAt: type: string format: date-time Provider: $ref: '#/components/schemas/Provider_2' Icon: $ref: '#/components/schemas/Icon_2' Tags: type: array items: type: string CreateQueueRequest: type: object required: - CommonServiceItem properties: CommonServiceItem: type: object required: - Name - Provider properties: Name: $ref: '#/components/schemas/QueueName' Description: type: string Provider: type: object required: - Class properties: Class: type: string enum: - simplemq Tags: type: array items: type: string Icon: $ref: '#/components/schemas/Icon_2' Settings_2: type: object required: - VisibilityTimeoutSeconds - ExpireSeconds properties: VisibilityTimeoutSeconds: $ref: '#/components/schemas/VisibilityTimeoutSeconds' ExpireSeconds: $ref: '#/components/schemas/ExpireSeconds' ExpireSeconds: description: 未処理メッセージ保存期間 (秒) type: integer minimum: 60 maximum: 1209600 example: 345600 Status_2: type: object required: - QueueName properties: QueueName: type: string example: sample-queue-1 description: キュー名 Provider_2: type: object required: - ID - Class - Name - ServiceClass properties: ID: type: integer example: 5200001 Class: type: string enum: - simplemq Name: type: string example: SimpleMQ ServiceClass: type: string example: cloud/simplemq VisibilityTimeoutSeconds: description: 可視性タイムアウト (秒) type: integer minimum: 5 maximum: 900 example: 30 Icon_2: oneOf: - type: 'null' - type: object properties: ID: oneOf: - type: string example: '113700153028' - type: integer example: 113700153028 description: 0を指定することでIconなしに設定することが出来ます URL: type: string example: https://secure.sakura.ad.jp/cloud/zone/is1b/api/cloud/1.1/icon/112901627751.png Name: type: string example: Ubuntu Scope: type: string example: shared Tags: type: array items: type: string Error_3: type: object properties: is_fatal: type: boolean serial: type: string example: 749ad39e1eea340c4d75bf5a4dd4bd11 status: type: string error_code: type: string error_msg: type: string ConfigQueueRequest_2: type: object required: - CommonServiceItem properties: CommonServiceItem: type: object required: - Settings properties: Description: type: string Settings: $ref: '#/components/schemas/Settings_3' Tags: type: array items: type: string Icon: $ref: '#/components/schemas/Icon_3' CommonServiceItem_3: type: object required: - ID - Name - Settings - SettingsHash - Status - ServiceClass - Availability - CreatedAt - ModifiedAt - Provider - Tags properties: ID: oneOf: - type: string example: '113700153028' - type: integer example: 113700153028 Name: type: string example: sample-queue-1 description: リソース名 Description: oneOf: - type: string - type: 'null' Settings: $ref: '#/components/schemas/Settings_3' SettingsHash: type: string Status: $ref: '#/components/schemas/Status_3' ServiceClass: type: string example: cloud/simplemq/1 Availability: type: string example: available CreatedAt: type: string format: date-time ModifiedAt: type: string format: date-time Provider: $ref: '#/components/schemas/Provider_3' Icon: $ref: '#/components/schemas/Icon_3' Tags: type: array items: type: string CreateQueueRequest_2: type: object required: - CommonServiceItem properties: CommonServiceItem: type: object required: - Name - Provider properties: Name: $ref: '#/components/schemas/QueueName' Description: type: string Provider: type: object required: - Class properties: Class: type: string enum: - simplemq Tags: type: array items: type: string Icon: $ref: '#/components/schemas/Icon_3' Settings_3: type: object required: - VisibilityTimeoutSeconds - ExpireSeconds properties: VisibilityTimeoutSeconds: $ref: '#/components/schemas/VisibilityTimeoutSeconds' ExpireSeconds: $ref: '#/components/schemas/ExpireSeconds' Status_3: type: object required: - QueueName properties: QueueName: type: string example: sample-queue-1 description: キュー名 Provider_3: type: object required: - ID - Class - Name - ServiceClass properties: ID: type: integer example: 5200001 Class: type: string enum: - simplemq Name: type: string example: SimpleMQ ServiceClass: type: string example: cloud/simplemq Icon_3: oneOf: - type: 'null' - type: object properties: ID: oneOf: - type: string example: '113700153028' - type: integer example: 113700153028 description: 0を指定することでIconなしに設定することが出来ます URL: type: string example: https://secure.sakura.ad.jp/cloud/zone/is1b/api/cloud/1.1/icon/112901627751.png Name: type: string example: Ubuntu Scope: type: string example: shared Tags: type: array items: type: string parameters: resourceIdPathParam: in: path name: id description: リソースID schema: type: string required: true resourceIdPathParam_2: in: path name: id description: キューのリソースID schema: type: string required: true resourceIdPathParam_3: in: path name: id description: キューのリソースID schema: type: string required: true securitySchemes: ApiKeyAuth: type: http scheme: basic description: APIキーを利用したBasic認証 x-refined-from: - eventbus-api.yaml - simplemq-sacloud-api.yaml - sakura-internet-eventbus-openapi.yml - sakura-internet-simplemq-sacloud-openapi.yml