[ { "title": "Introduction", "version": "0.1.0", "name": "Introduction", "group": "Introduction", "description": "

The Proofpoint Results API is not a turnkey tool and does not have predefined connectors to common BI tools or LMS systems. Therefore, you will have to refer to the instructions provided by those tools or the LMS system for information on how to integrate with the Proofpoint Results API.

The Proofpoint Results API contains five endpoints from which you can retrieve and filter data for your business needs:

  • CyberStrength – returns information from CyberStrength
  • PhishAlarm – returns information from PhishAlarm information
  • Phishing – returns information from ThreatSim simulated phishing campaigns
  • Training – returns information from Training assignments
  • Users – returns information about Users
  • Training Enrollments – returns information from the (beta) User Enrollments Report

  • Intended Audience

    The Proofpoint Results API and these instructions are designed to be used by software engineers, system architects, and system designers. Using the Proofpoint Results API requires knowledge of and familiarity with API building blocks that include remote calls, object classes, variables, HTML, CSS, JavaScript, and web application development. These building blocks are used to build software applications and business intelligence outputs.


    Programming Responsibility

    Since there are many different business intelligence (BI) tools and Learning Management Systems (LMS), all programming integrations must be done by your technical personnel. Proofpoint Support does not offer any programming assistance with integrating the Results API with your tools.


    Programming Details

    The API output format is JSON.

    The maximum request size is 8KB.

    The API supports:

  • Pagination (see Pagination below)
  • Filtering (see Filtering below and details in each endpoint)
  • Handling of special characters and URL encoding is detailed in Appendix A.

  • The API refresh rates vary per endpoint as follows:

    Refreshes approximately three times a day:

  • CyberStrength
  • PhishAlarm
  • Phishing
  • Training
  • Users

  • Refreshes approximately every 15 minutes: TrainingEnrollments


    Pagination

    By default, the page size (number of records returned) is 20 (our recommended page size). You can request more records per page using the page[size] parameter.


    Filtering

    A number of filters are provided for each endpoint of the API. Descriptions and default values for each filter are provided in each section below.

    In general, the filters are considered as additive operations. For example, if you request all campaigns in the last 30 days, and the inclusion of deleted users, you will receive data for the campaigns in the last 30 days, including data for deleted users. If you filter by campaigns in the last 30 days, and \"Campaign Type\" of \"Drive By\", you will receive only the assessments of type \"Drive By\" that were started in the last 30 days.


    Filtering on training modules

    There are two ways that users can take training - via training assignment or Free Play modules.

    To filter via Free Play:

    In order to include modules completed via Free Play, include the filter[_includefreeplay] and set the value to \"TRUE\". Including Free Play training data requires the filter[_attemptdate_start] and filter[_attemptdate_end] to be set.

    When the filter[_includefreeplay] is set to \"TRUE\", the following filters should NOT be used: filter[_assignmentstartdate_start], filter[_assignmentstartdate_end], filter[_includenotstarted], filter[_includedeletedassignments], filter[_includeremovedusers].

    In the filter[user_tag] field, add \"User tags are the custom properties that your company has defined in the platform. Many companies include fields like \"Department\", \"Region\", or \"Manager\". You can filter on one or more custom field/user tag per call. For example, \"Department = Marketing\" and \"Region = South.\" At this time, you cannot filter on the same custom property multiple times in the same call, e.g. \"Region = South\" and \"Region = North\". The format of this query is ?filter[user_tag][tag_name]='tag_value', and an example is: ?filter[user_tag][Department]='Finance'.


    Known Issues and Improvement Opportunities

  • Time zones may be presented differently, based on the endpoint selected. Current behavior is as follows:
  •   – ThreatSim phishing: UTC

      – Legacy PhishGuru phishing: EST (EU and US environments), UTC (AP environment)

      – Training: EST (US environment), UTC (EU and AP environments)

      – User: UTC

    It is our intent to standardize the presentation of time zones in the future.

  • The ID field is not a fixed field, nor is it a global user ID (GUID). Rather, it is an index number that supports pagination when you make the API call. Please note that the IDs are not unique and may change over time. Email Address is the unique identifier for user data.

  • " }, { "type": "post", "title": "Authentication", "version": "0.1.0", "name": "AuthenticationAPI", "group": "API_Endpoints", "description": "

    API Authentication Using Token Keys

    To make API requests, the Proofpoint Results API requires token-based authentication for secure access to data in the Platform.

    NOTE: If you haven’t received a token key, please contact your Proofpoint Security Awareness Training Platform Administrator (Admin) to receive it. The Admin is responsible for generating the token key using the Platform. Refer to the \"Proofpoint Results API Access Token Mart Guide\".

    1. Once you receive the access token from the Admin, you can use it to make a request to the API by entering it in the x-apikey-token header, as detailed in the rest of this documentation.
    2. Refer to the POST sample below to enter the token key.

    Please Note In the below examples the results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. CyberStrength, PhishAlarm, Phishing, Training, and Users


    ", "examples": [ { "title": "Example usage:", "content": "curl -X GET curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength -g \\\n \n --header \" x-apikey-token: $token\"| json_pp", "type": "json" } ], "filename": "reporting/documentation/latest/JWT_framework.py", "groupTitle": "API Endpoints" }, { "type": "get", "url": "/cyberstrength", "title": "Knowledge Assessments", "version": "0.1.0", "name": "CyberStrengthFunction", "group": "API_Endpoints", "description": "

    Returns information from Knowledge Assessments (previously Cyberstrength). Contains functionality for a variety of filters. Please see the "Parameter" section of this documentation for more information on these filters.

    Reminder! In the below examples the results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. if you were setting up API endpoints for Knowledge Assessments for your US platform environment, you would replace host.server:port with results.us.securityeducation.com. Typically customers platform accounts correspond to their geographic region. If you have any questions as to which environment your platform account is set up on, please ask your Platform Admin or Proofpoint Customer Success Manager or Customer Support.

    ", "examples": [ { "title": "Example usage:", "content": "https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[a]=b&page[number]=#&page[size]=#\nhttps://host.server:port/api/reporting/v0.1.0/cyberstrength?page[number]=2&page[size]=5&filter[_assessmenttype]=[Predefined]\nhttps://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assignmentstartdate_start]='2016-02-02'&filter[_assignmentstartdate_end]='2016-03-02'&filter[_includenotstarted]=TRUE\nhttps://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_fullquestion]=FALSE&filter[user_tag][Department]='Marketing'&user_tag_enable\nhttps://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assignmentname]=[1-17-17 C & YB Phishing - Userlist, 1-15-18 C & YB Phishing]&filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]", "type": "json" }, { "title": "cURL and Bash:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength -g \\\n--header \" x-apikey-token: $token\"| json_pp\n \n curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength?page[number]=2&page[size]=5 -g \\\n--header \" x-apikey-token: $token\"| json_pp\n \n curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assessmenttype]=[Predefined, Administrator Defined] -g \\\n--header \"x-apikey-token: $token\"| json_pp\n \ncurl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assignmentstartdate_start]='2016-02-02'&filter[_assignmentstartdate_end]='2016-03-02'&filter[_includenotstarted]=TRUE -g \\\n--header \" x-apikey-token: $token\"| json_pp\n \n curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[user_tag][Department]='Marketing'&user_tag_enable -g \\\n--header \" x-apikey-token: $token\"| json_pp\n \n curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_fullquestion]=FALSE -g \\\n--header \" x-apikey-token: $token\"| json_pp\n \n curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assignmentname]=[1-17-17 C & YB Phishing - Userlist, 1-15-18 C & YB Phishing]&filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org] -g \\ \n --header \" x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "cURL (Command Line):", "content": "set assignmentstart=2018-01-01\nset assignmentend=2018-03-01\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assignmentstartdate_start]='%assignmentstart%'&filter[_assignmentstartdate_end]='%assignmentend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >cyberstrength.txt\n \n set assessmenttype=Predefined\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assessmenttype]=[%assessmenttype%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >cyberstrength.txt\n \n set fullquestion=FALSE\nset includenotstarted=TRUE\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_fullquestion]=%fullquestion%&filter[_includenotstarted]=%includenotstarted%\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >cyberstrength.txt\n \n set assignmentname=Phishing-Userlist,Phishing\nset useremailaddress=john.doe@example.org,jane.doe@example.org\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/cyberstrength?filter[_assignmentname]=[%assignmentname%]&filter[_useremailaddress]=[%useremailaddress%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >cyberstrength.txt\n", "type": "json" } ], "permission": [ { "name": "SuperAdmin" }, { "name": "or" }, { "name": "ReportingAdmin" }, { "name": "or" }, { "name": "ReportingApi" } ], "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Accept", "description": "

    Accepted content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "Content-Type", "description": "

    Returned content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "x-apikey-token", "description": "

    User's access token.

    " } ] } }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": true, "field": "page[number]", "description": "

    Select page number, if pagination desired. Pagination is enabled by default.

    " }, { "group": "Parameter", "type": "Number", "optional": true, "field": "page[size]", "description": "

    Select page size, if pagination desired. Default is 20 records.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentname]", "description": "

    Filter to select one or more assignment names. By default, all values are returned.
    Format: ?filter[_assignmentname]=[name]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentstartdate_start]", "description": "

    Filter by the start date of the assignment.
    Format: ?filter[_assignmentstartdate_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentstartdate_end]", "description": "

    Filter by the end date of the assignment.
    Format: ?filter[_assignmentstartdate_end]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_questiondate_start]", "description": "

    Filter by the start date that the question was answered.
    Format: ?filter[_questiondate_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_questiondate_end]", "description": "

    Filter by the end date that the question was answered.
    Format: ?filter[_questiondate_end]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includenotstarted]", "description": "

    Filter to include assignments that have not been started. Default value is “TRUE”.
    Format: ?filter[_includenotstarted]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedusers]", "description": "

    Filter to include deleted users. Default value is “FALSE”.
    Format: ?filter[_includedeletedusers]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedassignments]", "description": "

    Filter to include deleted assignments. Default value is “FALSE”.
    Format: ?filter[_includedeletedassignments]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_fullquestion]", "description": "

    Filter to return the full question copy in the results set. Default value is “TRUE”.
    Format: ?filter[_fullquestion]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assessmenttype]", "description": "

    Filter to select one or more assessment types. By default, all values are returned.
    Values include, “Randomly Generated, Administrator Defined, Predefined, Automatically Generated”, takes an array of values.
    Format: ?filter[_assessmenttype]=[typename]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_useremailaddress]", "description": "

    Filter to select one or more specific email addresses. Email address takes an array of values.
    Format: ?filter[_useremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[user_tag]", "description": "

    The user_tag filter allows you to filter on a specific free value tag (formerly called “custom user properties.” For this filter, provide your tag (custom property)
    Format: "?filter[user_tag][tag_name]='tag_value'. There must be single quotes around your tag value, or you will get a query error.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "user_tag_enable", "description": "

    Add this query string parameter to cause the endpoint to return users' free value tags (formerly “custom user properties”) with each entry. Default value is “TRUE”. Values include “TRUE” and “FALSE”.

    " } ] } }, "success": { "fields": { "CyberStrength Field List (Success 200)": [ { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "id", "description": "

    Iterator position in result set; not a unique identifier

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "assignmentname", "description": "

    Assignment name

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "assessmentname", "description": "

    Assessment name

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "assignmentstatus", "description": "

    Status of the assignment, e.g. "Not Started, In Progress, Completed"

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "assessmentstatus", "description": "

    Status of the assessment, e.g. "Draft, Approved, Published"

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "assessmenttype", "description": "

    CyberStength assessment type

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentstartdate", "description": "

    Date the assignment was started and available to users

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentduedate", "description": "

    Date the assignment is due

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentdeleteddate", "description": "

    Date the assignment was deleted

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Boolean", "optional": false, "field": "userremovedfromassignment", "description": "

    true/false field that indicates if a user was removed from the assignment

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "category", "description": "

    Category of the question

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "categorybenchmarkall", "description": "

    Benchmark score for the category, averaged across all Wombat customers

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "categorybenchmarkindustry", "description": "

    Benchmark score for the category, averaged across Wombat customers in your assigned industry (e.g. healthcare, manufacturing)

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "questionsincategory", "description": "

    Overal number of questions in the category

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Boolean", "optional": false, "field": "isaeenabled", "description": "

    Specifies whether the CyberStrength Assessment can trigger training auto-enrollment

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Date", "optional": false, "field": "attemptdate", "description": "

    Date the CyberStrength assessment was taken

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "userfirstname", "description": "

    User first name

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "userlastname", "description": "

    User last name

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "useremailaddress", "description": "

    Email address

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Boolean", "optional": false, "field": "useractiveflag", "description": "

    true/false field indicating whether the user is active

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Date", "optional": false, "field": "userdeleteddate", "description": "

    Date the user was deleted

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "userassignmentstatus", "description": "

    User assignment status, e.g. “Not Started, In Progress, Completed”

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "questionid", "description": "

    Unique identifier of the question

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "questiontype", "description": "

    Type of the question, e.g. multiple choice, true/false

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Boolean", "optional": false, "field": "iscustomquestion", "description": "

    Is the question a custom question?

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "questiontext", "description": "

    Full text of the question

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "selectedanswer", "description": "

    Answer selected by the user

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Boolean", "optional": false, "field": "correct", "description": "

    Did the user answer the question correctly?

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "secondsinattempt", "description": "

    Duration, in seconds, the user spent completing the CyberStrength assessment

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "usercorrectonassignment", "description": "

    Total number of questions the user answered correctly on the assignment

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "useransweredonassignment", "description": "

    Number of questions the user answered on the assignment

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "userscoreonassignment", "description": "

    User's score on the assignment

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "questionlatency", "description": "

    Amount of time the user took to answer the question (in milliseconds)

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Date", "optional": false, "field": "questiondate", "description": "

    The date the user answered the question

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "assignmentaveragescore", "description": "

    Average question score for the assignment

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Number", "optional": false, "field": "companyaveragescore", "description": "

    Average question score for the company

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "Dictionary", "optional": false, "field": "usertags", "description": "

    Customer-defined tags (also known as custom properties) associated with the user, and their corresponding values

    " }, { "group": "CyberStrength Field List (Success 200)", "type": "String", "optional": false, "field": "sso_id", "description": "

    Identifier provided by your single sign on system for the user.

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"jsonapi\": {\n \"version\": \"1.0\"\n },\n \"links\": {\n \"first\": \"/api/reporting/v0.1.0/cyberstrength?page%5Bsize%5D=1\",\n \"last\": \"/api/reporting/v0.1.0/cyberstrength?page%5Bnumber%5D=35&page%5Bsize%5D=1\",\n \"next\": \"/api/reporting/v0.1.0/cyberstrength?page%5Bnumber%5D=2&page%5Bsize%5D=1\",\n \"self\": \"/api/reporting/v0.1.0/cyberstrength?page%5Bnumber%5D=1&page%5Bsize%5D=1\"\n },\n \"meta\": {\n \"page_number\": \"1\",\n \"page_size\": \"1\",\n \"count\": 35\n },\n \"data\": [\n {\n \"type\": \"fn_cyb_events_v1\",\n \"id\": 1,\n \"attributes\": {\n \"assignmentname\": \"1-17-17 C & YB Phishing - Userlist\",\n \"assessmentname\": \"Phishing\",\n \"assignmentstatus\": \"Not Started\",\n \"assessmentstatus\": \"Approved\",\n \"assessmenttype\": \"Predefined\",\n \"assignmentstartdate\": \"2017-01-17T00:00:00\",\n \"assignmentduedate\": \"2017-01-31T00:00:00\",\n \"assignmentdeleteddate\": \"9999-01-01T00:00:00\",\n \"userremovedfromassignment\": false,\n \"category\": \"Custom Question No Data Available\",\n \"categorybenchmarkall\": null,\n \"categorybenchmarkindustry\": null,\n \"questionsincategory\": null,\n \"isaeenabled\": true,\n \"attemptdate\": null,\n \"userfirstname\": \"58d72e8e4929313bdba8dc247ef3aa5f\",\n \"userlastname\": \"0bbe256b1695387f2c87f652b1d78521\",\n \"useremailaddress\": \"8238d2b693d9ad6dfab94f382064e726\",\n \"useractiveflag\": true,\n \"userdeleteddate\": null,\n \"userassignmentstatus\": \"Not Started\",\n \"questionid\": null,\n \"questiontype\": \"Multiple Choice\",\n \"iscustomquestion\": true,\n \"questiontext\": \"Custom Question\",\n \"selectedanswer\": null,\n \"correct\": false,\n \"secondsinattempt\": \"0\",\n \"usercorrectonassignment\": null,\n \"useransweredonassignment\": null,\n \"userscoreonassignment\": null,\n \"questionlatency\": \"0\",\n \"questiondate\": null,\n \"assignmentaveragescore\": null,\n \"companyaveragescore\": null,\n \"usertags\": null,\n \"sso_id\": null\n }\n }\n ]\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "json", "optional": false, "field": "401", "description": "

    Authorization Error, Missing Authorization Header, Expired Token

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "402", "description": "

    API Budget Empty

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "422", "description": "

    Invalid Token, Token Decode Error, Invalid Header

    " } ], "Error 5xx": [ { "group": "Error 5xx", "type": "json", "optional": false, "field": "500", "description": "

    Database Error, Internal Server Error

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"errors\": [\n {\n \"detail\": \"No API requests remaining in budget.\"\n \"source\": {},\n \"status\": 402\n \"title\": \"API Budget Empty\"\n }\n ],\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "filename": "reporting/documentation/latest/cyberdata_framework_010.py", "groupTitle": "API Endpoints" }, { "type": "get", "url": "/phishalarm", "title": "PhishAlarm", "version": "0.1.0", "name": "PhishAlarmFunction", "group": "API_Endpoints", "description": "

    Returns PhishAlarm information. Contains functionality for date filters, and enabling / disabling of users' tag information. Please see the "Parameter" section of this documentation for more information on these filters.

    Reminder! In the below examples the results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. if you were setting up API endpoints for PhishAlarm for your US platform environment, you would replace host.server:port with results.us.securityeducation.com. Typically customers platform accounts correspond to their geographic region. If you have any questions as to which environment your platform account is set up on, please ask your Platform Admin or Proofpoint Customer Success Manager or Customer Support.

    ", "examples": [ { "title": "Example usage: ", "content": "https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[a]=b&page[number]=#&page[size]=#\nhttps://host.server:port/api/reporting/v0.1.0/phishalarm?page[number]=1&page[size]=10&filter[_reporteddate_start]='2015-02-01'&filter[_reporteddate_end]='2015-03-01'\nhttps://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_receiveddate_start]='2017-02-02'&filter[_receiveddate_end]='2017-03-01'\nhttps://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_includedeletedusers]=TRUE&filter[user_tag][Department]='Finance'&user_tag_enable\nhttps://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]&filter[_action]=[Opened, Unopened]&filter[_includeplatformnotifications]=TRUE", "type": "json" }, { "title": "cURL and Bash:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/phishalarm -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishalarm?page[number]=1&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishalarm?page[number]=1&page[size]=10&filter[_reporteddate_start]='2015-02-01'&filter[_reporteddate_end]='2015-03-01' -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_receiveddate_start]='2017-02-02'&filter[_receiveddate_end]='2017-03-01' -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_includedeletedusers]=TRUE&filter[user_tag][Department]='Finance'&user_tag_enable -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]&filter[_action]=[Opened, Unopened]&filter[_includeplatformnotifications]=TRUE -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "cURL (Command Line):", "content": "set reportedstart=2018-01-01\nset reportedend=2018-03-01\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_reporteddate_start]='%reportedstart%'&filter[_reporteddate_end]='%reportedend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishalarm.txt\n\nset receivedstart=2017-02-02\nset receivedend=2017-03-01\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_receiveddate_start]='%receivedstart%'&filter[_receiveddate_end]='%receivedend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishalarm.txt\n\nset includedeletedusers=TRUE\nset useremailaddress=john.doe@example.org,jane.doe@example.org\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_includedeletedusers]=%includedeletedusers%&filter[_useremailaddress]=[%useremailaddress%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishalarm.txt\n\nset action=Opened,Unopened\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishalarm?filter[_action]=[%action%]?filter[_includeplatformnotifications]=TRUE\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishalarm.txt", "type": "json" } ], "permission": [ { "name": "SuperAdmin" }, { "name": "or" }, { "name": "ReportingAdmin" }, { "name": "or" }, { "name": "ReportingApi" } ], "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Accept", "description": "

    Accepted content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "Content-Type", "description": "

    Returned content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "x-apikey-token", "description": "

    User's access token.

    " } ] } }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": true, "field": "page[number]", "description": "

    Select page number, if pagination desired. Pagination is enabled by default.

    " }, { "group": "Parameter", "type": "Number", "optional": true, "field": "page[size]", "description": "

    Select page size, if pagination desired. Default is 20 records.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_reporteddate_start]", "description": "

    Filter by the date that emails started to be reported via PhishAlarm.
    Format: ?filter[_reporteddate_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_reporteddate_end]", "description": "

    Filter by the date that emails reported via PhishAlarm ended.
    Format: ?filter[_reporteddate_end]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_receiveddate_start]", "description": "

    Filter by the start date that emails were received by users.
    Format: ?filter[_receiveddate_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_receiveddate_end]", "description": "

    Filter by the end date that emails were received by users.
    Format: ?filter[_receiveddate_end]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_useremailaddress]", "description": "

    Filter to select one or more specific email addresses. Email address takes an array of values.
    Format: ?filter[_useremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedusers]", "description": "

    Filter to include deleted users. Default value is “FALSE”.
    Format: ?filter[_includedeletedusers]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_action]", "description": "

    Filter to select one or more actions. By default, all values are returned. Values include, “Opened, Opened in Preview Pane, Unopened” takes an array of values.
    Format: ?filter[_action]=[name]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[user_tag]", "description": "

    The user_tag filter allows you to filter on a specific free value tag (formerly called “custom user properties.” For this filter, provide your tag (custom property)
    Format: "?filter[user_tag][tag_name]='tag_value'. There must be single quotes around your tag value, or you will get a query error.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "user_tag_enable", "description": "

    Add this query string parameter to cause the endpoint to return users' free value tags (formerly “custom user properties”) with each entry. Default value is “TRUE”. Values include “TRUE” and “FALSE”.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includeplatformnotifications]", "description": "

    Filter to include Platform Notification email types. Default value is “False“.
    Format: ?filter[_includeplatformnotifications]=TRUE/FALSE.

    " } ] } }, "success": { "fields": { "PhishAlarm Field List (Success 200)": [ { "group": "PhishAlarm Field List (Success 200)", "type": "Number", "optional": false, "field": "id", "description": "

    Iterator position in result set; not a unique identifier

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "campaignname", "description": "

    Simulated phishing campaign associated with the PhishAlarm reported email

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "userfirstname", "description": "

    User first name

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "userlastname", "description": "

    User last name

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "useremailaddress", "description": "

    Email Address

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "Boolean", "optional": false, "field": "useractiveflag", "description": "

    true/false field indicating whether the user is active

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "Date", "optional": false, "field": "userdeleteddate", "description": "

    Date the user was deleted

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "action", "description": "

    Type of action the user took, e.g. Opened, Opened in Preview Pane, Unopened

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "emailtype", "description": "

    Specifies the category of email, e.g. Platform Notification, Potential Phish, Simulated Phish

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "receiveddate", "description": "

    Date the user received the email

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "reporteddate", "description": "

    Date the user reported the email

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "elapsedhours", "description": "

    The amount of hours that elapsed between receiving and reporting of the email

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "os", "description": "

    Operating system of the user's computer or device

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "emailclientversion", "description": "

    Type and version of email client

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "Dictionary", "optional": false, "field": "usertags", "description": "

    Customer-defined tags (also known as custom properties) associated with the user, and their corresponding values

    " }, { "group": "PhishAlarm Field List (Success 200)", "type": "String", "optional": false, "field": "sso_id", "description": "

    Identifier provided by your single sign on system for the user.

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"links\": {\n \"next\": \"/api/reporting/v0.1.0/phishalarm?page%5Bnumber%5D=2\",\n \"last\": \"/api/reporting/v0.1.0/phishalarm?page%5Bnumber%5D=9\",\n \"self\": \"/api/reporting/v0.1.0/phishalarm\",\n \"first\": \"/api/reporting/v0.1.0/phishalarm\"\n },\n \"jsonapi\": {\n \"version\": \"1.0\"\n },\n \"meta\": {\n \"count\": 176,\n \"page_size\": 20,\n \"page_number\": 1\n },\n \"data\": [\n {\n \"type\": \"fn_phishalarm_events_v1\",\n \"id\": 1,\n \"attributes\": {\n \"campaignname\": \"Apr 21 drive_by test\",\n \"userfirstname\": \"7fb55ed0b7a30342ba6da306428cae04\",\n \"userlastname\": \"d55b30607c2a9a2616347d6edb789f6b\",\n \"useremailaddress\": \"350caadb38672792361fa29de89712c1\",\n \"useractiveflag\": true,\n \"userdeleteddate\": null,\n \"action\": \"Opened\",\n \"emailtype\": \"Simulated Phish\",\n \"receiveddate\": \"2017-04-21T13:50:33\",\n \"reporteddate\": \"2017-04-21T13:51:18\",\n \"elapsedhours\": \"0.0\",\n \"os\": \"Unknown OS\",\n \"emailclientversion\": \"NA\",\n \"usertags\": null,\n \"sso_id\": null\n }\n }\n ...\n ]\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "json", "optional": false, "field": "401", "description": "

    Authorization Error, Missing Authorization Header, Expired Token

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "402", "description": "

    API Budget Empty

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "422", "description": "

    Invalid Token, Token Decode Error, Invalid Header

    " } ], "Error 5xx": [ { "group": "Error 5xx", "type": "json", "optional": false, "field": "500", "description": "

    Database Error, Internal Server Error

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"errors\": [\n {\n \"detail\": \"No API requests remaining in budget.\"\n \"source\": {},\n \"status\": 402\n \"title\": \"API Budget Empty\"\n }\n ],\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "filename": "reporting/documentation/latest/phishalarm_framework_010.py", "groupTitle": "API Endpoints" }, { "type": "get", "url": "/phishing", "title": "Phishing", "version": "0.1.0", "name": "PhishingEventFunction", "group": "API_Endpoints", "description": "

    Returns information for simulated phishing campaigns. Contains functionality for a variety of filters. Please see the "Parameter" section of this documentation for more information on these filters.

    Reminder! In the below examples the results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. if you were setting up API endpoints for Phishing for your US platform environment, you would replace host.server:port with results.us.securityeducation.com. Typically customers platform accounts correspond to their geographic region. If you have any questions as to which environment your platform account is set up on, please ask your Platform Admin or Proofpoint Customer Success Manager or Customer Support.

    ", "examples": [ { "title": "Example usage: ", "content": "https://host.server:port/api/reporting/v0.1.0/phishing?filter[a]=b&page[number]=#&page[size]=#\nhttps://host.server:port/api/reporting/v0.1.0/phishing?page[number]=1&page[size]=10&filter[_eventtimestamp_start]='2017-02-04'&filter[_eventtimestamp_end]='2017-02-07'\nhttps://host.server:port/api/reporting/v0.1.0/phishing?filter[user_tag][Manager]='Jane Doe'&filter[user_tag][Region]='South'&user_tag_enable\nhttps://host.server:port/api/reporting/v0.1.0/phishing?filter[_includearchivedcampaigns]=TRUE&filter[_campaignstartdate_start]='2016-02-02'&filter[_campaignstartdate_end]='2016-05-02'\nhttps://host.server:port/api/reporting/v0.1.0/phishing?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]&filter[_campaignname]=[PhishGuru Campaign 10-05-2018, PhishGuru Campaign 11-02-2017]", "type": "json" }, { "title": "cURL and Bash:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/phishing -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishing?page[number]=1&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishing?page[number]=1&page[size]=10&filter[_eventtimestamp_start]='2017-02-04'&filter[_eventtimestamp_end]='2017-02-07' -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishing?filter[user_tag][Manager]='Jane Doe'&filter[user_tag][Region]='South'&user_tag_enable -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishing?filter[_includearchivedcampaigns]=TRUE&filter[_campaignstartdate_start]='2016-02-02'&filter[_campaignstartdate_end]='2016-05-02' -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/phishing?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]&filter[_campaignname]=[PhishGuru Campaign 10-05-2018, PhishGuru Campaign 11-02-2017] -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "cURL (Command Line):", "content": "set campaignstart=2018-01-01\nset campaignend=2018-03-01\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishing?filter[_campaignstartdate_start]='%campaignstart%'&filter[_campaignstartdate_end]='%campaignend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishing.txt\n\nset eventtimestampstart=2017-02-04\nset eventtimestampend=2017-02-07\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishing?filter[_eventtimestamp_start]='%eventtimestampstart%'&filter[_eventtimestamp_end]='%eventtimestampend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishing.txt\n\nset includearchivedcampaigns=TRUE\nset campaignname=PhishGuruCampaign2018,PhishGuruCampaign2017\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishing?filter[_includearchivedcampaigns]=%includearchivedcampaigns%&filter[_campaignname]=[%campaignname%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishing.txt\n\nset useremailaddress=john.doe@example.org,jane.doe@example.org\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/phishing?filter[_useremailaddress]=[%useremailaddress%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishing.txt", "type": "json" } ], "permission": [ { "name": "SuperAdmin" }, { "name": "or" }, { "name": "ReportingAdmin" }, { "name": "or" }, { "name": "ReportingApi" } ], "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Accept", "description": "

    Accepted content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "Content-Type", "description": "

    Returned content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "x-apikey-token", "description": "

    User's access token.

    " } ] } }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": true, "field": "page[number]", "description": "

    Select page number, if pagination desired. Pagination is enabled by default.

    " }, { "group": "Parameter", "type": "Number", "optional": true, "field": "page[size]", "description": "

    Select page size, if pagination desired. Default is 20 records.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_eventtimestamp_start]", "description": "

    Filter by the start date of the user event (e.g. link clicked, attachment opened, data submitted).
    Format: ?filter[_eventtimestamp_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_eventtimestamp_end]", "description": "

    Filter by the end date of the user event (e.g. link clicked, attachment opened, data submitted).
    Format: ?filter[_eventtimestamp_end]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_campaignname]", "description": "

    Filter to select one or more campaign names. By default, all values are returned.
    Format: ?filter[_campaignname]=[name]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_campaignstartdate_start]", "description": "

    Filter by the campaign start date.
    Format: ?filter[_campaignstartdate_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_campaignstartdate_end]", "description": "

    Filter by the campaign end date.
    Format: ?filter[_campaignstartdate_end]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includenoaction]", "description": "

    Filter to include or exclude records where no action was taken (no event happened). For example, if 1,000 users were sent a simulated phish, and 200 clicked, includenoaction=TRUE would return 1,000 records. Conversely, includenoaction = FALSE would return 200 records (800 users took no action). Default value is “TRUE”.
    Format: ?filter[_includenoaction]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_useremailaddress]", "description": "

    Filter to select one or more specific email addresses. Email address takes an array of values.
    Format: ?filter[_useremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedusers]", "description": "

    Filter to include or exclude deleted users. Default value is “FALSE”.
    Format: ?filter[_includedeletedusers]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includearchivedcampaigns]", "description": "

    Filter to include archived campaigns. Default value is “FALSE”.
    Format: ?filter[_includearchivedcampaigns]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[user_tag]", "description": "

    The user_tag filter allows you to filter on a specific free value tag (formerly called “custom user properties.” For this filter, provide your tag (custom property)
    Format: "?filter[user_tag][tag_name]='tag_value'. There must be single quotes around your tag value, or you will get a query error.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "user_tag_enable", "description": "

    Add this query string parameter to cause the endpoint to return users' free value tags (formerly “custom user properties”) with each entry. Default value is “TRUE”. Values include “TRUE” and “FALSE”.

    " } ] } }, "success": { "fields": { "Phishing Field List (Success 200)": [ { "group": "Phishing Field List (Success 200)", "type": "Number", "optional": false, "field": "id", "description": "

    Iterator position in result set; not a unique identifier

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "userfirstname", "description": "

    User first name

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "userlastname", "description": "

    User last name

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "useremailaddress", "description": "

    Email address

    " }, { "group": "Phishing Field List (Success 200)", "type": "Boolean", "optional": false, "field": "useractiveflag", "description": "

    true/false field indicating whether the user is active

    " }, { "group": "Phishing Field List (Success 200)", "type": "Date", "optional": false, "field": "userdeleteddate", "description": "

    Date the user was deleted

    " }, { "group": "Phishing Field List (Success 200)", "type": "Date", "optional": false, "field": "senttimestamp", "description": "

    Time stamp when the phishing email was sent

    " }, { "group": "Phishing Field List (Success 200)", "type": "Date", "optional": false, "field": "eventtimestamp", "description": "

    Time stamp of the phishing campaign event (e.g. view, click)

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "eventtype", "description": "

    Type of event: Data Submission, Email View, Email Click, No Action, TM Complete, TM Sent

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "campaignname", "description": "

    Name of the campaign

    " }, { "group": "Phishing Field List (Success 200)", "type": "Boolean", "optional": false, "field": "autoenrollment", "description": "

    Does this phishing campaign trigger a training autoenrollment (true/false)?

    " }, { "group": "Phishing Field List (Success 200)", "type": "Date", "optional": false, "field": "campaignstartdate", "description": "

    Start date of the campaign

    " }, { "group": "Phishing Field List (Success 200)", "type": "Date", "optional": false, "field": "campaignenddate", "description": "

    End date of the campaign

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "campaigntype", "description": "

    Type of the phishing campaign event

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "campaignstatus", "description": "

    Status of campaign

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "templatename", "description": "

    Name of the phishing template used in the campaign

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "templatesubject", "description": "

    Email subject of the phishing campaign template

    " }, { "group": "Phishing Field List (Success 200)", "type": "Boolean", "optional": false, "field": "assessmentisarchived", "description": "

    true/false field indicating if the assessment has been archived

    " }, { "group": "Phishing Field List (Success 200)", "type": "Dictionary", "optional": false, "field": "usertags", "description": "

    Customer-defined tags (also known as custom properties) associated with the user, and their corresponding values

    " }, { "group": "Phishing Field List (Success 200)", "type": "String", "optional": false, "field": "sso_id", "description": "

    Identifier provided by your single sign on system for the user.

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"data\": [\n {\n \"type\": \"fn_attack_events_v1\",\n \"id\": 1,\n \"attributes\": {\n \"userfirstname\": \"edf7397416359d57215307af49b4493a\",\n \"userlastname\": \"be4990aa4393c80dc49843107b3d6366\",\n \"useremailaddress\": \"39d70f2acca1b12b1da7503eff212228\",\n \"useractiveflag\": true,\n \"userdeleteddate\": null,\n \"senttimestamp\": \"2016-04-28T11:30:00\",\n \"eventtimestamp\": \"2016-04-28T11:50:28\",\n \"eventtype\": \"No Action\",\n \"campaignname\": \"SmishGuru Campaign 04-28-2016 LW\",\n \"autoenrollment\": false,\n \"campaignstartdate\": \"2016-04-28T01:00:00\",\n \"campaignenddate\": \"2016-05-05T01:00:00\",\n \"campaigntype\": \"Drive By\",\n \"campaignstatus\": \"Sent\",\n \"templatename\": \"Debit Card Deactivated\",\n \"templatesubject\": \"Unknown\",\n \"assessmentisarchived\": false,\n \"usertags\": null,\n \"sso_id\": null\n }\n }\n ],\n \"links\": {\n \"next\": \"/api/reporting/v0.1.0/phishing?page%5Bsize%5D=1&page%5Bnumber%5D=2\",\n \"self\": \"/api/reporting/v0.1.0/phishing?page%5Bsize%5D=1\",\n \"first\": \"/api/reporting/v0.1.0/phishing?page%5Bsize%5D=1\",\n \"last\": \"/api/reporting/v0.1.0/phishing?page%5Bsize%5D=1&page%5Bnumber%5D=120973\"\n },\n \"meta\": {\n \"count\": 120973\n },\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "json", "optional": false, "field": "401", "description": "

    Authorization Error, Missing Authorization Header, Expired Token

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "402", "description": "

    API Budget Empty

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "422", "description": "

    Invalid Token, Token Decode Error, Invalid Header

    " } ], "Error 5xx": [ { "group": "Error 5xx", "type": "json", "optional": false, "field": "500", "description": "

    Database Error, Internal Server Error

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"errors\": [\n {\n \"detail\": \"No API requests remaining in budget.\"\n \"source\": {},\n \"status\": 402\n \"title\": \"API Budget Empty\"\n }\n ],\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "filename": "reporting/documentation/latest/attackevent_framework_010.py", "groupTitle": "API Endpoints" }, { "type": "get", "url": "/training", "title": "Training", "version": "0.1.0", "name": "TrainingFunction", "group": "API_Endpoints", "description": "

    Returns information from training assignments. Contains functionality for a variety of filters. Please see the "Parameter" section of this documentation for more information on these filters.

    Reminder! In the below examples the results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. if you were setting up API endpoints for Training for your US platform environment, you would replace host.server:port with results.us.securityeducation.com. Typically customers platform accounts correspond to their geographic region. If you have any questions as to which environment your platform account is set up on, please ask your Platform Admin or Proofpoint Customer Success Manager or Customer Support.

    ", "examples": [ { "title": "Example usage: ", "content": "https://host.server:port/api/reporting/v0.1.0/training?filter[a]=b&page[number]=#&page[size]=#\nhttps://host.server:port/api/reporting/v0.1.0/training?page[number]=1&page[size]=15&filter[_assignmentstartdate_start]='2017-03-03'&filter[_assignmentstartdate_end]='2017-04-03'\nhttps://host.server:port/api/reporting/v0.1.0/training?filter[_assignmentduedate_start]='2017-03-03'&filter[_assignmentduedate_end]='2017-04-03'\nhttps://host.server:port/api/reporting/v0.1.0/training?filter[_includenotstarted]=TRUE&filter[_includedeletedusers]=FALSE&filter[_userassignmentstatus]=[In Progress, Completed]\nhttps://host.server:port/api/reporting/v0.1.0/training?filter[_attemptdate_start]='2016-05-05'&filter[_attemptdate_end]='2016-05-06'&filter[user_tag][Department]='Accounting'&user_tag_enable\nhttps://host.server:port/api/reporting/v0.1.0/training?filter[_assignmentname]=[1-17-17 C & YB Phishing - Userlist, 1-15-18 C & YB Phishing]&filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]", "type": "json" }, { "title": "cURL and Bash:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/training -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/training?page[number]=1&page[size]=15 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/training?page[number]=1&page[size]=15&filter[_assignmentstartdate_start]='2017-03-03'&filter[_assignmentstartdate_end]='2017-04-03' -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/training?filter[_assignmentduedate_start]='2017-03-03'&filter[_assignmentduedate_end]='2017-04-03' -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/training?filter[_includenotstarted]=TRUE&filter[_includedeletedusers]=FALSE&filter[_userassignmentstatus]=[In Progress, Completed] -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/training?filter[_attemptdate_start]='2016-05-05'&filter[_attemptdate_end]='2016-05-06'&filter[user_tag][Department]='Accounting'&user_tag_enable -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/training?filter[_assignmentname]=[1-17-17 C & YB Phishing - Userlist, 1-15-18 C & YB Phishing]&filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org] -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "cURL (Command Line):", "content": "set assignmentstart=2018-01-01\nset assignmentend=2018-03-01\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/training?filter[_assignmentstartdate_start]='%assignmentstart%'&filter[_assignmentstartdate_end]='%assignmentend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >training.txt\n\nset assignmentduestart=2019-03-03\nset assignmentdueend=2019-04-03\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/training?filter[_assignmentduedate_start]='%assignmentduestart%'&filter[_assignmentduedate_end]='%assignmentdueend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >training.txt\n\nset includenotstarted=TRUE\nset includedeletedusers=FALSE\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/training?filter[_includenotstarted]=%includenotstarted%&filter[_includedeletedusers]=%includedeletedusers%\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >training.txt\n\nset userassignmentstatus=Completed\nset includedeletedusers=FALSE\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/training?filter[_userassignmentstatus]=[%userassignmentstatus%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >training.txt\n\nset attemptstart=2016-05-05\nset attemptdateend=2016-05-06\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/training?&filter[_attemptdate_start]='%attemptstart%'&filter[_attemptdate_end]='%2016-05-06%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >training.txt", "type": "json" } ], "permission": [ { "name": "SuperAdmin" }, { "name": "or" }, { "name": "ReportingAdmin" }, { "name": "or" }, { "name": "ReportingApi" } ], "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Accept", "description": "

    Accepted content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "Content-Type", "description": "

    Returned content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "x-apikey-token", "description": "

    User's access token.

    " } ] } }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": true, "field": "page[number]", "description": "

    Select page number, if pagination desired. Pagination is enabled by default.

    " }, { "group": "Parameter", "type": "Number", "optional": true, "field": "page[size]", "description": "

    Select page size, if pagination desired. Default is 20 records.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_attemptdate_start]", "description": "

    Filter by the start date of the user’s attempt at taking a training module.
    Format: ?filter[_attemptdate_start]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select assignmentstartdate 2018-01-01 to 2018-01-31 and moduleattemptdate of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_attemptdate_end]", "description": "

    Filter by the end date of the user’s attempt at taking a training module.
    Format: ?filter[_attemptdate_end]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select assignmentstartdate 2018-01-01 to 2018-01-31 and moduleattemptdate of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentname]", "description": "

    Filter to select one or more assignment names. By default, all values are returned.
    Format: ?filter[_assignmentname]=[name]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentstartdate_start]", "description": "

    Filter by the start date of the training assignment.
    Format: ?filter[_assignmentstartdate_start]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select assignmentstartdate 2018-01-01 to 2018-01-31 and moduleattemptdate of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentstartdate_end]", "description": "

    Filter by the end date of the training assignment.
    Format: ?filter[_assignmentstartdate_end]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select assignmentstartdate 2018-01-01 to 2018-01-31 and moduleattemptdate of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentduedate_start]", "description": "

    Filter by the earliest due date of an assignment(s), for a range of dates. This filter may be paired with the [_assignmentduedate_end] to return a range of due dates. Note that this filter applies for both scheduled assignments and duration-based assignments.
    Format: ?filter[_assignmentduedate_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentduedate_end]", "description": "

    Filter by the latest due date of assignment(s), for range of dates. This filter may be paired with the [_assignmentduedate_start] to return a range of due dates. Note that this filter applies for both scheduled assignments and duration-based assignments.
    Format: ?filter[_assignmentduedate_start]='YYYY-MM-DD'.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includenotstarted]", "description": "

    Filter to include assignments that are not started. Default value is “TRUE”.
    Format: ?filter[_includenotstarted]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_useremailaddress]", "description": "

    Filter to select one or more specific email addresses. Email address takes an array of values.
    Format: ?filter[_useremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedusers]", "description": "

    Filter to include deleted users. Default value is “FALSE”.
    Format: ?filter[_includedeletedusers]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedassignments]", "description": "

    Filter to include deleted assignments. Default value is “FALSE”.
    Format: ?filter[_includedeletedassignments]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includeremovedusers]", "description": "

    Filter to include users that have been removed from an assignment. Default value is “FALSE”.
    Format: ?filter[_includeremovedusers]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_userassignmentstatus]", "description": "

    Filter to select one or more user assignment statuses. By default, all values are returned. Values include, “Not Started, In Progress, Completed” takes an array of values.
    Format: ?filter[_userassignmentstatus]=[statusname]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[user_tag]", "description": "

    The user_tag filter allows you to filter on a specific free value tag (formerly called “custom user properties.” For this filter, provide your tag (custom property)
    Format: "?filter[user_tag][tag_name]='tag_value'. There must be single quotes around your tag value, or you will get a query error.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includefreeplay]", "description": "

    Filter to include or exclude free play training data. Default value is “FALSE”.
    Format: ?filter[_includefreeplay]=TRUE/FALSE.
    Including free play training data requires the filter[_attemptdate_start] and filter[_attemptdate_end] to be set.
    When the filter[_includefreeplay] is set to 'TRUE', the following filters should not be used: filter[_assignmentstartdate_start], filter[_assignmentstartdate_end], filter[_includenotstarted], filter[_includedeletedassignments], filter[_includeremovedusers].

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "user_tag_enable", "description": "

    Add this query string parameter to cause the endpoint to return users' free value tags (formerly “custom user properties”) with each entry. Default value is “TRUE”. Values include “TRUE” and “FALSE”.

    " } ] } }, "success": { "fields": { "Training Field List (Success 200)": [ { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "id", "description": "

    Iterator count in result set; not a unique identifier

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "userfirstname", "description": "

    User first name

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "userlastname", "description": "

    User last name

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "useremailaddress", "description": "

    Email address

    " }, { "group": "Training Field List (Success 200)", "type": "Boolean", "optional": false, "field": "useractiveflag", "description": "

    true/false field indicating whether the user is active

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "userdeleteddate", "description": "

    Date the user was deleted

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "assignmentname", "description": "

    Assignment name

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentstartdate", "description": "

    Date the assignment was started (scheduled assignments) or assigned to the user (duration-based assignments)

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentdeleteddate", "description": "

    Date that the assignment was deleted

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentduedate", "description": "

    End date of the assignment (scheduled assignments) or due date for the user (duration-based assignment)

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "assignmentstatus", "description": "

    Status of the assignment

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "assignmentmethod", "description": "

    Indicates if the assignment is a schedule-based or duration-based assignment.
    Values include Duration and Scheduled.

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "duration", "description": "

    Duration of the assignment, in whole days. For scheduled assignments, the duration is the difference between the assignment start and assignment end dates. For duration-based assignments, the duration is based on the individual user's start and due dates.

    " }, { "group": "Training Field List (Success 200)", "type": "Boolean", "optional": false, "field": "isautoenroll", "description": "

    Specifies whether the assignment was the result of auto-enrollment

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "modulename_admin", "description": "

    Name of the module as seen by the Administrator

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "modulename_user", "description": "

    Name of the module as seen by the end user

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "moduletype", "description": "

    Specifies whether the module is Standard or Custom

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "moduleattemptdate", "description": "

    Date the module was attempted

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "modulelastaction", "description": "

    Date the user last took action (answered a question)

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "secondsinmoduleattempt", "description": "

    Duration, in seconds, the user spent answering the question; only applies to completed attempts

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "moduleattemptendstatus", "description": "

    User status for when the module was completed, e.g. Completed, Completed - Force

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "moduleattemptstatus", "description": "

    User status for the module, e.g. Not Started, In Progress, Completed

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "moduleattemptscore", "description": "

    User's raw score on the attempt; only applies to completed attempts

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "moduleattemptscorecorrect", "description": "

    Number of correct answers given by a user; only applies to completed attempts

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "moduleattemptscoreanswered", "description": "

    Number of questions answered by a user; only applies to completed attempts

    " }, { "group": "Training Field List (Success 200)", "type": "Boolean", "optional": false, "field": "assignmentdeleted", "description": "

    true/false field that indicates if the assignment has been deleted

    " }, { "group": "Training Field List (Success 200)", "type": "Boolean", "optional": false, "field": "userremovedfromassignment", "description": "

    true/false field that indicates if a user was removed from the assignment

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "userassignmentstatus", "description": "

    User assignment status, e.g. “Not Started, In Progress, Completed”

    " }, { "group": "Training Field List (Success 200)", "type": "Dictionary", "optional": false, "field": "usertags", "description": "

    Free value tags (user properties)

    " }, { "group": "Training Field List (Success 200)", "type": "Boolean", "optional": false, "field": "isfreeplay", "description": "

    true/false field that indicates if the module was free play

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "sso_id", "description": "

    Identifier provided by your single sign on system for the user.

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "forcecompleteddate", "description": "

    Date the user was force-completed for this module

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"meta\": {\n \"page_number\": \"1\",\n \"count\": 30,\n \"page_size\": \"1\"\n },\n \"jsonapi\": {\n \"version\": \"1.0\"\n },\n \"data\": [\n {\n \"type\": \"fn_training_events_v1\",\n \"id\": 1,\n \"attributes\": {\n \"userfirstname\": \"07d6265486b22356362387c5a098ba7d\",\n \"userlastname\": \"047cb004f3b1fbe7352688b3a1c1597c\",\n \"useremailaddress\": \"b014435258eb4a3bbf343fe054a4a28c\",\n \"useractiveflag\": true,\n \"userdeleteddate\": null,\n \"assignmentname\": \"Duration\",\n \"assignmentstartdate\": \"2017-02-02T00:00:00\",\n \"assignmentdeleteddate\": \"9999-01-01T00:00:00\",\n \"assignmentduedate\": \"2017-02-17T00:00:00\",\n \"assignmentstatus\": \"Not Started\",\n \"assignmentmethod\": \"Duration\",\n \"duration\": null,\n \"isautoenroll\": false,\n \"modulename_admin\": \"Safer Web Browsing\",\n \"modulename_user\": \"Safer Web Browsing\",\n \"moduletype\": \"Standard\",\n \"moduleattemptdate\": \"2017-02-02T00:00:00\",\n \"modulelastaction\": \"2017-02-02T00:00:00\",\n \"secondsinmoduleattempt\": null,\n \"moduleattemptendstatus\": null,\n \"moduleattemptstatus\": \"Not Started\",\n \"moduleattemptscore\": null,\n \"moduleattemptscorecorrect\": null,\n \"moduleattemptscoreanswered\": null,\n \"assignmentdeleted\": false,\n \"userremovedfromassignment\": false,\n \"userassignmentstatus\": \"Not Started\",\n \"usertags\": null,\n \"isfreeplay\": null,\n \"sso_id\": null,\n \"forcecompleteddate\": null\n }\n }\n ],\n \"links\": {\n \"last\": \"/api/reporting/v0.1.0/training?page%5Bnumber%5D=30&page%5Bsize%5D=1\",\n \"next\": \"/api/reporting/v0.1.0/training?page%5Bnumber%5D=2&page%5Bsize%5D=1\",\n \"first\": \"/api/reporting/v0.1.0/training?page%5Bsize%5D=1\",\n \"self\": \"/api/reporting/v0.1.0/training?page%5Bnumber%5D=1&page%5Bsize%5D=1\"\n }\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "json", "optional": false, "field": "401", "description": "

    Authorization Error, Missing Authorization Header, Expired Token

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "402", "description": "

    API Budget Empty

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "422", "description": "

    Invalid Token, Token Decode Error, Invalid Header

    " } ], "Error 5xx": [ { "group": "Error 5xx", "type": "json", "optional": false, "field": "500", "description": "

    Database Error, Internal Server Error

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"errors\": [\n {\n \"detail\": \"No API requests remaining in budget.\"\n \"source\": {},\n \"status\": 402\n \"title\": \"API Budget Empty\"\n }\n ],\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "filename": "reporting/documentation/latest/trainingevent_framework_010.py", "groupTitle": "API Endpoints" }, { "type": "get", "url": "/trainingenrollments", "title": "TrainingEnrollments", "version": "0.2.0", "name": "TrainingEnrollmentsFunction", "group": "API_Endpoints", "description": "

    Returns information from the User Enrollments report, which contains recently active training and user status for the past 365 days. Contains functionality for a variety of filters. Please see the \"Parameter\" section of this documentation for more information on these filters.

    Reminder! In the below examples the results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. if you were setting up API endpoints for Training Enrollments for your US platform environment, you would replace host.server:port with results.us.securityeducation.com. Typically customers platform accounts correspond to their geographic region. If you have any questions as to which environment your platform account is set up on, please ask your Platform Admin or Proofpoint Customer Success Manager or Customer Support.

    ", "examples": [ { "title": "Example usage: ", "content": "https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[a]=b&page[number]=#&page[size]=#\nhttps://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10\nhttps://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]\nhttps://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[user_tag][Department]='Production'&user_tag_enable", "type": "json" }, { "title": "cURL and Bash:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org] -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[user_tag][Department]='Production'&user_tag_enable -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "cURL (Command Line):", "content": "set page_size=10\nset page_number=5\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=%page_number%&page[size]=%page_size%\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt\n\nset useremailaddress=john.doe@example.org,jane.doe@example.org\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[%useremailaddress%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt\n\nset userproperty=Department\nset userpropertyvalue=Finance\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[user_tag]['%userproperty%']='%userpropertyvalue%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt", "type": "json" } ], "permission": [ { "name": "SuperAdmin" }, { "name": "or" }, { "name": "ReportingAdmin" }, { "name": "or" }, { "name": "ReportingApi" } ], "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Accept", "description": "

    Accepted content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "Content-Type", "description": "

    Returned content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "x-apikey-token", "description": "

    User's access token.

    " } ] } }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": true, "field": "page[number]", "description": "

    Select page number, if pagination desired. Pagination is enabled by default.

    " }, { "group": "Parameter", "type": "Number", "optional": true, "field": "page[size]", "description": "

    Select page size, if pagination desired. Default is 20 records.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_created_start]", "description": "

    Filter by the start date of the user’s attempt at taking a training module.
    Format: ?filter[_created_start]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select _created_start 2018-01-01 to 2018-01-31 and _created_start of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_created_end]", "description": "

    Filter by the end date of the user’s attempt at taking a training module.
    Format: ?filter[_created_end]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select _created_end 2018-01-01 to 2018-01-31 and _created_end of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentname]", "description": "

    Filter to select one or more assignment names. By default, all values are returned.
    Format: ?filter[_assignmentname]=[name]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_useremailaddress]", "description": "

    Filter to select one or more specific email addresses. Email address takes an array of values.
    Format: ?filter[_useremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_filter_status]", "description": "

    Filter to select one or more user assignment statuses. By default, all values are returned. Values include, “Not Started, In Progress, Completed” takes an array of values.
    Format: ?filter[_filter_status]=[statusname]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_userfirstname]", "description": "

    Filter to select one or more specific user first names. _userfirstname takes an array of values.
    Format: ?filter[_userfirstname]=[PersonFirst, OtherPersonFirst...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_userlastname]", "description": "

    Filter to select one or more specific user last name. _userlastname takes an array of values.
    Format: ?filter[_userlastname]=[PersonLast, OtherPersonLast...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_manageremailaddress]", "description": "

    Filter to select users with a matching manager email address. _manageremailaddress takes an array of values.
    Format: ?filter[_manageremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "user_tag_enable", "description": "

    Add this query string parameter to cause the endpoint to return users' free value tags (formerly “custom user properties”) with each entry. Default value is “TRUE”. Values include “TRUE” and “FALSE”.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedusers]", "description": "

    Filter to include deleted (i.e., archived) users. Use “TRUE” to include results for both archived and unarchived users. This should not include results where BTUM's have been soft deleted. Use “FALSE” to only include results for unarchived users. Not including the filter [_includedeletedusers]will result in a filter value of “FALSE”.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includeremovedenrollments]", "description": "

    Filter to include (“TRUE”) or exclude (“FALSE”) user enrollments that have been removed from an assignment. Default value is “FALSE”.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_enrollmentremovalreason]", "description": "

    Filter to include archived users (“User Archived”) or users removed from an assignment (“User Removed From Assignment”). Default value is “User Archived”.

    " } ] } }, "success": { "fields": { "Training Enrollments Field List (Success 200)": [ { "group": "Training Enrollments Field List (Success 200)", "type": "Number", "optional": false, "field": "id", "description": "

    Iterator count in result set; not a unique identifier

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "module_id", "description": "

    Hashed representation of the module ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "user_id", "description": "

    User ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "userfirstname", "description": "

    User's first name

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "userlastname", "description": "

    User's last name

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "useremailaddress", "description": "

    User's email address

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "assignment_id", "description": "

    Hashed representation of the assignment ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "assignmentname", "description": "

    Assignment Name

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentstartdate", "description": "

    Date the user was added to the assignment

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "module_enrollment_date", "description": "

    Duration based assignments: will show the date the user was added to the module\n\n Scheduled assignments: will show the day the assignment was started/created, even if the user was added later

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "module_due_date", "description": "

    Due date of the module

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "userassignment_completion_date_time", "description": "

    Date when the user completed the assignment

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "userassignmentstatus", "description": "

    Current status of the user's assignment. For example; Not Started

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentduedate", "description": "

    Date the assignment is due to be completed

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "sso_id", "description": "

    The user's SSO ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "assignment_type", "description": "

    Type of assignment. For example: Duration

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "assignment_creation", "description": "

    Date the assignment was created

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "manageremailaddress", "description": "

    Email address of the user's manager

    " }, { "group": "Training Field List (Success 200)", "type": "Boolean", "optional": false, "field": "is_auto_enroll", "description": "

    Flag indicating whether the user was auto-enrolled in the module

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "useractiveflag", "description": "

    Flag indicating whether the user is still active. (not deleted)

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "modulename_admin", "description": "

    Name of the module as it appears to admin users

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "modulename_user", "description": "

    Name of the module as it appears to users

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "module_attempt_status", "description": "

    Current status of the module. For example: Overdue - Not Started

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "usermodule_completion_date_time", "description": "

    Date the user completed the module

    " }, { "group": "Training Field List (Success 200)", "type": "Dictionary", "optional": false, "field": "usertags", "description": "

    Free value tags (user properties)

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "enrollmentremovaldate", "description": "

    Date the enrollment was soft deleted.

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "enrollmentremovalreason", "description": "

    Add this string parameter to cause the endpoint to return data that includes the reason the enrollment was removed based on the BtumDeletedReasons. Values include (format is deletionReason,description):\n\n\nASSIGNMENT_DELETED,assignment deleted\nMODULE_REMOVED_FROM_ASSIGNMENT,module removed from assignment\nUSER_REMOVED_FROM_ASSIGNMENT,user removed from assignment\nUSER_DELETED,user deleted from company

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"jsonapi\": {\n \"version\": \"1.0\"\n },\n \"links\": {\n \"self\": \"/api/reporting/v0.1.0/trainingenrollments?filter%5B_assignmentname%5D=%5Btest+duration%5D&filter%5B_created_start%5D=2020-01-01&page%5Bsize%5D=5&page%5Bnumber%5D=1&filter%5B_data_privacy%5D=FALSE&filter%5B_userlastname%5D=%5BActiveUserBravoLast%5D&filter%5B_userfirstname%5D=%5BActiveUserBravo%2C+ActiveUserCharlie%5D&filter%5B_created_end%5D=2020-12-01&filter%5B_filter_status%5D=%5BNot+Started%5D&filter%5B_useremailaddress%5D=%5Bactiveuserbravo%40qlikbot.wombatqa.com%5D\"\n },\n \"data\": [\n {\n \"type\": \"fn_training_enrollments_v1\",\n \"id\": 1,\n \"attributes\": {\n \"module_id\": \"fe48f81255b084a53615518da688905a\",\n \"user_id\": \"59137434\",\n \"userfirstname\": \"ActiveUserBravo\",\n \"userlastname\": \"ActiveUserBravoLast\",\n \"useremailaddress\": \"activeuserbravo@qlikbot.wombatqa.com\",\n \"assignment_id\": \"739e7ff51389e2eb31fee93b5e9e6f6e\",\n \"assignmentname\": \"test duration\",\n \"assignmentstartdate\": \"2020-06-04T00:00:00\",\n \"module_enrollment_date\": \"2020-06-04T00:00:00\",\n \"module_due_date\": \"2020-06-14T00:00:00\",\n \"userassignment_completion_date_time\": null,\n \"userassignmentstatus\": \"Not Started\",\n \"assignmentduedate\": \"2020-06-14T00:00:00\",\n \"sso_id\": null,\n \"assignment_type\": \"Duration\",\n \"assignment_creation\": \"2020-06-02T14:51:53\",\n \"manageremailaddress\": null,\n \"is_auto_enroll\": false,\n \"useractiveflag\": true,\n \"modulename_admin\": \"Avoiding Dangerous Links 20.10.2\",\n \"modulename_user\": \"Avoiding Dangerous Links\",\n \"module_attempt_status\": \"Overdue - Not Started\",\n \"usermodule_completion_date_time\": null,\n \"usertags\": null\n }\n }\n ],\n \"meta\": {\n \"page_size\": \"5\",\n \"page_number\": \"1\",\n \"count\": 1\n }\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "json", "optional": false, "field": "401", "description": "

    Authorization Error, Missing Authorization Header, Expired Token

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "402", "description": "

    API Budget Empty

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "422", "description": "

    Invalid Token, Token Decode Error, Invalid Header

    " } ], "Error 5xx": [ { "group": "Error 5xx", "type": "json", "optional": false, "field": "500", "description": "

    Database Error, Internal Server Error

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"errors\": [\n {\n \"detail\": \"No API requests remaining in budget.\"\n \"source\": {},\n \"status\": 402\n \"title\": \"API Budget Empty\"\n }\n ],\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "filename": "reporting/documentation/latest/training_enrollments_framework_010.py", "groupTitle": "API Endpoints" }, { "type": "get", "url": "/trainingenrollments", "title": "TrainingEnrollments", "version": "0.1.0", "name": "TrainingEnrollmentsFunction", "group": "API_Endpoints", "description": "

    Returns information from the (beta) User Enrollments report, which contains recently active assignments and user status for the past 365 days. Contains functionality for a variety of filters. Please see the \"Parameter\" section of this documentation for more information on these filters.

    ", "examples": [ { "title": "Example usage: ", "content": "https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[a]=b&page[number]=#&page[size]=#\nhttps://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10\nhttps://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]\nhttps://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[user_tag][Department]='Production'&user_tag_enable", "type": "json" }, { "title": "cURL and Bash:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org] -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[user_tag][Department]='Production'&user_tag_enable -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "cURL (Command Line):", "content": "set page_size=10\nset page_number=5\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=%page_number%&page[size]=%page_size%\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt\n\nset useremailaddress=john.doe@example.org,jane.doe@example.org\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[%useremailaddress%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt\n\nset userproperty=Department\nset userpropertyvalue=Finance\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[user_tag]['%userproperty%']='%userpropertyvalue%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt", "type": "json" } ], "permission": [ { "name": "SuperAdmin" }, { "name": "or" }, { "name": "ReportingAdmin" }, { "name": "or" }, { "name": "ReportingApi" } ], "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Accept", "description": "

    Accepted content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "Content-Type", "description": "

    Returned content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "x-apikey-token", "description": "

    User's access token.

    " } ] } }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": true, "field": "page[number]", "description": "

    Select page number, if pagination desired. Pagination is enabled by default.

    " }, { "group": "Parameter", "type": "Number", "optional": true, "field": "page[size]", "description": "

    Select page size, if pagination desired. Default is 20 records.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_created_start]", "description": "

    Filter by the start date of the user’s attempt at taking a training module.
    Format: ?filter[_created_start]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select _created_start 2018-01-01 to 2018-01-31 and _created_start of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_created_end]", "description": "

    Filter by the end date of the user’s attempt at taking a training module.
    Format: ?filter[_created_end]='YYYY-MM-DD'. Pairs of date filters are treated as "OR" operations. For example, if you select _created_end 2018-01-01 to 2018-01-31 and _created_end of 2018-06-01 to 2018-06-01, the API will return records for both sets.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_assignmentname]", "description": "

    Filter to select one or more assignment names. By default, all values are returned.
    Format: ?filter[_assignmentname]=[name]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_useremailaddress]", "description": "

    Filter to select one or more specific email addresses. Email address takes an array of values.
    Format: ?filter[_useremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_filter_status]", "description": "

    Filter to select one or more user assignment statuses. By default, all values are returned. Values include, “Not Started, In Progress, Completed” takes an array of values.
    Format: ?filter[_filter_status]=[statusname]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_userfirstname]", "description": "

    Filter to select one or more specific user first names. _userfirstname takes an array of values.
    Format: ?filter[_userfirstname]=[PersonFirst, OtherPersonFirst...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_userlastname]", "description": "

    Filter to select one or more specific user last name. _userlastname takes an array of values.
    Format: ?filter[_userlastname]=[PersonLast, OtherPersonLast...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_manageremailaddress]", "description": "

    Filter to select users with a matching manager email address. _manageremailaddress takes an array of values.
    Format: ?filter[_manageremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "user_tag_enable", "description": "

    Add this query string parameter to cause the endpoint to return users' free value tags (formerly “custom user properties”) with each entry. Default value is “TRUE”. Values include “TRUE” and “FALSE”.

    " } ] } }, "success": { "fields": { "Training Enrollments Field List (Success 200)": [ { "group": "Training Enrollments Field List (Success 200)", "type": "Number", "optional": false, "field": "id", "description": "

    Iterator count in result set; not a unique identifier

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "module_id", "description": "

    Hashed representation of the module ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "user_id", "description": "

    User ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "userfirstname", "description": "

    User's first name

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "userlastname", "description": "

    User's last name

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "useremailaddress", "description": "

    User's email address

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "assignment_id", "description": "

    Hashed representation of the assignment ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "assignmentname", "description": "

    Assignment Name

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentstartdate", "description": "

    Date the user was added to the assignment

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "module_enrollment_date", "description": "

    Date the user was added to the module

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "module_due_date", "description": "

    Due date of the module

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "userassignment_completion_date_time", "description": "

    Date when the user completed the assignment

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Number", "optional": false, "field": "userassignmentstatus", "description": "

    Current status of the user's assignment. For example; Not Started

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "assignmentduedate", "description": "

    Date the assignment is due to be completed

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "sso_id", "description": "

    The user's SSO ID

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "assignment_type", "description": "

    Type of assignment. For example: Duration

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "Date", "optional": false, "field": "assignment_creation", "description": "

    Date the assignment was created

    " }, { "group": "Training Enrollments Field List (Success 200)", "type": "String", "optional": false, "field": "manageremailaddress", "description": "

    Email address of the user's manager

    " }, { "group": "Training Field List (Success 200)", "type": "Boolean", "optional": false, "field": "is_auto_enroll", "description": "

    Flag indicating whether the user was auto-enrolled in the module

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "useractiveflag", "description": "

    Flag indicating whether the user is still active. (not deleted)

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "modulename_admin", "description": "

    Name of the module as it appears to admin users

    " }, { "group": "Training Field List (Success 200)", "type": "String", "optional": false, "field": "modulename_user", "description": "

    Name of the module as it appears to users

    " }, { "group": "Training Field List (Success 200)", "type": "Number", "optional": false, "field": "module_attempt_status", "description": "

    Current status of the module. For example: Overdue - Not Started

    " }, { "group": "Training Field List (Success 200)", "type": "Date", "optional": false, "field": "usermodule_completion_date_time", "description": "

    Date the user completed the module

    " }, { "group": "Training Field List (Success 200)", "type": "Dictionary", "optional": false, "field": "usertags", "description": "

    Free value tags (user properties)

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"jsonapi\": {\n \"version\": \"1.0\"\n },\n \"links\": {\n \"self\": \"/api/reporting/v0.1.0/trainingenrollments?filter%5B_assignmentname%5D=%5Btest+duration%5D&filter%5B_created_start%5D=2020-01-01&page%5Bsize%5D=5&page%5Bnumber%5D=1&filter%5B_data_privacy%5D=FALSE&filter%5B_userlastname%5D=%5BActiveUserBravoLast%5D&filter%5B_userfirstname%5D=%5BActiveUserBravo%2C+ActiveUserCharlie%5D&filter%5B_created_end%5D=2020-12-01&filter%5B_filter_status%5D=%5BNot+Started%5D&filter%5B_useremailaddress%5D=%5Bactiveuserbravo%40qlikbot.wombatqa.com%5D\"\n },\n \"data\": [\n {\n \"type\": \"fn_training_enrollments_v1\",\n \"id\": 1,\n \"attributes\": {\n \"module_id\": \"fe48f81255b084a53615518da688905a\",\n \"user_id\": \"59137434\",\n \"userfirstname\": \"ActiveUserBravo\",\n \"userlastname\": \"ActiveUserBravoLast\",\n \"useremailaddress\": \"activeuserbravo@qlikbot.wombatqa.com\",\n \"assignment_id\": \"739e7ff51389e2eb31fee93b5e9e6f6e\",\n \"assignmentname\": \"test duration\",\n \"assignmentstartdate\": \"2020-06-04T00:00:00\",\n \"module_enrollment_date\": \"2020-06-04T00:00:00\",\n \"module_due_date\": \"2020-06-14T00:00:00\",\n \"userassignment_completion_date_time\": null,\n \"userassignmentstatus\": \"Not Started\",\n \"assignmentduedate\": \"2020-06-14T00:00:00\",\n \"sso_id\": null,\n \"assignment_type\": \"Duration\",\n \"assignment_creation\": \"2020-06-02T14:51:53\",\n \"manageremailaddress\": null,\n \"is_auto_enroll\": false,\n \"useractiveflag\": true,\n \"modulename_admin\": \"Avoiding Dangerous Links 20.10.2\",\n \"modulename_user\": \"Avoiding Dangerous Links\",\n \"module_attempt_status\": \"Overdue - Not Started\",\n \"usermodule_completion_date_time\": null,\n \"usertags\": null\n }\n }\n ],\n \"meta\": {\n \"page_size\": \"5\",\n \"page_number\": \"1\",\n \"count\": 1\n }\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "json", "optional": false, "field": "401", "description": "

    Authorization Error, Missing Authorization Header, Expired Token

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "402", "description": "

    API Budget Empty

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "422", "description": "

    Invalid Token, Token Decode Error, Invalid Header

    " } ], "Error 5xx": [ { "group": "Error 5xx", "type": "json", "optional": false, "field": "500", "description": "

    Database Error, Internal Server Error

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"errors\": [\n {\n \"detail\": \"No API requests remaining in budget.\"\n \"source\": {},\n \"status\": 402\n \"title\": \"API Budget Empty\"\n }\n ],\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "filename": "reporting/documentation/latest/training_enrollments_framework_010.py", "groupTitle": "API Endpoints" }, { "type": "get", "url": "/users", "title": "Users", "version": "0.1.0", "name": "UsersFunction", "group": "API_Endpoints", "description": "

    Returns user information. Contains functionality for an email filter, and enabling / disabling of users' tag information. Please see the "Parameter" section of this documentation for more information on these filters.

    Reminder! In the below examples the results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. if you were setting up API endpoints for Users for your US platform environment, you would replace host.server:port with results.us.securityeducation.com. Typically customers platform accounts correspond to their geographic region. If you have any questions as to which environment your platform account is set up on, please ask your Platform Admin or Proofpoint Customer Success Manager or Customer Support.

    ", "examples": [ { "title": "Example usage: ", "content": "https://host.server:port/api/reporting/v0.1.0/users?filter[a]=b&page[number]=#&page[size]=#\nhttps://host.server:port/api/reporting/v0.1.0/users?filter[_includedeletedusers]=TRUE&page[number]=4&page[size]=10\nhttps://host.server:port/api/reporting/v0.1.0/users?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org]\nhttps://host.server:port/api/reporting/v0.1.0/users?filter[user_tag][Department]='Production'&user_tag_enable", "type": "json" }, { "title": "cURL and Bash:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/users -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/users?page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/users?filter[_includedeletedusers]=TRUE&page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/users?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org] -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/users?filter[user_tag][Department]='Production'&user_tag_enable -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "cURL (Command Line):", "content": "set page_size=10\nset page_number=5\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/users?page[number]=%page_number%&page[size]=%page_size%\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >users.txt\n\nset userproperty=Department\nset userpropertyvalue=Finance\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/users?filter[user_tag]['%userproperty%']='%userpropertyvalue%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >users.txt\n\nset useremailaddress=john.doe@example.org,jane.doe@example.org\nset includedeletedusers=TRUE\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/users?filter[_useremailaddress]=[%useremailaddress%]&filter[_includedeletedusers]=%includedeletedusers%\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >users.txt", "type": "json" } ], "permission": [ { "name": "SuperAdmin" }, { "name": "or" }, { "name": "ReportingAdmin" }, { "name": "or" }, { "name": "ReportingApi" } ], "header": { "fields": { "Header": [ { "group": "Header", "type": "String", "optional": false, "field": "Accept", "description": "

    Accepted content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "Content-Type", "description": "

    Returned content type.

    " }, { "group": "Header", "type": "String", "optional": false, "field": "x-apikey-token", "description": "

    User's access token.

    " } ] } }, "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": true, "field": "page[number]", "description": "

    Select page number, if pagination desired. Pagination is enabled by default.

    " }, { "group": "Parameter", "type": "Number", "optional": true, "field": "page[size]", "description": "

    Select page size, if pagination desired. Default is 20 records.

    " }, { "group": "Parameter", "type": "Array", "optional": true, "field": "filter[_useremailaddress]", "description": "

    Filter to select one or more specific email addresses. Email address takes an array of values.
    Format: ?filter[_useremailaddress]=[a@b.com, b@c.com...]

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[_includedeletedusers]", "description": "

    Filter to include deleted users. Default value is “FALSE”.
    Format: ?filter[_includedeletedusers]=TRUE/FALSE.

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "filter[user_tag]", "description": "

    The user_tag filter allows you to filter on a specific free value tag (formerly called “custom user properties.” For this filter, provide your tag (custom property)
    Format: "?filter[user_tag][tag_name]='tag_value'. There must be single quotes around your tag value, or you will get a query error. Using this filter automatically enables user tags (see user_tag_enable, below).

    " }, { "group": "Parameter", "type": "String", "optional": true, "field": "user_tag_enable", "description": "

    Add this query string parameter to cause the endpoint to return users' free value tags (formerly “custom user properties”) with each entry. Default value is “TRUE”. Values include “TRUE” and “FALSE”.

    " } ] } }, "success": { "fields": { "Users Field List (Success 200)": [ { "group": "Users Field List (Success 200)", "type": "Number", "optional": false, "field": "id", "description": "

    Iterator count in result set; not a unique identifier

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "useremailaddress", "description": "

    User email address

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "userfirstname", "description": "

    User first name

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "userlastname", "description": "

    User last name

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "userlocale", "description": "

    Locale specific to the user (language and location)

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "usertimezone", "description": "

    User time zone

    " }, { "group": "Users Field List (Success 200)", "type": "Boolean", "optional": false, "field": "useractiveflag", "description": "

    true/false field indicating whether the user is active

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "userdeleteddaate", "description": "

    Date the user was deleted

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "datalastupdated", "description": "

    Timestamp of when the data was last refreshed in the data warehouse

    " }, { "group": "Users Field List (Success 200)", "type": "Dictionary", "optional": false, "field": "usertags", "description": "

    Free value tags (user properties)

    " }, { "group": "Users Field List (Success 200)", "type": "String", "optional": false, "field": "sso_id", "description": "

    Identifier provided by your single sign on system for the user.

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"data\": [\n {\n \"type\": \"fn_user_v1\",\n \"id\": 1,\n \"attributes\": {\n \"useremailaddress\": \"email_0972@wombank.com\",\n \"userfirstname\": \"Firs0972st\",\n \"userlastname\": \"Las0972st\",\n \"userlocale\": \"default\",\n \"usertimezone\": \"America/New_York\",\n \"useractiveflag\": true,\n \"userdeleteddate\":\"2017-01-01\",\n \"datalastupdated\":\"2017-01-01T08:00:09-04:00\",\n \"usertags\": null,\n \"sso_id\": null\n }\n }\n ],\n \"meta\": {\n \"page_size\": 20,\n \"page_number\": 1,\n \"count\": 1\n },\n \"links\": {\n \"self\": \"/api/reporting/v0.1.0/users?filter=%7B%22useremailaddress_in%22%3A%5B%22email_0972%40wombank.com%22%5D%7D\"\n },\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "json", "optional": false, "field": "401", "description": "

    Authorization Error, Missing Authorization Header, Expired Token

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "402", "description": "

    API Budget Empty

    " }, { "group": "Error 4xx", "type": "json", "optional": false, "field": "422", "description": "

    Invalid Token, Token Decode Error, Invalid Header

    " } ], "Error 5xx": [ { "group": "Error 5xx", "type": "json", "optional": false, "field": "500", "description": "

    Database Error, Internal Server Error

    " } ] }, "examples": [ { "title": "Example response:", "content": "{\n \"errors\": [\n {\n \"detail\": \"No API requests remaining in budget.\"\n \"source\": {},\n \"status\": 402\n \"title\": \"API Budget Empty\"\n }\n ],\n \"jsonapi\": {\n \"version\": \"1.0\"\n }\n}", "type": "json" } ] }, "filename": "reporting/documentation/latest/user_framework_010.py", "groupTitle": "API Endpoints" }, { "type": "post", "title": "Using cURL and Bash", "version": "0.1.0", "name": "ExampleUsageBash", "group": "Code_Samples", "description": "

    You have many options to perform integration to the reporting API. A relatively basic and easy way to test your tokens, connection to the API, and to retrieve basic data using Bash and cURL.

    Bash

    Bash is a Unix shell and command language that provides a command line console. Some versions of Windows (including Windows 10 and Windows Server 2019) include Windows Subsystem for Linux (WSL), which is a compatibility layer allows you to run native Linux command-line tools, including Bash. Apple and Linux machines typically contain a Bash shell out of the box.

    cURL

    cURL is a command line tool for sending or retrieving data or files by using URL syntax.

    Open a command line editor, or your preferred development environment.

    Sample

    #!/bin/bash 
    curl -X GET https://results_api_domain/api/reporting/v0.1.0/endpoint -g --header \"x-apikey-token: $token\"| json_pp

    results_api_domain The results API domain is specific to our three regional environments. For the US it is results.us.securityeducation.com, EU results.eu.securityeducation.com, and AP results.ap.securityeducation.com
    endpoint is one of the provided endpoints, e.g. CyberStrength, PhishAlarm, Phishing, Training, and Users


    #!/bin/bash Standard bash opening
    curl -X GET https://results_api_domain/api/reporting/v0.1.0/phishing -g --header \"x-apikey-token: $token\"| json_pp This line makes the call to the API to retrieve data (in JSON format), and parses into a more human-readable format.
    For pure JSON, remove | json_pp
    ", "examples": [ { "title": "Example usage by endpoint:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/phishing -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "CyberStrength:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/cyberstrength -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "PhishAlarm:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/phishalarm -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "Phishing:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/phishing -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "Training:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/training -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "Users:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/users -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" }, { "title": "TrainingEnrollments:", "content": "curl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=4&page[size]=10 -g \\\n--header \"x-apikey-token: $token\"| json_pp\n\ncurl -X GET https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[john.doe@example.org, jane.doe@example.org] -g \\\n--header \"x-apikey-token: $token\"| json_pp", "type": "json" } ], "filename": "reporting/documentation/latest/curl_usage.py", "groupTitle": "Code Samples" }, { "type": "post", "title": "Using cURL in Command Line Script", "version": "0.1.0", "name": "ExampleUsageCmd", "group": "Code_Samples", "description": "

    Using a command prompt, you can use the following samples as a basis for returning data from each of the endpoints. These samples are also in the documentation for each endpoint above.

    In all examples, results_api_domain should be replaced with your region's results domain.

    Sample

    The following will store filter information in environment variables (e.g. assignmentstart), then sends the request to the endpoint (e.g. cyberstrength) and stores the result in a file called cyberstrength.txt:

    set assignmentstart=2018-01-01 
    set assignmentend
    =2018-03-01
    curl
    -X GET ^ \"https://results_api_domain/api/reporting/v0.1.0/cyberstrength?filter[_assignmentstartdate_start]='%assignmentstart%'&filter[_assignmentstartdate_end]='%assignmentend%'\" -g^
    -H \"Accept: application/json\" ^
    -H \"x-apikey-token: %accesstoken%\" ^
    -H \"Content-Type: application/json\" >cyberstrength.txt
    ", "examples": [ { "title": "Example usage by endpoint:", "content": "curl -X GET ^\n\"https://results_api_domain/api/reporting/v0.1.0/cyberstrength\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >cyberstrength.txt", "type": "json" }, { "title": "CyberStrength:", "content": "set assignmentstart=2018-01-01\nset assignmentend=2018-03-01\ncurl -X GET ^\n\"https://results_api_domain/api/reporting/v0.1.0/cyberstrength?filter[_assignmentstartdate_start]='%assignmentstart%'&filter[_assignmentstartdate_end]='%assignmentend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >cyberstrength.txt", "type": "json" }, { "title": "PhishAlarm:", "content": "set reportedstart=2018-01-01\nset reportedend=2018-03-01\ncurl -X GET ^\n\"https://results_api_domain/api/reporting/v0.1.0/phishalarm?filter[_reporteddate_start]='%reportedstart%'&filter[_reporteddate_end]='%reportedend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishalarm.txt", "type": "json" }, { "title": "Phishing:", "content": "set campaignstart=2018-01-01\nset campaignend=2018-03-01\ncurl -X GET ^\n\"https://results_api_domain/api/reporting/v0.1.0/phishing?filter[_campaignstartdate_start]='%campaignstart%'&filter[_campaignstartdate_end]='%campaignend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >phishing.txt", "type": "json" }, { "title": "Training:", "content": "set assignmentstart=2018-01-01\nset assignmentend=2018-03-01\ncurl -X GET ^\n\"https://results_api_domain/api/reporting/v0.1.0/training?filter[_assignmentstartdate_start]='%assignmentstart%'&filter[_assignmentstartdate_end]='%assignmentend%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >training.txt", "type": "json" }, { "title": "Users:", "content": "set userproperty=Department\nset userpropertyvalue=Finance\ncurl -X GET ^\n\"https://results_api_domain/api/reporting/v0.1.0/users?filter[user_tag]['%userproperty%']='%userpropertyvalue%'\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >users.txt", "type": "json" }, { "title": "Training Enrollments:", "content": "set page_size=10\nset page_number=5\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?page[number]=%page_number%&page[size]=%page_size%\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt\n\nset useremailaddress=john.doe@example.org,jane.doe@example.org\ncurl -X GET ^\n\"https://host.server:port/api/reporting/v0.1.0/trainingenrollments?filter[_useremailaddress]=[%useremailaddress%]\" -g^\n-H \"Accept: application/json\" ^\n-H \"x-apikey-token: %accesstoken%\" ^\n-H \"Content-Type: application/json\" >trainingenrollments.txt", "type": "json" } ], "filename": "reporting/documentation/latest/curl_usage_cmd.py", "groupTitle": "Code Samples" } ]