public interface TemplatesApi
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<GuidVersionHolder> |
createTemplate(Template template)
Create a new template
Create a new template.
|
retrofit2.Call<CreatedOnHolder> |
createTemplateRevision(String guid,
TemplateRevision templateRevision)
Create a new revision of a template
|
retrofit2.Call<Message> |
deleteTemplate(String guid,
Boolean physical)
Delete template (and all revisions)
Delete an existing template (and all its revisions).
|
retrofit2.Call<Template> |
getTemplate(String guid)
Get a template
Get a template for this app.
|
retrofit2.Call<TemplateRevision> |
getTemplateRevision(String guid,
DateTime createdOn)
Get a single template document revision
|
retrofit2.Call<TemplateRevisionList> |
getTemplateRevisions(String guid,
Integer offsetBy,
Integer pageSize)
Get the template document revisions
|
retrofit2.Call<TemplateList> |
getTemplates(String type,
Integer offsetBy,
Integer pageSize,
Boolean includeDeleted)
Get a list of templates of a specific type
Get all the templates of a specific type for this app.
|
retrofit2.Call<Message> |
publishTemplateRevision(String guid,
DateTime createdOn)
Set a specific template revision as the version to use when the template is selected
|
retrofit2.Call<GuidVersionHolder> |
updateTemplate(String guid,
Template template)
Update an existing template
Update an existing template.
|
@Headers(value="Content-Type:application/json") @POST(value="v3/templates") retrofit2.Call<GuidVersionHolder> createTemplate(@Body Template template)
template
- New template (required)@Headers(value="Content-Type:application/json") @POST(value="v3/templates/{guid}/revisions") retrofit2.Call<CreatedOnHolder> createTemplateRevision(@Path(value="guid") String guid, @Body TemplateRevision templateRevision)
guid
- A guid (required)templateRevision
- (required)@Headers(value="Content-Type:application/json") @DELETE(value="v3/templates/{guid}") retrofit2.Call<Message> deleteTemplate(@Path(value="guid") String guid, @Query(value="physical") Boolean physical)
guid
- A guid (required)physical
- Physically delete this resource? (administrators only; this is always false for developers) (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v3/templates/{guid}") retrofit2.Call<Template> getTemplate(@Path(value="guid") String guid)
guid
- A guid (required)@Headers(value="Content-Type:application/json") @GET(value="v3/templates/{guid}/revisions/{createdOn}") retrofit2.Call<TemplateRevision> getTemplateRevision(@Path(value="guid") String guid, @Path(value="createdOn") DateTime createdOn)
guid
- A guid (required)createdOn
- Created on timestamp (ISO 8601) (required)@Headers(value="Content-Type:application/json") @GET(value="v3/templates/{guid}/revisions") retrofit2.Call<TemplateRevisionList> getTemplateRevisions(@Path(value="guid") String guid, @Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize)
guid
- A guid (required)offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v3/templates") retrofit2.Call<TemplateList> getTemplates(@Query(value="type") String type, @Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize, @Query(value="includeDeleted") Boolean includeDeleted)
type
- (optional)offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)includeDeleted
- Should deleted items be returned in results? (optional, default to false)@Headers(value="Content-Type:application/json") @POST(value="v3/templates/{guid}/revisions/{createdOn}/publish") retrofit2.Call<Message> publishTemplateRevision(@Path(value="guid") String guid, @Path(value="createdOn") DateTime createdOn)
guid
- A guid (required)createdOn
- Created on timestamp (ISO 8601) (required)@Headers(value="Content-Type:application/json") @POST(value="v3/templates/{guid}") retrofit2.Call<GuidVersionHolder> updateTemplate(@Path(value="guid") String guid, @Body Template template)
guid
- A guid (required)template
- Updated template (required)Copyright © 2023 Sage Bionetworks. All rights reserved.