-
-
Save roy-mor/abbfb3bfd03bd9b1572e785a4ecd37d7 to your computer and use it in GitHub Desktop.
manifest.json example for GraphQL2REST (advanced mode)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"endpoints": { | |
"/users/:id": { | |
"get": { | |
"description": "Get user by ID", | |
"operation": "getUserObjByOid", | |
"params": { | |
"userOid": "id" | |
} | |
}, | |
"delete": { | |
"description": "Delete user by ID", | |
"operation": "removeUser", | |
"params": { | |
"userOid": "id" | |
}, | |
"successStatusCode": 204 | |
} | |
}, | |
"/datasets": { | |
"get": { | |
"description": "Get list of all datasets in the system", | |
"operation": "listAllDatasets" | |
}, | |
"post": { | |
"operations": [{ | |
"description": "Create new dataset instance V1", | |
"operation": "addDatasetV1ToCollection", | |
"condition": { | |
"type": { | |
"$in": ["old", "v1"] | |
}, | |
"params": { | |
"datasetToAdd": "data" | |
}, | |
"successStatusCode": 201, | |
"hide": ["v1_internalRepresentation", "ownerId"] | |
} | |
}, | |
{ | |
"description": "Create new dataset instance V2", | |
"operation": "addDatasetV2ToCollection", | |
"condition": { | |
"type": { | |
"$in": ["new", "v2"] | |
}, | |
"params": { | |
"newDatasetFormat": "data" | |
}, | |
"successStatusCode": 201 | |
} | |
} | |
] | |
} | |
} | |
}, | |
"errors": { | |
"errorCodes": { | |
"1000": { | |
"httpCode": 500 | |
}, | |
"4003": { | |
"httpCode": 403, | |
"errorDescription": "Forbidden: Unauthorized access" | |
}, | |
"1017": { | |
"httpCode": 503, | |
"errorDescription": "Service Unavailable: Cannot retrieve logs, please try again later" | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment