Retrieving user accounts

Retrieve all the accounts the user has created under a particular project.

Procedure

  1. In a REST client platform, add the authentication details of the tenant from where you want to get the details of the user accounts.
    
    //In case of Instance API key 
    Headers:
    {
    "x-instance-api-key": "instance_api_key"
    }
     
    // In case of MCSP or ISV token
    Headers:
    {
    "Authorization": "mcsp_or_isv_token"
    }
    
  2. Make a GET request at the URL of the project.

    URL Syntax: <domain>/apis/v1/rest/projects/:project/accounts

    In this URL request, :project represents the name or the UID of the project from where you want to get the details of the user accounts.

    Method: GET

    If the request is successful, you receive the response code for success.

    output:
    	{
        "output": {
            "configs": {
                "provider_name": [
                    {
                        "activity_id": "<activity_id>",                    
                        "service": "<service>",
                        "provider": "<provider>",
                        "action": "<action>",
                        "version": "<version>",
                        "auth": "<auth_UID>",
                        "type": "<account_type>",
                        "name": "<account_name>",
                        "flow_uid": "<workflow_uid>",
                        "flow_version": <workflow_version>,
                        "uid": "<config_UID>"
                    },
                ]
            }
            "accounts": {
              "connections":{
                "provider_name": [
                    {
                        "icon": "<icon>",
                        "label": "<label>",
                        "title": "<title>",
                        "uid": "<uid>"                    
                    }
                ]
             },         
           "auths":{
                "provider_name": [
                    {
                        "icon": "<icon>",
                        "label": "<label>",
                        "title": "<title>",
                        "uid": "<uid>"                    
                    }
                ]
             }
            }
           }
    	  }
        }
    Note: This function will get all the accounts that are created whether they are used in connectors or not. The config key contains account data used in any action or trigger, and the 'account' key contains all the accounts the user has created in that project till now.