Integrations API Endpoints

Manage your Git integrations, repositories and branches with our API.

Get Integrations

To list all your Git integrations you can simply send a GET request to the following endpoint.

https://api.nodion.com/v1/integrations

Required Headers: Authorization

Example Response:

{
  "integrations": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "status": "authorized",
      "access_type": "is_private",
      "service_type": "github",
      "service_url": null,
      "username": "myuser"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "status": "authorized",
      "access_type": "is_private",
      "service_type": "gitlab",
      "service_url": null,
      "username": "myuser-gl"
    }
  ]
}

Get Repositories

To list all repositories of a specific integration you can simply send a GET request to the following endpoint.

https://api.nodion.com/v1/integrations/:id/repositories

Required Headers: Authorization

URL Parameters:

id – The ID of the integration.

Example Response:

{
  "repositories": [
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "service_id": "123456789",
      "name": "my-frontend",
      "full_name": "myuser/my-frontend",
      "description": "A Vue.js frontend application",
      "default_branch": "main",
      "private": false,
      "fork": false,
      "archived": false,
      "disabled": false,
      "branches_count": 3
    },
    {
      "id": "d4e5f6a7-b8c9-0123-defa-234567890123",
      "service_id": "987654321",
      "name": "my-backend",
      "full_name": "myuser/my-backend",
      "description": "A Rails backend API",
      "default_branch": "main",
      "private": true,
      "fork": false,
      "archived": false,
      "disabled": false,
      "branches_count": 1
    }
  ]
}

Get Branches

To list all branches of a specific repository you can simply send a GET request to the following endpoint.

https://api.nodion.com/v1/integrations/:id/repositories/:repo_id/branches

Required Headers: Authorization

URL Parameters:

id – The ID of the integration.

repo_id – The ID of the repository.

Example Response:

{
  "branches": [
    {
      "id": "e5f6a7b8-c9d0-1234-efab-345678901234",
      "name": "main"
    },
    {
      "id": "f6a7b8c9-d0e1-2345-fabc-456789012345",
      "name": "develop"
    },
    {
      "id": "a7b8c9d0-e1f2-3456-abcd-567890123456",
      "name": "feature/login"
    }
  ]
}