Skip to content

Commit

Permalink
docs: update postman collections
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitij-k-osmosys committed Sep 26, 2024
1 parent e8ccb5c commit 462912d
Show file tree
Hide file tree
Showing 3 changed files with 321 additions and 219 deletions.
61 changes: 50 additions & 11 deletions apps/api/OsmoX-API.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "42cdb5c9-74a1-4a4b-adbe-3dcb4fe9fb67",
"_postman_id": "cefe0933-555e-4ea0-a9b2-41fae6e8533d",
"name": "OsmoX-API",
"description": "List of all APIs used in OsmoX",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
Expand Down Expand Up @@ -535,7 +535,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n // Assuming providerId 11 also has channelType 11\n \"providerId\": 11,\n \"data\": {\n \"from\": \"[email protected]\",\n \"to\": \"[email protected]\",\n \"subject\": \"Test subject\",\n \"text\": \"This is a test notification\",\n \"html\": \"<b>This is a test notification</b>\",\n \"replyTo\": \"[email protected]\"\n }\n}"
"raw": "{\n // Assuming providerId 11 also has channelType 11\n \"providerId\": 11,\n \"data\": {\n \"from\": \"[email protected]\",\n \"to\": \"[email protected]\",\n // \"cc\": [\"[email protected]\", \"[email protected]\"],\n // \"bcc\": \"[email protected], [email protected], [email protected]\",\n // \"replyTo\": \"[email protected]\",\n \"subject\": \"Test subject\",\n \"text\": \"This is a test notification\",\n \"html\": \"<b>This is a test notification</b>\"\n }\n}"
},
"url": {
"raw": "{{base_url}}/notifications",
Expand Down Expand Up @@ -626,7 +626,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation LoginUser($username: String!, $password: String!) {\n login(loginUserInput: {username: $username, password: $password}) {\n token\n user\n allKeys {\n apiKeyId\n apiKey\n applicationId\n status\n }\n __typename\n }\n}",
"query": "mutation LoginUser($username: String!, $password: String!) {\n login(loginUserInput: {username: $username, password: $password}) {\n token\n __typename\n }\n}",
"operationName": "LoginUser",
"variables": "{\n \"username\": \"{{adminUsername}}\",\n \"password\": \"{{adminPassword}}\"\n}"
}
Expand Down Expand Up @@ -679,7 +679,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "query {\r\n notifications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: DESC\r\n search: \"[email protected]\"\r\n filters: [{ field: \"channelType\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n notifications {\r\n applicationDetails {\r\n applicationId\r\n name\r\n userId\r\n status\r\n createdOn\r\n updatedOn\r\n }\r\n applicationId\r\n channelType\r\n createdBy\r\n createdOn\r\n data\r\n deliveryStatus\r\n id\r\n providerId\r\n result\r\n status\r\n updatedBy\r\n updatedOn\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
"query": "query {\r\n notifications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: DESC\r\n search: \"[email protected]\"\r\n filters: [{ field: \"applicationId\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n notifications {\r\n applicationDetails {\r\n applicationId\r\n name\r\n userId\r\n status\r\n createdOn\r\n updatedOn\r\n }\r\n applicationId\r\n channelType\r\n createdBy\r\n createdOn\r\n data\r\n deliveryStatus\r\n id\r\n providerId\r\n result\r\n status\r\n updatedBy\r\n updatedOn\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
"variables": ""
}
},
Expand All @@ -703,7 +703,7 @@
"name": "Application",
"item": [
{
"name": "Create new Application",
"name": "Fetch all Applications",
"event": [
{
"listen": "test",
Expand Down Expand Up @@ -733,7 +733,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation CreateApplication {\r\n application(createApplicationInput: {\r\n name: \"sampleTestXApp\",\r\n userId: 2,\r\n }) {\r\n applicationId\r\n name\r\n userId\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n}",
"query": "query {\r\n applications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: ASC\r\n search: \"Pinestem\"\r\n filters: [{ field: \"applicationId\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n applications {\r\n applicationId\r\n name\r\n userId\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
"variables": ""
}
},
Expand All @@ -746,12 +746,12 @@
"graphql"
]
},
"description": "Allows successfully creating an application based on the options passed."
"description": "Allows successfully fetching all applications based on the options passed."
},
"response": []
},
{
"name": "Fetch all Applications",
"name": "Create new Application",
"event": [
{
"listen": "test",
Expand Down Expand Up @@ -781,7 +781,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "query {\r\n applications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: ASC\r\n search: \"Pinestem\"\r\n filters: [{ field: \"applicationId\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n applications {\r\n applicationId\r\n name\r\n userId\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
"query": "mutation CreateApplication {\r\n application(createApplicationInput: {\r\n name: \"<newApplicationName>\",\r\n userId: 2,\r\n }) {\r\n applicationId\r\n name\r\n userId\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n}",
"variables": ""
}
},
Expand All @@ -794,7 +794,7 @@
"graphql"
]
},
"description": "Allows successfully fetching all applications based on the options passed."
"description": "Allows successfully creating an application based on the options passed."
},
"response": []
}
Expand Down Expand Up @@ -883,7 +883,7 @@
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation CreateProvider {\n provider(createProviderInput: {\n applicationId: 2,\n channelType: 2,\n configuration: {},\n isEnabled: 1,\n name: \"Mailgun PineStem\",\n userId: 1,\n }) {\n applicationId\n channelType\n configuration\n isEnabled\n name\n userId\n createdOn\n updatedOn\n status\n }\n}",
"query": "mutation CreateProvider {\n provider(createProviderInput: {\n applicationId: 2,\n channelType: 2,\n configuration: {},\n isEnabled: 1,\n name: \"<New Provider Name>\",\n userId: 1,\n }) {\n applicationId\n channelType\n configuration\n isEnabled\n name\n userId\n createdOn\n updatedOn\n status\n }\n}",
"variables": ""
}
},
Expand Down Expand Up @@ -961,6 +961,45 @@
}
],
"description": "These API calls are responsible for all operations related to Webhooks."
},
{
"name": "Server Key",
"item": [
{
"name": "Generate New Server Key",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{auth-token}}"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "mutation GenerateApiKey($applicationId: Int!) {\n generateApiKey(applicationId: $applicationId)\n}",
"variables": "{\n \"applicationId\": {{applicationId}}\n}"
}
},
"url": {
"raw": "{{base_url}}/graphql",
"host": [
"{{base_url}}"
],
"path": [
"graphql"
]
}
},
"response": []
}
],
"description": "These API calls are responsible for all operations related to Server API Keys."
}
]
}
12 changes: 9 additions & 3 deletions apps/api/OsmoX-API.postman_environment.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,25 @@
"enabled": true
},
{
"key": "username",
"key": "adminUsername",
"value": "YOUR_USERNAME",
"type": "default",
"enabled": true
},
{
"key": "password",
"key": "adminPassword",
"value": "YOUR_PASSWORD",
"type": "default",
"enabled": true
},
{
"key": "applicationId",
"value": "YOUR_APPLICATION_ID",
"type": "default",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-09-23T16:01:30.507Z",
"_postman_exported_at": "2024-09-26T06:04:31.469Z",
"_postman_exported_using": "Postman/11.5.1"
}
Loading

0 comments on commit 462912d

Please sign in to comment.