Skip to main content

Get the executing user's membership in a Project

GET/v2/projects/{projectId}/memberships/self
API version
v2
Request method
GET
Operation ID
project-get-self-membership-for-project

Request​

  • projectIdstringrequired

    ID of the Project to get the membership for.

Responses​

Format
application/json
Description

OK

  • avatarRefstring (uuid)

    Avatar file reference id of the user.

  • emailstring (email)required

    Email used by the invited user.

  • expiresAtstring (date-time)

    Time the ProjectMembership should expire at.

  • firstNamestringrequired

    First name of the user.

  • idstring (uuid)required

    ID of the ProjectMembership.

  • inheritedbooleanrequired

    Whether the ProjectMembership was inherited from a CustomerMembership.

  • inviteIdstring (uuid)

    ID of the ProjectInvite the membership was created from.

  • lastNamestringrequired

    Last name of the user.

  • memberSincestring (date-time)

    Date the projectMembership was created at.

  • mfabooleanrequired

    MFA activated by the user.

  • projectIdstring (uuid)required

    ID of the Project the membership is for.

  • rolestring (one of: notset, owner, emailadmin, external)required
  • userIdstring (uuid)required

    ID of the user the ProjectMembership is for.

Content-Type: application/json

{
"avatarRef": "f0f86186-0a5a-45b2-aa33-502777496347",
"email": "email@mittwald.example",
"expiresAt": "1985-10-26T01:21:00.000Z",
"firstName": "string",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"inherited": true,
"inviteId": "f0f86186-0a5a-45b2-aa33-502777496347",
"lastName": "string",
"memberSince": "1985-10-26T01:21:00.000Z",
"mfa": true,
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"role": "notset",
"userId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
{
"properties": {
"avatarRef": {
"description": "Avatar file reference id of the user.",
"format": "uuid",
"type": "string"
},
"email": {
"description": "Email used by the invited user.",
"format": "email",
"type": "string"
},
"expiresAt": {
"description": "Time the ProjectMembership should expire at.",
"format": "date-time",
"type": "string"
},
"firstName": {
"description": "First name of the user.",
"type": "string"
},
"id": {
"description": "ID of the ProjectMembership.",
"format": "uuid",
"type": "string"
},
"inherited": {
"description": "Whether the ProjectMembership was inherited from a CustomerMembership.",
"type": "boolean"
},
"inviteId": {
"description": "ID of the ProjectInvite the membership was created from.",
"format": "uuid",
"type": "string"
},
"lastName": {
"description": "Last name of the user.",
"type": "string"
},
"memberSince": {
"description": "Date the projectMembership was created at.",
"format": "date-time",
"type": "string"
},
"mfa": {
"description": "MFA activated by the user.",
"type": "boolean"
},
"projectId": {
"description": "ID of the Project the membership is for.",
"format": "uuid",
"type": "string"
},
"role": {
"enum": [
"notset",
"owner",
"emailadmin",
"external"
],
"type": "string"
},
"userId": {
"description": "ID of the user the ProjectMembership is for.",
"format": "uuid",
"type": "string"
}
},
"required": [
"id",
"projectId",
"userId",
"role",
"inherited",
"email",
"mfa",
"firstName",
"lastName"
],
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/string/memberships/self
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.project.getSelfMembershipForProject({
"projectId": "string"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Project\GetSelfMembershipForProject\GetSelfMembershipForProjectRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new GetSelfMembershipForProjectRequest(
projectId: "string"
));
$response = $client->project()->getSelfMembershipForProject($request);

var_dump($response->getBody();

On this page