SnippetResource
RESTful endpoint for managing a Snippet.
The following resources are applicable:
/controller/snippets
Mount Point: /rest/controller/snippets
POST
Creates a new snippet based on the specified contents.
Parameters
| name | description | type | default |
|---|---|---|---|
| version | The revision is used to verify the client is working with the latest version of the flow. | form | |
| clientId | Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. | form | |
| parentGroupId | The id of the process group the components in this snippet belong to. | form | |
| linked | Whether or not this snippet is linked to the underlying data flow. If a linked snippet is deleted, the components that comprise the snippet are also deleted. | form | false |
| processorIds[] | The ids of any processors in this snippet. | form | |
| processGroupIds[] | The ids of any process groups in this snippet. | form | |
| remoteProcessGroupIds[] | The ids of any remote process groups in this snippet. | form | |
| inputPortIds[] | The ids of any input ports in this snippet. | form | |
| outputPortIds[] | The ids of any output ports in this snippet. | form | |
| connectionIds[] | The ids of any connections in this snippet. | form | |
| labelIds[] | The ids of any labels in this snippet. | form | |
| funnelIds[] | The ids of any funnels in this snippet. | form |
Response Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A snippetEntity
POST
Creates a snippet based off the specified configuration.
Request Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A snippetEntity
Response Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A snippetEntity
/controller/snippets/{id}
Mount Point: /rest/controller/snippets/{id}
The following operations are supported on this resource:
GET
Retrieves the specified snippet.
Parameters
| name | description | type | default |
|---|---|---|---|
| clientId | Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. | query | |
| verbose | Whether or not to include the contents of the snippet in the response. | query | false |
| id | The id of the snippet to retrieve. | path |
Response Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A snippetEntity.
PUT
Updates the specified snippet.
Parameters
| name | description | type | default |
|---|---|---|---|
| version | The revision is used to verify the client is working with the latest version of the flow. | form | |
| clientId | Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. | form | |
| verbose | Whether or not to include the contents of the snippet in the response. | form | false |
| id | The id of the snippet to update. | path | |
| parentGroupId | The id of the process group to move the contents of this snippet to. | form | |
| linked | Whether or not this snippet is linked to the underlying data flow. If a linked snippet is deleted, the components that comprise the snippet are also deleted. | form |
Response Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A snippetEntity.
PUT
Updates the specified snippet. The contents of the snippet (component ids) cannot be updated once the snippet is created.
Parameters
| name | description | type | default |
|---|---|---|---|
| id | The id of the snippet. | path |
Request Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A snippetEntity
Response Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A snippetEntity
DELETE
Removes the specified snippet.
Parameters
| name | description | type | default |
|---|---|---|---|
| version | The revision is used to verify the client is working with the latest version of the flow. | query | |
| clientId | Optional client id. If the client id is not specified, a new one will be generated. This value (whether specified or generated) is included in the response. | query | |
| id | The id of the snippet to remove. | path |
Response Body
| element: | snippetEntity |
| media types: | application/xml application/json |
A entity containing the client id and an updated revision.