2025-07-29- Action EndPoint
Action Endpoint Test
- Note!: Can Test endpoint can test by API Gateway
Test API Work Flow
Create EndPoint
Create Basic
Request Parameters
- objectType
- Type: string
- Required: true
- fieldNames
- Type: object
- Required: true
- Description: if objectType have versionedData can send fields of versionedData to created
Request Example
{
"objectType": "xxxxx",
"fieldNames": {
// fields or if have fields of versionedData
}
}
Output Response
- objType
- Type: object
- Description: return objectType and serviceTag
- objInstanceFull
- Type: object
- Description: return identifiers and fields of objectType
- relationships
- Type: array
- Description: return empty array if not send create with relationship
- Status
- Type: string
- Description: if correct return: “complete” , f invalid return “error”
- errorsFound
- Type: array
- Description: return value if have which condition invalid
Return Example
{
objType: {
objectType: "xxxxx",
serviceTag: "yyyyy"
},
objInstanceFull: {
identifiers: {
//identifiers
},
fields: {
//fields
}
},
relationships: [],
status: "complete", // or "error"
errorsFound: []
}
Create Object and Relationship
Request Parameters
- objectType
- Type: string
- Required: true
- fieldNames
- Type: object
- Required: true
- Description: if objectType have versionedData can send fields of versionedData to created
- relationships
- Type: array
- Required: optional
- Description: can create node and relationships to targetNode
- relationships.relType
- Type: Object
- Required: true
- relationships.targetObjType
- Type: Object
- Required: true
- relationships.relationshipDirection
- Type: String
- Required: true
- relationships.targetIdentifiers
- Type: Object
- Required: true
Request Example
{
"objectType": "xxxx",
"fieldNames": {
// fields or if have fields of versionedData
},
"relationships": [ // optional
{
"relType": {
"serviceTag": "xxxx",
"relationshipTag": "rel"
},
"targetObjType": {
"serviceTag": "xxxx",
"objectType": "yyyy"
},
"relationshipDirection": "xxxx", // 'from' or 'to'
"targetIdentifiers": {
// identifiers
}
}
]
}
Output Response
- objType
- Type: object
- Description: return objectType and serviceTag
- objInstanceFull
- Type: object
- Description: return identifiers and fields of objectType
- relationships
- Type: array
- Description: return data object of create Relationships
- Status
- Type: string
- Description: if correct return: “complete” , if invalid return “error”
- errorsFound
- Type: array
- Description: return value if have which condition invalid
Return Example
{
"objType":{
"objectType":"xxxx",
"serviceTag":"yyyy"
},
"objInstanceFull":{
"identifiers":{
// identifiers
},
"fields":{
// fields
}
},
"relationships":[
{
"relType":{
"serviceTag":"xxxx",
"relationshipTag":"rel"
},
"targetObjType":{
"serviceTag":"xxxx",
"objectType":"yyyy"
},
"relationshipDirection":"from", // or to
"targetIdentifiers":{
// targetIdentifiers
}
}
],
"status":"complete", // or 'error'
"errorsFound":[]
}
Test Create API Gateway
- Copy invoke URL for create in postman Type: PUT
- Body Parameter : not send objectType in parameter , but must to send every fieldNames in objectSchema that have requiredOnCreate = true
- storageResources : dynamoDB or graph (Cloudwatch)
Update EndPoint
Request Parameters
- objectType
- Type: string
- Required: true
- objInstanceFull
- Type: object
- Required: true
- objInstanceFull.identifiers
- Type: object
- Required: true
- objInstanceFull.fields
- Type: object
- Required: true
- Description: if objectType have versionedData can send fields of versionedData to created
- versionedDataIds
- Type: object
- Required: optional
Request Example
{
"objectType": "xxxxx",
"objInstanceFull": { // required
"identifiers": {
//identifiers
},
"fields": {
// fields or if have fields of versionedData
}
},
"versionedDataIds": { // optional
// “versionedDataLabel”: versionedDataIds
}
}
Output Response
- objType
- Type: object
- Description: return objectType and serviceTag
- objInstanceFull
- Type: object
- Description: return identifiers and fields of objectType
- versionedDataIds
- Type: object
- Description: In case not send versionedDataIds: Every filedName in requestParams will be update >> If In case send versionedDataIds: If send fieldName not in versionedData will throw error
- Status
- Type: string
- Description: if correct return: “complete” , if invalid return “error”
- errorsFound
- Type: array
- Description: return value if have which condition invalid
Return Example
{
returnValues: {
objType: {
objectType: "xxxxx",
serviceTag: "yyyyy"
},
objInstanceFull: {
identifiers: {
//identifiers
},
fields: {
//fields
}
},
versionedDataIds: {
// if send fields of versionedData will return versionedDataIds
}
},
status:"complete", // or "error"
errorsFound: []
}
Test Update API Gateway
- Copy invoke URL for get in postman Type: POST
- Body Parameter: not send objectType in parameter , just send “objInstanceFull” and fields want to update
Get EndPoint
Request Parameters
- objectType
- Type: string
- Required: true
- identifiers
- Type: object
- Required: true
Request Example
{
"objectType": "xxxxx",
"identifiers": {
//identifiers
}
}
Output Response
- Identifiers
- Type: object
- fields
- Type: object
- Description: will be return all fields in database
Return Example
{
response: {
identifiers: {
//identifiers
},
fields: {
//fields
}
}
}
Test Get API Gateway
- Copy invoke URL for get in postman Type: FrontEnd use POST or GET
- Body Parameter: just send “identifiers”
