汎用REST参照(標準UI駆動)

オーケストレート済システム用に構成するREST APIの例をいくつか見てみましょう。

アカウントの作成APIリクエスト・レスポンス

Create Account APIを構成するには、次の例を使用します。

アカウントAPI詳細の作成

  • 名前:ユーザーの作成
  • メソッド: POST
  • URL: <target-system>/admin/v1/Users
  • ヘッダー
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. 値<<CREDENTIALS>>は、統合設定で構成されたOCI Vaultまたはユーザー入力資格証明を使用して実行時に解決されます。
  • REST APIのリクエスト本文

    例に示されているschemas属性:

    {
      "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
      "userName": "<EL>attributes.get('name').get(0)</EL>",
      "name": {
        "givenName": "<EL>attributes.get('firstName').get(0)</EL>",
        "familyName": "<EL>attributes.get('lastName').get(0)</EL>"
      },
      "password": "<EL>attributes.get('password').get(0)</EL>",
      "emails": [
        {
          "value": "<EL>attributes.get('email').get(0)</EL>",
          "type": "work",
          "primary": true
        }
      ]
    }
  • 応答
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<JP>$.id</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }
    このAPIは、ターゲット・アカウントを作成し、返された識別子をuid属性にマップします。

グループ検索API

グループ検索アカウントAPI詳細

  • 名前:グループ検索(権限)
  • メソッド: POST
  • URL: <target-system>/admin/v1/Groups/.search
  • ヘッダー
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. 値<<CREDENTIALS>>は、統合設定で構成されたOCI Vaultまたはユーザー入力資格証明を使用して実行時に解決されます。
  • REST APIのリクエスト本文

    例に示すschemas属性を含めます。

    {
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:SearchRequest"
      ],
      "attributes": [
        "displayName",
        "externalId"
      ],
      "sortBy": "displayName",
      "startIndex": "UQ:<EL>currentOffset</EL>",
      "count": "UQ:<EL>limit</EL>"
    }
  • 応答

    JSONエディタを使用して、次のレスポンスを使用します。

    {
      "items": "<JP>$.Resources[*]</JP>",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<JP>$.Resources[<EL>currentIndex</EL>].id</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        },
        {
          "name": "name",
          "value": "<JP>$.Resources[<EL>currentIndex</EL>].displayName</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }

国検索API

  • 名前:国を検索
  • メソッド: GET
  • URL: <target-system>/admin/v1/AllowedValues/countries
  • ヘッダー
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. 値<<CREDENTIALS>>は、統合設定で構成されたOCI Vaultまたはユーザー入力資格証明を使用して実行時に解決されます。
  • 応答

    JSONエディタを使用して、次のレスポンスを使用します。

    {
      "items": "<JP>$.attrValues[*]</JP>",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<JP>$.attrValues[<EL>currentIndex</EL>].value</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        },
        {
          "name": "name",
          "value": "<JP>$.attrValues[<EL>currentIndex</EL>].value</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }

グループ・メンバーシップの追加API

  • 名前:グループ・メンバーシップの追加
  • メソッド: PATCH
  • URL: <target-system>/admin/v1/Groups/<EL>attributes.get('groups').get('uid').get(0)</EL>
  • ヘッダー
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. 値<<CREDENTIALS>>は、統合設定で構成されたOCI Vaultまたはユーザー入力資格証明を使用して実行時に解決されます。
  • リクエスト

    次のリクエストを使用します。

    {
      "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
      ],
      "Operations": [
        {
          "op": "add",
          "path": "members",
          "value": [
            {
              "value": "<EL>attributes.get('uid').get(0)</EL>",
              "type": "User"
            }
          ]
        }
      ]
    }
  • 応答
    JSONエディタを使用して、次のレスポンスを使用します。
    Name: uid
    Value: <EL>attributes.get('uid').get(0)</EL>
    または、JSONエディタを使用します。
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<EL>attributes.get('uid').get(0)</EL>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }

アカウントAPIの削除

  • 名前:アカウントの削除API
  • メソッド: DELETE
  • URL: <target-system>/admin/v1/Users/<EL>attributes.get('uid').get(0)</EL>
  • ヘッダー
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. 値<<CREDENTIALS>>は、統合設定で構成されたOCI Vaultまたはユーザー入力資格証明を使用して実行時に解決されます。
  • パラメータ: forceDelete: true
  • 応答

    次のレスポンスを使用します。

    Name: uid
    Value: <EL>attributes.get('uid').get(0)</EL>
    または、JSONエディタを使用します。
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<EL>attributes.get('uid').get(0)</EL>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }