Get the Available Environments for Task Execution

API URL

/getEnvironmentsForTaskAttr

HTTP Method

GET

API Category

TDM_Tasks

API Description

Get the list of TDM environments that are available for the user based on the following input filtering parameters:

  • If the task type is Extract , then validate and return the list of available source environments.
  • If the task type is Load, then validate and return both - source and target - available environments.
  • If the task type is Reserve (reserve only task), then validate and return the list of available target environments.
  • If the task is a delete only task, then validate and return the list of available target environments.

API Input

Param Name

Type

Mandatory

Default Value

Description

be

String

Yes

N/A

Populated by the task's be_id (Business Entity ID). For example: 1.

lus

String

Yes

N/A

Populated by the task's Logical Units (LU IDs), separated by a comma. For example: 1, 2, 3. The task's LUs are returned by /task/{taskId}/logicalunits API.

refcount

Integer

No

0

Populated by the number of reference tables included in the TDM task. The refcount parameter is returned by /tasks API

selection_method

String

No

L

Can be populated by the following values: "L" (entity list), "R" (random selection), "S" (entity cloning), "C" (custom logic), "PR" (parameters with a random selection), "P" (parameters), "ALL" (all entities), or "REF" (reference only task).

sync_mode

String

No

Empty

Can be populated by “OFF”, “FORCE”, or can be empty

version_ind

Boolean

No

False

True/False

replace_sequences

Boolean

No

False

True/False

delete_before_load

Boolean

No

False

True/False

task_type

String

Yes

N/A

Populated by "extract", "load", or "reserve".

API Input Examples

http://localhost:3213/api/getEnvironmentsForTaskAttr?be=1&lus=1,2,3&refcount=1&selection_method=L&sync_mode=FORCE&version_ind=false&replace_sequences=true&delete_before_load=true&task_type=load
http://localhost:3213/api/getEnvironmentsForTaskAttr?be=1&lus=1,2,3&refcount=1&delete_before_load=true&task_type=load

API Output Example

Get the Environments for an Admin User

{
  "result": [
    {
      "source environments": [
        {
          "environment_id": "4",
          "role_id": "admin",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "1",
          "role_id": "admin",
          "environment_name": "ENV1"
        },
        {
          "environment_id": "6",
          "role_id": "admin",
          "environment_name": "ENV3"
        },
        {
          "environment_id": "3",
          "role_id": "admin",
          "environment_name": "ENV4"
        },
        {
          "environment_id": "9",
          "role_id": "admin",
          "environment_name": "Env9"
        }
      ]
    },
    {
      "target environments": [
        {
          "environment_id": "2",
          "role_id": "admin",
          "environment_name": "ENV2"
        },
        {
          "environment_id": "5",
          "role_id": "admin",
          "environment_name": "ENV5"
        },
        {
          "environment_id": "6",
          "role_id": "admin",
          "environment_name": "ENV3"
        },
        {
          "environment_id": "9",
          "role_id": "admin",
          "environment_name": "Env9"
        }
      ]
    }
  ],
  "errorCode": "SUCCESS",
  "message": null
}

Get the Environments for an Owner User

Note: an owner user can be the owner of some TDM environments and can still be attached as a tester to other TDM environments. If the user is the owner of the TDM environment, the role_id is populated by owner. If the user is attached as a tester to the TDM environment, the role_id is populated by the ID of the TDM permission set.

{
  "result": [
    {
      "source environments": [
        {
          "environment_id": "4",
          "role_id": "owner",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "1",
          "role_id": "2",
          "environment_name": "ENV1"
        }
      ]
    },
    {
      "target environments": [
        {
          "environment_id": "4",
          "role_id": "owner",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "5",
          "role_id": "3",
          "environment_name": "ENV5"
        }
      ]
    }
  ],
  "errorCode": "SUCCESS",
  "message": null
}

Get the Environments for a Tester User

{
  "result": [
    {
      "source environments": [
        {
          "environment_id": "4",
          "role_id": "1",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "1",
          "role_id": "2",
          "environment_name": "ENV1"
        }
      ]
    },
    {
      "target environments": [
        {
          "environment_id": "4",
          "role_id": "1",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "5",
          "role_id": "3",
          "environment_name": "ENV5"
        }
      ]
    }
  ],
  "errorCode": "SUCCESS",
  "message": null
}

Previous

Get the Available Environments for Task Execution

API URL

/getEnvironmentsForTaskAttr

HTTP Method

GET

API Category

TDM_Tasks

API Description

Get the list of TDM environments that are available for the user based on the following input filtering parameters:

  • If the task type is Extract , then validate and return the list of available source environments.
  • If the task type is Load, then validate and return both - source and target - available environments.
  • If the task type is Reserve (reserve only task), then validate and return the list of available target environments.
  • If the task is a delete only task, then validate and return the list of available target environments.

API Input

Param Name

Type

Mandatory

Default Value

Description

be

String

Yes

N/A

Populated by the task's be_id (Business Entity ID). For example: 1.

lus

String

Yes

N/A

Populated by the task's Logical Units (LU IDs), separated by a comma. For example: 1, 2, 3. The task's LUs are returned by /task/{taskId}/logicalunits API.

refcount

Integer

No

0

Populated by the number of reference tables included in the TDM task. The refcount parameter is returned by /tasks API

selection_method

String

No

L

Can be populated by the following values: "L" (entity list), "R" (random selection), "S" (entity cloning), "C" (custom logic), "PR" (parameters with a random selection), "P" (parameters), "ALL" (all entities), or "REF" (reference only task).

sync_mode

String

No

Empty

Can be populated by “OFF”, “FORCE”, or can be empty

version_ind

Boolean

No

False

True/False

replace_sequences

Boolean

No

False

True/False

delete_before_load

Boolean

No

False

True/False

task_type

String

Yes

N/A

Populated by "extract", "load", or "reserve".

API Input Examples

http://localhost:3213/api/getEnvironmentsForTaskAttr?be=1&lus=1,2,3&refcount=1&selection_method=L&sync_mode=FORCE&version_ind=false&replace_sequences=true&delete_before_load=true&task_type=load
http://localhost:3213/api/getEnvironmentsForTaskAttr?be=1&lus=1,2,3&refcount=1&delete_before_load=true&task_type=load

API Output Example

Get the Environments for an Admin User

{
  "result": [
    {
      "source environments": [
        {
          "environment_id": "4",
          "role_id": "admin",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "1",
          "role_id": "admin",
          "environment_name": "ENV1"
        },
        {
          "environment_id": "6",
          "role_id": "admin",
          "environment_name": "ENV3"
        },
        {
          "environment_id": "3",
          "role_id": "admin",
          "environment_name": "ENV4"
        },
        {
          "environment_id": "9",
          "role_id": "admin",
          "environment_name": "Env9"
        }
      ]
    },
    {
      "target environments": [
        {
          "environment_id": "2",
          "role_id": "admin",
          "environment_name": "ENV2"
        },
        {
          "environment_id": "5",
          "role_id": "admin",
          "environment_name": "ENV5"
        },
        {
          "environment_id": "6",
          "role_id": "admin",
          "environment_name": "ENV3"
        },
        {
          "environment_id": "9",
          "role_id": "admin",
          "environment_name": "Env9"
        }
      ]
    }
  ],
  "errorCode": "SUCCESS",
  "message": null
}

Get the Environments for an Owner User

Note: an owner user can be the owner of some TDM environments and can still be attached as a tester to other TDM environments. If the user is the owner of the TDM environment, the role_id is populated by owner. If the user is attached as a tester to the TDM environment, the role_id is populated by the ID of the TDM permission set.

{
  "result": [
    {
      "source environments": [
        {
          "environment_id": "4",
          "role_id": "owner",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "1",
          "role_id": "2",
          "environment_name": "ENV1"
        }
      ]
    },
    {
      "target environments": [
        {
          "environment_id": "4",
          "role_id": "owner",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "5",
          "role_id": "3",
          "environment_name": "ENV5"
        }
      ]
    }
  ],
  "errorCode": "SUCCESS",
  "message": null
}

Get the Environments for a Tester User

{
  "result": [
    {
      "source environments": [
        {
          "environment_id": "4",
          "role_id": "1",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "1",
          "role_id": "2",
          "environment_name": "ENV1"
        }
      ]
    },
    {
      "target environments": [
        {
          "environment_id": "4",
          "role_id": "1",
          "environment_name": "ENV6"
        },
        {
          "environment_id": "5",
          "role_id": "3",
          "environment_name": "ENV5"
        }
      ]
    }
  ],
  "errorCode": "SUCCESS",
  "message": null
}

Previous