Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#30472 adding postman to check shortyId #30514

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "05e460a0-406c-42b4-a8e7-0d61a8c6f794",
"_postman_id": "015f66fd-6d09-4641-873d-03e8b08011f4",
"name": "ContentResourceV1",
"description": "This folder contains a comprehensive set of API requests related to the `ContentResourceV1` API endpoints. These requests cover various operations such as creating, retrieving and updating content. The folder is organized to help developers and testers efficiently validate and interact with the content resource endpoints in the system.\n\n#### Objectives:\n\n1. **Create Content**:\n \n - Test the creation of new content items with valid and invalid data.\n \n - Ensure that the response includes all necessary details for the created content.\n \n2. **Retrieve Content**:\n \n - Validate the retrieval of content items by ID.\n \n - Ensure the response contains accurate and complete content details.\n \n3. **Update Content**:\n \n - Test updating existing content items with valid and invalid data.\n \n - Verify that the response reflects the updated content accurately.\n \n - Ensure that only authorized users can update content.\n \n4. **Error Handling**:\n \n - Verify that the API returns appropriate error messages for invalid requests.\n \n - Ensure the correct HTTP status codes are used for different error scenarios.\n \n5. **Security**:\n \n - Validate that only authorized users can perform operations on the content.\n \n - Ensure that all security protocols are enforced during API interactions.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
Expand Down Expand Up @@ -474,11 +474,16 @@
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"",
"pm.test(\"Valid response\", function () {",
" pm.expect(pm.response.text()).to.include(\"SucessRequest\");",
"",
" pm.expect(jsonData.entity).to.have.property('shortyId');",
" pm.expect(jsonData.entity).to.have.property('identifier');",
"});",
"",
"var jsonData = pm.response.json();",
"",
"pm.collectionVariables.set(\"contentletIdentifier\", jsonData.entity.identifier);",
"pm.collectionVariables.set(\"contentletInode\", jsonData.entity.inode);",
"",
Expand All @@ -490,6 +495,16 @@
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{jwt}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [
{
Expand All @@ -499,7 +514,7 @@
],
"body": {
"mode": "raw",
"raw": "{ \"contentlet\" : {\n \"stInode\" : \"f4d7c1b8-2c88-4071-abf1-a5328977b07d\",\n \"languageId\" : 1,\n \"key\": \"SucessRequest{{$timestamp}}\",\n \"value\": \"SucessRequest{{$timestamp}}\"\n}\n}"
"raw": "{\n \"contentlet\": {\n \"stInode\": \"f4d7c1b8-2c88-4071-abf1-a5328977b07d\",\n \"languageId\": 1,\n \"key\": \"SucessRequest{{$timestamp}}\",\n \"value\": \"SucessRequest{{$timestamp}}\"\n }\n}"
},
"url": {
"raw": "{{serverURL}}/api/v1/workflow/actions/default/fire/PUBLISH",
Expand Down Expand Up @@ -2871,6 +2886,14 @@
{
"key": "contentIdentifier",
"value": ""
},
{
"key": "contentletIdentifier",
"value": ""
},
{
"key": "contentletInode",
"value": ""
}
]
}