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

How can I include the version header? #65

Open
Ryanauger95 opened this issue Jul 13, 2021 · 1 comment
Open

How can I include the version header? #65

Ryanauger95 opened this issue Jul 13, 2021 · 1 comment

Comments

@Ryanauger95
Copy link

Ryanauger95 commented Jul 13, 2021

How can I include the X-Contentful-Version header using the Python client?

        entry_id = id  
        entry = management_client.entries(space_id, environment_id).create(entry_id, {
            'content_type_id': experiment_content_id,
            'fields': {
                'contentMarkdown': {
                    'de': body
                }
            }
        })

Without this header, I get the error:

contentful_management.errors.VersionMismatchError: HTTP status code: 409
Message: Version mismatch error. The version you specified was incorrect. This may be due to someone else editing the content.

@rubydog
Copy link
Collaborator

rubydog commented Jan 5, 2022

@Ryanauger95 are you facing this issue with Contentful Delivery or Contentful Management library? Either way you can configure target version of the Contentful API by setting api_version on client as mentioned here.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants