The Unity UpMan REST API may be exposed (or disabled) as a regular Unity endpoint. See the main Unity documentation for endpoints configuration details.

All paths must be naturally prefixed with the server’s base URL, endpoint deployment’s path (as configured) and API version (currently there is only one). Example query path can be similar to:

https://unity.example.com/rest-upman/v1/projects/PROJECT-ID

1. API reference

1.1. Create project

@Path("/projects")
@POST

Adds a new project.

If registrationForm, signUpEnquiry or membershipUpdateEnquiry has property autogenerate set to true, the name property should be skipped.

If projectId is null or skipped, it will be auto generated.

Example input:

{
    "projectId": "my-project-id",
    "public": false,
    "displayedName": {
        "en": "displayedName"
    },
    "description": {
        "en": "description"
    },
    "logoUrl": "https://www.myservice.org/logo",
    "enableSubprojects": true,
    "readOnlyAttributes": [],
    "registrationForm": {
        "name": "registrationFormName",
        "autogenerate": false
    },
    "signUpEnquiry": {
        "name": "signUpEnquiryName",
        "autogenerate": false
    },
    "membershipUpdateEnquiry": {
        "name": "membershipUpdateEnquiryName",
        "autogenerate": false
    }
}

Example output:

{
    "id": "my-project-id"
}

1.2. Update project

@Path("/projects/{project-id}")
@PUT

Updates the project.

If registrationForm, signUpEnquiry or membershipUpdateEnquiry has property autogenerate set to true, the name property should be skipped.

Example input:

{
    "public": false,
    "displayedName": {
        "en": "displayedName"
    },
    "description": {
        "en": "description"
    },
    "logoUrl": "https://www.myservice.org/logo",
    "enableSubprojects": true,
    "readOnlyAttributes": [],
    "registrationForm": {
        "name": "registrationFormName",
        "autogenerate": false
    },
    "signUpEnquiry": {
        "name": "signUpEnquiryName",
        "autogenerate": false
    },
    "membershipUpdateEnquiry": {
        "name": "membershipUpdateEnquiryName",
        "autogenerate": false
    }
}

1.3. Remove project

@Path("/projects/{project-id}")
@DELETE

Removes the given project.

1.4. Get project

@Path("/projects/{project-id}")
@GET

Retrieves the given project.

Example output:

{
    "project-id": "projectId",
    "public": false,
    "displayedName": {
        "en": "displayedName"
    },
    "description": {
        "en": "description"
    },
    "logoUrl": "https://www.myservice.org/logo",
    "enableSubprojects": true,
    "readOnlyAttributes": [],
    "registrationForm": "registrationFormName",
    "signUpEnquiry": "signUpEnquiryName",
    "membershipUpdateEnquiry": "membershipUpdateEnquiryName"
}

1.5. Get projects

@Path("/projects")
@GET

Retrieves all projects.

Example output:

[
	{
	    "project-id": "projectId",
	    "public": false,
	    "displayedName": {
	        "en": "displayedName"
	    },
	    "description": {
	        "en": "description"
	    },
	    "logoUrl": "https://www.myservice.org/logo",
	    "enableSubprojects": true,
	    "readOnlyAttributes": [],
	    "registrationForm": "registrationFormName",
	    "signUpEnquiry": "signUpEnquiryName",
	    "membershipUpdateEnquiry": "membershipUpdateEnquiryName"
	}
]

1.6. Add member

@Path("/projects/{project-id}/members/{userId}")
@POST

Adds a user to the specified project.

Property userId should be provided as user’s email.

1.7. Remove member

@Path("/projects/{project-id}/members/{userId}")
@DELETE

Removes a user from the specified project.

1.8. Get member

@Path("/projects/{project-id}/members/{userId}")
@GET

Returns the specified user. Example output:

{
    "email": "[email protected]",
    "role": "manager",
    "attributes": [{
        "name": "attribute-name",
        "values": ["val1", "val2"]
    }]
}

1.9. Get members

@Path("/projects/{project-id}/members")
@GET

Returns all project users. Example output:

[
	{
	    "email": "[email protected]",
	    "role": "manager",
	    "attributes": [{
	        "name": "attribute-name",
	        "values": ["val1", "val2"]
	    }]
	}
]

1.10. Get member authorization role

@Path("/projects/{project-id}/members/{userId}/role")
@GET

Returns user’s project authorization role. Property role can be one of (manager, projectsAdmin, regular) Example output:

{
    "role": "manager"
}

1.11. Set member authorization role

@Path("/projects/{project-id}/members/{userId}/role")
@PUT

Updates user’s authorization role. Property role can be one of (manager, projectsAdmin, regular).

Example output:

{
    "role": "manager"
}