2025-07-29- Action EndPoint: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
=== Create Basic === | === 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''' | ''' Request Example''' | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
| Line 16: | Line 24: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
''' 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 ''' | ''' Return Example ''' | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
| Line 38: | Line 63: | ||
=== Create Node and Relationship === | === 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 ''' | ''' Request Example ''' | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
| Line 63: | Line 113: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
''' 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 ''' | ''' Return Example ''' | ||
| Line 89: | Line 156: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== 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 == | == 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 ''' | ''' Request Example ''' | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Revision as of 07:11, 30 July 2025
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
}
}
}
