2025-07-29- Action EndPoint
Jump to navigation
Jump to search
Graph 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 Node 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": [
{
"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
{
objectType: "xxxx",
fieldNames: {
// fields or if have versionedData
},
relationships: [
{
relType: {
serviceTag: "xxxx",
relationshipTag: "rel"
},
targetObjType: {
serviceTag: "xxxx",
objectType: "yyyy"
},
relationshipDirection: "xxxx", //'from' or 'to'
targetIdentifiers: {
// targetIdentifiers
}
}
]
}
= 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
}
}
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: []
}
Get EndPoint
Request Example
{
"objectType": "xxxxx",
"identifiers": {
//identifiers
}
}
Return Example
{
response: {
identifiers: {
//identifiers
},
fields: {
//fields
}
}
}
