View Source

WAS THIS PAGE HELPFUL? {html}<a href="mailto:training@gwos.com?subject=Collectors Configuration APIs">Leave Feedback</a>{html}

h5. {color:#333333}26.1 List Collectors Configuration Files{color}

List all available YAML Collectors Configuration file names. File names include the ".yaml" extension and are returned in case insensitive alphabetical order.

h6. {color:#333333}26.1.1 Method: GET all Collectors Configuration File Names{color}

{color:#4a86e8}GET /api/collectors/configurations{color}

h6. {color:#333333}26.1.2 HTTP Headers{color}

|| Header || Valid Values || Required ||
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.1.3 HTTP Status Codes{color}

|| Code || Description ||
| 200 | Collectors Configuration file names returned |
| 401 | Authentication/authorization error occurred |
| 404 | No Collectors Configuration files found |
| 500 | An internal server error occurred during get |

h6. {color:#333333}26.1.4 File Names Responses{color}

File names are returned as a list of strings in the standard XML and JSON wrapped forms.

{code: language=html/xml}
<files>
<file>config.yaml</file>
<file>config2.yaml</file>
</files>
{code}

{code: language=javascript}
{
"files" : [ "config.yaml", "config2.yaml" ]
}
{code}

h5. {color:#333333}26.2 Get Collectors Configuration File{color}

Get YAML Collectors Configuration file content. File name must include the ".yaml" extension.

h6. {color:#333333}26.2.1 Method: GET Collectors Configuration File{color}

{color:#4a86e8}GET /api/collectors/configurations/\{fileName\}{color}

h6. {color:#333333}26.2.2 Path Parameters{color}

|| Field || Type || Description || Required ||
| fileName | Path | File name including the ".yaml" extension | yes |

h6. {color:#333333}26.2.3 HTTP Headers{color}

|| Header || Valid Values || Required ||
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.2.4 HTTP Status Codes{color}

|| Code || Description ||
| 200 | Collectors Configuration content returned |
| 400 | Invalid Collectors Configuration file name |
| 401 | Authentication/authorization error occurred |
| 404 | Collectors Configuration file not found |
| 500 | An internal server error occurred during get |

h6. {color:#333333}26.2.5 YAML Collectors Configuration Response{color}

UTF-8 YAML Collectors Configuration is returned. Content type is {{text/yaml;charset=UTF-8}}.

h5. {color:#333333}26.3 Create Collectors Configuration File{color}

Create YAML Collectors Configuration file from template. File name must include the ".yaml" extension. Accepts a number of identity properties that are merged into the template to create the file. Template is selected using the {{agentType}} and {{prefix}} identity properties.

h6. {color:#333333}26.3.1 Method: POST Create Collectors Configuration File{color}

{color:#4a86e8}POST /api/collectors/configurations/\{fileName\}{color}

h6. {color:#333333}26.3.2 Path And POST Parameters{color}

|| Field || Type || Description || Required ||
| fileName | Path | File name including the ".yaml" extension | yes |
| agentType\* | POST | Collector agent type | yes |
| prefix\* | POST | Collector Configuration prefix | yes |
| hostName | POST | Collector host name | yes |
| ipv4 | POST | Collector address | no |
| ipv6 | POST | Collector address | no |
| mac | POST | Collector mac address | no |
| characteristic | POST | Collector characteristic string | no |

\* {{agentType}} and {{prefix}} parameters are used to select the Collectors Configuration template to instantiate.

h6. {color:#333333}26.3.3 POST Request{color}

POST parameters are specified using the standard form/url encoded syntax.

{code}
agentType=child&prefix=child&hostName=localhost
{code}

h6. {color:#333333}26.3.4 HTTP Headers{color}

|| Header || Valid Values || Required ||
| Content-Type | application/x-www-form-urlencoded | True |
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.3.5 HTTP Status Codes{color}

|| Code || Description ||
| 200 | Created Collectors Configuration content returned |
| 400 | Invalid Collectors Configuration file name or missing POST parameters |
| 401 | Authentication/authorization error occurred |
| 404 | Collectors Configuration template file not found |
| 500 | An internal server error occurred during create |

h6. {color:#333333}26.3.6 YAML Collectors Configuration Response{color}

Created UTF-8 YAML Collectors Configuration from template is returned. Content type is {{text/yaml;charset=UTF-8}}. YAML Collectors Configurations created with this endpoint will always contain an {{identity}} section.

{code}
identity:
agentType: child
prefix: child
hostName: localhost
...
{code}

h5. {color:#333333}26.4 Add or Replace Collectors Configuration File{color}

Add or replace YAML Collectors Configuration file. File name must include the ".yaml" extension. Accepts YAML file with multiple top level properties or sections, (i.e. can be loaded into a key/value pair). This endpoint does not return any content: {{204 No Content}} is the successful return status.

h6. {color:#333333}26.4.1 Method: PUT Collectors Configuration File{color}

{color:#4a86e8}PUT /api/collectors/configurations/\{fileName\}{color}

h6. {color:#333333}26.4.2 Path Parameters{color}

|| Field || Type || Description || Required ||
| fileName | Path | File name including the ".yaml" extension | yes |

h6. {color:#333333}26.4.3 PUT Request{color}

UTF-8 YAML Collectors Configuration file content. Content type must be specified as {{text/yaml}} or {{application/x-yaml}}. If specified, charset must be set to {{UTF-8}}. Typically Collectors Configurations include an {{identity}} section.

{code}
identity:
agentType: child
prefix: child
hostName: localhost
...
{code}

h6. {color:#333333}26.4.4 HTTP Headers{color}

|| Header || Valid Values || Required ||
| Content-Type | {{text/yaml}} or {{application/x-yaml}}, {{charset=UTF-8}} | True |
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.4.5 HTTP Status Codes{color}

|| Code || Description ||
| 204 | Collectors Configuration file added or replaced |
| 400 | Invalid Collectors Configuration file name or content |
| 401 | Authentication/authorization error occurred |
| 500 | An internal server error occurred during add or replace |

h5. {color:#333333}26.5 Delete Collectors Configuration File{color}

Delete existing YAML Collectors Configuration file. File name must include the ".yaml" extension. This endpoint does not return any content: {{204 No Content}} is the successful return status.

h6. {color:#333333}26.5.1 Method: DELETE Collectors Configuration File{color}

{color:#4a86e8}DELETE /api/collectors/configurations/\{fileName\}{color}

h6. {color:#333333}26.5.2 Path Parameters{color}

|| Field || Type || Description || Required ||
| fileName | Path | File name including the ".yaml" extension | yes |

h6. {color:#333333}26.5.3 HTTP Headers{color}

|| Header || Valid Values || Required ||
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.5.4 HTTP Status Codes{color}

|| Code || Description ||
| 204 | Collectors Configuration file deleted |
| 400 | Invalid Collectors Configuration file name |
| 401 | Authentication/authorization error occurred |
| 500 | An internal server error occurred during delete |

h5. {color:#333333}26.6 List Collectors Configuration Template Files{color}

List all available YAML Collectors Configuration template file names. File names include the ".yaml" extension and are returned in case insensitive alphabetical order.

h6. {color:#333333}26.6.1 Method: GET all Collectors Configuration Template File Names{color}

{color:#4a86e8}GET /api/collectors/templates{color}

h6. {color:#333333}26.6.2 HTTP Headers{color}

|| Header || Valid Values || Required ||
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.6.3 HTTP Status Codes{color}

|| Code || Description ||
| 200 | Collectors Configuration template file names returned |
| 401 | Authentication/authorization error occurred |
| 404 | No Collectors Configuration template files found |
| 500 | An internal server error occurred during get |

h6. {color:#333333}26.6.4 File Names Responses{color}

File names are returned as a list of strings in the standard XML and JSON wrapped forms.

{code: language=html/xml}
<files>
<file>config-template.yaml</file>
<file>config-template2.yaml</file>
</files>
{code}

{code: language=javascript}
{
"files" : [ "config-template.yaml", "config-template2.yaml" ]
}
{code}

h5. {color:#333333}26.7 Get Collectors Configuration Template File{color}

Get YAML Collectors Configuration template file content. File name must include the ".yaml" extension.

h6. {color:#333333}26.7.1 Method: GET Collectors Configuration Template File{color}

{color:#4a86e8}GET /api/collectors/templates/\{fileName\}{color}

h6. {color:#333333}26.7.2 Path Parameters{color}

|| Field || Type || Description || Required ||
| fileName | Path | File name including the ".yaml" extension | yes |

h6. {color:#333333}26.7.3 HTTP Headers{color}

|| Header || Valid Values || Required ||
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.7.4 HTTP Status Codes{color}

|| Code || Description ||
| 200 | Collectors Configuration template content returned |
| 400 | Invalid Collectors Configuration template file name |
| 401 | Authentication/authorization error occurred |
| 404 | Collectors Configuration template file not found |
| 500 | An internal server error occurred during get |

h6. {color:#333333}26.7.5 YAML Collectors Configuration Response{color}

UTF-8 YAML Collectors Configuration template is returned. Content type is {{text/yaml;charset=UTF-8}}.

h5. {color:#333333}26.8 Add or Replace Collectors Configuration Template File{color}

Add or replace YAML Collectors Configuration template file. File name must include the ".yaml" extension. Template YAML Collectors Configurations must contain a top level {{identity}} section with {{agentType}} and optionally {{prefix}} sub key/values pairs. This minimal information is used to select templates when Collectors Configurations are created. This endpoint does not return any content: {{204 No Content}} is the successful return status.

h6. {color:#333333}26.8.1 Method: PUT Collectors Configuration File{color}

{color:#4a86e8}PUT /api/collectors/templates/\{fileName\}{color}

h6. {color:#333333}26.8.2 Path Parameters{color}

|| Field || Type || Description || Required ||
| fileName | Path | File name including the ".yaml" extension | yes |

h6. {color:#333333}26.8.3 PUT Request{color}

UTF-8 YAML Collectors Configuration template file content. Content type must be specified as {{text/yaml}} or {{application/x-yaml}}. If specified, charset must be set to {{UTF-8}}. Collectors Configuration templates include an {{identity}} section with {{agentType}} and optionally {{prefix}} sub key/values pairs.

{code}
identity:
agentType: child
prefix: child
hostName: localhost
...
{code}

h6. {color:#333333}26.8.4 HTTP Headers{color}

|| Header || Valid Values || Required ||
| Content-Type | {{text/yaml}} or {{application/x-yaml}}, {{charset=UTF-8}} | True |
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.8.5 HTTP Status Codes{color}

|| Code || Description ||
| 204 | Collectors Configuration template file added or replaced |
| 400 | Invalid Collectors Configuration template file name or content |
| 401 | Authentication/authorization error occurred |
| 500 | An internal server error occurred during add or replace |

h5. {color:#333333}26.9 Delete Collectors Configuration Template File{color}

Delete existing YAML Collectors Configuration template file. File name must include the ".yaml" extension. This endpoint does not return any content: {{204 No Content}} is the successful return status.

h6. {color:#333333}26.9.1 Method: DELETE Collectors Configuration Template File{color}

{color:#4a86e8}DELETE /api/collectors/templates/\{fileName\}{color}

h6. {color:#333333}26.9.2 Path Parameters{color}

|| Field || Type || Description || Required ||
| fileName | Path | File name including the ".yaml" extension | yes |

h6. {color:#333333}26.9.3 HTTP Headers{color}

|| Header || Valid Values || Required ||
| GWOS-API-TOKEN | a valid token returned from login | True |
| GWOS-APP-NAME | your application name | True |

h6. {color:#333333}26.9.4 HTTP Status Codes{color}

|| Code || Description ||
| 204 | Collectors Configuration template file deleted |
| 400 | Invalid Collectors Configuration template file name |
| 401 | Authentication/authorization error occurred |
| 500 | An internal server error occurred during delete |