# Sharing Group

#### Add a sharing group:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/sharing\_groups/add</p>

##### Request:

```
{
  "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
  "name": "Banking Sharing Group",
  "description": "Banking Institutions of X Sharing Group",
  "releasability": "string",
  "local": true,
  "active": true,
  "org_count": "6",
  "organisation_uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
  "org_id": "12345",
  "sync_user_id": "12345",
  "created": "string",
  "modified": "string",
  "roaming": true
}
```

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "SharingGroup": {
    "id": "1",
    "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
    "name": "Banking Sharing Group",
    "description": "Banking Institutions of X Sharing Group",
    "releasability": "string",
    "local": true,
    "active": true,
    "org_count": "6",
    "organisation_uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
    "org_id": "12345",
    "sync_user_id": "12345",
    "created": "string",
    "modified": "string",
    "roaming": true
  },
  "Organisation": {
    "id": "12345",
    "name": "ORGNAME",
    "date_created": "2021-06-14 14:29:19",
    "date_modified": "2021-06-14 14:29:19",
    "description": "string",
    "type": "ADMIN",
    "nationality": "string",
    "sector": "string",
    "created_by": "12345",
    "uuid": "string",
    "contacts": "string",
    "local": true,
    "restricted_to_domain": [
      "example.com"
    ],
    "landingpage": "string",
    "user_count": "3",
    "created_by_email": "string"
  },
  "SharingGroupOrg": [
    {
      "id": "1",
      "sharing_group_id": "1",
      "org_id": "12345",
      "extend": true,
      "Organisation": {
        "id": "12345",
        "name": "ORGNAME",
        "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b"
      }
    }
  ],
  "SharingGroupServer": [
    {
      "all_orgs": true,
      "server_id": "12345",
      "sharing_group_id": "1",
      "Server": {
        "id": "12345",
        "name": "Phising Server"
      }
    }
  ],
  "editable": true,
  "deletable": true
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Edit a sharing group:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/sharing\_groups/edit/{sharingGroupId}</p>

##### Request:

```
{
  "id": "1",
  "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
  "name": "Banking Sharing Group",
  "description": "Banking Institutions of X Sharing Group",
  "releasability": "string",
  "local": true,
  "active": true,
  "org_count": "6",
  "organisation_uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
  "org_id": "12345",
  "sync_user_id": "12345",
  "created": "string",
  "modified": "string",
  "roaming": true
}
```

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "SharingGroup": {
    "id": "1",
    "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
    "name": "Banking Sharing Group",
    "description": "Banking Institutions of X Sharing Group",
    "releasability": "string",
    "local": true,
    "active": true,
    "org_count": "6",
    "organisation_uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
    "org_id": "12345",
    "sync_user_id": "12345",
    "created": "string",
    "modified": "string",
    "roaming": true
  },
  "Organisation": {
    "id": "12345",
    "name": "ORGNAME",
    "date_created": "2021-06-14 14:29:19",
    "date_modified": "2021-06-14 14:29:19",
    "description": "string",
    "type": "ADMIN",
    "nationality": "string",
    "sector": "string",
    "created_by": "12345",
    "uuid": "string",
    "contacts": "string",
    "local": true,
    "restricted_to_domain": [
      "example.com"
    ],
    "landingpage": "string",
    "user_count": "3",
    "created_by_email": "string"
  },
  "SharingGroupOrg": [
    {
      "id": "1",
      "sharing_group_id": "1",
      "org_id": "12345",
      "extend": true,
      "Organisation": {
        "id": "12345",
        "name": "ORGNAME",
        "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b"
      }
    }
  ],
  "SharingGroupServer": [
    {
      "all_orgs": true,
      "server_id": "12345",
      "sharing_group_id": "1",
      "Server": {
        "id": "12345",
        "name": "Phising Server"
      }
    }
  ],
  "editable": true,
  "deletable": true
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Delete a sharing group:

<p class="callout danger">DELETE</p>

<p class="callout info">https://misp.local/sharing\_groups/delete/{sharingGroupId}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "SharingGroup deleted",
  "message": "SharingGroup deleted",
  "url": "/sharing_groups/delete/1"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Get a list of sharing groups:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/sharing\_groups</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "response": [
    {
      "SharingGroup": {
        "id": "1",
        "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
        "name": "Banking Sharing Group",
        "description": "Banking Institutions of X Sharing Group",
        "releasability": "string",
        "local": true,
        "active": true,
        "org_count": "6"
      },
      "Organisation": {
        "id": "12345",
        "name": "ORGNAME",
        "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b"
      },
      "SharingGroupOrg": [
        {
          "id": "1",
          "sharing_group_id": "1",
          "org_id": "12345",
          "extend": true,
          "Organisation": {
            "id": "12345",
            "name": "ORGNAME",
            "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b"
          }
        }
      ],
      "SharingGroupServer": [
        {
          "all_orgs": true,
          "server_id": "12345",
          "sharing_group_id": "1",
          "Server": {
            "id": "12345",
            "name": "Phising Server"
          }
        }
      ],
      "editable": true,
      "deletable": true
    }
  ]
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Get a sharing group by ID:

<p class="callout success">GET</p>

<p class="callout info">https://misp.local/sharing\_groups/view/{sharingGroupId}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "SharingGroup": {
    "id": "1",
    "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
    "name": "Banking Sharing Group",
    "description": "Banking Institutions of X Sharing Group",
    "releasability": "string",
    "local": true,
    "active": true,
    "org_count": "6",
    "organisation_uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b",
    "org_id": "12345",
    "sync_user_id": "12345",
    "created": "string",
    "modified": "string",
    "roaming": true
  },
  "Organisation": {
    "id": "12345",
    "name": "ORGNAME",
    "date_created": "2021-06-14 14:29:19",
    "date_modified": "2021-06-14 14:29:19",
    "description": "string",
    "type": "ADMIN",
    "nationality": "string",
    "sector": "string",
    "created_by": "12345",
    "uuid": "string",
    "contacts": "string",
    "local": true,
    "restricted_to_domain": [
      "example.com"
    ],
    "landingpage": "string",
    "user_count": "3",
    "created_by_email": "string"
  },
  "SharingGroupOrg": [
    {
      "id": "1",
      "sharing_group_id": "1",
      "org_id": "12345",
      "extend": true,
      "Organisation": {
        "id": "12345",
        "name": "ORGNAME",
        "uuid": "c99506a6-1255-4b71-afa5-7b8ba48c3b1b"
      }
    }
  ],
  "SharingGroupServer": [
    {
      "all_orgs": true,
      "server_id": "12345",
      "sharing_group_id": "1",
      "Server": {
        "id": "12345",
        "name": "Phising Server"
      }
    }
  ],
  "editable": true,
  "deletable": true
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Add an organisation to a sharing group:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/sharing\_groups/addOrg/{sharingGroupId}/{organisationId}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Organisation added to the sharing group.",
  "message": "Organisation added to the sharing group.",
  "url": "/sharing_groups/addOrg"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Remove an organisation from a sharing group:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/sharing\_groups/removeOrg/{sharingGroupId}/{organisationId}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Organisation removed from the sharing group.",
  "message": "Organisation removed from the sharing group.",
  "url": "/sharing_groups/removeOrg"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Add a server to a sharing group:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/sharing\_groups/addServer/{sharingGroupId}/{serverId}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Server added to the sharing group.",
  "message": "Server added to the sharing group.",
  "url": "/sharing_groups/addServer"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```




#### Remove a server from a sharing group:

<p class="callout info">POST</p>

<p class="callout info">https://misp.local/sharing\_groups/removeServer/{sharingGroupServerId}/{serverId}</p>

##### Response: 

<span style="text-decoration: underline;">**200:**</span>

```
{
  "saved": true,
  "success": true,
  "name": "Server removed from the sharing group.",
  "message": "Server removed from the sharing group.",
  "url": "/sharing_groups/removeServer"
}
```

**<span style="text-decoration: underline;">403:</span>**

```
{
  "name": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "message": "Authentication failed. Please make sure you pass the API key of an API enabled user along in the Authorization header.",
  "url": "/attributes"
}
```

<span style="text-decoration: underline;">**404:**</span>

```
{
  "name": "Invalid attribute",
  "message": "Invalid attribute",
  "url": "/attributes/1234"
}
```

**<span style="text-decoration: underline;">Default:</span>**

```
{
  "name": "string",
  "message": "string",
  "url": "/attributes"
}
```