# Build Your Own Connector

The following table describes:

* The list of SDK APIs and the mandatory APIs.
* The "Order of Implementation" column to check the order of the APIs to be implemented. Empty columns represent optional APIs.
* Overview of how OpsHub will call each API and its expected response.

| Sections                           | API Name                                                                                                                                                 | Required (Yes/No) | Order of Implementation | Overview                                                                                                                                                                                                         |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Introduction**                   |                                                                                                                                                          |                   |                         | This section will help you understand key concepts of SDK API and help you get started with it.                                                                                                                  |
|                                    | [SDK API URI Structure](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/sdk-api-uri-structure)                                     |                   |                         |                                                                                                                                                                                                                  |
|                                    | [Error Handling](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/error-handling)                                                   |                   |                         |                                                                                                                                                                                                                  |
|                                    | [Pagination](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/pagination)                                                           |                   |                         |                                                                                                                                                                                                                  |
|                                    | Passing the Configuration Parameters to SDK APIs                                                                                                         |                   |                         |                                                                                                                                                                                                                  |
| **Session APIs**                   |                                                                                                                                                          | Yes               | 1                       | API to manage sessions with the end system.                                                                                                                                                                      |
|                                    | [Session – Initialize](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/session-initialize)                                         |                   |                         | API to initiate SDK. In this API, SDK can connect to the end system, initialize memory cache, etc.                                                                                                               |
|                                    | [Session - Logout](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/session-logout)                                                 |                   |                         | API to cleanup / logout                                                                                                                                                                                          |
| **Registration API**               |                                                                                                                                                          | Yes               | 2                       |                                                                                                                                                                                                                  |
|                                    | [Connector Metadata – Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/connector-metadata-get)                                 |                   |                         | API to get connector metadata.                                                                                                                                                                                   |
|                                    | [Discovery API - Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/discovery-api-get)                                           |                   |                         | API to get connector discovery details.                                                                                                                                                                          |
| **Configuration Information APIs** |                                                                                                                                                          | Yes               | 3                       | These APIs are one of the most crucial APIs for the whole SDK to function as expected. OpsHub heavily relies on data sent as part of configuration info APIs to support multiple sync features.                  |
|                                    | [Server-Info](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/server-info)                                                         |                   |                         | This API needs to return basic server related information like max page size, time zone, etc.                                                                                                                    |
|                                    | [Projects – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/projects-list)                                                   |                   |                         | This API needs to return all the projects that exist in the end system.                                                                                                                                          |
|                                    | [Entity Types – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/entity-types-list)                                           |                   |                         | Returns all the entity types for a given project.                                                                                                                                                                |
|                                    | [Entity Type – Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/entity-type-get)                                               |                   |                         | Returns detailed configuration information for a given entity type and project.                                                                                                                                  |
|                                    | [Lookup Field Values-Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/lookup-field-value-get)                                  |                   |                         | Returns lookup values for a given field, a given entity type.                                                                                                                                                    |
| **Entity APIs**                    |                                                                                                                                                          | Yes               | 4                       | Entity CRUD APIs.                                                                                                                                                                                                |
|                                    | [Entity – Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/entity-get)                                                         |                   |                         | Gets information for a given entity id.                                                                                                                                                                          |
|                                    | [Entity – Create](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/entity-create)                                                   |                   |                         | Creates a single entity in the end system.                                                                                                                                                                       |
|                                    | [Entity – Update](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/entity-update)                                                   |                   |                         | Updates a single entity in the end system.                                                                                                                                                                       |
|                                    | [Entity – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/entity-list)                                                       |                   |                         | Searches API on entities.                                                                                                                                                                                        |
|                                    | [Entity – Delete](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/entity-delete)                                                   |                   |                         | Soft-deletes a single entity in the end system.                                                                                                                                                                  |
| **Substeps**                       |                                                                                                                                                          | No                |                         | Returns steps in which a given update needs to be broken.                                                                                                                                                        |
|                                    | [Dynamic Substeps – Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/dynamic-substeps-get)                                     |                   |                         |                                                                                                                                                                                                                  |
| **User APIs**                      |                                                                                                                                                          | No                |                         | Search API on users.                                                                                                                                                                                             |
|                                    | [Users – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/users-list)                                                         |                   |                         | Returns list of users matching a given search criteria.                                                                                                                                                          |
| **Comments API**                   |                                                                                                                                                          | No                |                         | Implement these set of APIs to integrate comments.                                                                                                                                                               |
|                                    | [Add Comments](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/add-comments)                                                       |                   |                         | Adds a single comment in the end system.                                                                                                                                                                         |
|                                    | [Get Comments](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/get-comments)                                                       |                   |                         | Gets all comments for a given entity.                                                                                                                                                                            |
| **Attachment APIs**                |                                                                                                                                                          | No                |                         | Implement these set of APIs to integrate attachments.                                                                                                                                                            |
|                                    | [Attachment Content – Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/attachment-content-get)                                 |                   |                         | Returns attachment content in base64 format.                                                                                                                                                                     |
|                                    | [Attachment – Create](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/attachment-create)                                           |                   |                         | Adds a single attachment in the end system.                                                                                                                                                                      |
|                                    | [Attachment - Update](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/attachment-update)                                           |                   |                         | Updates an attachment in the end system.                                                                                                                                                                         |
|                                    | [Attachment – Delete](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/attachment-delete)                                           |                   |                         | Deletes an attachment in the end system.                                                                                                                                                                         |
|                                    | [File Name – Get](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/file-name-get)                                                   |                   |                         | Parses and returns file name in given HREF or imgsrc.                                                                                                                                                            |
| **Links**                          |                                                                                                                                                          | No                |                         | Implement these set of APIs to integrate links.                                                                                                                                                                  |
|                                    | [Link – Create or Update](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/link-create-or-update)                                   |                   |                         | Adds or updates a link.                                                                                                                                                                                          |
|                                    | [Link – Delete](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/link-delete)                                                       |                   |                         | Deletes a link.                                                                                                                                                                                                  |
|                                    | [Get Siblings Under Parent Order By Rank](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/get-siblings-under-parent-order-by-rank) |                   |                         | Gets siblings under parent ordered by rank.                                                                                                                                                                      |
| **History APIs**                   |                                                                                                                                                          | No                |                         | Implement these set of APIs to integrate history.                                                                                                                                                                |
|                                    | [History – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/history-list)                                                     |                   |                         | This API is mandatory to implement if recovery.type is 'HISTORY\_BASED' in entitytype - get API of configuration info category. The API should return matching history records as per the given search criteria. |
|                                    | [Attachment History – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/attachment-history-list)                               |                   |                         | Implement this API if your end system has a separate API for getting attachment history.                                                                                                                         |
|                                    | [Comment History – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/comment-history-list)                                     |                   |                         | Implement this API if your end system has a separate API for getting comments history.                                                                                                                           |
|                                    | [Link History – List](https://docs.opshub.com/v7.215/connector-sdk-index/sdk-connector-apis/link-history-list)                                           |                   |                         | Implement this API if your end system has a separate API for getting links history.                                                                                                                              |

## Some Useful SDK Pages

* [APIs Required for Each Feature](https://docs.opshub.com/v7.215/connector-sdk-index/getting-started/apis-required-for-each-feature)
* [SDK Best Practices](https://docs.opshub.com/v7.215/connector-sdk-index/getting-started/sdk-best-practices)
