Logo
15_Days_of_Postman_-_for_testers_IvanKo API Documentation

Collections

Number of APIs: 6


1. Create a collection

POST {{baseUrl}}/collections

Creates a collection using the [Qodex Collection v2 schema format] Include a collection object in the request body that contains the following required properties:

  • info — An object that contains the following properties:

    • name — A string value that contains the collection's name.
    • schema — A string value that contains a URL to the collection's schema. For example, the https://schema.getQodex.com/collection/v1 URL.
  • item — An object that contains the HTTP request and response information.

    • request — An object that contains the collection's request information. For a complete list of values, refer to the definitions.request entry in the [collection.json schema file] If you pass an empty object for this value, the system defaults to an untitled GET request.

For more information about the Collection Format, see the [Qodex Collection Format documentation]

Note:

  • For a complete list of available property values for this endpoint, use the following references available in the [collection.json schema file]
    • info object — Use the definitions.info entry.
    • item object — Use the definitions.items entry.
  • For all other possible values, refer to the [collection.json schema file]



2. Get a collection

GET {{baseUrl}}/collections/{{collectionId}}

Gets information about a collection. For a complete list of this endpoint's possible values, use the [collection.json schema file]



3. Delete a collection

DELETE {{baseUrl}}/collections/{{collectionId}}

Deletes a collection.



4. Replace a collection's data

PUT {{baseUrl}}/collections/{{collectionId}}

Replaces the contents of a collection using the [Qodex Collection v2 schema format] Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.

The maximum collection size this endpoint accepts cannot exceed 20 MB.

Include a collection object in the request body that contains the following required properties:

  • info — An object that contains the following properties:
    • name — A string value that contains the collection's name.
    • schema — A string value that contains a URL to the collection's schema. For example, the https://schema.getQodex.com/collection/v1 URL.
  • item — An object that contains the collection's information.

For a complete list of available property values for this endpoint, use the following references available in the [collection.json schema file]

  • info object — Use "#/definitions/info".
  • item object — Use "#/definitions/item".

For all other possible values, refer to the [collection.json schema file] For more information about the Collection Format, see the [Qodex Collection Format documentation]

Note:

To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the id, uid, and Qodex_id values.



5. Update part of a collection

PATCH {{baseUrl}}/collections/{{collectionId}}

Updates specific collection information, such as its name, events, or its variables. For more information about the auth, variables, and events properties, refer to the [collection.json schema file]

  • For variables, refer to "#/definitions/variable".
  • For auth, refer to "#/definitions/auth-attribute".
  • For events, refer to "#/definitions/event".

For more information about the Collection Format, see the [Qodex Collection Format documentation]



6. Get all collections

GET {{baseUrl}}/collections

Gets all of your collections. The response includes all of your subscribed collections.



ENDPOINTS