Platform API

<back to all web services

SaveObjectConnection

Creates or Updates a new connection between two objects.

Requires Authentication
The following routes are available for this service:
POST/api/objects/{FromObjectId}/{ToObjectId}/{RmsTableCtxIdConnectionMethod}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


# @ApiResponse(Description="Returns the object connection Id created/modified and success of the save.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SaveObjectConnectionResponse:
    object_connection_id: Optional[str] = None
    response_status: Optional[ResponseStatus] = None


# @Api(Description="Creates or Updates a new connection between two objects.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SaveObjectConnection:
    """
    Creates or Updates a new connection between two objects.
    """

    # @ApiMember(DataType="Guid", Description="'From' object ID in the connection.", IsRequired=true, Name="FromObjectId", ParameterType="query")
    from_object_id: Optional[str] = None
    """
    'From' object ID in the connection.
    """


    # @ApiMember(DataType="Guid", Description="'To' object ID in the connection.", IsRequired=true, Name="ToObjectId", ParameterType="query")
    to_object_id: Optional[str] = None
    """
    'To' object ID in the connection.
    """


    # @ApiMember(DataType="Guid", Description="Guid representing the Connection Method to use to connect the objects with.", IsRequired=true, Name="RmsTableCtxIdConnectionMethod", ParameterType="query")
    rms_table_ctx_id_connection_method: Optional[str] = None
    """
    Guid representing the Connection Method to use to connect the objects with.
    """

Python SaveObjectConnection DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/objects/{FromObjectId}/{ToObjectId}/{RmsTableCtxIdConnectionMethod} HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}