Jobs
Get All Jobs (ALM + Verification + LDAP) for All Projects
Returns a list of all ALM, Verification, and LDAP jobs associated with all projects. Note that the parameters and jobs are only shown if you have the correct permissions.
GET /api/v2/jobs/
Query Parameters
The following parameters may be used to filter the connections resources in the response.
| Parameter | Description | 
|---|---|
| automatic | Returns all jobs that were created automatically. | 
| connection | Returns all jobs that correspond to a specific connection. | 
| ready | Returns all jobs that have finished running, successfully, or otherwise. | 
| succeeded | Returns all jobs that completed successfully. | 
| user | Returns all jobs run by the specified user. | 
GET /api/v2/jobs/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "id": 12,
        "user": "no-reply+example@localhost",
        "triggered_by": "admin@example.com",
        "succeeded": true,
        "automatic": true,
        "ready": true,
        "result_message": "",
        "last_run": "2015-04-15T20:27:24.396442Z",
        "connection": {
            "alias": "My Connection",
            "command": "run_my_connection",
            "frequency": "daily",
            "id": 23,
            "params": {
                "asset_name": "WebGoat Java",
                "sde_project": "WhiteHat",
                "sde_businessunit": "General",
                "sde_application": "Demo Application",
                "import_behaviour": "replace-scanner",
                "analysis_server": "server.whitehatsec.com",
                "task_status_mapping": "{}"
            },
            "project": 7,
            "system": "Whitehat"
        }
    }]
}
Expand Parameters
See the Expand Parameters section for more details.
| Parameter | Description | 
|---|---|
| user | User field is expanded. | 
| triggered_by | triggered_by field is expanded. | 
GET /api/v2/jobs/?expand=user,triggered_by
Accept: application/json
Authorization: Token: "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "id": 12,
        "succeeded": true,
        "user": {
            "id": 3,
            "email": "no-reply+admin@localhost",
            "first_name": "SD Elements",
            "last_name": "Service-Bot",
            "last_login": null,
            "date_joined": "2018-03-21T14:57:22.661977-04:00",
            "is_active": false,
            "is_superuser": true,
            "role": {
                "id": "UR5",
                "name": "No Role"
            },
            "groups": [],
            "password_reset_in_progress": false
        },
        "triggered_by": {
            "id": 1,
            "email": "admin@example.com",
            "first_name": "Admin",
            "last_name": "Testerton",
            "last_login": "2018-03-21T14:53:54.861971-04:00",
            "date_joined": "2011-05-25T11:37:55-04:00",
            "is_active": true,
            "is_superuser": true,
            "role": {
                "id": "UR4",
                "name": "Administrator"
            },
            "groups": [],
            "password_reset_in_progress": false
        },
        "succeeded": true,
        "automatic": true,
        "ready": true,
        "result_message": "",
        "last_run": "2015-04-15T20:27:24.396442Z",
        "connection": {
            "alias": "My Connection",
            "command": "run_my_connection",
            "frequency": "daily",
            "id": 23,
            "params": {
                "asset_name": "WebGoat Java",
                "sde_project": "WhiteHat",
                "sde_businessunit": "General",
                "sde_application": "Demo Application",
                "import_behaviour": "replace-scanner",
                "analysis_server": "server.whitehatsec.com",
                "task_status_mapping": "{}"
            },
            "project": 7,
            "system": "Whitehat"
        }
    }]
}
Get All ALM Jobs of All Projects
Returns a list of all alm jobs associated with all projects. Note that the params are only shown if you have 'Edit ALM connections' permission.
GET /api/v2/jobs/alm/
Query Parameters
The following parameters may be used to filter the ALM connections resources in the response.
| Parameter | Description | 
|---|---|
| automatic | Returns all ALM jobs that were created automatically. | 
| connection | Returns all ALM jobs that correspond to a specific connection. | 
| ready | Returns all ALM jobs that have finished running, successfully or otherwise. | 
| succeeded | Returns all ALM jobs that completed successfully. | 
| user | Returns all ALM jobs synchronized by the specified user. | 
GET /api/v2/jobs/alm/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "id": 12,
        "user": "no-reply+example@localhost",
        "triggered_by": "admin@example.com",
        "succeeded": true,
        "automatic": true,
        "ready": true,
        "result_message": "",
        "last_run": "2015-04-15T20:27:24.396442Z",
        "attachment": null,
        "connection": {
            "alias": "My Connection",
            "command": "run_my_connection",
            "frequency": "daily",
            "id": 23,
            "params": {
                "sde_project": "Demo Project",
                "alm_auth_mode": "basic",
                "alm_user": "rally_user",
                "sde_verification_filter": "none,partial,pass,fail",
                "rally_workspace": "Rally Workspace",
                "alm_method": "https",
                "alm_title_format": "$task_id $title",
                "alm_server": "rally1.rallydev.com",
                "sde_businessunit": "General",
                "sde_application": "Demo Application",
                "alm_project": "Rally Project",
                "alm_pass": "rally_password",
                "alm_phases": "requirements,architecture-design,development",
                "sde_statuses_in_scope": "TODO",
                "conflict_policy": "alm",
                "sde_min_priority": 7
            },
            "project": 7,
            "system": "Rally"
        }
    }]
}
Expand Parameters
See the Expand Parameters section for more details.
| Parameter | Description | 
|---|---|
| user | User field is expanded. | 
| triggered_by | triggered_by field is expanded. | 
GET /api/v2/jobs/alm/?expand=user,triggered_by
Accept: application/json
Authorization: Token: "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "id": 12,
        "user": {
            "id": 3,
            "email": "no-reply+admin@localhost",
            "first_name": "SD Elements",
            "last_name": "Service-Bot",
            "last_login": null,
            "date_joined": "2018-03-21T14:57:22.661977-04:00",
            "is_active": false,
            "is_superuser": true,
            "role": {
                "id": "UR5",
                "name": "No Role"
            },
            "groups": [],
            "password_reset_in_progress": false
        },
        "triggered_by": {
            "id": 1,
            "email": "admin@example.com",
            "first_name": "Admin",
            "last_name": "Testerton",
            "last_login": "2018-03-21T14:53:54.861971-04:00",
            "date_joined": "2011-05-25T11:37:55-04:00",
            "is_active": true,
            "is_superuser": true,
            "role": {
                "id": "UR4",
                "name": "Administrator"
            },
            "groups": [],
            "password_reset_in_progress": false
        },
        "succeeded": true,
        "automatic": true,
        "ready": true,
        "result_message": "",
        "last_run": "2015-04-15T20:27:24.396442Z",
        "attachment": null,
        "connection": {
            "alias": "My Connection",
            "command": "run_my_connection",
            "frequency": "daily",
            "id": 23,
            "params": {
                "sde_project": "Demo Project",
                "alm_auth_mode": "basic",
                "alm_user": "rally_user",
                "sde_verification_filter": "none,partial,pass,fail",
                "rally_workspace": "Rally Workspace",
                "alm_method": "https",
                "alm_title_format": "$task_id $title",
                "alm_server": "rally1.rallydev.com",
                "sde_businessunit": "General",
                "sde_application": "Demo Application",
                "alm_project": "Rally Project",
                "alm_pass": "rally_password",
                "alm_phases": "requirements,architecture-design,development",
                "sde_statuses_in_scope": "TODO",
                "conflict_policy": "alm",
                "sde_min_priority": 7
            },
            "project": 7,
            "system": "Rally"
        }
    }]
}
Get a Specific ALM Job
Returns a specific alm job. Note that the params are only shown if you have 'Edit ALM connections' permission.
GET /api/v2/jobs/alm/{job_id}
GET /api/v2/jobs/alm/{job_id} HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": 12,
    "user": "no-reply+example@localhost",
    "triggered_by": "admin@example.com",
    "succeeded": true,
    "automatic": true,
    "ready": true,
    "result_message": "",
    "last_run": "2015-04-15T20:27:24.396442Z",
    "attachment": null,
    "connection": {
        "alias": "My Connection",
        "command": "run_my_connection",
        "frequency": "daily",
        "id": 23,
        "params": {
            "sde_project": "Demo Project",
            "alm_auth_mode": "basic",
            "alm_user": "rally_user",
            "sde_verification_filter": "none,partial,pass,fail",
            "rally_workspace": "Rally Workspace",
            "alm_method": "https",
            "alm_title_format": "$task_id $title",
            "alm_server": "rally1.rallydev.com",
            "sde_businessunit": "General",
            "sde_application": "Demo Application",
            "alm_project": "Rally Project",
            "alm_pass": "rally_password",
            "alm_phases": "requirements,architecture-design,development",
            "sde_statuses_in_scope": "TODO",
            "conflict_policy": "alm",
            "sde_min_priority": 7
        },
        "project": 7,
        "system": "Rally"
    }
}
Initiate an ALM Connection Sync Job
Will add a sync job to the queue to be run.
POST /api/v2/jobs/alm/
| Fields | Required | Description | 
|---|---|---|
| automatic | Yes | Whether the job was run automatically. | 
| connection | Yes | The connection id associated with the job. | 
| ready | Yes | Whether the job is ready to post its result or not. This field must be set to "false" in order for the import to commence. | 
| succeeded | No | Boolean Field. Use this along with the 'ready: true' to record when a job was successful/unsuccessful. | 
POST /api/v2/jobs/alm/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
    "connection": 12,
    "automatic": false,
    "ready": false
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "id": 12,
    "triggered_by": "admin@example.com",
    "succeeded": false,
    "automatic": false,
    "ready": false,
    "result_message": "",
    "last_run": "2015-04-15T20:27:24.396442Z",
    "attachment": null,
    "connection": {
        "alias": "My Connection",
        "command": "run_my_connection",
        "frequency": "daily",
        "id": 12,
        "params": {
            "sde_project": "Demo Project",
            "alm_auth_mode": "basic",
            "alm_user": "rally_user",
            "sde_verification_filter": "none,partial,pass,fail",
            "rally_workspace": "Rally Workspace",
            "alm_method": "https",
            "alm_title_format": "$task_id $title",
            "alm_server": "rally1.rallydev.com",
            "sde_businessunit": "General",
            "sde_application": "Demo Application",
            "alm_project": "Rally Project",
            "alm_pass": "rally_password",
            "alm_phases": "requirements,architecture-design,development",
            "sde_statuses_in_scope": "TODO",
            "conflict_policy": "alm",
            "sde_min_priority": 7
        },
        "project": 7,
        "system": "Rally"
    }
}
Post Results of an ALM Job of a Project
Will submit the results of an ALM job.
POST /api/v2/jobs/alm/
| Fields | Required | Description | 
|---|---|---|
| automatic | Yes | Whether the job was run automatically. | 
| connection | Yes | The connection id associated with the job. | 
| result_message | Yes | The result message of the job. | 
| succeeded | Yes | Whether the job was run successfully. | 
POST /api/v2/jobs/alm/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
    "connection": 12,
    "result_message": "My Message",
    "succeeded": true,
    "automatic": true
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "id": 12,
    "user": "admin@example.com",
    "triggered_by": "admin@example.com",
    "succeeded": true,
    "automatic": true,
    "ready": true,
    "result_message": "My Message",
    "last_run": "2015-04-15T20:27:24.396442Z",
    "attachment": null,
    "connection": {
        "alias": "My Connection",
        "command": "run_my_connection",
        "frequency": "daily",
        "id": 12,
        "params": {
            "sde_project": "Demo Project",
            "alm_auth_mode": "basic",
            "alm_user": "rally_user",
            "sde_verification_filter": "none,partial,pass,fail",
            "rally_workspace": "Rally Workspace",
            "alm_method": "https",
            "alm_title_format": "$task_id $title",
            "alm_server": "rally1.rallydev.com",
            "sde_businessunit": "General",
            "sde_application": "Demo Application",
            "alm_project": "Rally Project",
            "alm_pass": "rally_password",
            "alm_phases": "requirements,architecture-design,development",
            "sde_statuses_in_scope": "TODO",
            "conflict_policy": "alm",
            "sde_min_priority": 7
        },
        "project": 7,
        "system": "Rally"
    }
}
Get All Verification Jobs for All Projects
Returns a list of all verification jobs associated with all projects. Note that the params are only shown if you have the 'Edit verification connections' permission.
GET /api/v2/jobs/analysis/
Query Parameters
The following parameters may be used to filter the verification connections resources in the response.
| Parameter | Description | 
|---|---|
| automatic | Returns all Verification jobs that were created automatically. | 
| connection | Returns all Verification jobs that correspond to a specific connection. | 
| ready | Returns all Verification jobs that have finished running, successfully, or otherwise. | 
| succeeded | Returns all Verification jobs that completed successfully. | 
| user | Returns all Verification jobs synchronized by the specified user. | 
GET /api/v2/jobs/analysis/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "id": 12,
        "user": "no-reply+example@localhost",
        "triggered_by": "admin@example.com",
        "succeeded": true,
        "automatic": true,
        "ready": true,
        "result_message": "",
        "last_run": "2015-04-15T20:27:24.396442Z",
        "attachment": null,
        "connection": {
            "alias": "My Connection",
            "command": "run_my_connection",
            "frequency": "daily",
            "id": 23,
            "params": {
                "asset_name": "WebGoat Java",
                "sde_project": "WhiteHat",
                "sde_businessunit": "General",
                "sde_application": "Demo Application",
                "import_behaviour": "replace-scanner",
                "analysis_server": "server.whitehatsec.com",
                "task_status_mapping": "{}"
            },
            "project": 7,
            "system": "Whitehat"
        }
    }]
}
Expand Parameters
See the Expand Parameters section for more details.
| Parameter | Description | 
|---|---|
| user | User field is expanded. | 
| triggered_by | triggered_by field is expanded. | 
GET /api/v2/jobs/analysis/?expand=user,triggered_by
Accept: application/json
Authorization: Token: "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "id": 12,
        "succeeded": true,
        "user": {
            "id": 3,
            "email": "no-reply+admin@localhost",
            "first_name": "SD Elements",
            "last_name": "Service-Bot",
            "last_login": null,
            "date_joined": "2018-03-21T14:57:22.661977-04:00",
            "is_active": false,
            "is_superuser": true,
            "role": {
                "id": "UR5",
                "name": "No Role"
            },
            "groups": [],
            "password_reset_in_progress": false
        },
        "triggered_by": {
            "id": 1,
            "email": "admin@example.com",
            "first_name": "Admin",
            "last_name": "Testerton",
            "last_login": "2018-03-21T14:53:54.861971-04:00",
            "date_joined": "2011-05-25T11:37:55-04:00",
            "is_active": true,
            "is_superuser": true,
            "role": {
                "id": "UR4",
                "name": "Administrator"
            },
            "groups": [],
            "password_reset_in_progress": false
        },
        "succeeded": true,
        "automatic": true,
        "ready": true,
        "result_message": "",
        "last_run": "2015-04-15T20:27:24.396442Z",
        "attachment": null,
        "connection": {
            "alias": "My Connection",
            "command": "run_my_connection",
            "frequency": "daily",
            "id": 23,
            "params": {
                "asset_name": "WebGoat Java",
                "sde_project": "WhiteHat",
                "sde_businessunit": "General",
                "sde_application": "Demo Application",
                "import_behaviour": "replace-scanner",
                "analysis_server": "server.whitehatsec.com",
                "task_status_mapping": "{}"
            },
            "project": 7,
            "system": "Whitehat"
        }
    }]
}
Get a Specific Verification Job
Returns a specific verification job. Note that the params are only shown if you have 'Edit verification connections' permission.
GET /api/v2/jobs/analysis/{job_id}
GET /api/v2/jobs/analysis/{job_id} HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "id": 12,
    "user": "no-reply+example@localhost",
    "triggered_by": "admin@example.com",
    "succeeded": true,
    "automatic": true,
    "ready": true,
    "result_message": "",
    "last_run": "2015-04-15T20:27:24.396442Z",
    "attachment": null,
    "connection": {
        "alias": "My Connection",
        "command": "run_my_connection",
        "frequency": "daily",
        "id": 23,
        "params": {
            "asset_name": "WebGoat Java",
            "sde_project": "WhiteHat",
            "sde_businessunit": "General",
            "sde_application": "Demo Application",
            "import_behaviour": "replace-scanner",
            "analysis_server": "server.whitehatsec.com",
            "task_status_mapping": "{}"
        },
        "project": 7,
        "system": "Whitehat"
    }
}
Initiate a Verification Connection Import Job
This puts the import job on the queue to be run.
POST /api/v2/jobs/analysis/
| Fields | Required | Description | 
|---|---|---|
| automatic | Yes | Whether the job was run automatically. | 
| connection | Yes | The connection id associated with the job. | 
| ready | Yes | Whether the job is ready to post its result or not. This field must be set to "false" in order for the import to commence. | 
| succeeded | No | Boolean Field. Use this along with the 'ready: true' to record when a job was successful/unsuccessful. | 
POST /api/v2/jobs/analysis/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
    "connection": 12,
    "automatic": false,
    "ready": false
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "id": 12,
    "triggered_by": "admin@example.com",
    "succeeded": false,
    "automatic": false,
    "ready": false,
    "result_message": "",
    "last_run": "2015-04-15T20:27:24.396442Z",
    "attachment": null,
    "connection": {
        "alias": "My Connection",
        "command": "run_my_connection",
        "frequency": "daily",
        "id": 23,
        "params": {
            "asset_name": "WebGoat Java",
            "sde_project": "WhiteHat",
            "sde_businessunit": "General",
            "sde_application": "Demo Application",
            "import_behaviour": "replace-scanner",
            "analysis_server": "server.whitehatsec.com",
            "task_status_mapping": "{}"
        },
        "project": 7,
        "system": "Whitehat"
    }
}
Post Results of a Verification Job of a Project
This submits the results of an analysis job.
POST /api/v2/jobs/analysis/
| Fields | Required | Description | 
|---|---|---|
| automatic | Yes | Whether the job was run automatically. | 
| connection | Yes | The connection id associated with the job. | 
| result_message | Yes | The result message of the job. | 
| succeeded | Yes | Whether the job was run successfully. | 
| ready | No | Whether the job is ready to post the result or not. Defaults to True. | 
POST /api/v2/jobs/analysis/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
    "connection": 12,
    "result_message": "My Message",
    "succeeded": true,
    "automatic": true
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "id": 12,
    "user": "no-reply+example@localhost",
    "triggered_by": "admin@example.com",
    "succeeded": true,
    "automatic": true,
    "ready": true,
    "result_message": "My Message",
    "last_run": "2015-04-15T20:27:24.396442Z",
    "attachment": null,
    "connection": {
        "alias": "My Connection",
        "command": "run_my_connection",
        "frequency": "daily",
        "id": 23,
        "params": {
            "asset_name": "WebGoat Java",
            "sde_project": "WhiteHat",
            "sde_businessunit": "General",
            "sde_application": "Demo Application",
            "import_behaviour": "replace-scanner",
            "analysis_server": "server.whitehatsec.com",
            "task_status_mapping": "{}"
        },
        "project": 7,
        "system": "Whitehat"
    }
}
Initiate a Verification Connection File Import Job
This puts the file import job on the queue to be run.
POST /api/v2/jobs/analysis-file/
| Fields | Required | Description | 
|---|---|---|
| report_file | Yes | A file upload containing results from a security tool verification. | 
| system | Yes | The id of the system. | 
| project | Yes | The id of the SD Elements project that this connection will connect with. | 
| params | No | A dictionary containing connections options. Please refer to product documentation for more details or reach out to support. | 
POST /api/v2/jobs/analysis-file/ HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
------Boundary
Content-Disposition: form-data; name="report_file"; filename="report.xml"
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ReportDefinition type="xml">
  <truncated ...>
</ReportDefinition>
------Boundary
Content-Disposition: form-data; name="system"
fortify_file_upload
------Boundary
Content-Disposition: form-data; name="project"
1
------Boundary--
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "automatic": false,
    "attachment": "report.xml",
    "connection": {
        "id": 10,
        "alias": "File Upload Connection - Fortify",
        "system": {
            "id": "fortify_file_upload",
            "short_name": "Fortify",
            "name": "Fortify Software Security Center"
        },
        "frequency": "manually",
        "command": "import_fortify",
        "params": {
            "file_upload": "report.xml",
            "sde_project": 1,
            "sde_businessunit": 1,
            "sde_application": 1
        },
        "in_progress": true,
        "connector": null,
        "project": 1,
        "debug_mode": false,
        "is_file_upload": true
    },
    "id": 10,
    "last_run": "2018-08-01T15:51:47.606173-04:00",
    "ready": false,
    "result_message": "",
    "succeeded": false,
    "user": "admin@example.com",
    "triggered_by": "admin@example.com"
}
Get All LDAP Jobs
Returns a list of all LDAP jobs. Note that the params are only shown if you have 'Edit verification connections' permission.
GET /api/v2/jobs/ldap/
Query Parameters
The following parameters may be used to filter the verification connections resources in the response.
| Parameter | Type | Description | 
|---|---|---|
| automatic | Boolean | Returns all LDAP jobs that were created automatically. | 
| connection | Integer | Returns all LDAP jobs that correspond to a specific connection. | 
| ready | Boolean | Returns all LDAP jobs that have finished running, successfully or otherwise. | 
| succeeded | Boolean | Returns all LDAP jobs that completed successfully. | 
| user | Returns all LDAP jobs synchronized by the specified user. | 
GET /api/v2/jobs/ldap/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "attachment": null,
        "automatic": false,
        "connection": {
            "id": 29,
            "alias": "gg'",
            "system": "LDAP",
            "frequency": "manually",
            "command": "sync_ldap",
            "params": {
                "group_base_dn": "OU=SyncGroups,DC=example,DC=com",
                "ldap_server": "geneva.labs.sdelements.com:389",
                "bind_dn": "CN=Bind User2,CN=Users,DC=labs,DC=sdelements,DC=com",
                "user_schema": {
                    "first_name": "gn",
                    "last_name": "sn",
                    "email": "mail",
                    "full_name": "cn"
                },
                "deactivation": false,
                "group_member_query": "(&(objectClass=user)(memberOf=%s))",
                "page_size": 666,
                "base_dn": "DC=labs,DC=sdelements,DC=com",
                "ldap_method": "LDAP",
                "ldap_validate_cert": true
            },
            "inaccessible": false
        },
        "id": 57,
        "last_run": "2017-01-05T18:38:42.604983Z",
        "ready": true,
        "result_message": "",
        "succeeded": true,
        "user": "no-reply+example@localhost",
        "triggered_by": "admin@example.com"
    }]
}
Expand Parameters
See the Expand Parameters section for more details.
| Parameter | Description | 
|---|---|
| user | User field is expanded. | 
| triggered_by | triggered_by field is expanded. | 
GET /api/v2/jobs/ldap/?expand=user,triggered_by
Accept: application/json
Authorization: Token: "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [{
        "attachment": null,
        "automatic": false,
        "connection": {
            "id": 29,
            "alias": "gg'",
            "system": "LDAP",
            "frequency": "manually",
            "command": "sync_ldap",
            "params": {
                "group_base_dn": "OU=SyncGroups,DC=example,DC=com",
                "ldap_server": "geneva.labs.sdelements.com:389",
                "bind_dn": "CN=Bind User2,CN=Users,DC=labs,DC=sdelements,DC=com",
                "user_schema": {
                    "first_name": "gn",
                    "last_name": "sn",
                    "email": "mail",
                    "full_name": "cn"
                },
                "deactivation": false,
                "group_member_query": "(&(objectClass=user)(memberOf=%s))",
                "page_size": 666,
                "base_dn": "DC=labs,DC=sdelements,DC=com",
                "ldap_method": "LDAP",
                "ldap_validate_cert": true
            },
            "inaccessible": false
        },
        "id": 57,
        "last_run": "2017-01-05T18:38:42.604983Z",
        "ready": true,
        "result_message": "",
        "succeeded": true,
        "user": {
            "id": 3,
            "email": "no-reply+admin@localhost",
            "first_name": "SD Elements",
            "last_name": "Service-Bot",
            "last_login": null,
            "date_joined": "2018-03-21T14:57:22.661977-04:00",
            "is_active": false,
            "is_superuser": true,
            "role": {
                "id": "UR5",
                "name": "No Role"
            },
            "groups": [],
            "password_reset_in_progress": false
        },
        "triggered_by": {
            "id": 1,
            "email": "admin@example.com",
            "first_name": "Admin",
            "last_name": "Testerton",
            "last_login": "2018-03-21T14:53:54.861971-04:00",
            "date_joined": "2011-05-25T11:37:55-04:00",
            "is_active": true,
            "is_superuser": true,
            "role": {
                "id": "UR4",
                "name": "Administrator"
            },
            "groups": [],
            "password_reset_in_progress": false
        }
    }]
}
Get a Specific LDAP Job
Returns a specific LDAP job. Note that the params are only shown if you have 'Edit verification connections' permission.
GET /api/v2/jobs/ldap/{job_id}
GET /api/v2/jobs/ldap/{job_id} HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "attachment": null,
    "automatic": false,
    "connection": {
        "id": 29,
        "alias": "gg'",
        "system": "LDAP",
        "frequency": "manually",
        "command": "sync_ldap",
        "params": {
            "group_base_dn": "OU=SyncGroups,DC=example,DC=com",
            "ldap_server": "geneva.labs.sdelements.com:389",
            "bind_dn": "CN=Bind User2,CN=Users,DC=labs,DC=sdelements,DC=com",
            "user_schema": {
                "first_name": "gn",
                "last_name": "sn",
                "email": "mail",
                "full_name": "cn"
            },
            "deactivation": false,
            "group_member_query": "(&(objectClass=user)(memberOf=%s))",
            "page_size": 666,
            "base_dn": "DC=labs,DC=sdelements,DC=com",
            "ldap_method": "LDAP",
            "ldap_validate_cert": true
        },
        "inaccessible": false
    },
    "id": 57,
    "last_run": "2017-01-05T18:38:42.604983Z",
    "ready": true,
    "result_message": "",
    "succeeded": true,
    "user": "no-reply+example@localhost",
    "triggered_by": "joe@example.com"
}
Initiate an LDAP Connection Import Job
Will put the import job on the queue to be run.
POST /api/v2/jobs/ldap/
| Fields | Required | Type | Description | 
|---|---|---|---|
| automatic | Yes | Boolean | Whether the job was run automatically. | 
| connection | Yes | Integer | The connection id associated with the job. | 
| ready | Yes | Boolean | Whether the job is ready to post its result or not. This field must be set to "false" in order for the import to commence. | 
| succeeded | No | Boolean | Use this along with the 'ready: true' to record when a job was successful/unsuccessful. | 
POST /api/v2/jobs/ldap/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
    "connection": 29,
    "automatic": false,
    "ready": false
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "attachment": null,
    "automatic": false,
    "connection": {
        "id": 29,
        "alias": "gg'",
        "system": "LDAP",
        "frequency": "manually",
        "command": "sync_ldap",
        "params": {
            "group_base_dn": "OU=SyncGroups,DC=example,DC=com",
            "ldap_server": "geneva.labs.sdelements.com:389",
            "bind_dn": "CN=Bind User2,CN=Users,DC=labs,DC=sdelements,DC=com",
            "user_schema": {
                "first_name": "gn",
                "last_name": "sn",
                "email": "mail",
                "full_name": "cn"
            },
            "deactivation": false,
            "group_member_query": "(&(objectClass=user)(memberOf=%s))",
            "page_size": 666,
            "base_dn": "DC=labs,DC=sdelements,DC=com",
            "ldap_method": "LDAP",
            "ldap_validate_cert": true
        },
        "inaccessible": false
    },
    "id": 57,
    "last_run": "2017-01-05T18:38:42.604983Z",
    "ready": true,
    "result_message": "",
    "succeeded": true,
    "user": "no-reply+example@localhost",
    "triggered_by": "joe@example.com"
}
Post Results of an LDAP Job
Will submit the results of an LDAP job.
POST /api/v2/jobs/LDAP/
| Fields | Required | Type | Description | 
|---|---|---|---|
| automatic | Yes | Boolean | Whether the job was run automatically. | 
| connection | Yes | Integer | The connection id associated with the job. | 
| result_message | Yes | String | The result message of the job. | 
| succeeded | Yes | Boolean | Whether the job was run successfully. | 
| ready | No | Boolean | Whether the job is ready to post the result or not. Defaults to True. | 
POST /api/v2/jobs/ldap/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
    "connection": 29,
    "result_message": "My Message",
    "succeeded": true,
    "automatic": true
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "attachment": null,
    "automatic": false,
    "connection": {
        "id": 29,
        "alias": "gg'",
        "system": "LDAP",
        "frequency": "manually",
        "command": "sync_ldap",
        "params": {
            "group_base_dn": "OU=SyncGroups,DC=example,DC=com",
            "ldap_server": "geneva.labs.sdelements.com:389",
            "bind_dn": "CN=Bind User2,CN=Users,DC=labs,DC=sdelements,DC=com",
            "user_schema": {
                "first_name": "gn",
                "last_name": "sn",
                "email": "mail",
                "full_name": "cn"
            },
            "deactivation": false,
            "group_member_query": "(&(objectClass=user)(memberOf=%s))",
            "page_size": 666,
            "base_dn": "DC=labs,DC=sdelements,DC=com",
            "ldap_method": "LDAP",
            "ldap_validate_cert": true
        },
        "inaccessible": false
    },
    "id": 57,
    "last_run": "2017-01-05T18:38:42.604983Z",
    "ready": true,
    "result_message": "My Message",
    "succeeded": true,
    "user": "no-reply+example@localhost",
    "triggered_by": "joe@example.com"
}