Riferimento REST generico (basato sull'interfaccia utente standard)

Di seguito sono riportati alcuni esempi di API REST da configurare per il sistema orchestrato.

Crea risposta richiesta API account

Per configurare l'API Crea account, utilizzare l'esempio riportato di seguito.

Crea dettagli API account

  • Nome: Crea utente
  • Metodo: POST
  • URL: <target-system>/admin/v1/Users
  • Intestazioni
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. Il valore <<CREDENTIALS>> viene risolto in runtime utilizzando OCI Vault o le credenziali immesse dall'utente configurate in Impostazioni di integrazione.
  • Corpo richiesta per API REST

    L'attributo schemas visualizzato nell'esempio:

    {
      "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
        }
      ]
    }
  • Risposta
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<JP>$.id</JP>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }
    Questa API crea un account di destinazione e mappa l'identificativo restituito all'attributo uid.

API ricerca gruppo

Dettagli API conto ricerca gruppo

  • Nome: ricerca gruppo (autorizzazione)
  • Metodo: POST
  • URL: <target-system>/admin/v1/Groups/.search
  • Intestazioni
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. Il valore <<CREDENTIALS>> viene risolto in runtime utilizzando OCI Vault o le credenziali immesse dall'utente configurate in Impostazioni di integrazione.
  • Corpo richiesta per API REST

    Includere l'attributo schemas mostrato nell'esempio:

    {
      "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>"
    }
  • Risposta

    Utilizzando l'editor JSON, utilizzare la risposta seguente:

    {
      "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 ricerca paese

  • Nome: Cerca paesi
  • Metodo: GET
  • URL: <target-system>/admin/v1/AllowedValues/countries
  • Intestazioni
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. Il valore <<CREDENTIALS>> viene risolto in runtime utilizzando OCI Vault o le credenziali immesse dall'utente configurate in Impostazioni di integrazione.
  • Risposta

    Utilizzando l'editor JSON, utilizzare la risposta seguente:

    {
      "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": []
        }
      ]
    }

Aggiungi API appartenenza gruppo

  • Nome: Aggiungi appartenenza al gruppo
  • Metodo: PATCH
  • URL: <target-system>/admin/v1/Groups/<EL>attributes.get('groups').get('uid').get(0)</EL>
  • Intestazioni
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. Il valore <<CREDENTIALS>> viene risolto in runtime utilizzando OCI Vault o le credenziali immesse dall'utente configurate in Impostazioni di integrazione.
  • Richiesta

    Utilizzare la seguente richiesta:

    {
      "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"
            }
          ]
        }
      ]
    }
  • Risposta
    Utilizzando l'editor JSON, utilizzare la risposta seguente:
    Name: uid
    Value: <EL>attributes.get('uid').get(0)</EL>
    In alternativa, utilizzare JSON Editor
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<EL>attributes.get('uid').get(0)</EL>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }

Elimina API account

  • Nome: elimina API account
  • Metodo: DELETE
  • URL: <target-system>/admin/v1/Users/<EL>attributes.get('uid').get(0)</EL>
  • Intestazioni
    • Content-Type: application/json
    • Authorization: <<CREDENTIALS>>. Il valore <<CREDENTIALS>> viene risolto in runtime utilizzando OCI Vault o le credenziali immesse dall'utente configurate in Impostazioni di integrazione.
  • Parametro: forceDelete: true
  • Risposta

    Utilizzare la seguente risposta:

    Name: uid
    Value: <EL>attributes.get('uid').get(0)</EL>
    In alternativa, utilizzare JSON Editor
    {
      "items": "",
      "responseValues": [],
      "attributes": [
        {
          "name": "uid",
          "value": "<EL>attributes.get('uid').get(0)</EL>",
          "responseOfSubRequestId": null,
          "items": null,
          "subAttributes": []
        }
      ]
    }