Skip to main content

/api/<resource>

GET#

GET /api/<resource>

Returns a ArchitectResource array which represents collection of your resources.

Parameters#

This method does not require any parameters.

Response#

Successful response returns a HTTP 200 OK status and the following body:

TypeDescription
ArchitectResourceResource collection

POST#

POST /api/<resource>

Returns a ArchitectResource which represents your created resource.

Parameters#

This method takes 1 parameter:

ParameterRequiredTypeDefault valueDescription
resourceDatatrueRecord<string, any>Data representing the resource you want to create

Response#

Successful response returns a HTTP 200 OK status and the following body:

TypeDescription
ArchitectResourceCreated resource

PUT#

PUT /api/<resource>/<resourceId>

Returns a ArchitectResource which represents your updated resource.

Parameters#

This method takes 2 parameters:

ParameterRequiredTypeDefault valueDescription
resourceIdtruestringId representing id of your resource
resourceDatatrueRecord<string, any>Data you want to update for the given resource

Response#

Successful response returns a HTTP 200 OK status and the following body:

TypeDescription
ArchitectResourceUpdated resource

DELETE#

DELETE /api/<resource>/<resourceId>

Returns a boolean representing resource removal confirmation.

Parameters#

This method takes 1 route parameter:

ParameterRequiredTypeDefault valueDescription
resourceIdtruestringUnique ID representing your resource

Response#

Successful response returns a HTTP 200 OK status and the following body:

TypeDescription
booleanReturns a boolean based on removal confirmation