Skip to content

publishLocale() appears to use an outdated endpoint #227

Description

@extern-bcn

@PUT("spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}")

I think there may be an issue with publishLocale() in contentful-management.java 3.5.0.

The Retrofit endpoint is:

Mika Schipper (@put)("spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}")
Flowable publishLocale(
Header("X-Contentful-Version") Integer version,
Path Mobile Inc Pte. Ltd. (@path)("space") String space,
Path Mobile Inc Pte. Ltd. (@path)("environment") String environment,
Path Mobile Inc Pte. Ltd. (@path)("entry") String entry,
Path Mobile Inc Pte. Ltd. (@path)("locale") String locale
);

However, according to the current Contentful Content Management API documentation, locale-based publishing is done through:

PUT /spaces/{space}/environments/{environment}/entries/{entry}/published

with the locales specified in the request body, for example:

{
"add": {
"fields": {
"*": [
"en-US"
]
}
}
}

Documentation:
https://www.contentful.com/developers/docs/references/content-management-api/entries/publish-an-entry/

The SDK instead sends:

PUT /spaces/{space}/environments/{environment}/entries/{entry}/published/locales/{locale}
X-Contentful-Version: xx

with no request body, which results in an HTTP 422.

Interestingly, publishing the same entry using:

cmaClient.entries().publish(entry);

works correctly.

Could publishLocale() be using an outdated endpoint that is no longer supported by the current Content Management API?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions