Skip to content

Commit 186622b

Browse files
committed
Updating readme for collection upsert
1 parent 47c5f60 commit 186622b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,20 @@ JPostman allows you to generate JSON for your collections. You can also write y
117117
Collection pmcSource = Collection.pmcFactory("/path/to/another/collection.json");
118118
pmcTest.addCollection(pmcSource);
119119
pmcTest.writeToFile("new-collection.json");
120+
121+
### Create or update a collection in Postman
122+
123+
You can upsert (create or update) a collection in Postman, optionally adding it to a workspace.
124+
- If a collection does not have a collection ID, it will be created on Postman, and given the UUID returned by Postman
125+
- You can optionally include a workspace ID to link the newly created collection to that workspace
126+
- If a collection has a collection ID, it will be updated in Postman.
127+
128+
```
129+
pmcTest.upsertToPostman(new PostmanID(<POSTMAN_WORKSPACE_ID>"));
130+
```
131+
132+
```
133+
120134
```
121135
122136
### Validate collections (and any collection element) against the Postman Collection Schema

0 commit comments

Comments
 (0)