Skip to main content

Attributes

How to generate a list of attributes

To generate a list of attributes use the following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes

In this way a list of attributes is obtained. The excerpt below shows the "Filing Structure" attribute with its related elements:

    {
"id": 2,
"name": "filingstructure",
"displayName": "Filing Structure",
"fixedSystemAttribute": false,
"isTargetRelation": false,
"refName": "FILINGSTRUCTURE",
"type": 1,
"relationshipType": 0,
"related": [
{
"id": 9,
"name": "zone",
"displayName": "Zone",
"fixedSystemAttribute": false,
"isTargetRelation": true,
"refName": "ZONE",
"type": 1,
"relationshipType": 1,
"related": null,
"relatedProperties": null,
"statusEnabled": false
},
{
"id": 5,
"name": "protocol",
"displayName": "Protocol",
"fixedSystemAttribute": false,
"isTargetRelation": false,
"refName": "PROTOCOL",
"type": 1,
"relationshipType": 4,
"related": null,
"relatedProperties": null,
"statusEnabled": false
}
],
"relatedProperties": null,
"statusEnabled": false
}

How to view attributes by name or id

You can view specific attributes by appending their name or id to the following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/{name}

or

https://{client}-api.phlextmf.com/attributes/v5/attributes/{id}

How to view the Filing Structure attribute

In the section How to generate a list of attributes it is shown that Filing Structure's name is "filingstructure" while its id is "2".

With that in mind you can make the following GET requests:

https://{client}-api.phlextmf.com/attributes/v5/attributes/filingstructure

or

https://{client}-api.phlextmf.com/attributes/v5/attributes/2

In both cases, the response is as follows:

{
"id": 2,
"name": "filingstructure",
"displayName": "Filing Structure",
"fixedSystemAttribute": false,
"isTargetRelation": false,
"refName": "FILINGSTRUCTURE",
"type": 1,
"relationshipType": 0,
"related": [
{
"id": 9,
"name": "zone",
"displayName": "Zone",
"fixedSystemAttribute": false,
"isTargetRelation": true,
"refName": "ZONE",
"type": 1,
"relationshipType": 1,
"related": null,
"relatedProperties": null,
"statusEnabled": false
},
{
"id": 5,
"name": "protocol",
"displayName": "Protocol",
"fixedSystemAttribute": false,
"isTargetRelation": false,
"refName": "PROTOCOL",
"type": 1,
"relationshipType": 4,
"related": null,
"relatedProperties": null,
"statusEnabled": false
}
],
"relatedProperties": null,
"statusEnabled": false
}

How to view values for attributes

Each attribute may have certain values assigned to it. You can display values for attributes in different ways.

How to view all values for the selected attribute

To view all values for the selected attribute use the following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/{name}/values

For example:

https://{client}-api.phlextmf.com/attributes/v5/attributes/artifact/values

This will return the list of all values for the "artifact" attribute, see the excerpt of the response below:

        {
"id": 110000001252,
"attributeId": 11,
"attributeDisplayName": "Artifact",
"attributeRefName": "ARTIFACT",
"attributeFieldName": "artifact",
"value": "01.01.01 Trial Master File Plan",
"sortOrder": null,
"description": "1",
"helpContent": "To describe how records for the trial will be managed and stored during and after the trial, including study-specific processes and documentation for archiving and destruction. To include TMF filing structure to be used. May include TMF content list, filing structure and chain of custody records. Artifact can include any evidence of plan execution including, but not limited to: plan, reports, checklists, etc.",
"processHelpContent": "Version date",
"processHelpLink": null,
"status": 1,
"isLocked": false,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
},
{
"id": 110000001253,
"attributeId": 11,
"attributeDisplayName": "Artifact",
"attributeRefName": "ARTIFACT",
"attributeFieldName": "artifact",
"value": "01.01.02 Trial Management Plan",
"sortOrder": null,
"description": "2",
"helpContent": "To describe overall strategy for timelines, management and conduct of the trial and typically makes reference to other artifacts. Artifact can include details on contingency plan covering details for site start up planning.",
"processHelpContent": "Version date",
"processHelpLink": null,
"status": 1,
"isLocked": false,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
}
note

Please note the difference between the following values:

  • "id": 110000001252 - this id belongs to the value "01.01.01 Trial Master File Plan"
  • "attributeId": 11 - this id belongs to the attribute "Artifact"

How to view specific values for an attribute

You can also search for a particular value for a given attribute:

See the following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/{name}/values/{value}

or

https://{client}-api.phlextmf.com/attributes/v5/attributes/{name}/values/{id}

How to view a value for the artifact attribute

You can search for a specific value, for example "01.01.02 Trial Management Plan" for an "artifact" attribute:

https://{client}-api.phlextmf.com/attributes/v5/attributes/artifact/values/01.01.02 Trial Management Plan

The response:

{
"id": 110000001253,
"attributeId": 11,
"attributeDisplayName": "Artifact",
"attributeRefName": "ARTIFACT",
"attributeFieldName": "artifact",
"value": "01.01.02 Trial Management Plan",
"sortOrder": null,
"description": "2",
"helpContent": "To describe overall strategy for timelines, management and conduct of the trial and typically makes reference to other artifacts. Artifact can include details on contingency plan covering details for site start up planning.",
"processHelpContent": "Version date",
"processHelpLink": null,
"status": 1,
"isLocked": null,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
}

Alternatively, instead of the name of the value "01.01.02 Trial Management Plan", you can use its id "110000001253" if need be:

https://{client}-api.phlextmf.com/attributes/v5/attributes/artifact/values/110000001253

How to check a specific protocol value

The attribute "protocol" can have various values, for example, "TestAutomationProtocol". In this case you would use the following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/protocol/values/TestAutomationProtocol

The response is as follows:

{
"id": 110000000968,
"attributeId": 5,
"attributeDisplayName": "Protocol",
"attributeRefName": "PROTOCOL",
"attributeFieldName": "protocol",
"value": "TestAutomationProtocol",
"sortOrder": null,
"description": "",
"helpContent": "",
"processHelpContent": "",
"processHelpLink": "",
"status": 1,
"isLocked": null,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
}

How to create a new value for an attribute

To create an attribute value you may need to check certain data related to the attribute. In this example a new Vendor will be added.

First, you need to check the id for the attribute "Vendor". You may do so via the following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/vendor

The response:

{
"id": 17,
"name": "vendor",
"displayName": "Vendor",
"fixedSystemAttribute": false,
"isTargetRelation": false,
"refName": "VENDOR",
"type": 1,
"relationshipType": 0,
"related": [],
"relatedProperties": null,
"statusEnabled": false
}

As per the response the id for the "Vendor" attribute is "17".

If you know the status number you can create your new value by making the following POST request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/Vendor/values

and including the request body:

{
"attributeId": "17",
"value": "New Vendor",
"status": 1
}

The "value" must be the Vendor's name and the "status" must be specified. If you do not know the statuses' values, you can quickly check these by leaving the status out of your request body, i.e.:

{
"attributeId": "17",
"value": "New Vendor"
}

In this case, 400 BAD REQUEST will be returned and the message of the response will supply the information about the missing statuses numbers and their related names:

{
"ErrorType": "BAD_REQUEST",
"Message": "Invalid or no status supplied: Active: 1, Closed: 2, Locked: 3, Confidential:4, Pending: 5, Retired: 6, ImportInProgress: 7"
...
}

Once you populate the body of the response and make a call, you obtain the 201 CREATED response:

{
"id": 900000000149,
"attributeId": 17,
"attributeDisplayName": "Vendor",
"attributeRefName": "VENDOR",
"attributeFieldName": "vendor",
"value": "New Vendor",
"sortOrder": null,
"description": "",
"helpContent": null,
"processHelpContent": null,
"processHelpLink": null,
"status": 1,
"isLocked": null,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
}

How to update an attribute value

You can amend the attribute values. In this example, the value "New Vendor" with the status "Active" will be amended to "Second Vendor" with the status "Closed".

First, you need to check the data related to the Vendor you wish to amend, it can be done via the following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/vendor/values/New Vendor

Once you have the relevant data, you can create the PUT request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/Vendor/values/900000000149

where "900000000149" is the value id for "New Vendor".

Then, include the request body:

{ 
"attributeId": "17",
"value": "Second Vendor",
"status": 2
}

Note the following :

The response should be 200 OK.

The following GET request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/Vendor/values/Second Vendor

demonstrates that the changes have been made successfully:

{
"id": 900000000149,
"attributeId": 17,
"attributeDisplayName": "Vendor",
"attributeRefName": "VENDOR",
"attributeFieldName": "vendor",
"value": "Second Vendor",
"sortOrder": null,
"description": "",
"helpContent": null,
"processHelpContent": null,
"processHelpLink": null,
"status": 2,
"isLocked": null,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
}

How to delete an attribute value

You can delete an attribute value via the following DELETE request:

https://{client}-api.phlextmf.com/attributes/v5/attributes/Vendor/values/{id}

In this example the "Second Vendor" with the id "900000000149" will be deleted:

https://{client}-api.phlextmf.com/attributes/v5/attributes/Vendor/values/900000000149

The response is 200 OK:

{
"id": 900000000149,
"attributeId": 17,
"attributeDisplayName": "Vendor",
"attributeRefName": "VENDOR",
"attributeFieldName": "vendor",
"value": "Second Vendor",
"sortOrder": null,
"description": "",
"helpContent": null,
"processHelpContent": null,
"processHelpLink": null,
"status": 2,
"isLocked": null,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
}

Documents

You can view and manage the documents and their metadata.

How to view documents for a selected protocol

You can use the following GET request to obtain the information about the documents filed under the protocol 'TestAutomationProtocol':

https://{client}-api.phlextmf.com/documents/v5/documents?filter=protocol in ('TestAutomationProtocol')

How to look for the documents submitted to the system for the particular protocol on the particular day

See Filters.

How to obtain a list of documents with the specific status for a given protocol

See Filters.

How to generate an audit trail for a document

To generate the audit trail for a document you need to use the following GET request:

https://{client}-api.phlextmf.com/documents/v5/documents/{id}?embed=audits,links,queries

To generate the audit trail for the document with the id "900000000366" you can make the following GET request:

https://{client}-api.phlextmf.com/documents/v5/documents/900000000366?embed=audits,links,queries

After sending the request, you should get the 200 OK response. You will find the relevant information under the "audits" section, see the excerpt below:

        {
"auditDate": "2024-10-21T20:38:23.921931",
"user": "Document User",
"actionDetail": "User '[email protected]' has created document,documentid: '900000000366'."
},
{
"auditDate": "2024-10-21T20:38:23.938",
"user": "System Admin ([email protected])",
"actionDetail": "AddedByUserEmail changed from 0 to [email protected].\napproval changed from Blank to Approval Not Required.\ncountry changed from Blank to N/A.\ndeleted changed from Blank to N.\ndocumentvisibility changed from Blank to Public.\nFileName changed from blank to OAK-900000000366-D-.\nfilingstructure changed from Blank to TMF Reference Model V3.3.\norigin changed from Blank to UPLOAD.\nProcessingStatusName changed from New to Verifying File.\nProcessPriority changed from 0 to 10.\nproduct changed from Blank to TestProduct.\nprotocol changed from Blank to TestAutomationProtocol.\nsite changed from Blank to N/A.\nsourcetype changed from Blank to DocModule.\nStorageEngineId changed from 0 to 110000000001.\nsupportingdocument changed from Blank to Primary Document.\ntransmitter changed from Blank to [email protected].\nvendor changed from Blank to No Vendor Available.\nwetink changed from Blank to N.\n"
}

Users

How to add a user

Provided that you have adequate permissions, you can create a new user account.

A user is added via the following POST request:

https://{client}-api.phlextmf.com/security/v5/users

The body of the request must be populated, for example:

{    
"userId": 0,
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]",
"password": "",
"expiryDate": "2026-11-06",
"expiryDays": 0,
"companyId": 1,
"locationId": 719,
"primaryRoleId": 110000020147,
"isDisabled": false,
"changePasswordAtLogin": true,
"sendUserEmail": false,
"userAttributes": [
0
]
}
note
  • expiryDate - if you do not wish to set up an expiry date for the account, you can delete this value.
  • password - if you set up a password and the response to your request is the following error: 400 BAD REQUEST
{
"errorType": "INVALID_REQUEST",
"message": "Password must be empty for the current configuration.",
"exception": null
}

then you must delete the password value as the configuration does not allow you to install one. In such case the user will receive an email with the request to reset their password.

  • companyId - you can use the following GET request to obtain the list of companies with their ids:
https://{client}-api.phlextmf.com/security/v5/companies

and you may also append filters to narrow down the results, for example:

https://{client}-api.phlextmf.com/security/v5/companies?filter=name in ('Phlexglobal')
  • locationId - use the following GET request:
https://{client}-api.phlextmf.com//attributes/v5/attributes/address/values/{name}

For example:

https://{client}-api.phlextmf.com//attributes/v5/attributes/address/values/UK

The response indicates that the id for the UK location is, in this case, "719":

{
"id": 719,
"attributeId": 27,
"attributeDisplayName": "Address",
"attributeRefName": "ADDRESS",
"attributeFieldName": "address",
"value": "UK",
"sortOrder": null,
"description": "",
"helpContent": "",
"processHelpContent": "",
"processHelpLink": null,
"status": 1,
"isLocked": null,
"relationModels": null,
"relatedProperties": null,
"attributeValueLocks": null
}
  • primaryRoleId - must be specified upon the creation of the user account. Make the following POST request:
https://{client}-api.phlextmf.com/security/v5/authorization/roles/list

include, for example, the following body in your request:

{
"right": "string",
"scope": {
"type": "string",
"id": 0
},
"check": 0
}

You should obtain the list of user roles with their assigned Ids.

Alternatively, use the following GET request:

https://{client}-api.phlextmf.com/security/v5/roles
note

Both primary and secondary roles will be displayed in the response. You must select one of the primary roles.

  • isDisabled - type in "true" or "false" depending on whether you wish the user to be disabled or enabled.
  • changePasswordAtLogin - type in "true" or "false" to either enforce the user to change the password upon login or not.
  • sendUserEmail - type in "true" or "false" which determines whether the user receives a system-generated welcome email.

How to check a user id and data

You must know the user id and data to be able to manage the user account and amend their permissions, roles or data if needed.

Such data may be found via the GET request, for example:

https://{client}-api.phlextmf.com/security/v5/users?filter=firstname in ('John')

or

https://{client}-api.phlextmf.com/security/v5/users?filter=email eq ('[email protected]')

The response is:

{
"userId": 900000000492,
"firstName": "John",
"lastName": "Smith",
"email": "[email protected]",
"companyId": 1,
"company": "Phlexglobal",
"location": "UK",
"locationId": 719,
"isLocked": false,
"isDisabled": false,
"changePasswordAtLogin": false,
"expiryDate": "2026-11-06T00:00:00",
"expiryDays": 0,
"primaryRoleId": 110000020147,
"primaryRole": "System Master Administrator",
"lastLoginDate": "2024-11-20T12:19:02.401648",
"userAttributes": [
{
"attributeId": 13,
"attributeName": "Transmitter",
"attributeValueId": 900000000915,
"value": "[email protected]"
}
]
}

How to edit a user

To edit a user make the following PUT request:

https://{client}-api.phlextmf.com/security/v5/users

To obtain the relevant user data for the request body, see How to check a user id and data.

Next, amend the data as necessary. In this example the last name "Smith" is to be changed to "Smith-Blake".

{
"user":
{
"userId": 900000000492,
"firstName": "John",
"lastName": "Smith-Blake",
"email": "[email protected]",
"companyId": 1,
"company": "Phlexglobal",
"location": "UK",
"locationId": 719,
"isLocked": false,
"isDisabled": false,
"changePasswordAtLogin": false,
"expiryDate": "2026-11-06T00:00:00",
"expiryDays": 0,
"primaryRoleId": 110000020146,
"primaryRole": "Phlex Master Administrator",
"lastLoginDate": "2024-11-20T12:19:02.401648",
"userAttributes": [13]
}
}

How to check the roles available for users

To check which roles can be assigned to the users and which ids they are associated with make the following GET request:

https://{client}-api.phlextmf.com/security/v5/roles

As per the excerpt of the response below, you also obtain the information on whether the role is primary or secondary.

        {
"id": 110000020096,
"roleName": "Phlex Super User",
"roleTypeName": "Security",
"isPrimary": "Primary"
},
{
"id": 110000020097,
"roleName": "Phlex QC Op",
"roleTypeName": "Internal Ops",
"isPrimary": "Secondary"
}
tip

to locate a particular role you may append the following filter to your request:

?filter=rolename eq ('Phlex Admin User')

How to change a user's primary role

To change a user's primary role use the following PUT request:

https://{client}-api.phlextmf.com/security/v5/users

Populate the request body with the relevant user data (see How to check a user id and data).

In the example below the role "Phlex Master Administartor" is to be changed into "Phlex Admin User" which entails amending two values:

  • "primaryRoleId" - enter the id of the primary role you wish the user to have
  • "primaryRole" - enter the name of the primary role you wish the user to have
{
"user":
{
"userId": 900000000492,
"firstName": "John",
"lastName": "Smith-Blake",
"email": "[email protected]",
"companyId": 1,
"company": "Phlexglobal",
"location": "UK",
"locationId": 719,
"isLocked": false,
"isDisabled": false,
"changePasswordAtLogin": false,
"expiryDate": "2026-11-06T00:00:00",
"expiryDays": 0,
"primaryRoleId": 110000043005,
"primaryRole": "Phlex Admin User",
"lastLoginDate": "2024-11-20T12:19:02.401648",
"userAttributes": [13]
}
}

How to create a user's secondary role

To create the secondary role for a user make the following POST request. You need to use the user id, in the example below, it's "900000000133"

https://{client}-api.dev.phlextmf.net/security/v5/users/900000000133/roles

In the body of your request you need to use:

{
"userId": 900000000133,
"roleId": 110000010124,
"attributeValueIds": [
110000000968
]
}

See the response below:

{
"userId": 900000000133,
"roleDataSource": [
{
"roleTypeName": "Validation",
"roleName": "QC",
"roleId": 110000010124,
"attributeValues": [
{
"id": 110000000968,
"name": "TestAutomationProtocol"
}
]
}
]
}

The user now has the secondary role of QC and can act on the documents filed under the protocol "TestAutomationProtocol" whose id is "110000000968".

How to change attribute values for the secondary role

You can specify to which protocols the secondary role pertains. To do so make the following PUT request:

https://{client}-api.dev.phlextmf.net/security/v5/users/{userid}/roles/{id}

For example:

https://{client}-api.dev.phlextmf.net/security/v5/users/900000000133/roles/110000010124

this request includes the user id (900000000133) and id of the secondary role (110000010124) which is assigned to them.

You must add a body in which you specify the current user id and secondary role id. Then, select the attribute values you wish to assign to the user's current secondary role. You can assign protocol ids. In the example below all available protocols have been assigned to the role as in this case value "-1" for "attributeValueIds" is equivalent to "All":

{
"userId": 110000010124,
"roleId": 110000020166,
"attributeValueIds": [
-1
]
}

How to clone a user

To clone a user make the following POST request:

https://{client}-api.dev.phlextmf.net/security/v5/users/{userid}/clone

For example:

https://{client}-api.dev.phlextmf.net/security/v5/users/900000000133/clone

you also need to include the request body.

 {
"FirstName": "Ann Cloned",
"LastName": "House",
"Email": "[email protected]",
"Password": "",
"UserAttributes":[13]
}
note

You can set up a password if your configuration renders that possible.

Please see the response below:

{
"userId": 900000000137,
"firstName": "Ann Cloned",
"lastName": "House",
"email": "[email protected]",
"companyId": 1,
"company": "Phlexglobal",
"location": "UK",
"locationId": 719,
"isLocked": false,
"isDisabled": false,
"changePasswordAtLogin": true,
"expiryDate": "2026-11-06T00:00:00",
"expiryDays": 0,
"primaryRoleId": 110000020147,
"primaryRole": "System Master Administrator",
"lastLoginDate": "1900-01-01T00:00:00",
"userAttributes": [
{
"attributeId": 13,
"attributeName": "Transmitter",
"attributeValueId": 900000000148,
"value": "[email protected]"
}
]
}

How to delete a user's secondary role

To delete the role you need to use the DELETE request. Specify the user id (e.g., 900000000133) and their current secondary role (e.g., 110000010124)

https://{client}-api.dev.phlextmf.net/security/v5/users/900000000133/roles/110000010124

How to change a user's secondary role

To change a user's secondary role you need to delete it first (see How to delete a user secondary role) and proceed to assign the relevant secondary role (see How to create a user's secondary role).

Reports

How to generate a list of reports

To obtain the list of reports, make the following GET request:

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports

See the excerpt of the response:

        {
"Id": 110000000005,
"Name": "User Login",
"Description": "Table showing count of log-ins of selected users over a period",
"ReportType": 1,
"CategoryText": "User Activity",
"XTitle": null,
"YTitle": null,
"Filters": null
},
{
"Id": 110000000013,
"Name": "Inventory",
"Description": "Table listing number of documents per artifact",
"ReportType": 1,
"CategoryText": "TMF Content",
"XTitle": null,
"YTitle": null,
"Filters": null
}

How to generate a list of available filtering fields for a selected report in the system

To view the values which you can use to filter the reports in the system use the following GET request:

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports/{id}/filters

The example below shows filtering values for the "User Login" report whose id is in this case "110000000005".

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports/110000000005/filters

The response is as follows:

{
"Data": [
{
"Id": 110000004031,
"AttributeId": 0,
"Name": "user",
"FilterType": 1,
"IsRequired": 0,
"SortOrder": 20
},
{
"Id": 110000004032,
"AttributeId": 0,
"Name": "company",
"FilterType": 1,
"IsRequired": 0,
"SortOrder": 30
},
{
"Id": 110000004030,
"AttributeId": 0,
"Name": "date",
"FilterType": 3,
"IsRequired": 1,
"SortOrder": 10
}
]
}

How to view the list of available values for the mandatory report fields

To view these values, you need to use the following GET request:

https://{client}-api.dev.phlextmf.net/filters/{id}/list

In the example below the report "Quality Review Count" with the id "110004477001" can be checked via the GET request:

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports/filters/110004477001/list

As this report has one mandatory filed in the system which is "Protocol", all the available values for this field are displayed:

    "Data": [
{
"Value": 900000000128,
"Name": "Binder1-41891"
},
{
"Value": 900000000130,
"Name": "Binder2-41891"
},
{
"Value": 900000000132,
"Name": "NonBinder-41891"
},
{
"Value": 6,
"Name": "OpsTestProtocol"
},
{
"Value": 900000000137,
"Name": "Prdpxv24170"
},
{
"Value": 900000000143,
"Name": "RFT Protocol 25890"
},
{
"Value": 900000000107,
"Name": "Test Protocol VS"
},
{
"Value": 110000000968,
"Name": "TestAutomationProtocol"
},
{
"Value": 110000000045,
"Name": "TestCQCProtocol"
},
{
"Value": 7,
"Name": "TestModuleProtocol"
},
{
"Value": 8,
"Name": "TestProtocol1"
},
{
"Value": 9,
"Name": "TestProtocol2"
},
{
"Value": 900000000087,
"Name": "TestProtocol26517"
},
{
"Value": 110000000440,
"Name": "TestSaaSProtocol"
},
{
"Value": 11,
"Name": "TestUATProtocol"
}
]
}

How to execute a report

To execute the report you need to use the following POST request:

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports/execute/{id}

with the request body such as, for example:

{
"Filter": "",
"OrderBy": "",
"Offset": 0,
"Limit": 100
}

How to execute the User Login report

In this example the "User Login" report will be run. You need to start the following POST request where "110000000005" is the report id:

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports/execute/110000000001

and include the following body in your request:

{
"Filter": "user in ('[email protected]')",
"OrderBy": "ReportName",
"Offset": 0,
"Limit": 100
}

You will obtain the number of user logins with their date.

How to execute the Document Status by Protocol report

In this example the "Document Status by Protocol" report will be run for "TestAutomationProtocol".

The POST request must be made:

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports/execute/{id}

with the body of the request:

{
"Filter": "string",
"OrderBy": "string",
"Offset": 0,
"Limit": 0
}

First, you need to check the id of the "Document Status by Protocol" report, see How to generate a list of reports.

Once you have it you can made the POST request:

https://{client}-api.dev.phlextmf.net/Reports/v5/Reports/execute/110004485001

and include the request body specifying the id of the protocol for which you wish to run the report:

{
"Filter": "protocol in ('110000000968')",
"OrderBy": "ReportName",
"Offset": 0,
"Limit": 100
}

The response details how many documents in this protocol are currently at the given status:

{
"Data": {
"Series": [
{
"id": 1,
"name": "Missing",
"format": null,
"data": [
91
]
},
{
"id": 3,
"name": "In Process",
"format": null,
"data": [
2
]
},
{
"id": 4,
"name": "In QC",
"format": null,
"data": [
0
]
},
{
"id": 5,
"name": "Final",
"format": null,
"data": [
7
]
},
{
"id": 6,
"name": "QC",
"format": null,
"data": [
0
]
}
],
"xAxis": [
"TestAutomationProtocol"
],
"yAxis": "%"
},
"Paging": {
"Offset": 0,
"Limit": 100,
"TotalItemCount": 1
}
}