diff --git a/LICENSE b/LICENSE index 4ae8271..e0e3bd2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2025 Contentstack +Copyright (c) 2022-2026 Contentstack Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index 4fe3c4c..ef58f7c 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,84 @@ + src="https://images.contentstack.io/v3/assets/blt2d43f51baca745a8/blt2c341bd633887e37/Contentstack-LogoLockup-AmethystShadowHeavy-RGB.png" />
-

Contentstack provides OpenAPI files for its Content Delivery and Content Management REST APIs. These files are in - JSON format. Using these JSON files, you can automatically generate API documentation, test API, and do a lot more. +

+Contentstack provides OpenAPI files for its Content Delivery and Content Management APIs in JSON format. These files allow you to automatically generate API documentation, test requests, and streamline your development workflow. +

+

+This tutorial walks you through how to use these JSON files with Swagger Editor to interact with Contentstack’s APIs.

-

This tutorial will walk you through the process of using Contentstack APIs (Content Delivery and Content Management - APIs) with Swagger.


Content Delivery API (CDA)

-

Version: 3.0.0 [Download]

-

Last Updated: Feb 06, 2023

-

Note: To use the latest version, download - the CDA file on your system.

-

To use Contentstack Content Delivery API (CDA) with Swagger, perform the following steps:

+ + +

+To use CDA with Swagger, follow these steps: +

    -
  1. Download - the CDA file and go to the Swagger Editor.
  2. -
  3. On the “Swagger Editor” page, click on File, and select the Import file option. -
  4. + +
  5. Download the latest CDA JSON file and navigate to Swagger Editor.
  6. + +
  7. Click File on top-right and select Import File to upload the JSON.
  8. + +
  9. Open any API request and click the Try it out button to unlock the parameter fields.
  10. + +
  11. Enter your stack's values or use the default demo stack credentials.
  12. + +
  13. Click Execute.
-

Alternatively, if you want to use the Import URL option, you can upload the CDA - file as an asset in Contentstack, and then paste the asset’s URL in the prompt.

-
    -
  1. Open any API request and click on the Try it out button. Clicking this button will unlock the - fields, so you can either run the API request on our demo stack or can use your own values.
  2. -
  3. Click on Execute.
  4. -

-

In the Responses section, you can see the following details:

+

+The Responses section will display the following: +


-

Content Management API

-

Version: 3.0.0 [Download]

-

Last Updated: Feb 06, 2023

-

Note: To use the latest version, download - the CMA file on your system.

-

To use Contentstack Content Management API (CMA) with Swagger, perform the following steps:

+ +
  • The API request in cURL format.
  • + +
  • The response body (JSON).
  • + +
  • The HTTP status code.
  • + +

    +Note: To ensure you are testing against the most accurate environment, always download the latest CDA file from the Contentstack documentation site. +

    +

    Content Management API (CMA)

    + + +

    +To use CDA with Swagger, follow these steps: +

      -
    1. Download - the CMA file and go to the Swagger Editor.
    2. -
    3. On the “Swagger Editor” page, click on File, and select the Import file option. -
    4. -
    5. Alternatively, you can upload the CMA - file as an asset in Contentstack. Then, you can use the Import URL option and paste the - asset’s URL in the prompt.
    6. -
    7. To run any API request for CMA, make sure you have either the Management token or Auth token in hand.
        -
      1. To use a management token, refer to the Generate Management token guide.
      2. -
      3. To use Auth token, run the Login API request, located under the User Session - section.
      4. -
      -
    8. -
    9. Open any API request and click on the Try it out button. Clicking this button will unlock the - fields for you to use your enter the values.
    10. -
    11. Click Execute.
    12. -

    -

    In the Responses section, you can see the following details:

    + +
  • Download the latest CMA JSON file and navigate to Swagger Editor.
  • + +
  • Click File on top-right and select Import File to upload the JSON.
  • + +
  • Before running a request, ensure you have an authentication method ready:
  • + +
  • Management Token: We recommend using a management token for CMA requests. Refer to the Generate Management Token guide for details.
  • + +
  • Authtoken: Run the Log in API request under the User Session section to retrieve an authtoken in the response.
  • + +
  • Open any API request and click the Try it out button to unlock the parameter fields.
  • + +
  • Enter your stack's values or use the default demo stack credentials.
  • + +
  • Click Execute.
  • + +

    +The Responses section will display the following: +

    -

    Points to note:

    +

    +Note: +


    \ No newline at end of file + +
  • We recommend using the Management token for executing CMA requests rather than authtoken.
  • + +
  • For any DELETE request that has a request body in it, you won’t be able to run it in Swagger.