Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    PTP Service Definitions Management RESTful Web Services

    The following operations can be performed using the Connectivity Services Director Precision Time Protocol (PTP) Service Definitions Management RESTful Web Services.

    Get a PTP Service Definition By Service Definition ID

    This request is used to retrieve the details of a particular PTP service definition, based on the service definition ID.

    URI

    /api/space/nsas/timing-ptp/service-management/
    service-definitions/<serdef-id>

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-definition+xml

    Produces

    Collects the details of a specific PTP service definition.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<TimingServiceDefinition>
    			<Common>
    				<Name>TimingSD</Name>
    				<Comments>TestForSd</Comments>
    			</Common>
    			<ClockType editable="true">Ordinary Clock</ClockType>
    			<UnicastMode editable="true">Yes</UnicastMode>
    			<Transport editable="true">IPv4</Transport>
    			<IPV4DSCP editable="true">46</IPV4DSCP>
    			<IPV4TTL editable="true">16</IPV4TTL>
    			<GrandMasterConfigurationDefinition
    				xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PTPServiceGrandMasterParameterDefType">
    				<Profile editable="false">Telecom Profile</Profile>
    				<TwoStep editable="false">No</TwoStep>
    				<Priority1 editable="false">0</Priority1>
    				<Priority2 editable="true">0</Priority2>
    				<AnnounceRate editable="true">1 Packet/8 sec</AnnounceRate>
    				<DelayRequestRate editable="true">64 Packets/sec
    				</DelayRequestRate>
    				<AnnounceReceiptTimeout editable="true">2
    				</AnnounceReceiptTimeout>
    				<ContinuousARP editable="true">false</ContinuousARP>
    				<SignalingConfiguration>
    					<Signaling editable="true">true</Signaling>
    					<DelayRate>
    						<min editable="true">1 Packet/sec</min>
    						<max editable="true">64 Packets/sec</max>
    					</DelayRate>
    					<AnnounceRate>
    						<min editable="true">1 Packet/sec</min>
    						<max editable="true">1 Packet/8 sec</max>
    					</AnnounceRate>
    					<SyncRate>
    						<min editable="true">1 Packet/sec</min>
    						<max editable="true">64 Packets/sec</max>
    					</SyncRate>
    				</SignalingConfiguration>
    				<TimingConfiguration xsi:type="PTPServiceGrandMasterTimingParameterDefType">
    					<IRIG-B editable="true">B000</IRIG-B>
    					<Frequency editable="true">5 MHZ</Frequency>
    					<DelayCompensation editable="true">0</DelayCompensation>
    					<SyncSourcePriority editable="true">GPS Internal
    					</SyncSourcePriority>
    				</TimingConfiguration>
    			</GrandMasterConfigurationDefinition>
    			<GrandSlaveConfigurationDefinition
    				xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PTPServiceGrandSlaveParameterDefType">
    				<Profile editable="true">Telecom Profile</Profile>
    				<DelayRequestRate editable="true">64 Packets/sec
    				</DelayRequestRate>
    				<AnnounceReceiptTimeout editable="true">2
    				</AnnounceReceiptTimeout>
    				<Signalingconfiguration>
    					<Signaling editable="true">true</Signaling>
    					<GrantDuration editable="true">300</GrantDuration>
    					<SyncRate editable="true">64 Packets/sec</SyncRate>
    					<AnnounceRate editable="true">1 Packet/sec</AnnounceRate>
    				</Signalingconfiguration>
    				<PTPESMCMapping>
    					<EnableClockClass editable="true">true</EnableClockClass>
    					<NetworkOption editable="true">Option-1</NetworkOption>
    					<QualityLevel editable="true">PRC</QualityLevel>
    					<ClockClass editable="true">80</ClockClass>
    				</PTPESMCMapping>
    				<TimingConfiguration xsi:type="PTPServiceSlaveTimingParameterDefType">
    					<PPx editable="true">PPS</PPx>
    					<Frequency editable="true">5 MHZ</Frequency>
    					<OffsetCompensation editable="true">0
    					</OffsetCompensation>
    					<TimeOfDay>
    						<BaudRate editable="true">1200</BaudRate>
    						<Format editable="true">Calendar</Format>
    					</TimeOfDay>
    					<SyncSourcePriority editable="true">PTP Internal
    					</SyncSourcePriority>
    				</TimingConfiguration>
    			</GrandSlaveConfigurationDefinition>
    		</TimingServiceDefinition>
    	</ServiceResource>
    </Data>
    

    Get All PTP Service Definitions

    This request is used to retrieve all the configured PTP service definitions.

    URI

    /api/space/nsas/timing-ptp/service-management/
    service-definitions/

    HTTP Method

    GET

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-definitions+xml

    Produces

    Collects all the configured PTP service definitions.

    Output

    Sample XML Output

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource size="2">
    		<TimingServiceDefinition key="1"
    			uri="/api/space/nsas/timing-ptp/service-management/service-definitions/1"
    			href="/api/space/nsas/timing-ptp/service-management/service-definitions/1">
    			<Common>
    				<Name>Test</Name>
    				<Identity>1</Identity>
    				<State>Published</State>
    				<Comments>fsdfdsf</Comments>
    				<CreatedDate>2013-05-13T19:24:52.000+05:30</CreatedDate>
    				<LastUpdatedDate>2013-05-13T19:24:52.000+05:30</LastUpdatedDate>
    				<CreatedBy>super</CreatedBy>
    			</Common>
    			<ServiceType>PTP</ServiceType>
    		</TimingServiceDefinition>
    		<TimingServiceDefinition key="45"
    			uri="/api/space/nsas/timing-ptp/service-management/service-definitions/45"
    			href="/api/space/nsas/timing-ptp/service-management/service-definitions/45">
    			<Common>
    				<Name>TimingSD</Name>
    				<Identity>45</Identity>
    				<State>Published</State>
    				<Comments>fdsfdsaf</Comments>
    				<CreatedDate>2013-05-13T19:26:31.000+05:30</CreatedDate>
    				<LastUpdatedDate>2013-05-13T19:26:31.000+05:30</LastUpdatedDate>
    				<CreatedBy>super</CreatedBy>
    			</Common>
    			<ServiceType>PTP</ServiceType>
    		</TimingServiceDefinition>
    	</ServiceResource>
    </Data>
    
    				

    Create a PTP Service Definition

    This request is used to create a PTP service definition.

    URI

    /api/space/nsas/timing-ptp/service-management/
    service-definitions/

    HTTP Method

    POST

    Content Type

    application/vnd.net.juniper.space.service-management.
    service-definition+xml

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-definition-status+xml

    Produces

    Creates a PTP service definition.

    Input

    Sample XML Input

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    	<ServiceResource>
    		<TimingServiceDefinition>
    			<Common>
    				<Name>ServiceDefinition_PTP</Name>
    				<Comments>TestForSd</Comments>
    			</Common>
    <ServiceType>PTP</ServiceType>
    			<Topology editable="true">Boundary</Topology>
    			<TransportMode editable="false">Multicast</TransportMode>
    			<TransportEncapsulation  editable="true">IEEE-802.3-Link Local</TransportEncapsulation>
    			<IPV4DSCP editable="true">63</IPV4DSCP>
    
    			<EnablePTPResiliency editable="true">true</EnablePTPResiliency>
    
    			
    			<GrandMasterConfigurationDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PTPServiceGrandMasterParameterDefType">
    				<Profile editable="false">Default</Profile>
    				<TwoStep editable="false">No</TwoStep>
    				<SyncRate editable ="false">64 Packets/sec</SyncRate>
    				<Priority1 editable="false">128</Priority1>
    				<Priority2 editable="true">128</Priority2>
    				<AnnounceRate editable="true">1 Packet/8 sec</AnnounceRate>
    				<DelayRequestRate editable="true">64 Packets/sec</DelayRequestRate>
    				<AnnounceReceiptTimeout editable="true">2</AnnounceReceiptTimeout>
    				<ContinuousARP editable="true">false</ContinuousARP>
    				<SignalingConfiguration>
    					<Signaling editable="true">false</Signaling>
    					<DelayRate>
    						<min editable="true">1 Packet/sec</min>
    						<max editable="true">64 Packets/sec</max>
    					</DelayRate>
    					<AnnounceRate>
    						<min editable="true">1 Packet/sec</min>
    						<max editable="true">1 Packet/8 sec</max>
    					</AnnounceRate>
    					<SyncRate>
    						<min editable="true">1 Packet/sec</min>
    						<max editable="true">64 Packets/sec</max>
    					</SyncRate>
    				</SignalingConfiguration>
    				<TimingConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:type="PTPServiceGrandMasterTimingParameterDefType">
    					<IRIG-B editable="true">B001</IRIG-B>
    					<Frequency editable="true">5 MHZ</Frequency>
    					<DelayCompensation editable="true">0</DelayCompensation>
    					<SyncSourcePriority editable="true">GPS Internal PTP</SyncSourcePriority>
    				</TimingConfiguration>
    			</GrandMasterConfigurationDefinition>
    			<GrandSlaveConfigurationDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PTPServiceGrandSlaveParameterDefType">
    				<Profile editable="false">Default</Profile>
    				<DelayRequestRate editable="true">64 Packets/sec</DelayRequestRate>
    				<AnnounceReceiptTimeout editable="true">2</AnnounceReceiptTimeout>
    				<EnableHybrid editable="false">true</EnableHybrid>
    				<Signalingconfiguration>
    					<Signaling editable="true">true</Signaling>
    					<GrantDuration editable="true">2</GrantDuration>
    					<SyncRate editable="false">64 Packets/sec</SyncRate>
    					<AnnounceRate editable="true">1 Packet/sec</AnnounceRate>
    				</Signalingconfiguration>
    				<PTPESMCMapping>
    					<EnableClockClass editable="true">true</EnableClockClass>
    					<NetworkOption editable="false">Option-2</NetworkOption>
    					<QualityLevel editable="true">PRS</QualityLevel>
    					<ClockClass editable="true">80</ClockClass>
    				</PTPESMCMapping>
    				<TimingConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PTPServiceSlaveTimingParameterDefType">
    					<PPx editable="true">PPS</PPx>
    					<Frequency editable="true">5 MHZ</Frequency>
    					<OffsetCompensation editable="true">-1000000</OffsetCompensation>
    					<TimeOfDay>
    						<BaudRate editable="true">1200</BaudRate>
    						<Format editable="true">Calendar</Format>
    					</TimeOfDay>
    					<SyncSourcePriority editable="true">PTP Internal</SyncSourcePriority>
    				</TimingConfiguration>
    			</GrandSlaveConfigurationDefinition>
    		</TimingServiceDefinition>
    	</ServiceResource>
    <CustomAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ServiceDefinitionCustomActionType">
    	<Action>Publish</Action>
    </CustomAction>
    
    </Data>
    
    
    
    				

    Output

    Sample XML Output

    
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <Data xmlns="services.schema.networkapi.jmp.juniper.net">
        <Status>
        <Identity>
        <Type>PTPServiceDefinition</Type>
        <Value>524338</Value>
        </Identity>
        <Code>200</Code>
        <Message>ServiceDefinition Created and Published Successfully</Message>
        </Status>
        </Data>
    
    
    

    Publish and Unpublish a PTP Service Definition

    This request is used to publish or unpublish a PTP service definition.

    URI

    api/space/nsas/timing-ptp/service-management/
    service-definitions/

    HTTP Method

    POST

    Content-Type

    application/vnd.net.juniper.space.service-management.
    service-definition+xml

    Consumes

    application/vnd.net.juniper.space.service-management.
    service-definition-status+xml

    Action types are Publish and Unpublish.

    Produces

    Publishes or unpublishes a PTP service definition.

    Input (Publishing the Service Definition)

    Sample XML Input

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    <CustomAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ServiceDefinitionCustomActionType">
    	<Action>Publish</Action>
    </CustomAction>
    </Data>
    				

    Output

    Sample XML Output

    <Data>
    <Status>
    <Identity>
    <Type>ServiceDefinition</Type>
    <Value>32768</Value>
    </Identity>
    <Code>200</Code>
    <Message>ServiceDefinition Published Successfully</Message>
    </Status>
    </Data>
    

    Input (Unpublishing the Service Definition)

    Sample XML Input

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Data xmlns="services.schema.networkapi.jmp.juniper.net">
    <CustomAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ServiceDefinitionCustomActionType">
    	<Action>Unpublish</Action>
    </CustomAction>
    </Data>
    				

    Output

    Sample XML Output

    <Data>
    <Status>
    <Identity>
    <Type>ServiceDefinition</Type>
    <Value>32768</Value>
    </Identity>
    <Code>200</Code>
    <Message>ServiceDefinition UnPublished Successfully</Message>
    </Status>
    </Data>
    

    Modified: 2017-09-13