Skip to main content

A customer asks, I would like to know whether its a possibility to use the REST API the PSO web app uses (i.e. https://host/IFSPSOWorkbench/api/ResourceScheduling/UpdateActivity)

Because I am unable to see the usage for the swagger mentioned apis. So, is this a possibility?

The API you are looking for is below.

https://MyHost/IFSSchedulingRESTfulGateway/api/v1/scheduling/data?
dataType=SCHEDULE

 

Scheduling Update you are posting should be in line with Scheduling Schema (Available in documentations)


Hi @Ann Degroat, here is an example from my Postman collection:

Endpoint:

{{baseUrl}}/api/v1/scheduling/data?dataType=SCHEDULE&waitForCompletion=true&includeOutput=true&compressed=false&submitCompressed=false

 

Body:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dsScheduleData xmlns="http://360Scheduling.com/Schema/dsScheduleData.xsd">
<Input_Reference>
<id>Commit_Activity</id>
<datetime>2022-03-01T07:00:00+01:00</datetime>
<input_type>CHANGE</input_type>
<dataset_id>LXDEMO</dataset_id>
<account_id>smfsm6e1fsm14</account_id>
</Input_Reference>
<Activity_Status>
<activity_id>A001-TUE</activity_id>
<status_id>30</status_id>
<resource_id>R10</resource_id>
<date_time_stamp>2022-03-01T07:00:00+01:00</date_time_stamp>
<date_time_status>2022-03-01T07:00:00+01:00</date_time_status>
</Activity_Status>
</dsScheduleData>

For details of the XML, check out the Scheduling Schema guide.


Another question, I am unable to find in the schema doc on how i could fetch a list of the resources & activities. I see that the workbench calls the api "https://host/IFSPSOWorkbench/api/ResourceScheduling/GetCompleteSchedule"

is there something similar available via the IFSSchedulingRESTfulGateway?


Try to use a broadcast, here’s an example. First request the broadcast:

{{baseUrl}}/api/v1/scheduling/data?dataType=SCHEDULE&waitForCompletion=true&includeOutput=true&compressed=false&submitCompressed=false

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dsScheduleData xmlns="http://360Scheduling.com/Schema/dsScheduleData.xsd">
<Input_Reference>
<id>BCAST</id>
<datetime>2022-03-01T07:00:00+01:00</datetime>
<input_type>CHANGE</input_type>
<dataset_id>LXDEMO</dataset_id>
<account_id>YOUR ACCOUNT ID</account_id>
</Input_Reference>
<Broadcast>
<id>0002</id>
<description>Test Broadcast</description>
<broadcast_type_id>POLLING</broadcast_type_id>
<plan_type>COMPLETE</plan_type>
<active>true</active>
<minimum_plan_quality>98</minimum_plan_quality>
<minimum_step_interval>1</minimum_step_interval>
<once_only>true</once_only>
<allocation_type>1</allocation_type>
<input_reference_id>BCAST</input_reference_id>
</Broadcast>
<Broadcast_Parameter>
<broadcast_id>0002</broadcast_id>
<parameter_name>data_tables</parameter_name>
<parameter_value>Resources</parameter_value>
</Broadcast_Parameter>
</dsScheduleData>

LXDEMO Is the name of my dataset, 0002 is just an ID.

Then poll the broadcast result:

{{baseUrl}}/api/v1/scheduling/data?datasetId=LXDEMO&includeOutput=true&broadcastId=0002

 

Polling is just for testing, have a look at the documentation to see what other options you have with broadcasts.

Just fyi - there is also a reporting API on the roadmap (no promise!), which would allow you to get activities and resources directly. Watch out for the PSO release notes...


@Ann Degroat - The new Reporting API was released with 6.12, worth checking out the documentation: IFS Cloud 23R2/ PSO 6.12 Documentation | IFS Community This would also give you activities and resources.


@Alexander Heinze thanks for providing the information about the APIs.

Regarding the broadcast, i assume it can be only used once (create a broadcast request), or can i create a broadcast request and request the data more than once with the same broadcastId?

Also, is there a way we can check the payload that PSO receives either from the REST API or when FSM sends? When a post call has been made we receives an internal id and also how we can check this. (Environments are hosted on Azure (IFS managed cloud))

 

Unfortunately the PSO 6.12 documentation we are unable to see.


@Alexander Heinze thanks for providing the information about the APIs.

Regarding the broadcast, i assume it can be only used once (create a broadcast request), or can i create a broadcast request and request the data more than once with the same broadcastId?

Also, is there a way we can check the payload that PSO receives either from the REST API or when FSM sends? When a post call has been made we receives an internal id and also how we can check this. (Environments are hosted on Azure (IFS managed cloud))

 

Unfortunately the PSO 6.12 documentation we are unable to see.

With POLLING you can request the result only once, but 1) you can instead of “0002” request another one “0003” or 2) just poll without a broadcast ID.

This method is used to retrieve output from the scheduling system. A broadcast id can be included in the request, in which case the gateway will return the output for this broadcast. The broadcast type on the Broadcast row in the input data must be 'POLLING'. The data returned will be the data requested in the broadcast. If no broadcast id is provided then the Gateway will return the latest complete plan from the QMS. In this case there are options to return only the input data, only the output data, or both.


Reply