Extension to the standard interface to add ”Resources” implementation - available only on PRDS!
If the ”ID's” columns are used then the corresponding columns for name or value would be ignored.
Columns that can be used as filters:
Organization
ResourceType_ID
Value
Name
Active
IsAvailable
Actions can be done:
list
full/list
create
update
delete
URL: https://socrate-test.rcs-rds.ro/prds/rest/resource/list/4/?startRow=0&endRow=100&accessToken={access_token}&Value=testing
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Definiri RCS&RDS (*)",
"Organization_ID": 1001352,
"ResourceType_ID": 1000002,
"Value": "testing",
"Name": "testing",
"Active": true,
"IsAvailable": true,
"Created": "2020-02-28 11:54:24+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-04-07 17:32:30+0300",
"UpdatedBy": "SuperUser",
"Resource_ID": 1009916,
"Description": "alalalala",
"AD_User_ID": 1044001,
"C_Location_ID": 1169491,
"ChargeableQty": 123,
"M_Warehouse_ID": 1004052,
"Site3G_DataStart": "2020-02-01 00:00:00+0200",
"Site3G_DataStop": "2020-02-01 00:00:00+0200",
"Site3G_DelimitationPoint": "Joasă Tensiune",
"Site3G_Importance": "Site de agregare POC 1 (MSC/BSC)",
"Site3G_Latitudine": 123,
"Site3G_Longitudine": 123,
"Site3G_MeterType": null,
"Site3G_Objective": "Macro",
"Site3G_StructureType": "Site-uri instalate la sol",
"Site3G_SubType": "Instalate Outdoor",
"Site3G_TechType": null,
"RDS_VehicleIDNo": null,
"RDS_EmployeeOrg": 1000003,
"ResourceGroup": "O"
}
],
"totalRows": 1
}
URL: https://socrate-test.rcs-rds.ro/prds/rest/resource/full/list/4/?startRow=0&endRow=100&accessToken={access_token}&Value=testing
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Definiri RCS&RDS (*)",
"Organization_ID": 1001352,
"ResourceType_ID": 1000002,
"Value": "testing",
"Name": "testing",
"Active": true,
"IsAvailable": true,
"Created": "2020-02-28 11:54:24+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-04-07 17:32:30+0300",
"UpdatedBy": "SuperUser",
"Resource_ID": 1009916,
"Description": "alalalala",
"AD_User_ID": 1044001,
"C_Location_ID": 1169491,
"ChargeableQty": 123,
"M_Warehouse_ID": 1004052,
"Site3G_DataStart": "2020-02-01 00:00:00+0200",
"Site3G_DataStop": "2020-02-01 00:00:00+0200",
"Site3G_DelimitationPoint": "Joasă Tensiune",
"Site3G_Importance": "Site de agregare POC 1 (MSC/BSC)",
"Site3G_Latitudine": 123,
"Site3G_Longitudine": 123,
"Site3G_MeterType": null,
"Site3G_Objective": "Macro",
"Site3G_StructureType": "Site-uri instalate la sol",
"Site3G_SubType": "Instalate Outdoor",
"Site3G_TechType": null,
"RDS_VehicleIDNo": null,
"RDS_EmployeeOrg": 1000003,
"ResourceGroup": "O",
"PowerVendors": [
{
"Organization": "RCS&RDS SA",
"Created": "2020-02-28 11:54:41+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-02-28 11:54:41+0200",
"UpdatedBy": "PETROV VLADIMIR",
"Active": true,
"BPartnerIssuer": "NIss",
"BPartner_ID": 1081833,
"PaymentTerm_ID": 1004918,
"PaymentModeOfEnergyInvoices": "PRNB"
}
],
"PowerSuppliers": [
{
"Organization": "*",
"Created": "2020-02-28 11:54:50+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-02-28 11:54:50+0200",
"UpdatedBy": "PETROV VLADIMIR",
"Active": true,
"NameConsumption": "aaa",
"NrATR": "aaa",
"NrVendorContract": "aaa",
"SupplierType": "E",
"BPartner_ID": 1081833
}
],
"Counters": [
{
"Organization": "RCS&RDS SA",
"Created": "2020-02-28 11:55:06+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-02-28 11:55:36+0200",
"UpdatedBy": "PETROV VLADIMIR",
"Active": true,
"GLN": "asdasd",
"SerNo": "aaaaa",
"C_Activity_ID": 1000001,
"M_Product_ID": 1077142,
"C_CounterType_ID": 1000001,
"RDS_BPartner_ID": 1081833,
"RDS_Project_ID": 1000093,
"Multiplier": 1,
"BPartner_ID": null,
"Project_ID": null,
"Contract_ID": null
}
],
"Charges": [
{
"Organization": "RCS&RDS SA",
"Created": "2020-02-28 11:55:13+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-04-03 18:52:22+0300",
"UpdatedBy": "SuperUser",
"Active": true,
"RDS_AdjustedComponent": 0,
"RDS_GreenCertificates": 0,
"RDS_NegotiatedComponent": 0,
"RDS_PartOfCogeneration": 5,
"RDS_Taxes": 5
}
]
}
],
"totalRows": 1
}
When the resource is created, also a product is created with the same value and name.
URL: https://socrate-test.rcs-rds.ro/prds/rest/resource/create/4?startRow=0&endRow=100&accessToken={access_token}
Method: POST
Return: resource value for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Definiri RCS&RDS (*)",
"Organization_ID": 1001352,
"ResourceType_ID": 1000002,
"Value": "testing123",
"Name": "testing123",
"Active": true,
"IsAvailable": true,
"Created": "2020-02-28 11:54:24+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-04-07 10:57:59+0300",
"UpdatedBy": "SuperUser",
"Resource_ID": 1009916,
"Description": "test",
"AD_User_ID": 1044001,
"C_Location_ID": 1169491,
"ChargeableQty": 123,
"M_Warehouse_ID": 1004052,
"Site3G_DataStart": "2020-02-01 00:00:00+0200",
"Site3G_DataStop": "2020-02-01 00:00:00+0200",
"Site3G_DelimitationPoint": "Joasă Tensiune",
"Site3G_Importance": "Site de agregare POC 1 (MSC/BSC)",
"Site3G_Latitudine": 123,
"Site3G_Longitudine": 123,
"Site3G_MeterType": null,
"Site3G_Objective": "Macro",
"Site3G_StructureType": "Site-uri instalate la sol",
"Site3G_SubType": "Instalate Outdoor",
"Site3G_TechType": null,
"RDS_VehicleIDNo": null,
"RDS_EmployeeOrg": 1000003,
"ResourceGroup": "O"
}
URL: https://socrate-test.rcs-rds.ro/prds/rest/resource/update/4?startRow=0&endRow=100&accessToken={access_token}&Value=testing
Method: POST
Params could be Value or Resource_ID
Return: product value for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Definiri RCS&RDS (*)",
"Organization_ID": 1001352,
"ResourceType_ID": 1000002,
"Value": "testing",
"Name": "testing",
"Active": true,
"IsAvailable": true,
"Created": "2020-02-28 11:54:24+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-04-07 10:57:59+0300",
"UpdatedBy": "SuperUser",
"Resource_ID": 1009916,
"Description": "alalalala",
"AD_User_ID": 1044001,
"C_Location_ID": 1169491,
"ChargeableQty": 123,
"M_Warehouse_ID": 1004052,
"Site3G_DataStart": "2020-02-01 00:00:00+0200",
"Site3G_DataStop": "2020-02-01 00:00:00+0200",
"Site3G_DelimitationPoint": "Joasă Tensiune",
"Site3G_Importance": "Site de agregare POC 1 (MSC/BSC)",
"Site3G_Latitudine": 123,
"Site3G_Longitudine": 123,
"Site3G_MeterType": null,
"Site3G_Objective": "Macro",
"Site3G_StructureType": "Site-uri instalate la sol",
"Site3G_SubType": "Instalate Outdoor",
"Site3G_TechType": null,
"RDS_VehicleIDNo": null,
"RDS_EmployeeOrg": 1000003,
"ResourceGroup": "O"
}
For the Resource to be deleted, must delete first the M_Product created with value = testing123
URL: https://socrate-test.rcs-rds.ro/prds/rest/resource/delete/4?startRow=0&endRow=100&accessToken={access_token}&Value=testing123
Method: POST
Params could be Value or Resource_ID
Return: 'Deleted' for success or error message (start with "ERROR: ")
{
"Organization": "Definiri RCS&RDS (*)",
"Organization_ID": 1001352,
"ResourceType_ID": 1000002,
"Value": "testing123",
"Name": "testing123",
"Active": true,
"IsAvailable": true,
"Created": "2020-02-28 11:54:24+0200",
"CreatedBy": "PETROV VLADIMIR",
"Updated": "2020-04-07 10:57:59+0300",
"UpdatedBy": "SuperUser",
"Resource_ID": 1009916,
"Description": "test",
"AD_User_ID": 1044001,
"C_Location_ID": 1169491,
"ChargeableQty": 123,
"M_Warehouse_ID": 1004052,
"Site3G_DataStart": "2020-02-01 00:00:00+0200",
"Site3G_DataStop": "2020-02-01 00:00:00+0200",
"Site3G_DelimitationPoint": "Joasă Tensiune",
"Site3G_Importance": "Site de agregare POC 1 (MSC/BSC)",
"Site3G_Latitudine": 123,
"Site3G_Longitudine": 123,
"Site3G_MeterType": null,
"Site3G_Objective": "Macro",
"Site3G_StructureType": "Site-uri instalate la sol",
"Site3G_SubType": "Instalate Outdoor",
"Site3G_TechType": null,
"RDS_VehicleIDNo": null,
"RDS_EmployeeOrg": 1000003,
"ResourceGroup": "O"
}