Endpoints to manipulate JSON data
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
The idea of this project is to manipulate the data through REST endpoints.
For each operation, the endpoint receive the data to manipulate in the body and the params as query parameters.
There is no logging on purpose.
This small REST API relies on NodeJS and Express.
To get a local copy up and running follow these simple example steps.
Install NodeJS. This has been tested with the versions 18 and 20.
- Clone the repo
git clone https://github.com/yannick-beot-sp/data-manipulation.git
- Install NPM packages
npm install
- Change git remote url to avoid accidental pushes to base project
git remote set-url origin yannick-beot-sp/data-manipulation git remote -v # confirm the changes
- Run the server
npm start
By default, any successfull operation returns a 200
.
Any invalid parameter would result in a 400
.
GET
/?name=<name>
name
type
data type
default
description
Name
Optional
String
World
N/A
Hello <name>!
name | type | data type | default | description |
---|---|---|---|---|
Name | Optional | String | World | N/A |
Hello <name>!
POST
/extract?property=<name>
Name
Required
data type
description
name
Y
String
name of the property to used from objects inside the array
Array of objects. The Array can be empty. The body can be empty
[
{
"id": "1954bab361a145d6b828c3456f9d4592",
"name": "PRISM ERP - Report Admin",
"description": "Grants report administrator access to the PRISM ERP system."
},
{
"id": "69a487be846f458caa6b5549a38defca",
"name": "PRISM ERP - User Access",
"description": "Grants user access to the PRISM ERP system"
}
]
Array of string
POST
/addRow?value=<value>
name
Required
data type
description
value
Y
JSON Object
It must be a valid JSON object. To add a string, the string must be between double quotes
Array of objects. The Array can be empty. The body can be empty
[
{
"id": "1954bab361a145d6b828c3456f9d4592",
"name": "PRISM ERP - Report Admin",
"description": "Grants report administrator access to the PRISM ERP system."
},
{
"id": "69a487be846f458caa6b5549a38defca",
"name": "PRISM ERP - User Access",
"description": "Grants user access to the PRISM ERP system"
}
]
Array of objects
TBD
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
)
- Commit your Changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the Branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Name | Required | data type | description |
---|---|---|---|
name | Y | String | name of the property to used from objects inside the array |
[
{
"id": "1954bab361a145d6b828c3456f9d4592",
"name": "PRISM ERP - Report Admin",
"description": "Grants report administrator access to the PRISM ERP system."
},
{
"id": "69a487be846f458caa6b5549a38defca",
"name": "PRISM ERP - User Access",
"description": "Grants user access to the PRISM ERP system"
}
]
POST
/addRow?value=<value>
name
Required
data type
description
value
Y
JSON Object
It must be a valid JSON object. To add a string, the string must be between double quotes
Array of objects. The Array can be empty. The body can be empty
[
{
"id": "1954bab361a145d6b828c3456f9d4592",
"name": "PRISM ERP - Report Admin",
"description": "Grants report administrator access to the PRISM ERP system."
},
{
"id": "69a487be846f458caa6b5549a38defca",
"name": "PRISM ERP - User Access",
"description": "Grants user access to the PRISM ERP system"
}
]
Array of objects
name | Required | data type | description |
---|---|---|---|
value | Y | JSON Object | It must be a valid JSON object. To add a string, the string must be between double quotes |
[
{
"id": "1954bab361a145d6b828c3456f9d4592",
"name": "PRISM ERP - Report Admin",
"description": "Grants report administrator access to the PRISM ERP system."
},
{
"id": "69a487be846f458caa6b5549a38defca",
"name": "PRISM ERP - User Access",
"description": "Grants user access to the PRISM ERP system"
}
]
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)LICENSE.txt
for more information.