🗃️Endpoints - Les groupes

Lister les membres d'un groupe

List Group members

GEThttps://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers
Path parameters
groupId*string

The id of the group

Query parameters
Response

Group members returned successfully

Body
items*array of SpotMemberApiResponse (object)

The items found

total*integer

The total number of items found

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "text",
      "spotId": "text",
      "userId": "text",
      "email": "text",
      "title": "text",
      "role": "Member",
      "customRoleId": "text",
      "status": "Accepted",
      "firstname": "text",
      "lastname": "text",
      "warnings": 0,
      "embedBaseUrls": {
        "default": "text"
      }
    }
  ],
  "total": 0
}

Ajouter un membre à un groupe

Add member to a group

POSThttps://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers
Path parameters
groupId*string

The id of the group

Body
spotMemberId*string

An uuid representing the unique identifier of the spot member to add to the group

Response

Member successfully added

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "spotMemberId": "text"
    }),
});
const data = await response.json();

Créer un groupe

Create a group

POSThttps://openapi.meltingspot.io/v1/groups
Body
name*string

The name of the group

descriptionstring

The description of the group

emojistring

The emoji of the group

Response

Group has been successfully created

Body
id*string

The id of the group.

name*string

The name of the group.

descriptionstring

The description of the group

emojistring

The emoji of the group

iconstring

The icon of the group

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text"
    }),
});
const data = await response.json();
Response
{
  "id": "text",
  "name": "text",
  "description": "text",
  "emoji": "text",
  "icon": "text"
}

Lister les groupes du Spot

List groups

GEThttps://openapi.meltingspot.io/v1/groups
Query parameters
Response

Groups returned successfully

Body
items*array of GroupApiResponse (object)

The items found

total*integer

The total number of items found

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "items": [
    {
      "id": "text",
      "name": "text",
      "description": "text",
      "emoji": "text",
      "icon": "text"
    }
  ],
  "total": 0
}

Supprimer un groupe

Delete a group

DELETEhttps://openapi.meltingspot.io/v1/groups/{groupId}
Path parameters
groupId*string

The id of the group

Response

Group successfully deleted

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups/{groupId}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();

Modifier un groupe

Update a group

PUThttps://openapi.meltingspot.io/v1/groups/{groupId}
Path parameters
groupId*string

The id of the group

Body
namestring

The name of the group

descriptionnullable string

The description of the group

emojinullable string

The emoji of the group

Response

Group successfully updated

Body
id*string

The id of the group.

name*string

The name of the group.

descriptionstring

The description of the group

emojistring

The emoji of the group

iconstring

The icon of the group

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups/{groupId}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": "text",
  "name": "text",
  "description": "text",
  "emoji": "text",
  "icon": "text"
}

Récupérer un groupe

Get a group

GEThttps://openapi.meltingspot.io/v1/groups/{groupId}
Path parameters
groupId*string

The id of the group

Response

Group found and returned successfully

Body
id*string

The id of the group.

name*string

The name of the group.

descriptionstring

The description of the group

emojistring

The emoji of the group

iconstring

The icon of the group

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups/{groupId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "text",
  "name": "text",
  "description": "text",
  "emoji": "text",
  "icon": "text"
}

Ajouter plusieurs membres à un groupe

Add members to a group

POSThttps://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers~bulkAdd
Path parameters
groupId*string

The id of the group

Body
spotMemberIds*array of string

An array of strings representing the unique identifiers of spot members to add to group

Response

Members successfully added

Body
addedSpotMemberIds*array of string

The list of spot member id that were successfully added to the group.

failedSpotMemberIds*array of string

The list of spot member id that failed to be added to the group.

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers~bulkAdd', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "spotMemberIds": [
        "text"
      ]
    }),
});
const data = await response.json();
Response
{
  "addedSpotMemberIds": [
    "text"
  ],
  "failedSpotMemberIds": [
    "text"
  ]
}

Supprimer plusieurs membres d'un groupe

Remove members from a group

POSThttps://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers~bulkRemove
Path parameters
groupId*string

ID of the group

Body
spotMemberIds*array of string

An array of strings representing the unique identifiers of spot members to remove from group

Response

Members successfully removed

Body
removedSpotMembersCount*integer

The number of members removed from the group.

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups/{groupId}/spotMembers~bulkRemove', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "spotMemberIds": [
        "text"
      ]
    }),
});
const data = await response.json();
Response
{
  "removedSpotMembersCount": 0
}

Créer plusieurs groupes

Create multiple groups

POSThttps://openapi.meltingspot.io/v1/groups~bulkCreate
Body
name*string

The name of the group

descriptionstring

The description of the group

emojistring

The emoji of the group

Response

Groups has been successfully created

Body
created*array of GroupApiResponse (object)

The groups that were created.

failed*array of CreateGroupApiBody (object)

The groups that failed to be created.

Request
const response = await fetch('https://openapi.meltingspot.io/v1/groups~bulkCreate', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify([
      {
        "name": "text"
      }
    ]),
});
const data = await response.json();
Response
{
  "created": [
    {
      "id": "text",
      "name": "text",
      "description": "text",
      "emoji": "text",
      "icon": "text"
    }
  ],
  "failed": [
    {
      "name": "text",
      "description": "text",
      "emoji": "text"
    }
  ]
}

Dernière mise à jour