All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.contentstack.cms.stack.StackService Maven / Gradle / Ivy

Go to download

Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an API-first approach

There is a newer version: 1.5.0
Show newest version
package com.contentstack.cms.stack;

import okhttp3.ResponseBody;
import org.json.simple.JSONObject;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.Map;

public interface StackService {

    @GET("stacks")
    Call fetch(
            @HeaderMap Map headers,
            @QueryMap Map params);

    @POST("stacks")
    Call create(
            @Header("organization_uid") String orgUid,
            @Body JSONObject body);

    @PUT("stacks")
    Call update(
            @HeaderMap Map headers,
            @Body JSONObject body);

    @POST("stacks/transfer_ownership")
    Call transferOwnership(
            @HeaderMap Map headers,
            @Body JSONObject body);

    @GET("stacks/accept_ownership/{ownership_token}")
    Call acceptOwnership(
            @HeaderMap Map headers,
            @Path("ownership_token") String ownershipToken,
            @QueryMap Map query);

    @GET("stacks/settings")
    Call setting(@HeaderMap Map headers);

    @POST("stacks/settings")
    Call updateSetting(
            @HeaderMap Map headers,
            @Body JSONObject body);

    @POST("stacks/share")
    Call share(
            @HeaderMap Map headers,
            @Body JSONObject body);

    @POST("stacks/unshare")
    Call unshare(
            @HeaderMap Map headers,
            @Body JSONObject body);

    @GET("stacks?include_collaborators=true")
    Call allUsers(@HeaderMap Map headers);

    @POST("stacks/users/roles")
    Call updateUserRoles(
            @HeaderMap Map headers,
            @Body JSONObject body);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy