MyCumulus API 4.3

Version manual: 4.4.1

August 4, 2021


Table of contents

  Public API Functions

    Check back-end
    Utilities - Get API and back-end versions
    Utilities - Check Client Compatibility
    Utilities - Get UTC Time
    Utilities - Get Orthometric Height
    Utilities - Convert Geodetic Coordinates to Plane Coordinates
    Utilities - Convert list of Geodetic Coordinates to Plane Coordinates
    Utilities - Convert Plane Coordinates to Geodetic Coordinates
    Utilities - Convert list of Plane Coordinates to Geodetic Coordinates

    Location - Upload location of user
    Location - Get location of user
    Location - Delete location of user

    Users - Login
    Users - Logout
    Users - Update name and e-mail
    Users - Adding Collaborators
    Users - Signup of a Collaborator
    Users - Change Password
    Users - Change Password of Collaborator
    Users - Number of Collaborators
    Users - Get Collaborators
    Users - Grant Collaborator permission to create projects
    Users - Revoke Collaborator permission to create projects
    Users - Delete Collaborator (by Admin User)

    Projects - Create a project
    Projects - Update the project data
    Projects - Number of projects
    Projects - Retrieve projects (Admin User)
    Projects - Retrieve projects (Collaborator)
    Projects - Retrieve a Project
    Projects - Delete a Project
    Projects - Duplicate a Project
    Projects - Copy Project Template

    Project/Members - Add a user to a project.
    Project/Members - Remove a user from a project.
    Project/Members - Retrieve information of a member of a project.
    Project/Members - Retrieve the list of 'all members (users)' of the project.
    Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)
    Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.
    Project/Members - Grant permissions to collaborator
    Project/Members - Revoke permissions from collaborator

    Templates - Create a form
    Templates - Update the form
    Templates - Number of forms in a project
    Templates - Retrieve the list of all forms of a project
    Templates - Retrieve a form
    Templates - Delete a form
    Templates - Duplicate a form
    Templates - Copy a form from domain project

    Styles - Create a style
    Styles - Update the style
    Styles - Retrieve styles
    Styles - Retrieve a style
    Styles - Delete a style
    Styles - Template and Style compatible
    Styles - List of compatible styles

    Features - Upload a feature
    Features - Update the feature
    Features - Number of features
    Features - Retrieve the list of all features
    Features - Retrieve a feature
    Features - Delete a set of features
    Features - Search text
    Features - Search extensive
    Features - Import CSV

    Report Templates - Create a report template
    Report Templates - Update the report template
    Report Templates - Retrieve the list of all report templates
    Report Templates - Retrieve the list of all public report templates
    Report Templates - Retrieve a report template
    Report Templates - Delete a report template

    Create Report - Create a report
    Create Report - Get the status of the report generation
    Create Report - Get the list of generated reports
    Create Report - Set the indication that the report is downloaded
    Create Report - Delete the report

    Files - Upload a private file
    Files - Check if a private file exists
    Files - Download a private file
    Files - Delete a private file
    Files - Upload a public file
    Files - Check if a public file exists
    Files - Download a public file
    Files - Delete a public file


--- Public API functions: Utilities ---


Check back-end   

This is a simple call to check if you have access to the MyCumulus back-end.

Request

GET    /v1/online

Response

{
    "status" : 200, 
    "uri" : "/v1/online", 
    "server_status" : {
        "status" : true
    }
}


Utilities - Get API and back-end versions   

Returns the version of the MyCumulus API and of the back-end software.

Request

GET    /v1/version

Response

{
    "status" : 200, 
    "uri" : "/v1/version", 
    "version" : {
        "api_version" : "4.3", 
        "backend_version" : "4.3.1"
    }
}


Utilities - Check Client Compatibility   

This command verifies if the client software using the given API version is compatible with the actual API version. In the response, client_version_compatible is true if the back-end is backwards compatible with the API used by the client.

Request

GET    /v1/version/4.3

Response

{
    "status" : 200, 
    "uri" : "/v1/version/4.3", 
    "version" : {
        "client_version_compatible" : true, 
        "client_version" : "4.3", 
        "api_version" : "4.3", 
        "backend_version" : "4.3.1"
    }
}


Utilities - Get UTC Time   

Returns the actual UTC time of the MyCumulus back-end. The back-end server uses the Amazon Time Sync Service for time syncronisation.

Request

GET    /v1/time

Response

{
    "status" : 200, 
    "uri" : "/v1/time", 
    "time" : "2021-08-06T19:52:37.598Z"
}


Utilities - Get Orthometric Height   

Returns for Lambert 72 (B), Lambert 2008 (B) and RD (NL), the difference between ellipsoidal height and orthometric height.

Request

POST    /v1/crs/dz
Content-Type: application/json
X-Auth-Token: b12b56205a99e8f717532b12d5bd4be4b744be885f45f55b1d5454198f06dd59ec7fcf49ee827c1dc8cd423d99cc2220aa93860d9a7d0a2044f39b5d32dec1bb95bd985eb97b3557053939ebca32f64767e15e2d83f40a353958445875d5ab352079b0b0d32cde9db220e23d4a1085ed4d3721cd2e1cbe682cb10

Request Body

{
    "crs" : "RDNAP", 
    "coordinates" : {
        "latitude" : 51.7010500000000, 
        "longitude" : 5.35511000000000
    }
}

Response

{
    "status" : 201, 
    "uri" : "/v1/crs/dz", 
    "Z_value" : {
        "Z" : 43.588318565505986
    }
}


Utilities - Convert Geodetic Coordinates to Plane Coordinates   

Converts from geodetic to plane coordinates.
- Lambert 72 (B) and Lambert 2008 (B) : ellipsoidal altitude is converted to TAW.
- RD (NL) : ellipsoidal altitude is converted to NAP.
- BGS2005 : heigth = ellipsoidal altitude. Converts to Bulgarian CRS BGS2005 Cadastral.
- UTM : heigth = ellipsoidal altitude. The conversion is automatically done in the UTM zone of the given latitude, longitude.

See also:
    Utilities - Convert list of Geodetic Coordinates to Plane Coordinates
    Utilities - Convert Plane Coordinates to Geodetic Coordinates
    Utilities - Convert list of Plane Coordinates to Geodetic Coordinates

Request

POST    /v1/crs/conversion
Content-Type: application/json
X-Auth-Token: b12b56205a99e8f717532b12d5bd4be4b744be885f45f55b1d5454198f06dd59ec7fcf49ee827c1dc8cd423d99cc2220aa93860d9a7d0a2044f39b5d32dec1bb95bd985eb97b3557053939ebca32f64767e15e2d83f40a353958445875d5ab352079b0b0d32cde9db220e23d4a1085ed4d3721cd2e1cbe682cb10

Request Body

{
    "crs" : "RDNAP", 
    "coordinates" : {
        "latitude" : 51.7010500000000, 
        "longitude" : 5.35511000000000, 
        "altitude" : 47.1230000000000
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/crs/conversion", 
    "coordinates" : {
        "X" : 152781.5616310775, 
        "Y" : 412476.39033625706, 
        "Z" : 3.5346814344940114
    }
}


Utilities - Convert list of Geodetic Coordinates to Plane Coordinates   

Converts a list of geodetic coordinates to plane coordinates.

See also:
    Utilities - Convert Geodetic Coordinates to Plane Coordinates
    Utilities - Convert Plane Coordinates to Geodetic Coordinates
    Utilities - Convert list of Plane Coordinates to Geodetic Coordinates

Request

POST    /v1/crs/listconversion
Content-Type: application/json
X-Auth-Token: b12b56205a99e8f717532b12d5bd4be4b744be885f45f55b1d5454198f06dd59ec7fcf49ee827c1dc8cd423d99cc2220aa93860d9a7d0a2044f39b5d32dec1bb95bd985eb97b3557053939ebca32f64767e15e2d83f40a353958445875d5ab352079b0b0d32cde9db220e23d4a1085ed4d3721cd2e1cbe682cb10

Request Body

{
    "crs" : "Lambert72", 
    "coordinates" : [
        {
            "latitude" : 51.0000000000000, 
            "longitude" : 5.00000000000000, 
            "altitude" : 75.0000000000000
        }, 
        {
            "latitude" : 51.1000000000000, 
            "longitude" : 5.10000000000000, 
            "altitude" : 75.1000000000000
        }, 
        {
            "latitude" : 51.2000000000000, 
            "longitude" : 5.20000000000000, 
            "altitude" : 75.2000000000000
        }
    ]
}

Response

{
    "status" : 200, 
    "uri" : "/v1/crs/listconversion", 
    "coordinates" : [
        {
            "X" : 194310.43337177983, 
            "Y" : 187941.78858876982, 
            "Z" : 31.97233327229818
        }, 
        {
            "X" : 201220.15400326814, 
            "Y" : 199130.4603034103, 
            "Z" : 32.3336680094401
        }, 
        {
            "X" : 208099.7824498453, 
            "Y" : 210328.6867683348, 
            "Z" : 32.76499862670899
        }
    ]
}


Utilities - Convert Plane Coordinates to Geodetic Coordinates   

Converts from plane coordinates to geodetic coordinates.
For more details about the supported CRS's see Utilities - Convert Geodetic Coordinates to Plane Coordinates

See also:
    Utilities - Convert Geodetic Coordinates to Plane Coordinates
    Utilities - Convert list of Geodetic Coordinates to Plane Coordinates
    Utilities - Convert list of Plane Coordinates to Geodetic Coordinates

Request

POST    /v1/crs/inverse_conversion
Content-Type: application/json
X-Auth-Token: b12b56205a99e8f717532b12d5bd4be4b744be885f45f55b1d5454198f06dd59ec7fcf49ee827c1dc8cd423d99cc2220aa93860d9a7d0a2044f39b5d32dec1bb95bd985eb97b3557053939ebca32f64767e15e2d83f40a353958445875d5ab352079b0b0d32cde9db220e23d4a1085ed4d3721cd2e1cbe682cb10

Request Body

{
    "crs" : "RDNAP", 
    "coordinates" : {
        "X" : 152781.563000000, 
        "Y" : 412476.389000000, 
        "Z" : 3.55000000000000
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/crs/inverse_conversion", 
    "location" : {
        "latitude" : 51.70104998838578, 
        "longitude" : 5.35511002040349, 
        "altitude" : 47.138318575872425
    }
}


Utilities - Convert list of Plane Coordinates to Geodetic Coordinates   

Converts a list of plane coordinates to geodetic coordinates.

See also:
    Utilities - Convert Geodetic Coordinates to Plane Coordinates
    Utilities - Convert Plane Coordinates to Geodetic Coordinates
    Utilities - Convert list of Geodetic Coordinates to Plane Coordinates

Request

POST    /v1/crs/list_inverse_conversion
Content-Type: application/json
X-Auth-Token: b12b56205a99e8f717532b12d5bd4be4b744be885f45f55b1d5454198f06dd59ec7fcf49ee827c1dc8cd423d99cc2220aa93860d9a7d0a2044f39b5d32dec1bb95bd985eb97b3557053939ebca32f64767e15e2d83f40a353958445875d5ab352079b0b0d32cde9db220e23d4a1085ed4d3721cd2e1cbe682cb10

Request Body

{
    "crs" : "Lambert72", 
    "coordinates" : [
        {
            "X" : 194310.433000000, 
            "Y" : 187941.789000000, 
            "Z" : 31.9720000000000
        }, 
        {
            "X" : 201220.154000000, 
            "Y" : 199130.460000000, 
            "Z" : 32.3340000000000
        }, 
        {
            "X" : 208099.782000000, 
            "Y" : 210328.684000000, 
            "Z" : 32.7650000000000
        }
    ]
}

Response

{
    "status" : 200, 
    "uri" : "/v1/crs/list_inverse_conversion", 
    "locations" : [
        {
            "latitude" : 51.000000001884075, 
            "longitude" : 5.000000005450774, 
            "altitude" : 74.99966672373188
        }, 
        {
            "latitude" : 51.0999999954506, 
            "longitude" : 5.10000001060911, 
            "altitude" : 75.10033200234022
        }, 
        {
            "latitude" : 51.19999997335334, 
            "longitude" : 5.200000003755887, 
            "altitude" : 75.20000145388698
        }
    ]
}


--- Public API functions: Track and Trace ---


Location - Upload location of user   

Upload GNSS location. Stores the most recent GNSS location of the user. Can be used for track and trace.

Request

POST    /v1/location/upload
Content-Type: application/json
X-Auth-Token: b95915205f784f4768f9e941a02efe92b227fa9316f8e26af4392e51e6da1a7c189966a19aa51ab94bd843d515fcf5f84e491c4dd464b0c628fef195f024b3260d8ce1ed6368d8bd86916d377f7c8f5eac04c565f121cb03b3ba2975f80af301f7376909150c8c59dd9e6fef1d1d3ad3bee1b386822553e45299d7a3715

Request Body

{
    "user_id" : "610d9306ed1110411f64097f", 
    "user_name" : "DrPyth", 
    "gnss_source" : "MyCumulus GNSS", 
    "coordinates" : {
        "longitude" : 51.7010500000000, 
        "latitude" : 5.35511000000000, 
        "altitude" : 66.2390000000000, 
        "accuracy" : 1.30000000000000E-3
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/location/upload", 
    "location" : {
        "id" : "610d9306ed1110411f640986", 
        "created_at" : "2021-08-06T19:52:38.273Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9306ed1110411f64097f", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "user_id" : "610d9306ed1110411f64097f", 
        "coordinates" : {
            "latitude" : 5.35511, 
            "longitude" : 51.70105, 
            "altitude" : 66.239, 
            "accuracy" : 0.0013
        }, 
        "user_name" : "DrPyth", 
        "gnss_source" : "MyCumulus GNSS"
    }
}


Location - Get location of user   

Gets the most recent GNSS location.

Request

GET    /v1/location/610d9306ed1110411f64097f
X-Auth-Token: b95915205f784f4768f9e941a02efe92b227fa9316f8e26af4392e51e6da1a7c189966a19aa51ab94bd843d515fcf5f84e491c4dd464b0c628fef195f024b3260d8ce1ed6368d8bd86916d377f7c8f5eac04c565f121cb03b3ba2975f80af301f7376909150c8c59dd9e6fef1d1d3ad3bee1b386822553e45299d7a3715

Response

{
    "status" : 200, 
    "uri" : "/v1/location/610d9306ed1110411f64097f", 
    "location" : {
        "latitude" : 5.35511, 
        "longitude" : 51.70105, 
        "altitude" : 66.239, 
        "accuracy" : 0.0013
    }
}


Location - Delete location of user   

Deletes the GNSS location.

Request

DELETE    /v1/location/610d9306ed1110411f64097f
X-Auth-Token: b95915205f784f4768f9e941a02efe92b227fa9316f8e26af4392e51e6da1a7c189966a19aa51ab94bd843d515fcf5f84e491c4dd464b0c628fef195f024b3260d8ce1ed6368d8bd86916d377f7c8f5eac04c565f121cb03b3ba2975f80af301f7376909150c8c59dd9e6fef1d1d3ad3bee1b386822553e45299d7a3715

Response

{
    "status" : 200, 
    "uri" : "/v1/location/610d9306ed1110411f64097f", 
    "location" : {
        "id" : "610d9306ed1110411f640986", 
        "created_at" : "2021-08-06T19:52:38.273Z", 
        "updated_at" : null, 
        "deleted_at" : "2021-08-06T19:52:38.352Z", 
        "created_by" : "610d9306ed1110411f64097f", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "user_id" : "610d9306ed1110411f64097f", 
        "coordinates" : {
            "latitude" : 5.35511, 
            "longitude" : 51.70105, 
            "altitude" : 66.239, 
            "accuracy" : 0.0013
        }, 
        "user_name" : "DrPyth", 
        "gnss_source" : "MyCumulus GNSS"
    }
}


--- Public API functions: Users ---


Users - Login   

Login using name and password. The name may be either the user name or the e-mail address. Once logged in, the user needs the authentication code X-Auth-Token to access the public MyCumulus API functions.
The request body should contain a JSON object named credentials containing the user name and password, and an optional boolean field named remember.
If remember is set to true, the user session will be kept active until the user has explicitely logged out.
By default remember is set to false and the user session will be closed after 24 hours.

See also:
    Users - Logout

Request

POST    /v1/users/login
Content-Type: application/json

Request Body

{
    "credentials" : {
        "name" : "DrPyth", 
        "password" : "MyPassword"
    }, 
    "remember" : false
}

Response

{
    "status" : 202, 
    "uri" : "/v1/users/login", 
    "token" : {
        "user_id" : "610d9306ed1110411f640988", 
        "key" : "aec318a8ccee46a24bea50b063a5feaa9b754cb89034f39b91edc9ee1e048cf5c1aba8d69be54b82ce0531d9231ff1b47a751717be9e4a92e5b9a5e79d563460f6fbd2c6d0b6656fdd9b50b951ee168349e5b4516656fdd161845dcbbece92fa4711435314efb306a3da6e0efd1aef6cd5992d41ee3cabdb0a989f93f", 
        "expires_at" : "2021-08-07T19:52:38.690Z"
    }
}


Users - Logout   

Logout of Admin or Collaborator.

See also:
    Users - Login

Request

POST    /v1/users/logout
X-Auth-Token: aec318a8ccee46a24bea50b063a5feaa9b754cb89034f39b91edc9ee1e048cf5c1aba8d69be54b82ce0531d9231ff1b47a751717be9e4a92e5b9a5e79d563460f6fbd2c6d0b6656fdd9b50b951ee168349e5b4516656fdd161845dcbbece92fa4711435314efb306a3da6e0efd1aef6cd5992d41ee3cabdb0a989f93f

Response

{
    "status" : 200, 
    "uri" : "/v1/users/logout", 
    "message" : "DrPyth is logged out."
}


Users - Update name and e-mail   

Update the name and/or e-mail of the user.

Request

PUT    /v1/users/610d9306ed1110411f640988/update
Content-Type: application/json
X-Auth-Token: ab3152d87468bca1120eca9935aeefb90b1f5a9486d4fe8b8689378d381ad390efbf7bc8c214ece3b139f64e3b6b784fbf55bfc385d0ce53735389b96eceb41bfede17e5449842c3571f17249e88c722348d71a64ae27f8225bd063968574fde2417a179181ac98aa1fc40654ec5ef8fb304788f3ea8a77e70425134

Request Body

{
    "name" : "DrPyth", 
    "email" : "mynewemail@mycumulus.com"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/users/610d9306ed1110411f640988/update", 
    "user" : {
        "id" : "610d9306ed1110411f640988", 
        "email" : "mynewemail@mycumulus.com", 
        "name" : "DrPyth", 
        "is_activated" : true, 
        "managed_users_ids" : [
        ], 
        "created_at" : "2021-08-06T19:52:38.559Z", 
        "updated_at" : "2021-08-06T19:52:38.819Z", 
        "deleted_at" : null, 
        "user_type" : "admin_user", 
        "customer_id" : "610d9306ed1110411f64098a", 
        "temporary_user" : false, 
        "mc_marxact" : null
    }
}


Users - Adding Collaborators   

An Admin user can invite collaborators with the invite call.
The response contains an invitation_code, that is required to signup a collaborator (also called a managed user).
The number of collaborators that can be added depends on the subscription.

See also:
    Users - Signup of a Collaborator
    Users - Delete Collaborator (by Admin User)

Request

POST    /v1/users/invite
Content-Type: application/json
X-Auth-Token: 401ac8d4a544226d911f79d4db932568b151e3a6adfd0f4cb33c0aab7d6b897e51f341f416c23e5e86d3b2d17555eaa0a3c534f932255ed8a74322e327ccb6bafa68215731fcfaeec7afc67c833540c346d190655f3a6453d61d208b43c625fdc6763222d5031e6322d4f82e5f2e0e68e59fab0f15d8c95eb43607ccb1b71

Request Body

{
    "email" : "Thales@mycumulus.com"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/users/invite", 
    "invitation_code" : "db6f9d6cf581217e2eafdca5c9db3588db84f3d5affb5454b2610613d92462cbcc94e68df5c9988a844b51cd98579899c2c7edc539bd6a13dabc80bb6955b5c883cd75f2d753245272a15c58f327d7f1da5dace8e177f3c4c74a5ae7ac3f29c4544d52c42e99f263963548f105acfbf1dd95d94a57005982ff52c5ee9"
}


Users - Signup of a Collaborator   

When an Admin user has sent an invitation, the collaborator will receive an e-mail. Using the link in the e-mail will activate the Signup page of the MyCumulus website.
When the user name and the password are given, the user can activate the account.

See also:
    Users - Adding Collaborators

Request

POST    /v1/users/signupmanaged?token=db6f9d6cf581217e2eafdca5c9db3588db84f3d5affb5454b2610613d92462cbcc94e68df5c9988a844b51cd98579899c2c7edc539bd6a13dabc80bb6955b5c883cd75f2d753245272a15c58f327d7f1da5dace8e177f3c4c74a5ae7ac3f29c4544d52c42e99f263963548f105acfbf1dd95d94a57005982ff52c5ee9
Content-Type: application/json

Request Body

{
    "email" : "Thales@mycumulus.com", 
    "name" : "Thales", 
    "password" : "MyPassword", 
    "user_type" : "collaborator"
}

Response

{
    "status" : 201, 
    "uri" : "/v1/users/signupmanaged?token=db6f9d6cf581217e2eafdca5c9db3588db84f3d5affb5454b2610613d92462cbcc94e68df5c9988a844b51cd98579899c2c7edc539bd6a13dabc80bb6955b5c883cd75f2d753245272a15c58f327d7f1da5dace8e177f3c4c74a5ae7ac3f29c4544d52c42e99f263963548f105acfbf1dd95d94a57005982ff52c5ee9", 
    "user" : {
        "id" : "610d9306ed1110411f640991", 
        "email" : "thales@mycumulus.com", 
        "name" : "Thales", 
        "is_activated" : true, 
        "created_at" : "2021-08-06T19:52:38.935Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9306ed1110411f640988", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "user_type" : "collaborator", 
        "customer_id" : "610d9306ed1110411f64098a", 
        "temporary_user" : null, 
        "mc_marxact" : null, 
        "manager_id" : "610d9306ed1110411f640988", 
        "permissions" : {
            "projects" : [
            ]
        }
    }
}


Users - Change Password   

A user can request to change his password with the Change Password function. The old and the new password must be given in the Request Body.

See also:
    Users - Login
    Users - Change Password of Collaborator

Request

PUT    /v1/users/changepassword
Content-Type: application/json
X-Auth-Token: 44f49154a378bc586a2527c53630949e69dbaf2f302bc794c4e51d7c3c36c0c76b195d20d9d6378ae54c77f4b3ce488f194f5a39ee949e32a35388cb534a74f7b3f4146fbc382821ea579923af3079723550766cdd91a4b6492bee7d334b08664597c669dc38b5b9a6746e5aa77852dc96b3737dc38e21e282c5

Request Body

{
    "password" : "MyPassword", 
    "new_password" : "OldPassword"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/users/changepassword", 
    "user" : {
        "id" : "610d9306ed1110411f640991", 
        "email" : "thales@mycumulus.com", 
        "name" : "Thales", 
        "is_activated" : true, 
        "created_at" : "2021-08-06T19:52:38.935Z", 
        "updated_at" : "2021-08-06T19:52:39.032Z", 
        "deleted_at" : null, 
        "created_by" : "610d9306ed1110411f640988", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "user_type" : "collaborator", 
        "customer_id" : "610d9306ed1110411f64098a", 
        "temporary_user" : null, 
        "mc_marxact" : null, 
        "manager_id" : "610d9306ed1110411f640988", 
        "permissions" : {
            "projects" : [
            ]
        }
    }
}


Users - Change Password of Collaborator   

Change of the password of a Collaborator by the Admin user.

See also:
    Users - Login
    Users - Change Password

Request

POST    /v1/users/resetcollaboratorpassword
X-Auth-Token: 401ac8d4a544226d911f79d4db932568b151e3a6adfd0f4cb33c0aab7d6b897e51f341f416c23e5e86d3b2d17555eaa0a3c534f932255ed8a74322e327ccb6bafa68215731fcfaeec7afc67c833540c346d190655f3a6453d61d208b43c625fdc6763222d5031e6322d4f82e5f2e0e68e59fab0f15d8c95eb43607ccb1b71
Content-Type: application/json

Request Body

{
    "collaborator_name" : "Thales", 
    "new_password" : "NewPassword"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/users/resetcollaboratorpassword", 
    "user" : {
        "id" : "610d9306ed1110411f640991", 
        "email" : "thales@mycumulus.com", 
        "name" : "Thales", 
        "is_activated" : true, 
        "created_at" : "2021-08-06T19:52:38.935Z", 
        "updated_at" : "2021-08-06T19:52:39.122Z", 
        "deleted_at" : null, 
        "created_by" : "610d9306ed1110411f640988", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "user_type" : "collaborator", 
        "customer_id" : "610d9306ed1110411f64098a", 
        "temporary_user" : null, 
        "mc_marxact" : null, 
        "manager_id" : "610d9306ed1110411f640988", 
        "permissions" : {
            "projects" : [
            ]
        }
    }
}


Users - Number of Collaborators   

Returns the number of all Collaborators that the Admin user has added. The count includes the Admin user.

See also:
    Users - Adding Collaborators
    Users - Delete Collaborator (by Admin User)
    Users - Get Collaborators

Request

GET    /v1/users/610d9306ed1110411f640988/count
X-Auth-Token: 080db33174fbac4a3c96b79d3c6987fe921dc9c402929ba7c7bbcc45fe631e6ae12e682e37406ff81353c517f0ac385a6c8e25e6dcba815defca845bbf495a3ae23ae1572d7a8caf75ae71f185de79a05bed9256f3dabd60dce9a1a6d71f53b04c8941ae214f217ea122d98374569d67cd4a472cb4870cdc4c8695317

Response

{
    "number_of_users" : 2
}


Users - Get Collaborators   

Returns a list of all Collaborators that the Admin user has added.

See also:
    Users - Adding Collaborators
    Users - Delete Collaborator (by Admin User)

Request

GET    /v1/users/610d9306ed1110411f640988/managed?page=1&perPage=100
X-Auth-Token: 080db33174fbac4a3c96b79d3c6987fe921dc9c402929ba7c7bbcc45fe631e6ae12e682e37406ff81353c517f0ac385a6c8e25e6dcba815defca845bbf495a3ae23ae1572d7a8caf75ae71f185de79a05bed9256f3dabd60dce9a1a6d71f53b04c8941ae214f217ea122d98374569d67cd4a472cb4870cdc4c8695317

Response

{
    "status" : 200, 
    "uri" : "/v1/users/610d9306ed1110411f640988/managed?page=1&perPage=100", 
    "users" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 1, 
            "total_count" : 1, 
            "uris" : {
                "first" : "/v1/users/610d9306ed1110411f640988/managed?page=1&perPage=100", 
                "self" : "/v1/users/610d9306ed1110411f640988/managed", 
                "last" : "/v1/users/610d9306ed1110411f640988/managed?page=1&perPage=100"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/users/610d9306ed1110411f640988/managed?page=1&perPage=100", 
                "self" : "http://api.mycumulus.com/v1/users/610d9306ed1110411f640988/managed", 
                "last" : "http://api.mycumulus.com/v1/users/610d9306ed1110411f640988/managed?page=1&perPage=100"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9306ed1110411f640991", 
                "email" : "thales@mycumulus.com", 
                "name" : "Thales", 
                "is_activated" : true, 
                "created_at" : "2021-08-06T19:52:38.935Z", 
                "updated_at" : "2021-08-06T19:52:39.175Z", 
                "deleted_at" : null, 
                "created_by" : "610d9306ed1110411f640988", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "user_type" : "collaborator", 
                "customer_id" : "610d9306ed1110411f64098a", 
                "temporary_user" : null, 
                "mc_marxact" : null, 
                "manager_id" : "610d9306ed1110411f640988", 
                "permissions" : {
                    "projects" : [
                    ]
                }
            }
        ]
    }
}


Users - Grant Collaborator permission to create projects   

This command will give permission to the Collaborator to create projects. Only an Admin can grant this permission.
The request body contains a JSON object named permissions.
Only the structure shown in the example below is valid.
The Admin user acts as a super user and has all permissions to projects, templates, features and files owned by a collaborator.

See also:
    Projects - Create a project
    Users - Revoke Collaborator permission to create projects

Request

PUT    /v1/users/610d9307ed1110411f640995/grant
Content-Type: application/json
X-Auth-Token: 080db33174fbac4a3c96b79d3c6987fe921dc9c402929ba7c7bbcc45fe631e6ae12e682e37406ff81353c517f0ac385a6c8e25e6dcba815defca845bbf495a3ae23ae1572d7a8caf75ae71f185de79a05bed9256f3dabd60dce9a1a6d71f53b04c8941ae214f217ea122d98374569d67cd4a472cb4870cdc4c8695317

Request Body

{
    "permissions" : {
        "projects" : [
            "create"
        ]
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/users/610d9307ed1110411f640995/grant", 
    "user" : {
        "id" : "610d9307ed1110411f640995", 
        "email" : "porphyry@mycumulus.com", 
        "name" : "Porphyry", 
        "is_activated" : true, 
        "created_at" : "2021-08-06T19:52:39.370Z", 
        "updated_at" : "2021-08-06T19:52:39.417Z", 
        "deleted_at" : null, 
        "created_by" : "610d9306ed1110411f640988", 
        "updated_by" : "610d9306ed1110411f640988", 
        "deleted_by" : null, 
        "user_type" : "collaborator", 
        "customer_id" : "610d9306ed1110411f64098a", 
        "temporary_user" : null, 
        "mc_marxact" : null, 
        "manager_id" : "610d9306ed1110411f640988", 
        "permissions" : {
            "projects" : [
                "create"
            ]
        }
    }
}


Users - Revoke Collaborator permission to create projects   

This command will revoke the permission of a Collaborator to create projects. Only an Admin can revoke this permission.
The request body contains a JSON object named permissions.
Only the structure shown in the example below is valid.
The Admin user acts as a super user and has all permissions to projects, templates, features and files owned by a collaborator.

See also:
    Projects - Create a project
    Users - Grant Collaborator permission to create projects

Request

PUT    /v1/users/610d9307ed1110411f640995/revoke
Content-Type: application/json
X-Auth-Token: 080db33174fbac4a3c96b79d3c6987fe921dc9c402929ba7c7bbcc45fe631e6ae12e682e37406ff81353c517f0ac385a6c8e25e6dcba815defca845bbf495a3ae23ae1572d7a8caf75ae71f185de79a05bed9256f3dabd60dce9a1a6d71f53b04c8941ae214f217ea122d98374569d67cd4a472cb4870cdc4c8695317

Request Body

{
    "permissions" : {
        "projects" : [
            "create"
        ]
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/users/610d9307ed1110411f640995/revoke", 
    "user" : {
        "id" : "610d9307ed1110411f640995", 
        "email" : "porphyry@mycumulus.com", 
        "name" : "Porphyry", 
        "is_activated" : true, 
        "created_at" : "2021-08-06T19:52:39.370Z", 
        "updated_at" : "2021-08-06T19:52:39.460Z", 
        "deleted_at" : null, 
        "created_by" : "610d9306ed1110411f640988", 
        "updated_by" : "610d9306ed1110411f640988", 
        "deleted_by" : null, 
        "user_type" : "collaborator", 
        "customer_id" : "610d9306ed1110411f64098a", 
        "temporary_user" : null, 
        "mc_marxact" : null, 
        "manager_id" : "610d9306ed1110411f640988", 
        "permissions" : {
            "projects" : [
            ]
        }
    }
}


Users - Delete Collaborator (by Admin User)   

Delete a Collaborator. When deleted, all projects owned by the Collaborator, and consequently the subordinate templates and features, will be removed.

See also:
    Users - Adding Collaborators
    Users - Number of Collaborators
    Users - Get Collaborators

Request

DELETE    /v1/managedusers/610d9307ed1110411f640995
X-Auth-Token: 080db33174fbac4a3c96b79d3c6987fe921dc9c402929ba7c7bbcc45fe631e6ae12e682e37406ff81353c517f0ac385a6c8e25e6dcba815defca845bbf495a3ae23ae1572d7a8caf75ae71f185de79a05bed9256f3dabd60dce9a1a6d71f53b04c8941ae214f217ea122d98374569d67cd4a472cb4870cdc4c8695317

Response

{
    "status" : 200, 
    "uri" : "/v1/managedusers/610d9307ed1110411f640995", 
    "user" : {
        "id" : "610d9307ed1110411f640995", 
        "email" : "porphyry@mycumulus.com", 
        "name" : "Porphyry", 
        "is_activated" : true, 
        "created_at" : "2021-08-06T19:52:39.370Z", 
        "updated_at" : "2021-08-06T19:52:39.460Z", 
        "deleted_at" : "2021-08-06T19:52:39.511Z", 
        "created_by" : "610d9306ed1110411f640988", 
        "updated_by" : "610d9306ed1110411f640988", 
        "deleted_by" : null, 
        "user_type" : "collaborator", 
        "customer_id" : "610d9306ed1110411f64098a", 
        "temporary_user" : null, 
        "mc_marxact" : null, 
        "manager_id" : "610d9306ed1110411f640988", 
        "permissions" : {
            "projects" : [
            ]
        }
    }
}


--- Public API functions: Projects ---


Projects - Create a project   

Creates a project. An Admin user can always create projects. A Collaborator requires permission, see Users - Grant Collaborator permission to create projects to create projects.
A user that created the project, will become the owner of the project.
The owner of a project has all permissions. None can be revoked.
A project can be a 'template', a 'domain' or a plain 'project'. A project of type 'template' is intended to be used as a template to create plain projects. A 'domain' groups forms that belong to the same domain. E.g. archeology, biology, drilling, etc.A project created by a user is a private project. It means that the project can only be shared by users being part of the same organisation (same customer).The MyCumulus system contains public project templates and public domains. This allows client applications to duplicate public project templates and forms.

See also:
    Users - Grant Collaborator permission to create projects
    Projects - Update the project data
    Projects - Delete a Project
    Projects - Duplicate a Project
    Projects - Copy Project Template
    Project/Members - Retrieve information of a member of a project.
    Projects - Retrieve projects (Admin User)
    Projects - Retrieve projects (Collaborator)

Request

POST    /v1/projects
Content-Type: application/json
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Request Body

{
    "name" : "Test Project", 
    "description" : "Description of Test Project", 
    "project_class" : "project", 
    "archived" : false
}

Response

{
    "status" : 201, 
    "uri" : "/v1/projects", 
    "project" : {
        "id" : "610d9308ed1110411f64099e", 
        "name" : "Test Project", 
        "description" : "Description of Test Project", 
        "image_file_url" : null, 
        "template_ids" : [
        ], 
        "created_at" : "2021-08-06T19:52:40.007Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9307ed1110411f640997", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "customer_id" : "610d9307ed1110411f640999", 
        "project_class" : "project", 
        "visibility" : "private", 
        "archived" : false
    }
}


Projects - Update the project data   

Updates the information of the specified project. This API can be used to change the project class, and to archive/unarchive a project.

See also:
    Projects - Create a project

Request

PUT    /v1/projects/610d9308ed1110411f64099e
Content-Type: application/json
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Request Body

{
    "name" : "Test Project changed", 
    "description" : "Description of Test Project changed", 
    "project_class" : "template", 
    "archived" : false
}

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9308ed1110411f64099e", 
    "project" : {
        "id" : "610d9308ed1110411f64099e", 
        "name" : "Test Project changed", 
        "description" : "Description of Test Project changed", 
        "image_file_url" : null, 
        "template_ids" : [
        ], 
        "created_at" : "2021-08-06T19:52:40.007Z", 
        "updated_at" : "2021-08-06T19:52:40.101Z", 
        "deleted_at" : null, 
        "created_by" : "610d9307ed1110411f640997", 
        "updated_by" : "610d9307ed1110411f640997", 
        "deleted_by" : null, 
        "customer_id" : "610d9307ed1110411f640999", 
        "project_class" : "template", 
        "visibility" : "private", 
        "archived" : false
    }
}


Projects - Number of projects   

The X-Auth-Token may refer to an Admin user or to a Collaborator. If:
    - Admin user: returns the number of projects that are created by the user plus the projects created by its collaborators.
        As a consequence, the number of projects may be larger than the number of projects returned by the call: Projects - Retrieve projects (Admin User)
    - Collaborator: returns the number of projects that are (1) created by the collaborator, plus (2) the projects the collaborator is member of.
The user that created the project is also called the owner of the project.

See also:
    Projects - Create a project

Request

GET    /v1/projects/count/
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Response

{
    "number_of_projects" : 3
}


Projects - Retrieve projects (Admin User)   

The X-Auth-Token may refer to an Admin user or to a Collaborator. If project_class = "project":
    - Admin user: returns all projects that are created by the user. The projects created by its collaborators cannot be obtained.
    - Collaborator: returns all projects that are (1) created by the collaborator, and (2) the projects the collaborator is member of.
The example below shows the result when the function is called by an Admin (the X-Auth-Token is of an Admin).
The query contains:
    - project_class: "project", "domain" or "template"
    - visibility: "private", or "public"
    - archive: "true", or "false"
The list will return only the projects satisfying the query.

See also:
    Projects - Create a project
    Projects - Retrieve projects (Collaborator)

Request

GET    /v1/projects?page=1&perPage=100
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Response

{
    "status" : 200, 
    "uri" : "/v1/projects?page=1&perPage=100", 
    "projects" : {
        "metadata" : {
            "page" : 3, 
            "pages" : 1, 
            "page_count" : 3, 
            "total_count" : 3, 
            "uris" : {
                "first" : "/v1/projects?page=1&perPage=4", 
                "self" : "/v1/projects?proClass=project&visibility=private&archived=false", 
                "last" : "/v1/projects?page=1&perPage=4"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/projects?page=1&perPage=4", 
                "self" : "http://api.mycumulus.com/v1/projects?proClass=project&visibility=private&archived=false", 
                "last" : "http://api.mycumulus.com/v1/projects?page=1&perPage=4"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9308ed1110411f6409a0", 
                "name" : "Test Project 3", 
                "description" : "Description of Test Project 3", 
                "image_file_url" : null, 
                "template_ids" : [
                ], 
                "created_at" : "2021-08-06T19:52:40.243Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9307ed1110411f640997", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "customer_id" : "610d9307ed1110411f640999", 
                "project_class" : "project", 
                "visibility" : "private", 
                "archived" : false
            }, 
            {
                "id" : "610d9308ed1110411f64099f", 
                "name" : "Test Project 2", 
                "description" : "Description of Test Project 2", 
                "image_file_url" : null, 
                "template_ids" : [
                ], 
                "created_at" : "2021-08-06T19:52:40.195Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9307ed1110411f640997", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "customer_id" : "610d9307ed1110411f640999", 
                "project_class" : "project", 
                "visibility" : "private", 
                "archived" : false
            }, 
            {
                "id" : "610d9307ed1110411f64099a", 
                "name" : "Example Project", 
                "description" : "Allows you to experiment...", 
                "image_file_url" : null, 
                "template_ids" : [
                    "610d9307ed1110411f64099b", 
                    "610d9307ed1110411f64099c"
                ], 
                "created_at" : "2021-08-06T19:52:39.898Z", 
                "updated_at" : "2021-08-06T19:52:39.899Z", 
                "deleted_at" : null, 
                "created_by" : "610d9307ed1110411f640997", 
                "updated_by" : "610d9307ed1110411f640997", 
                "deleted_by" : null, 
                "customer_id" : "610d9307ed1110411f640999", 
                "project_class" : "project", 
                "visibility" : "private", 
                "archived" : false
            }
        ]
    }
}


Projects - Retrieve projects (Collaborator)   

The X-Auth-Token may refer to an Admin user or to a Collaborator. If:
    - Admin user: returns all projects that are created by the user. The projects created by its collaborators cannot be obtained.
    - Collaborator: returns all projects that are (1) created by the collaborator, and (2) the projects the collaborator is member of.
The example below shows the result when the function is called by a collaborator (the X-Auth-Token is of a collaborator). Notice that the name of the object in the JSON structure containing the projects = project_members.
The command returns the same projects as the (obsolete) call  Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)

See also:
    Projects - Create a project
    Projects - Retrieve projects (Admin User)

Request

GET    /v1/projects?page=1&perPage=100
X-Auth-Token: f51a47657835c6d61412f35887befca8213c7ffe97eb9485917acaec4b3358b43b04e4912fa7541a7e61e442436ff246a11ea01b2c97f799127a68c382693507371fbdaa5e7a121c58e158c8bafb1cd272c5af9c9d6d275e646cedac4a50926f238702bff7971d845d82b214e671639e40f032fa7c6edc9527f1ff

Response

{
    "status" : 200, 
    "uri" : "/v1/projects?page=1&perPage=100", 
    "projects" : {
        "metadata" : {
            "page" : 2, 
            "pages" : 1, 
            "page_count" : 2, 
            "total_count" : 2, 
            "uris" : {
                "first" : "/v1/projects?page=1&perPage=2", 
                "self" : "/v1/projects?proClass=project&visibility=private&archived=false", 
                "last" : "/v1/projects?page=1&perPage=2"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/projects?page=1&perPage=2", 
                "self" : "http://api.mycumulus.com/v1/projects?proClass=project&visibility=private&archived=false", 
                "last" : "http://api.mycumulus.com/v1/projects?page=1&perPage=2"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9308ed1110411f6409a5", 
                "name" : "Project of Thales", 
                "description" : "Description of project", 
                "image_file_url" : null, 
                "template_ids" : [
                ], 
                "created_at" : "2021-08-06T19:52:40.569Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9308ed1110411f6409a2", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "customer_id" : "610d9307ed1110411f640999", 
                "project_class" : "project", 
                "visibility" : "private", 
                "archived" : false
            }, 
            {
                "id" : "610d9308ed1110411f64099f", 
                "name" : "Test Project 2", 
                "description" : "Description of Test Project 2", 
                "image_file_url" : null, 
                "template_ids" : [
                ], 
                "created_at" : "2021-08-06T19:52:40.195Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9307ed1110411f640997", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "customer_id" : "610d9307ed1110411f640999", 
                "project_class" : "project", 
                "visibility" : "private", 
                "archived" : false
            }
        ]
    }
}


Projects - Retrieve a Project   

Reads the information of the specified project.

See also:
    Projects - Create a project

Request

GET    /v1/projects/610d9308ed1110411f64099e
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9308ed1110411f64099e", 
    "project" : {
        "id" : "610d9308ed1110411f64099e", 
        "name" : "Test Project changed", 
        "description" : "Description of Test Project changed", 
        "image_file_url" : null, 
        "template_ids" : [
        ], 
        "created_at" : "2021-08-06T19:52:40.007Z", 
        "updated_at" : "2021-08-06T19:52:40.101Z", 
        "deleted_at" : null, 
        "created_by" : "610d9307ed1110411f640997", 
        "updated_by" : "610d9307ed1110411f640997", 
        "deleted_by" : null, 
        "customer_id" : "610d9307ed1110411f640999", 
        "project_class" : "template", 
        "visibility" : "private", 
        "archived" : false
    }
}


Projects - Delete a Project   

Delete the specified project.
When deleted, all templates in the project, and consequently the subordinate features, will be removed.

See also:
    Projects - Create a project

Request

DELETE    /v1/projects/610d9308ed1110411f64099f
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9308ed1110411f64099f", 
    "project" : {
        "id" : "610d9308ed1110411f64099f", 
        "name" : "Test Project 2", 
        "description" : "Description of Test Project 2", 
        "image_file_url" : null, 
        "template_ids" : [
        ], 
        "created_at" : "2021-08-06T19:52:40.195Z", 
        "updated_at" : null, 
        "deleted_at" : "2021-08-06T19:52:40.839Z", 
        "created_by" : "610d9307ed1110411f640997", 
        "updated_by" : null, 
        "deleted_by" : "610d9307ed1110411f640997", 
        "customer_id" : "610d9307ed1110411f640999", 
        "project_class" : "project", 
        "visibility" : "private", 
        "archived" : false
    }
}


Projects - Duplicate a Project   

Duplicates the project. De duplicated project will contain the same templates as the original project.
The user calling the duplicate API will become the owner of the project. When duplicating the project of another user, the rights of the original project are not duplicated.

See also:
    Projects - Create a project

Request

POST    /v1/project/duplicate
Content-Type: application/json
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Request Body

{
    "project_id" : "610d9308ed1110411f6409a7", 
    "name" : "Test Project Copy", 
    "description" : "Description of Test Project"
}

Response

{
    "status" : 201, 
    "uri" : "/v1/project/duplicate", 
    "project" : {
        "id" : "610d9309ed1110411f6409a9", 
        "name" : "Test Project Copy", 
        "description" : "Description of Test Project", 
        "image_file_url" : "", 
        "template_ids" : [
            "610d9309ed1110411f6409aa"
        ], 
        "created_at" : "2021-08-06T19:52:41.008Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9307ed1110411f640997", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "customer_id" : "610d9307ed1110411f640999", 
        "project_class" : "project", 
        "visibility" : "private", 
        "archived" : false
    }
}


Projects - Copy Project Template   

Duplicates a private or public project template and converts it to a plain project. De new project will contain the same templates as the original project template.
The user calling this API will become the owner of the project. When duplicating the project template of another user, the rights of the original project are not duplicated.

See also:
    Projects - Create a project

Request

POST    /v1/project/template/copy
Content-Type: application/json
X-Auth-Token: 98fb43e97a88658bbe20d6e648663e3e43151a9fe7d561f61d9e8d74e1b7ac824acdf74f36ebc2ad4f8726cea8a29b1c2f4d0cf95e950e64dde4d17f178e65daaf32f11d8c90da281fed8e49646e7481f884bbc98eacfb41d8d9cdfbb37179f18ab3f2753f116b3b7e29167ef28a61aa618fe098444ae41cbc31e5f99d6

Request Body

{
    "user_id" : "610d9307ed1110411f640997", 
    "project_id" : "610d9308ed1110411f6409a7", 
    "name" : "Sewage Vosselaar", 
    "description" : "Sewage Survey in Vosselaar"
}

Response

{
    "status" : 201, 
    "uri" : "/v1/project/template/copy", 
    "project" : {
        "id" : "610d9309ed1110411f6409ab", 
        "name" : "Sewage Vosselaar", 
        "description" : "Sewage Survey in Vosselaar", 
        "image_file_url" : "", 
        "template_ids" : [
            "610d9309ed1110411f6409ac"
        ], 
        "created_at" : "2021-08-06T19:52:41.101Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9307ed1110411f640997", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "customer_id" : "610d9307ed1110411f640999", 
        "project_class" : "project", 
        "visibility" : "private", 
        "archived" : false
    }
}


--- Public API functions: Project-Members ---


Project/Members - Add a user to a project.   

Add a collaborator to a project. When a collaborator is added, he becomes a member of the project.
Only the owner of the project or the Admin is authorised to add members to his project(s).
A member has initially no rights (permissions) to the templates of the owner of the project. The permissions (rights) are granted using: Project/Members - Grant permissions to collaborator

Request : POST /v1/projects/:project_id/members

See also:
    Project/Members - Remove a user from a project.
    Project/Members - Grant permissions to collaborator
    Project/Members - Revoke permissions from collaborator
    Project/Members - Retrieve the list of 'all members (users)' of the project.
    Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)
    Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.

Request

POST    /v1/projects/610d9309ed1110411f6409b5/members
Content-Type: application/json
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e
X-Working-Project-Id: 610d9309ed1110411f6409b5

Request Body

{
    "user_id" : "610d9309ed1110411f6409b8"
}

Response

{
    "status" : 201, 
    "uri" : "/v1/projects/610d9309ed1110411f6409b5/members", 
    "project_member" : {
        "id" : "610d9309ed1110411f6409bb", 
        "user_id" : "610d9309ed1110411f6409b8", 
        "project_id" : "610d9309ed1110411f6409b5", 
        "permissions" : {
            "features" : [
            ]
        }, 
        "created_at" : "2021-08-06T19:52:41.850Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9309ed1110411f6409ae", 
        "updated_by" : null, 
        "deleted_by" : null
    }
}


Project/Members - Retrieve information of a member of a project.   

Returns information of the member of the project. Here you can find the permissions related to templates/features.

See also:
    Projects - Create a project

Request

GET    /v1/projects/610d9309ed1110411f6409b5/members/610d9309ed1110411f6409b8
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9309ed1110411f6409b5/members/610d9309ed1110411f6409b8", 
    "project_member" : {
        "id" : "610d9309ed1110411f6409bb", 
        "user_id" : "610d9309ed1110411f6409b8", 
        "project_id" : "610d9309ed1110411f6409b5", 
        "permissions" : {
            "features" : [
                {
                    "template_id" : "610d9309ed1110411f6409bd", 
                    "permission_types" : [
                        "create", 
                        "read", 
                        "update", 
                        "delete"
                    ]
                }, 
                {
                    "template_id" : "610d930aed1110411f6409be", 
                    "permission_types" : [
                        "read", 
                        "update"
                    ]
                }
            ]
        }, 
        "created_at" : "2021-08-06T19:52:41.850Z", 
        "updated_at" : "2021-08-06T19:52:42.086Z", 
        "deleted_at" : null, 
        "created_by" : "610d9309ed1110411f6409ae", 
        "updated_by" : "610d9309ed1110411f6409ae", 
        "deleted_by" : null
    }
}


Project/Members - Retrieve the list of 'all members (users)' of the project.   

Returns all members of the project. The Admin user will never be in the list. When the owner is a collaborator, he will be in the list.
The information in the list is general information about each collaborator. If you need for a specific member the permissions to templates and features see: Project/Members - Retrieve information of a member of a project.

See also:
    Projects - Create a project
    Project/Members - Add a user to a project.
    Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)
    Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.

Request

GET    /v1/projects/610d9309ed1110411f6409b5/members?page=1&perPage=100
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9309ed1110411f6409b5/members?page=1&perPage=100", 
    "users" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 2, 
            "total_count" : 2, 
            "uris" : {
                "first" : "/v1/projects/610d9309ed1110411f6409b5/members?page=1&perPage=100", 
                "self" : "/v1/projects/610d9309ed1110411f6409b5/members", 
                "last" : "/v1/projects/610d9309ed1110411f6409b5/members?page=1&perPage=100"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/projects/610d9309ed1110411f6409b5/members?page=1&perPage=100", 
                "self" : "http://api.mycumulus.com/v1/projects/610d9309ed1110411f6409b5/members", 
                "last" : "http://api.mycumulus.com/v1/projects/610d9309ed1110411f6409b5/members?page=1&perPage=100"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9309ed1110411f6409ba", 
                "email" : "porphyry@mycumulus.com", 
                "name" : "Porphyry", 
                "is_activated" : true, 
                "created_at" : "2021-08-06T19:52:41.808Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9309ed1110411f6409ae", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "user_type" : "collaborator", 
                "customer_id" : "610d9309ed1110411f6409b0", 
                "temporary_user" : null, 
                "mc_marxact" : null, 
                "manager_id" : "610d9309ed1110411f6409ae", 
                "permissions" : {
                    "projects" : [
                    ]
                }
            }, 
            {
                "id" : "610d9309ed1110411f6409b8", 
                "email" : "thales@mycumulus.com", 
                "name" : "Thales", 
                "is_activated" : true, 
                "created_at" : "2021-08-06T19:52:41.729Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9309ed1110411f6409ae", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "user_type" : "collaborator", 
                "customer_id" : "610d9309ed1110411f6409b0", 
                "temporary_user" : null, 
                "mc_marxact" : null, 
                "manager_id" : "610d9309ed1110411f6409ae", 
                "permissions" : {
                    "projects" : [
                    ]
                }
            }
        ]
    }
}


Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)   

Retrieve the list of 'all projects' the collaborator is member of, and the projects owned by the collaborator. This call should not be used for Admin users since they can't be member of projects of a collaborator. For an Admin user, this call does not even return it's own projects. 
For a collaborator, the command returns the same projects as the call  Projects - Retrieve projects (Collaborator)

See also:
    Projects - Create a project
    Project/Members - Add a user to a project.
    Project/Members - Retrieve the list of 'all members (users)' of the project.
    Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.

Request

GET    /v1/users/610d9309ed1110411f6409b8/projects?page=1&perPage=100
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e

Response

{
    "status" : 200, 
    "uri" : "/v1/users/610d9309ed1110411f6409b8/projects?page=1&perPage=100", 
    "projects" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 1, 
            "total_count" : 1, 
            "uris" : {
                "first" : "/v1/projects?page=1&perPage=1", 
                "self" : "/v1/projects?proClass=project&visibility=private&archived=false", 
                "last" : "/v1/projects?page=1&perPage=1"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/projects?page=1&perPage=1", 
                "self" : "http://api.mycumulus.com/v1/projects?proClass=project&visibility=private&archived=false", 
                "last" : "http://api.mycumulus.com/v1/projects?page=1&perPage=1"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9309ed1110411f6409b5", 
                "name" : "Test Project", 
                "description" : "Description of Test Project", 
                "image_file_url" : null, 
                "template_ids" : [
                    "610d9309ed1110411f6409bd", 
                    "610d930aed1110411f6409be"
                ], 
                "created_at" : "2021-08-06T19:52:41.553Z", 
                "updated_at" : "2021-08-06T19:52:42.043Z", 
                "deleted_at" : null, 
                "created_by" : "610d9309ed1110411f6409ae", 
                "updated_by" : "610d9309ed1110411f6409ae", 
                "deleted_by" : null, 
                "customer_id" : "610d9309ed1110411f6409b0", 
                "project_class" : "project", 
                "visibility" : "private", 
                "archived" : false
            }
        ]
    }
}


Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.   

This command is similar to Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete), but retrieves for 'all projects' the user is member of, the permissions to the features of the templates.
Using this call for Admin users does not make sense. An empty list will be returned. 
For a collaborator, the command returns the same projects as the call  Projects - Retrieve projects (Collaborator) but will not contain names of the projects. Each project in the list will have a field "permissions" that specifies the operations (create, read, update, delete) are allowed on the features of each template in the project.
For more information about permissions, see  Project/Members - Grant permissions to collaborator

See also:
    Projects - Create a project
    Project/Members - Add a user to a project.
    Project/Members - Retrieve the list of 'all members (users)' of the project.
    Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)

Request

GET    /v1/users/610d9309ed1110411f6409b8/projectmembers
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e

Response

{
    "status" : 200, 
    "uri" : "/v1/users/610d9309ed1110411f6409b8/projectmembers", 
    "project_members" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 1, 
            "total_count" : 1, 
            "uris" : {
                "first" : "/v1/users/610d9309ed1110411f6409b8/projectmembers?page=1&perPage=50", 
                "self" : "/v1/users/610d9309ed1110411f6409b8/projectmembers", 
                "last" : "/v1/users/610d9309ed1110411f6409b8/projectmembers?page=1&perPage=50"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/users/610d9309ed1110411f6409b8/projectmembers?page=1&perPage=50", 
                "self" : "http://api.mycumulus.com/v1/users/610d9309ed1110411f6409b8/projectmembers", 
                "last" : "http://api.mycumulus.com/v1/users/610d9309ed1110411f6409b8/projectmembers?page=1&perPage=50"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9309ed1110411f6409bb", 
                "user_id" : "610d9309ed1110411f6409b8", 
                "project_id" : "610d9309ed1110411f6409b5", 
                "permissions" : {
                    "features" : [
                        {
                            "template_id" : "610d9309ed1110411f6409bd", 
                            "permission_types" : [
                                "create", 
                                "read", 
                                "update", 
                                "delete"
                            ]
                        }, 
                        {
                            "template_id" : "610d930aed1110411f6409be", 
                            "permission_types" : [
                                "read", 
                                "update"
                            ]
                        }
                    ]
                }, 
                "created_at" : "2021-08-06T19:52:41.850Z", 
                "updated_at" : "2021-08-06T19:52:42.086Z", 
                "deleted_at" : null, 
                "created_by" : "610d9309ed1110411f6409ae", 
                "updated_by" : "610d9309ed1110411f6409ae", 
                "deleted_by" : null
            }
        ]
    }
}


Project/Members - Remove a user from a project.   

Remove a collaborator from a project. The collaborator will not be anymore a member of the project. All his permissions to the project are removed.
This call does not remove the collaborator, nor will it remove any data.

See also:
    Project/Members - Add a user to a project.
    Project/Members - Retrieve the list of 'all members (users)' of the project.
    Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)
    Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.

Request

DELETE    /v1/projects/610d9309ed1110411f6409b5/members/610d9309ed1110411f6409ba
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e
X-Working-Project-Id: 610d9309ed1110411f6409b5

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9309ed1110411f6409b5/members/610d9309ed1110411f6409ba", 
    "project_member" : {
        "id" : "610d9309ed1110411f6409bc", 
        "user_id" : "610d9309ed1110411f6409ba", 
        "project_id" : "610d9309ed1110411f6409b5", 
        "permissions" : {
            "features" : [
            ]
        }, 
        "created_at" : "2021-08-06T19:52:41.898Z", 
        "updated_at" : null, 
        "deleted_at" : "2021-08-06T19:52:42.368Z", 
        "created_by" : "610d9309ed1110411f6409ae", 
        "updated_by" : null, 
        "deleted_by" : "610d9309ed1110411f6409ae"
    }
}


Project/Members - Grant permissions to collaborator   

This command will give permissions to a member of the given project. Only the owner of the project or the Admin is authorised to grant permissions to members.
The request body contains a JSON object named permissions.
Only the structure shown in the example below is valid. The JSON array permissions is an array containing the permissions to be granted for each template.
Valid value in array permission_types:
    - read: the user may read features in the template. If not in the list the user has no access at all to the template.
    - create: the user may create features in the template.
    - update: the user may update existing features in the template.
    - delete: the user may delete features in the template.
When granting a permission, the same permission may not yet be present yet. So either add permissions for a new template, or add a permission for a template already in the list.
The Admin user acts as a super user and has by default all permissions.

See also:
    Project/Members - Revoke permissions from collaborator
    Project/Members - Retrieve information of a member of a project.
    Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)
    Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.
    Project/Members - Retrieve the list of 'all members (users)' of the project.

Request

PUT    /v1/projects/610d9309ed1110411f6409b5/grant
Content-Type: application/json
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e
X-Working-Project-Id: 610d9309ed1110411f6409b5

Request Body

{
    "user_id" : "610d9309ed1110411f6409b8", 
    "permissions" : {
        "features" : [
            {
                "template_id" : "610d930aed1110411f6409be", 
                "permission_types" : [
                    "create", 
                    "read", 
                    "update", 
                    "delete"
                ]
            }
        ]
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9309ed1110411f6409b5/grant", 
    "project_member" : {
        "id" : "610d9309ed1110411f6409bb", 
        "user_id" : "610d9309ed1110411f6409b8", 
        "project_id" : "610d9309ed1110411f6409b5", 
        "permissions" : {
            "features" : [
                {
                    "template_id" : "610d9309ed1110411f6409bd", 
                    "permission_types" : [
                        "create", 
                        "read", 
                        "update", 
                        "delete"
                    ]
                }, 
                {
                    "template_id" : "610d930aed1110411f6409be", 
                    "permission_types" : [
                        "create", 
                        "read", 
                        "update", 
                        "delete"
                    ]
                }
            ]
        }, 
        "created_at" : "2021-08-06T19:52:41.850Z", 
        "updated_at" : "2021-08-06T19:52:42.415Z", 
        "deleted_at" : null, 
        "created_by" : "610d9309ed1110411f6409ae", 
        "updated_by" : "610d9309ed1110411f6409ae", 
        "deleted_by" : null
    }
}


Project/Members - Revoke permissions from collaborator   

This command will revoke permissions from a member of the given project. Only the owner of the project or the Admin is authorised to revoke permissions.The request body and meaning of the names and values is described in: Project/Members - Grant permissions to collaborator
Only permissions that are already in the list may be revoked.

See also:
    Project/Members - Grant permissions to collaborator
    Project/Members - Retrieve information of a member of a project.
    Project/Members - Retrieve the list of 'all projects' user is member of. (Obsolete)
    Project/Members - Retrieve the list of 'all projects (permissions)' user is member of.
    Project/Members - Retrieve the list of 'all members (users)' of the project.

Request

PUT    /v1/projects/610d9309ed1110411f6409b5/revoke
Content-Type: application/json
X-Auth-Token: 7f71dd3a6cb32d0bbe24f69fcb86baba3be8d32e2783d3c5ca5f4cf4e13f2eac2516a3a96fb0688c35c16325475067b46424c3c06e1fc94ad3c562b35b849e67a0b797d6733eb70986145979f5b47476f2857264bbeb95e82d4c3bb2f6c3eb5497b6d572e1c7e7acc3bfcd288933a2a251c938a3e591e934673568e
X-Working-Project-Id: 610d9309ed1110411f6409b5

Request Body

{
    "user_id" : "610d9309ed1110411f6409b8", 
    "permissions" : {
        "features" : [
            {
                "template_id" : "610d930aed1110411f6409be", 
                "permission_types" : [
                    "create", 
                    "read", 
                    "update", 
                    "delete"
                ]
            }
        ]
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d9309ed1110411f6409b5/revoke", 
    "project_member" : {
        "id" : "610d9309ed1110411f6409bb", 
        "user_id" : "610d9309ed1110411f6409b8", 
        "project_id" : "610d9309ed1110411f6409b5", 
        "permissions" : {
            "features" : [
                {
                    "template_id" : "610d9309ed1110411f6409bd", 
                    "permission_types" : [
                        "create", 
                        "read", 
                        "update", 
                        "delete"
                    ]
                }
            ]
        }, 
        "created_at" : "2021-08-06T19:52:41.850Z", 
        "updated_at" : "2021-08-06T19:52:42.618Z", 
        "deleted_at" : null, 
        "created_by" : "610d9309ed1110411f6409ae", 
        "updated_by" : "610d9309ed1110411f6409ae", 
        "deleted_by" : null
    }
}


--- Public API functions: Forms ---


Templates - Create a form   

Creates a new template. A template will normally be used with the MyCumulus app to view, update and collect data that will be represented as features in the MyCumulus database.
The list of attributes specifies the attributes of the features generated from the template.
The list of fields specifies the fields in the form.
The list of attributes and the list of fields must match.

See also:
    Templates - Update the form
    Templates - Delete a form
    Templates - Retrieve a form
    Templates - Duplicate a form
    Templates - Copy a form from domain project
    Templates - Retrieve the list of all forms of a projectStyles - Retrieve styles

Request

POST    /v1/templates
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177
Content-Type: application/json
X-Working-Project-Id: 610d930bed1110411f6409c7

Request Body

{
    "project_id" : "610d930bed1110411f6409c7", 
    "name" : "Template 1", 
    "description" : "First Template", 
    "image_file_url" : null, 
    "default_style_id" : null, 
    "feature" : {
        "geometry_type" : "Point", 
        "attributes" : [
            {
                "_class" : "attribute", 
                "name" : "T1 Field 1", 
                "type" : "string", 
                "default_value" : "T1 Default Value Field 1"
            }, 
            {
                "_class" : "attribute", 
                "name" : "T1 Field 2", 
                "type" : "string", 
                "default_value" : "T1 Default Value Field 2"
            }, 
            {
                "_class" : "attribute", 
                "name" : "T1 Field 3", 
                "type" : "string", 
                "default_value" : "T1 Default Value Field 3"
            }
        ]
    }, 
    "form" : {
        "fields" : [
            {
                "_class" : "stringfield", 
                "name" : "T1 Field 1", 
                "label" : "T1 Label Field 1", 
                "description" : "T1 Description Field 1", 
                "enabled" : true, 
                "visible" : true, 
                "required" : true, 
                "use_previous_value" : false, 
                "constraints" : [
                ], 
                "default_value" : "T1 Default Value Field 1"
            }, 
            {
                "_class" : "stringfield", 
                "name" : "T1 Field 2", 
                "label" : "T1 Label Field 2", 
                "description" : "T1 Description Field 2", 
                "enabled" : true, 
                "visible" : true, 
                "required" : true, 
                "use_previous_value" : false, 
                "constraints" : [
                ], 
                "default_value" : "T1 Default Value Field 2"
            }, 
            {
                "_class" : "stringfield", 
                "name" : "T1 Field 3", 
                "label" : "T1 Label Field 3", 
                "description" : "T1 Description Field 3", 
                "enabled" : true, 
                "visible" : true, 
                "required" : true, 
                "use_previous_value" : false, 
                "constraints" : [
                ], 
                "default_value" : "T1 Default Value Field 3"
            }
        ]
    }
}

Response

{
    "status" : 201, 
    "uri" : "/v1/templates", 
    "template" : {
        "id" : "610d930bed1110411f6409c8", 
        "project_id" : "610d930bed1110411f6409c7", 
        "name" : "Template 1", 
        "description" : "First Template", 
        "image_file_url" : null, 
        "feature" : {
            "geometry_type" : "Point", 
            "attributes" : [
                {
                    "_class" : "attribute", 
                    "name" : "T1 Field 1", 
                    "type" : "string", 
                    "default_value" : "T1 Default Value Field 1", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "T1 Field 2", 
                    "type" : "string", 
                    "default_value" : "T1 Default Value Field 2", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "T1 Field 3", 
                    "type" : "string", 
                    "default_value" : "T1 Default Value Field 3", 
                    "restrictions" : [
                    ]
                }
            ]
        }, 
        "form" : {
            "fields" : [
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Field 1", 
                    "label" : "T1 Label Field 1", 
                    "description" : "T1 Description Field 1", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Default Value Field 1"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Field 2", 
                    "label" : "T1 Label Field 2", 
                    "description" : "T1 Description Field 2", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Default Value Field 2"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Field 3", 
                    "label" : "T1 Label Field 3", 
                    "description" : "T1 Description Field 3", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Default Value Field 3"
                }
            ]
        }, 
        "map_style" : null, 
        "template" : false, 
        "created_at" : "2021-08-06T19:52:43.603Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d930bed1110411f6409c0", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "visibility" : null, 
        "is_template" : false, 
        "default_style_id" : null
    }
}


Templates - Update the form   

Update the template. The Request Body may contain only the properties to be updated. However it's advised to send the complete updated template again.

See also:
    Templates - Create a form
    Templates - Retrieve a form

Request

PUT    /v1/templates/610d930bed1110411f6409c8
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177
Content-Type: application/json
X-Working-Project-Id: 610d930bed1110411f6409c7

Request Body

{
    "feature" : {
        "geometry_type" : "Point", 
        "attributes" : [
            {
                "_class" : "attribute", 
                "name" : "T1 Update Field 2", 
                "type" : "string", 
                "default_value" : "T1 Update Default Value Field 2"
            }, 
            {
                "_class" : "attribute", 
                "name" : "T1 Update Field 3", 
                "type" : "string", 
                "default_value" : "T1 Update Default Value Field 3"
            }
        ]
    }, 
    "form" : {
        "fields" : [
            {
                "_class" : "stringfield", 
                "name" : "T1 Update Field 2", 
                "label" : "T1 Update Label Field 2", 
                "description" : "T1 Update Description Field 2", 
                "enabled" : true, 
                "visible" : true, 
                "required" : true, 
                "use_previous_value" : false, 
                "constraints" : [
                ], 
                "default_value" : "T1 Update Default Value Field 2"
            }, 
            {
                "_class" : "stringfield", 
                "name" : "T1 Update Field 3", 
                "label" : "T1 Update Label Field 3", 
                "description" : "T1 Update Description Field 3", 
                "enabled" : true, 
                "visible" : true, 
                "required" : true, 
                "use_previous_value" : false, 
                "constraints" : [
                ], 
                "default_value" : "T1 Update Default Value Field 3"
            }
        ]
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930bed1110411f6409c8", 
    "template" : {
        "id" : "610d930bed1110411f6409c8", 
        "project_id" : "610d930bed1110411f6409c7", 
        "name" : "Template 1", 
        "description" : "First Template", 
        "image_file_url" : null, 
        "feature" : {
            "geometry_type" : "Point", 
            "attributes" : [
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 2", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 2", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 3", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 3", 
                    "restrictions" : [
                    ]
                }
            ]
        }, 
        "form" : {
            "fields" : [
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 2", 
                    "label" : "T1 Update Label Field 2", 
                    "description" : "T1 Update Description Field 2", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 2"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 3", 
                    "label" : "T1 Update Label Field 3", 
                    "description" : "T1 Update Description Field 3", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 3"
                }
            ]
        }, 
        "map_style" : null, 
        "template" : false, 
        "created_at" : "2021-08-06T19:52:43.603Z", 
        "updated_at" : "2021-08-06T19:52:43.746Z", 
        "deleted_at" : null, 
        "created_by" : "610d930bed1110411f6409c0", 
        "updated_by" : "610d930bed1110411f6409c0", 
        "deleted_by" : null, 
        "visibility" : null, 
        "is_template" : false, 
        "default_style_id" : null
    }
}


Templates - Number of forms in a project   

Returns the number of templates in the project.

See also:
    Templates - Create a form
    Templates - Retrieve the list of all forms of a project

Request

GET    /v1/projects/610d930bed1110411f6409c7/templates/count
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177
X-Working-Project-Id: 610d930bed1110411f6409c7

Response

{
    "number_of_templates" : 1
}


Templates - Retrieve the list of all forms of a project   

Retrieve the list of all the templates of a specific project.
Alternative command that gives the same response: GET /v1/templates.

See also:
    Templates - Create a form
    Templates - Number of forms in a project

Request

GET    /v1/projects/610d930bed1110411f6409c7/templates?page=1&perPage=100
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177
X-Working-Project-Id: 610d930bed1110411f6409c7

Response

{
    "status" : 200, 
    "uri" : "/v1/projects/610d930bed1110411f6409c7/templates?page=1&perPage=100", 
    "templates" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 1, 
            "total_count" : 1, 
            "uris" : {
                "first" : "/v1/projects/610d930bed1110411f6409c7/templates?page=1&perPage=100", 
                "self" : "/v1/projects/610d930bed1110411f6409c7/templates", 
                "last" : "/v1/projects/610d930bed1110411f6409c7/templates?page=1&perPage=100"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/projects/610d930bed1110411f6409c7/templates?page=1&perPage=100", 
                "self" : "http://api.mycumulus.com/v1/projects/610d930bed1110411f6409c7/templates", 
                "last" : "http://api.mycumulus.com/v1/projects/610d930bed1110411f6409c7/templates?page=1&perPage=100"
            }
        }, 
        "instances" : [
            {
                "id" : "610d930bed1110411f6409c8", 
                "project_id" : "610d930bed1110411f6409c7", 
                "name" : "Template 1", 
                "description" : "First Template", 
                "image_file_url" : null, 
                "feature" : {
                    "geometry_type" : "Point", 
                    "attributes" : [
                        {
                            "_class" : "attribute", 
                            "name" : "T1 Update Field 2", 
                            "type" : "string", 
                            "default_value" : "T1 Update Default Value Field 2", 
                            "restrictions" : [
                            ]
                        }, 
                        {
                            "_class" : "attribute", 
                            "name" : "T1 Update Field 3", 
                            "type" : "string", 
                            "default_value" : "T1 Update Default Value Field 3", 
                            "restrictions" : [
                            ]
                        }
                    ]
                }, 
                "form" : {
                    "fields" : [
                        {
                            "_class" : "stringfield", 
                            "name" : "T1 Update Field 2", 
                            "label" : "T1 Update Label Field 2", 
                            "description" : "T1 Update Description Field 2", 
                            "enabled" : true, 
                            "visible" : true, 
                            "required" : true, 
                            "use_previous_value" : false, 
                            "constraints" : [
                            ], 
                            "event_actions" : null, 
                            "default_value_expression" : null, 
                            "default_value" : "T1 Update Default Value Field 2"
                        }, 
                        {
                            "_class" : "stringfield", 
                            "name" : "T1 Update Field 3", 
                            "label" : "T1 Update Label Field 3", 
                            "description" : "T1 Update Description Field 3", 
                            "enabled" : true, 
                            "visible" : true, 
                            "required" : true, 
                            "use_previous_value" : false, 
                            "constraints" : [
                            ], 
                            "event_actions" : null, 
                            "default_value_expression" : null, 
                            "default_value" : "T1 Update Default Value Field 3"
                        }
                    ]
                }, 
                "map_style" : null, 
                "template" : false, 
                "created_at" : "2021-08-06T19:52:43.603Z", 
                "updated_at" : "2021-08-06T19:52:43.746Z", 
                "deleted_at" : null, 
                "created_by" : "610d930bed1110411f6409c0", 
                "updated_by" : "610d930bed1110411f6409c0", 
                "deleted_by" : null, 
                "visibility" : null, 
                "is_template" : false, 
                "default_style_id" : null
            }
        ]
    }
}


Templates - Retrieve a form   

Retrieves a template.

See also:
    Templates - Create a form

Request

GET    /v1/templates/610d930bed1110411f6409c8
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177
X-Working-Project-Id: 610d930bed1110411f6409c7

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930bed1110411f6409c8", 
    "template" : {
        "id" : "610d930bed1110411f6409c8", 
        "project_id" : "610d930bed1110411f6409c7", 
        "name" : "Template 1", 
        "description" : "First Template", 
        "image_file_url" : null, 
        "feature" : {
            "geometry_type" : "Point", 
            "attributes" : [
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 2", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 2", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 3", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 3", 
                    "restrictions" : [
                    ]
                }
            ]
        }, 
        "form" : {
            "fields" : [
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 2", 
                    "label" : "T1 Update Label Field 2", 
                    "description" : "T1 Update Description Field 2", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 2"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 3", 
                    "label" : "T1 Update Label Field 3", 
                    "description" : "T1 Update Description Field 3", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 3"
                }
            ]
        }, 
        "map_style" : null, 
        "template" : false, 
        "created_at" : "2021-08-06T19:52:43.603Z", 
        "updated_at" : "2021-08-06T19:52:43.746Z", 
        "deleted_at" : null, 
        "created_by" : "610d930bed1110411f6409c0", 
        "updated_by" : "610d930bed1110411f6409c0", 
        "deleted_by" : null, 
        "visibility" : null, 
        "is_template" : false, 
        "default_style_id" : null
    }
}


Templates - Delete a form   

Deletes a form.

See also:
    Templates - Create a form

Request

DELETE    /v1/templates/610d930bed1110411f6409c8
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177
X-Working-Project-Id: 610d930bed1110411f6409c7

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930bed1110411f6409c8", 
    "template" : {
        "id" : "610d930bed1110411f6409c8", 
        "project_id" : "610d930bed1110411f6409c7", 
        "name" : "Template 1", 
        "description" : "First Template", 
        "image_file_url" : null, 
        "feature" : {
            "geometry_type" : "Point", 
            "attributes" : [
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 2", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 2", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 3", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 3", 
                    "restrictions" : [
                    ]
                }
            ]
        }, 
        "form" : {
            "fields" : [
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 2", 
                    "label" : "T1 Update Label Field 2", 
                    "description" : "T1 Update Description Field 2", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 2"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 3", 
                    "label" : "T1 Update Label Field 3", 
                    "description" : "T1 Update Description Field 3", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 3"
                }
            ]
        }, 
        "map_style" : null, 
        "template" : false, 
        "created_at" : "2021-08-06T19:52:43.603Z", 
        "updated_at" : "2021-08-06T19:52:43.746Z", 
        "deleted_at" : "2021-08-06T19:52:44.262Z", 
        "created_by" : "610d930bed1110411f6409c0", 
        "updated_by" : "610d930bed1110411f6409c0", 
        "deleted_by" : "610d930bed1110411f6409c0", 
        "visibility" : null, 
        "is_template" : false, 
        "default_style_id" : null
    }
}


Templates - Duplicate a form   

Duplicates a form.

See also:
    Templates - Create a form
    Templates - Copy a form from domain project

Request

POST    /v1/template/duplicate
Content-Type: application/json
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177

Request Body

{
    "project_id" : "610d930bed1110411f6409c7", 
    "template_id" : "610d930ced1110411f6409c9", 
    "name" : "First Template Copy", 
    "description" : ""
}

Response

{
    "status" : 201, 
    "uri" : "/v1/template/duplicate", 
    "template" : {
        "id" : "610d930ced1110411f6409ca", 
        "project_id" : "610d930bed1110411f6409c7", 
        "name" : "First Template Copy", 
        "description" : "First Template", 
        "image_file_url" : "", 
        "feature" : {
            "geometry_type" : "Point", 
            "attributes" : [
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 2", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 2", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "T1 Update Field 3", 
                    "type" : "string", 
                    "default_value" : "T1 Update Default Value Field 3", 
                    "restrictions" : [
                    ]
                }
            ]
        }, 
        "form" : {
            "fields" : [
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 2", 
                    "label" : "T1 Update Label Field 2", 
                    "description" : "T1 Update Description Field 2", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 2"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "T1 Update Field 3", 
                    "label" : "T1 Update Label Field 3", 
                    "description" : "T1 Update Description Field 3", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "T1 Update Default Value Field 3"
                }
            ]
        }, 
        "map_style" : null, 
        "template" : false, 
        "created_at" : "2021-08-06T19:52:44.597Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d930bed1110411f6409c0", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "visibility" : null, 
        "is_template" : false, 
        "default_style_id" : null
    }
}


Templates - Copy a form from domain project   

Duplicates a private or public form stored in a domain project.
The user calling this API will become the owner of the form. Collaborators who are member of the project where the duplicated form is stored have no access to the new form.

See also:
    Templates - Create a form
    Templates - Duplicate a form

Request

POST    /v1/form/template/copy
Content-Type: application/json
X-Auth-Token: 38c5b951c18f87a4a4722d7a3d4bf3bf552b9f2a32e0758c7b528cc6deea3aa1229867118f49be9f03b95f75a8dbd89fd5135ab5d3681ee83f9063aa96517b8dfce4ab021dd3d1d688abbbee78bb841439b64424ce656ec617ec317139c999d9692d27e233aecc9dcbcf78531445c2679a90f34c85d3d177

Request Body

{
    "user_id" : "610d930bed1110411f6409c0", 
    "project_id" : "610d930bed1110411f6409c7", 
    "template_id" : "610d930ded1110411f6409cf"
}

Response

{
    "status" : 201, 
    "uri" : "/v1/form/template/copy", 
    "template" : {
        "id" : "610d930ded1110411f6409d0", 
        "project_id" : "610d930bed1110411f6409c7", 
        "name" : "Drilling", 
        "description" : "Simple", 
        "image_file_url" : "", 
        "feature" : {
            "geometry_type" : "Point", 
            "attributes" : [
                {
                    "_class" : "attribute", 
                    "name" : "F1 Field 1", 
                    "type" : "string", 
                    "default_value" : "F1 Default Value Field 1", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "F1 Field 2", 
                    "type" : "string", 
                    "default_value" : "F1 Default Value Field 2", 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "F1 Field 3", 
                    "type" : "string", 
                    "default_value" : "F1 Default Value Field 3", 
                    "restrictions" : [
                    ]
                }
            ]
        }, 
        "form" : {
            "fields" : [
                {
                    "_class" : "stringfield", 
                    "name" : "F1 Field 1", 
                    "label" : "F1 Label Field 1", 
                    "description" : "F1 Description Field 1", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "F1 Default Value Field 1"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "F1 Field 2", 
                    "label" : "F1 Label Field 2", 
                    "description" : "F1 Description Field 2", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "F1 Default Value Field 2"
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "F1 Field 3", 
                    "label" : "F1 Label Field 3", 
                    "description" : "F1 Description Field 3", 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : true, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : "F1 Default Value Field 3"
                }
            ]
        }, 
        "map_style" : null, 
        "template" : false, 
        "created_at" : "2021-08-06T19:52:45.652Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d930bed1110411f6409c0", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "visibility" : null, 
        "is_template" : false, 
        "default_style_id" : null
    }
}


--- Public API functions: Styles ---


Styles - Create a style   

Creates a style. A template can link to a style, allowing any MyCumulus client to make a graphical representation of the geometry, based on the information in the style.
The elements in the array indexes contains a "Name" field and a "Values field" (an array of value). For each combination Name-Value, there must be an entry in the attributes list. For example: when there are 2 elements in the name field, the first one containing 4 values and the second 3 values, the attributes list must contain exactly 12 style attributes.
The sequence in this array (4x3): (I(1).V1, I(2).V1), (I(1).V1, I(2).V2), (I(1).V1, I(2).V3, (I(1).V2, I(2).V1), (I(1).V2, I(2).V2), ... (I(1).V4, I(2).V3).
The attributes are used by MyCumulus clients to give the right representation (style) of each feature by taking the values of the fields whose names/values match with the names/values in the indexes array.

See also:
    Styles - Update the style
    Styles - Delete a style
    Styles - Retrieve a style

Request

POST    /v1/styles
Content-Type: application/json
X-Auth-Token: 7f77a7ee6ecc69630adf1f448a32275a202178e4228b276928e86979c7fe721ce82955c5a77a83b33846514fd5ad5812f88d7daf27ea8fe668eb32edc7972689df9cb212b3634b9354b8a61ce8ffdd937ba291b382cfd2289166e4725c242372f91825c5d0b967d45bcde2d94c8c58fa5ea3716dba72718aebe6268a2

Request Body

{
    "name" : "Style Sewage Inspection", 
    "description" : "Symbols used for Sewage Inspection", 
    "indexes" : [
        {
            "name" : "Building", 
            "values" : [
                "House", 
                "School", 
                "Factory", 
                null
            ]
        }, 
        {
            "name" : "Ownership", 
            "values" : [
                "Private", 
                "Public", 
                null
            ]
        }
    ], 
    "attributes" : [
        {
            "layer" : "House Private", 
            "color" : [
                255, 
                0, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "House Public", 
            "color" : [
                0, 
                255, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "House", 
            "color" : [
                0, 
                0, 
                255
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "School Private", 
            "color" : [
                255, 
                0, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "School Public", 
            "color" : [
                0, 
                255, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "School", 
            "color" : [
                0, 
                0, 
                255
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "Factory Private", 
            "color" : [
                255, 
                0, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "Factory Public", 
            "color" : [
                0, 
                255, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "Factory", 
            "color" : [
                0, 
                0, 
                255
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "Building Private", 
            "color" : [
                255, 
                0, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "Building Public", 
            "color" : [
                0, 
                255, 
                0
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }, 
        {
            "layer" : "Building", 
            "color" : [
                0, 
                0, 
                255
            ], 
            "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
            "point_style" : "square"
        }
    ]
}

Response

{
    "status" : 201, 
    "uri" : "/v1/styles", 
    "style" : {
        "id" : "610d930eed1110411f6409dd", 
        "created_at" : "2021-08-06T19:52:46.491Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d930eed1110411f6409d2", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "indexes" : [
            {
                "name" : "Building", 
                "values" : [
                    "House", 
                    "School", 
                    "Factory", 
                    null
                ]
            }, 
            {
                "name" : "Ownership", 
                "values" : [
                    "Private", 
                    "Public", 
                    null
                ]
            }
        ], 
        "attributes" : [
            {
                "color" : [
                    255, 
                    0, 
                    0
                ], 
                "layer" : "House Private", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    255, 
                    0
                ], 
                "layer" : "House Public", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    255
                ], 
                "layer" : "House", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    255, 
                    0, 
                    0
                ], 
                "layer" : "School Private", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    255, 
                    0
                ], 
                "layer" : "School Public", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    255
                ], 
                "layer" : "School", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    255, 
                    0, 
                    0
                ], 
                "layer" : "Factory Private", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    255, 
                    0
                ], 
                "layer" : "Factory Public", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    255
                ], 
                "layer" : "Factory", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    255, 
                    0, 
                    0
                ], 
                "layer" : "Building Private", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    255, 
                    0
                ], 
                "layer" : "Building Public", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    255
                ], 
                "layer" : "Building", 
                "icon_url" : "/v1/files/public/610d930eed1110411f6409da/Letter_H_Manual.png", 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "square"
            }
        ], 
        "name" : "Style Sewage Inspection", 
        "description" : "Symbols used for Sewage Inspection", 
        "visibility" : "private", 
        "customer_id" : "610d930eed1110411f6409d4"
    }
}


Styles - Update the style   

Update the style

See also:
    Styles - Create a style
    Styles - Retrieve a style

Request

PUT    /v1/styles/610d930eed1110411f6409dd
Content-Type: application/json
X-Auth-Token: 7f77a7ee6ecc69630adf1f448a32275a202178e4228b276928e86979c7fe721ce82955c5a77a83b33846514fd5ad5812f88d7daf27ea8fe668eb32edc7972689df9cb212b3634b9354b8a61ce8ffdd937ba291b382cfd2289166e4725c242372f91825c5d0b967d45bcde2d94c8c58fa5ea3716dba72718aebe6268a2

Request Body

{
    "name" : "Style Sewage Inspection", 
    "description" : "Symbols used for Sewage Inspection", 
    "indexes" : [
        {
            "name" : "Building", 
            "values" : [
                "House", 
                "School", 
                "Factory", 
                null
            ]
        }
    ], 
    "attributes" : [
        {
            "layer" : "House", 
            "color" : [
                0, 
                0, 
                0
            ], 
            "icon_url" : null, 
            "point_style" : "circle"
        }, 
        {
            "layer" : "School", 
            "color" : [
                0, 
                0, 
                0
            ], 
            "icon_url" : null, 
            "point_style" : "circle"
        }, 
        {
            "layer" : "Factory", 
            "color" : [
                0, 
                0, 
                0
            ], 
            "icon_url" : null, 
            "point_style" : "circle"
        }, 
        {
            "layer" : "Building", 
            "color" : [
                0, 
                0, 
                0
            ], 
            "icon_url" : null, 
            "point_style" : "circle"
        }
    ]
}

Response

{
    "status" : 201, 
    "uri" : "/v1/styles/610d930eed1110411f6409dd", 
    "style" : {
        "id" : "610d930eed1110411f6409dd", 
        "created_at" : "2021-08-06T19:52:46.491Z", 
        "updated_at" : "2021-08-06T19:52:46.543Z", 
        "deleted_at" : null, 
        "created_by" : "610d930eed1110411f6409d2", 
        "updated_by" : "610d930eed1110411f6409d2", 
        "deleted_by" : null, 
        "indexes" : [
            {
                "name" : "Building", 
                "values" : [
                    "House", 
                    "School", 
                    "Factory", 
                    null
                ]
            }
        ], 
        "attributes" : [
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "House", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "School", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "Factory", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "Building", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }
        ], 
        "name" : "Style Sewage Inspection", 
        "description" : "Symbols used for Sewage Inspection", 
        "visibility" : "private", 
        "customer_id" : "610d930eed1110411f6409d4"
    }
}


Styles - Retrieve a style   

Retrieves the style

See also:
    Styles - Create a style

Request

GET    /v1/styles/610d930eed1110411f6409dd
X-Auth-Token: 7f77a7ee6ecc69630adf1f448a32275a202178e4228b276928e86979c7fe721ce82955c5a77a83b33846514fd5ad5812f88d7daf27ea8fe668eb32edc7972689df9cb212b3634b9354b8a61ce8ffdd937ba291b382cfd2289166e4725c242372f91825c5d0b967d45bcde2d94c8c58fa5ea3716dba72718aebe6268a2

Response

{
    "status" : 200, 
    "uri" : "/v1/styles/610d930eed1110411f6409dd", 
    "style" : {
        "id" : "610d930eed1110411f6409dd", 
        "created_at" : "2021-08-06T19:52:46.491Z", 
        "updated_at" : "2021-08-06T19:52:46.543Z", 
        "deleted_at" : null, 
        "created_by" : "610d930eed1110411f6409d2", 
        "updated_by" : "610d930eed1110411f6409d2", 
        "deleted_by" : null, 
        "indexes" : [
            {
                "name" : "Building", 
                "values" : [
                    "House", 
                    "School", 
                    "Factory", 
                    null
                ]
            }
        ], 
        "attributes" : [
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "House", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "School", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "Factory", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "Building", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }
        ], 
        "name" : "Style Sewage Inspection", 
        "description" : "Symbols used for Sewage Inspection", 
        "visibility" : "private", 
        "customer_id" : "610d930eed1110411f6409d4"
    }
}


Styles - Retrieve styles   

Retrieves the list of all private or public styles.
    - visibility: "private", or "public"
If visibility is omitted from the query, both private and public styles are returned.

See also:
    Styles - Create a style

Request

GET    /v1/styles?visibility=private
X-Auth-Token: 7f77a7ee6ecc69630adf1f448a32275a202178e4228b276928e86979c7fe721ce82955c5a77a83b33846514fd5ad5812f88d7daf27ea8fe668eb32edc7972689df9cb212b3634b9354b8a61ce8ffdd937ba291b382cfd2289166e4725c242372f91825c5d0b967d45bcde2d94c8c58fa5ea3716dba72718aebe6268a2

Response

{
    "status" : 200, 
    "uri" : "/v1/styles?visibility=private", 
    "styles" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 1, 
            "total_count" : 1, 
            "uris" : {
                "first" : "/v1/styles?page=1&perPage=100", 
                "self" : "/v1/styles?visibility=private", 
                "last" : "/v1/styles?page=1&perPage=100"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/styles?page=1&perPage=100", 
                "self" : "http://api.mycumulus.com/v1/styles?visibility=private", 
                "last" : "http://api.mycumulus.com/v1/styles?page=1&perPage=100"
            }
        }, 
        "instances" : [
            {
                "id" : "610d930eed1110411f6409dd", 
                "created_at" : "2021-08-06T19:52:46.491Z", 
                "updated_at" : "2021-08-06T19:52:46.543Z", 
                "deleted_at" : null, 
                "created_by" : "610d930eed1110411f6409d2", 
                "updated_by" : "610d930eed1110411f6409d2", 
                "deleted_by" : null, 
                "indexes" : [
                    {
                        "name" : "Building", 
                        "values" : [
                            "House", 
                            "School", 
                            "Factory", 
                            null
                        ]
                    }
                ], 
                "attributes" : [
                    {
                        "color" : [
                            0, 
                            0, 
                            0
                        ], 
                        "layer" : "House", 
                        "icon_url" : null, 
                        "line_style" : null, 
                        "polygon_pattern" : null, 
                        "autocad_block" : null, 
                        "pythagoras_style" : [
                        ], 
                        "point_style" : "circle"
                    }, 
                    {
                        "color" : [
                            0, 
                            0, 
                            0
                        ], 
                        "layer" : "School", 
                        "icon_url" : null, 
                        "line_style" : null, 
                        "polygon_pattern" : null, 
                        "autocad_block" : null, 
                        "pythagoras_style" : [
                        ], 
                        "point_style" : "circle"
                    }, 
                    {
                        "color" : [
                            0, 
                            0, 
                            0
                        ], 
                        "layer" : "Factory", 
                        "icon_url" : null, 
                        "line_style" : null, 
                        "polygon_pattern" : null, 
                        "autocad_block" : null, 
                        "pythagoras_style" : [
                        ], 
                        "point_style" : "circle"
                    }, 
                    {
                        "color" : [
                            0, 
                            0, 
                            0
                        ], 
                        "layer" : "Building", 
                        "icon_url" : null, 
                        "line_style" : null, 
                        "polygon_pattern" : null, 
                        "autocad_block" : null, 
                        "pythagoras_style" : [
                        ], 
                        "point_style" : "circle"
                    }
                ], 
                "name" : "Style Sewage Inspection", 
                "description" : "Symbols used for Sewage Inspection", 
                "visibility" : "private", 
                "customer_id" : "610d930eed1110411f6409d4"
            }
        ]
    }
}


Styles - Template and Style compatible   

Returns true if the style is compatible with the given form. A style is compatible if the name and type of the indexes matches with fields in the form. In other words: the style can be applied to features of the given form.

See also:
    Styles - Create a style
    Styles - List of compatible styles

Request

GET    /v1/template/610d930eed1110411f6409de/style/610d930eed1110411f6409dd/compatible
X-Auth-Token: 7f77a7ee6ecc69630adf1f448a32275a202178e4228b276928e86979c7fe721ce82955c5a77a83b33846514fd5ad5812f88d7daf27ea8fe668eb32edc7972689df9cb212b3634b9354b8a61ce8ffdd937ba291b382cfd2289166e4725c242372f91825c5d0b967d45bcde2d94c8c58fa5ea3716dba72718aebe6268a2

Response

{
    "status" : 200, 
    "uri" : "/v1/template/610d930eed1110411f6409de/style/610d930eed1110411f6409dd/compatible", 
    "compatible" : false
}


Styles - List of compatible styles   

Returns all styles that are compatible with the given form. The list will return the "private" or "public" styles depending on the value of "visibility" in the query.
    - visibility: "private", or "public"
If visibility is omitted from the query, both private and public styles are returned.

See also:
    Styles - Create a style
    Styles - Template and Style compatible

Request

GET    /v1/template/610d930eed1110411f6409de/styles?visibility=public
X-Auth-Token: 7f77a7ee6ecc69630adf1f448a32275a202178e4228b276928e86979c7fe721ce82955c5a77a83b33846514fd5ad5812f88d7daf27ea8fe668eb32edc7972689df9cb212b3634b9354b8a61ce8ffdd937ba291b382cfd2289166e4725c242372f91825c5d0b967d45bcde2d94c8c58fa5ea3716dba72718aebe6268a2

Response

{
    "status" : 200, 
    "uri" : "/v1/template/610d930eed1110411f6409de/styles?visibility=public", 
    "styles" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 0, 
            "page_count" : 0, 
            "total_count" : 0, 
            "uris" : {
                "first" : "/v1/styles?page=1&perPage=100", 
                "self" : "/v1/styles?visibility=public", 
                "last" : "/v1/styles?page=0&perPage=100"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/styles?page=1&perPage=100", 
                "self" : "http://api.mycumulus.com/v1/styles?visibility=public", 
                "last" : "http://api.mycumulus.com/v1/styles?page=0&perPage=100"
            }
        }, 
        "instances" : [
        ]
    }
}


Styles - Delete a style   

Deletes the style

See also:
    Styles - Create a style

Request

DELETE    /v1/styles/610d930eed1110411f6409dd
X-Auth-Token: 7f77a7ee6ecc69630adf1f448a32275a202178e4228b276928e86979c7fe721ce82955c5a77a83b33846514fd5ad5812f88d7daf27ea8fe668eb32edc7972689df9cb212b3634b9354b8a61ce8ffdd937ba291b382cfd2289166e4725c242372f91825c5d0b967d45bcde2d94c8c58fa5ea3716dba72718aebe6268a2

Response

{
    "status" : 200, 
    "uri" : "/v1/styles/610d930eed1110411f6409dd", 
    "style" : {
        "id" : "610d930eed1110411f6409dd", 
        "created_at" : "2021-08-06T19:52:46.491Z", 
        "updated_at" : "2021-08-06T19:52:46.543Z", 
        "deleted_at" : "2021-08-06T19:52:46.829Z", 
        "created_by" : "610d930eed1110411f6409d2", 
        "updated_by" : "610d930eed1110411f6409d2", 
        "deleted_by" : "610d930eed1110411f6409d2", 
        "indexes" : [
            {
                "name" : "Building", 
                "values" : [
                    "House", 
                    "School", 
                    "Factory", 
                    null
                ]
            }
        ], 
        "attributes" : [
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "House", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "School", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "Factory", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }, 
            {
                "color" : [
                    0, 
                    0, 
                    0
                ], 
                "layer" : "Building", 
                "icon_url" : null, 
                "line_style" : null, 
                "polygon_pattern" : null, 
                "autocad_block" : null, 
                "pythagoras_style" : [
                ], 
                "point_style" : "circle"
            }
        ], 
        "name" : "Style Sewage Inspection", 
        "description" : "Symbols used for Sewage Inspection", 
        "visibility" : "private", 
        "customer_id" : "610d930eed1110411f6409d4"
    }
}


--- Public API functions: Features ---


Features - Upload a feature   

Uploads a new feature. If the user requesting the upload is a collaborator, and is not the owner of the project, he must be:
    1. Member of the project and
    2. Have the permission to create features.

Binary data (photos, etc>) are not stored in a feature. Rather they are uploaded as files. The feature will contain links to the files.
The field sequence_number in the request body is obligatory and must be a UUID. When missing or not unique, an error is returned. When the feature contains links to files, the feature_sequence_number used when uploading a file must be the same as the sequence_number of the feature. The sequence number can be used if the internet connection is not stable and may cause that the upload command needs to be sent again. When resending in case of communication errors, use the same sequence number. If not, the record will be stored twice on the server. Regarding file names see also: Files - Upload a private file

The order of the coordinates must be Latitude, Longitude, Elevation. Latitude and longitude are expressed in decimal degrees.

The field attributes should contain all attributes that are also in the template. If name and/or type do not match with the template, an error will be returned. If a field is not present the default value, if any, will be stored. Else the field is not stored in the database.

See also:
    Files - Upload a private file
    Templates - Create a form
    Project/Members - Add a user to a project.
    Project/Members - Grant permissions to collaborator

Request

POST    /v1/templates/610d930fed1110411f6409e8/features
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
Content-Type: application/json
X-Working-Project-Id: 610d930fed1110411f6409e7

Request Body

{
    "geometry" : {
        "type" : "Point", 
        "coordinates" : [
            51.3021300000000, 
            4.88400400000000, 
            22.0000000000000, 
            9.87600000000000
        ]
    }, 
    "sequence_number" : "DEA090E8-F6EF-11EB-B761-001C423D74FB", 
    "template_id" : "610d930fed1110411f6409e8", 
    "attributes" : {
        "T1 Field 1" : "F1 Value 1", 
        "T1 Field 2" : "F1 Value 2", 
        "T1 Field 3" : "F1 Value 3"
    }
}

Response

{
    "status" : 201, 
    "uri" : "/v1/templates/610d930fed1110411f6409e8/features", 
    "feature" : {
        "id" : "610d930fed1110411f6409e9", 
        "sequence_number" : "DEA090E8-F6EF-11EB-B761-001C423D74FB", 
        "template_id" : "610d930fed1110411f6409e8", 
        "geometry" : {
            "type" : "Point", 
            "coordinates" : [
                51.30213, 
                4.884004, 
                22.0, 
                0.0
            ]
        }, 
        "attributes" : {
            "T1 Field 1" : "F1 Value 1", 
            "T1 Field 2" : "F1 Value 2", 
            "T1 Field 3" : "F1 Value 3"
        }, 
        "created_at" : "2021-08-06T19:52:47.324Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d930fed1110411f6409e0", 
        "updated_by" : null, 
        "deleted_by" : null
    }
}


Features - Update the feature   

Update a feature. If the user requesting the update is a collaborator, and is not the owner of the project, he must be:
    1. Member of the project and
    2. Have the permission to update features.

Regarding file names see also: Files - Upload a private file

The order of the coordinates must be Latitude, Longitude, Elevation. Latitude and longitude are expressed in decimal degrees.

The field attributes should contain all attributes that are also in the template. If name and/or type do not match with the template, an error will be returned. If a field is not present the default value, if any, will be stored. Else the field is not stored in the database.

See also:
    Features - Upload a feature
    Project/Members - Grant permissions to collaborator

Request

PUT    /v1/templates/610d930fed1110411f6409e8/features/610d930fed1110411f6409e9
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
Content-Type: application/json
X-Working-Project-Id: 610d930fed1110411f6409e7

Request Body

{
    "geometry" : {
        "type" : "Point", 
        "coordinates" : [
            6.22568200000000, 
            1.26083400000000, 
            22.0000000000000, 
            9.87600000000000
        ]
    }, 
    "template_id" : "610d930fed1110411f6409e8", 
    "attributes" : {
        "T1 Field 1" : "F1 Upd Value 1", 
        "T1 Field 2" : "F1 Upd Value 2", 
        "T1 Field 3" : "F1 Upd Value 3"
    }
}

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930fed1110411f6409e8/features/610d930fed1110411f6409e9", 
    "feature" : {
        "id" : "610d930fed1110411f6409e9", 
        "sequence_number" : "DEA090E8-F6EF-11EB-B761-001C423D74FB", 
        "template_id" : "610d930fed1110411f6409e8", 
        "geometry" : {
            "type" : "Point", 
            "coordinates" : [
                6.225682, 
                1.260834, 
                22.0, 
                0.0
            ]
        }, 
        "attributes" : {
            "T1 Field 1" : "F1 Upd Value 1", 
            "T1 Field 2" : "F1 Upd Value 2", 
            "T1 Field 3" : "F1 Upd Value 3"
        }, 
        "created_at" : "2021-08-06T19:52:47.324Z", 
        "updated_at" : "2021-08-06T19:52:47.463Z", 
        "deleted_at" : null, 
        "created_by" : "610d930fed1110411f6409e0", 
        "updated_by" : "610d930fed1110411f6409e0", 
        "deleted_by" : null
    }
}


Features - Number of features   

Returns the number of features.

See also:
    Features - Upload a feature
    Features - Retrieve the list of all features

Request

GET    /v1/templates/610d930fed1110411f6409e8/features/count/
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
X-Working-Project-Id: 610d930fed1110411f6409e7

Response

{
    "number_of_features" : 3
}


Features - Retrieve the list of all features   

Retrieve the list of all features.

See also:
    Features - Upload a feature
    Features - Number of features

Request

GET    /v1/templates/610d930fed1110411f6409e8/features?page1?perPage=100
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
X-Working-Project-Id: 610d930fed1110411f6409e7

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930fed1110411f6409e8/features?page1?perPage=100", 
    "features" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 3, 
            "total_count" : 3, 
            "uris" : {
                "first" : "/v1/templates/610d930fed1110411f6409e8/features?page=1&perPage=500", 
                "self" : "/v1/templates/610d930fed1110411f6409e8/features", 
                "last" : "/v1/templates/610d930fed1110411f6409e8/features?page=1&perPage=500"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409e8/features?page=1&perPage=500", 
                "self" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409e8/features", 
                "last" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409e8/features?page=1&perPage=500"
            }
        }, 
        "instances" : [
            {
                "id" : "610d930fed1110411f6409eb", 
                "sequence_number" : "DEA090EA-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409e8", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        51.312553, 
                        4.88304, 
                        22.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "T1 Field 1" : "F3 Value 1", 
                    "T1 Field 2" : "F3 Value 2", 
                    "T1 Field 3" : "F3 Value 3"
                }, 
                "created_at" : "2021-08-06T19:52:47.416Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }, 
            {
                "id" : "610d930fed1110411f6409ea", 
                "sequence_number" : "DEA090E9-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409e8", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        51.312572, 
                        4.875058, 
                        22.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "T1 Field 1" : "F2 Value 1", 
                    "T1 Field 2" : "F2 Value 2", 
                    "T1 Field 3" : "F2 Value 3"
                }, 
                "created_at" : "2021-08-06T19:52:47.369Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }, 
            {
                "id" : "610d930fed1110411f6409e9", 
                "sequence_number" : "DEA090E8-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409e8", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.225682, 
                        1.260834, 
                        22.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "T1 Field 1" : "F1 Upd Value 1", 
                    "T1 Field 2" : "F1 Upd Value 2", 
                    "T1 Field 3" : "F1 Upd Value 3"
                }, 
                "created_at" : "2021-08-06T19:52:47.324Z", 
                "updated_at" : "2021-08-06T19:52:47.463Z", 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : "610d930fed1110411f6409e0", 
                "deleted_by" : null
            }
        ]
    }
}


Features - Retrieve a feature   

Retrieve a feature.

See also:
    Features - Upload a feature

Request

GET    /v1/templates/610d930fed1110411f6409e8/features/610d930fed1110411f6409e9
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
X-Working-Project-Id: 610d930fed1110411f6409e7

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930fed1110411f6409e8/features/610d930fed1110411f6409e9", 
    "feature" : {
        "id" : "610d930fed1110411f6409e9", 
        "sequence_number" : "DEA090E8-F6EF-11EB-B761-001C423D74FB", 
        "template_id" : "610d930fed1110411f6409e8", 
        "geometry" : {
            "type" : "Point", 
            "coordinates" : [
                6.225682, 
                1.260834, 
                22.0, 
                0.0
            ]
        }, 
        "attributes" : {
            "T1 Field 1" : "F1 Upd Value 1", 
            "T1 Field 2" : "F1 Upd Value 2", 
            "T1 Field 3" : "F1 Upd Value 3"
        }, 
        "created_at" : "2021-08-06T19:52:47.324Z", 
        "updated_at" : "2021-08-06T19:52:47.463Z", 
        "deleted_at" : null, 
        "created_by" : "610d930fed1110411f6409e0", 
        "updated_by" : "610d930fed1110411f6409e0", 
        "deleted_by" : null
    }
}


Features - Delete a feature   

Delete a feature. If the user requesting the delete is a collaborator, and is not the owner of the project, he must be:
    1. Member of the project and
    2. Have the permission to delete features.

See also:
    Features - Upload a feature
    Project/Members - Add a user to a project.
    Project/Members - Grant permissions to collaborator

Request

DELETE    /v1/templates/610d930fed1110411f6409e8/features/610d930fed1110411f6409e9
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
X-Working-Project-Id: 610d930fed1110411f6409e7

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930fed1110411f6409e8/features/610d930fed1110411f6409e9", 
    "feature" : {
        "id" : "610d930fed1110411f6409e9", 
        "sequence_number" : "DEA090E8-F6EF-11EB-B761-001C423D74FB", 
        "template_id" : "610d930fed1110411f6409e8", 
        "geometry" : {
            "type" : "Point", 
            "coordinates" : [
                6.225682, 
                1.260834, 
                22.0, 
                0.0
            ]
        }, 
        "attributes" : {
            "T1 Field 1" : "F1 Upd Value 1", 
            "T1 Field 2" : "F1 Upd Value 2", 
            "T1 Field 3" : "F1 Upd Value 3"
        }, 
        "created_at" : "2021-08-06T19:52:47.324Z", 
        "updated_at" : "2021-08-06T19:52:47.463Z", 
        "deleted_at" : "2021-08-06T19:52:47.653Z", 
        "created_by" : "610d930fed1110411f6409e0", 
        "updated_by" : "610d930fed1110411f6409e0", 
        "deleted_by" : "610d930fed1110411f6409e0"
    }
}


Features - Delete a set of features   

Delete a set of features. The Ids of features to be deleted are listed in the Request Body.
If the user requesting the delete is a collaborator, and is not the owner of the project, he must be:
    1. Member of the project and
    2. Have the permission to delete features.

See also:
    Features - Upload a feature
    Project/Members - Add a user to a project.
    Project/Members - Grant permissions to collaborator

Request

DELETE    /v1/templates/610d930fed1110411f6409e8/features
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
Content-Type: application/json
X-Working-Project-Id: 610d930fed1110411f6409e7

Request Body

{
    "ids" : [
        "610d930fed1110411f6409ea", 
        "610d930fed1110411f6409eb"
    ]
}

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930fed1110411f6409e8/features", 
    "features" : {
        "metadata" : {
            "page" : 0, 
            "pages" : 0, 
            "page_count" : 0, 
            "total_count" : 0, 
            "uris" : {
            }, 
            "absolute_uris" : {
            }
        }, 
        "instances" : [
            {
                "id" : "610d930fed1110411f6409ea", 
                "sequence_number" : "DEA090E9-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409e8", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        51.312572, 
                        4.875058, 
                        22.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "T1 Field 1" : "F2 Value 1", 
                    "T1 Field 2" : "F2 Value 2", 
                    "T1 Field 3" : "F2 Value 3"
                }, 
                "created_at" : "2021-08-06T19:52:47.369Z", 
                "updated_at" : null, 
                "deleted_at" : "2021-08-06T19:52:47.701Z", 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : "610d930fed1110411f6409e0"
            }, 
            {
                "id" : "610d930fed1110411f6409eb", 
                "sequence_number" : "DEA090EA-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409e8", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        51.312553, 
                        4.88304, 
                        22.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "T1 Field 1" : "F3 Value 1", 
                    "T1 Field 2" : "F3 Value 2", 
                    "T1 Field 3" : "F3 Value 3"
                }, 
                "created_at" : "2021-08-06T19:52:47.416Z", 
                "updated_at" : null, 
                "deleted_at" : "2021-08-06T19:52:47.703Z", 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : "610d930fed1110411f6409e0"
            }
        ]
    }
}

Search the given text in all string fields in the features of a given template. The template body is text (not JSON).

See also:
    Features - Search extensive

Request

POST    /v1/templates/610d930fed1110411f6409ec/features/textsearch
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
X-Working-Project-Id: 610d930fed1110411f6409e7
Content-Type: text/plain; charset=utf-8

Search Value

R&D

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930fed1110411f6409ec/features/textsearch", 
    "features" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 4, 
            "total_count" : 4, 
            "uris" : {
                "first" : "/v1/templates/610d930fed1110411f6409ec/features/textsearch?page=1&perPage=500", 
                "self" : "/v1/templates/610d930fed1110411f6409ec/features/textsearch", 
                "last" : "/v1/templates/610d930fed1110411f6409ec/features/textsearch?page=1&perPage=500"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409ec/features/textsearch?page=1&perPage=500", 
                "self" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409ec/features/textsearch", 
                "last" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409ec/features/textsearch?page=1&perPage=500"
            }
        }, 
        "instances" : [
            {
                "id" : "610d930fed1110411f6409f1", 
                "sequence_number" : "DEA090EF-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409ec", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.168548, 
                        1.234305, 
                        0.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "Name" : "Michel", 
                    "Function" : "Developer", 
                    "Department" : "R&D"
                }, 
                "created_at" : "2021-08-06T19:52:47.994Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }, 
            {
                "id" : "610d930fed1110411f6409f0", 
                "sequence_number" : "DEA090EE-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409ec", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.168548, 
                        1.234305, 
                        0.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "Name" : "Boris", 
                    "Function" : "Testing & Deployment", 
                    "Department" : "R&D"
                }, 
                "created_at" : "2021-08-06T19:52:47.947Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }, 
            {
                "id" : "610d930fed1110411f6409ef", 
                "sequence_number" : "DEA090ED-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409ec", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.168548, 
                        1.234305, 
                        0.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "Name" : "Ishak", 
                    "Function" : "Developer", 
                    "Department" : "R&D"
                }, 
                "created_at" : "2021-08-06T19:52:47.900Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }, 
            {
                "id" : "610d930fed1110411f6409ee", 
                "sequence_number" : "DEA090EC-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409ec", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.168548, 
                        1.234305, 
                        0.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "Name" : "Matthias", 
                    "Function" : "Developer", 
                    "Department" : "R&D"
                }, 
                "created_at" : "2021-08-06T19:52:47.854Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }
        ]
    }
}

Extensive search in all the features of a template. The query is in the Request Body in JSON format. When the request body contains multiple name, value pairs, all those conditions must be met.The query may contain operators to specify if values should be equal, greater than, less than, etc. The use of those operators will be documented later.

See also:
    Features - Search text

Request

POST    /v1/templates/610d930fed1110411f6409ec/features/search
Content-Type: application/json
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e
X-Working-Project-Id: 610d930fed1110411f6409e7

Request Body

{
    "Function" : "Developer", 
    "Department" : "R&D"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/templates/610d930fed1110411f6409ec/features/search", 
    "features" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 3, 
            "total_count" : 3, 
            "uris" : {
                "first" : "/v1/templates/610d930fed1110411f6409ec/features/search?page=1&perPage=500", 
                "self" : "/v1/templates/610d930fed1110411f6409ec/features/search", 
                "last" : "/v1/templates/610d930fed1110411f6409ec/features/search?page=1&perPage=500"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409ec/features/search?page=1&perPage=500", 
                "self" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409ec/features/search", 
                "last" : "http://api.mycumulus.com/v1/templates/610d930fed1110411f6409ec/features/search?page=1&perPage=500"
            }
        }, 
        "instances" : [
            {
                "id" : "610d930fed1110411f6409f1", 
                "sequence_number" : "DEA090EF-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409ec", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.168548, 
                        1.234305, 
                        0.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "Name" : "Michel", 
                    "Function" : "Developer", 
                    "Department" : "R&D"
                }, 
                "created_at" : "2021-08-06T19:52:47.994Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }, 
            {
                "id" : "610d930fed1110411f6409ef", 
                "sequence_number" : "DEA090ED-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409ec", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.168548, 
                        1.234305, 
                        0.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "Name" : "Ishak", 
                    "Function" : "Developer", 
                    "Department" : "R&D"
                }, 
                "created_at" : "2021-08-06T19:52:47.900Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }, 
            {
                "id" : "610d930fed1110411f6409ee", 
                "sequence_number" : "DEA090EC-F6EF-11EB-B761-001C423D74FB", 
                "template_id" : "610d930fed1110411f6409ec", 
                "geometry" : {
                    "type" : "Point", 
                    "coordinates" : [
                        6.168548, 
                        1.234305, 
                        0.0, 
                        0.0
                    ]
                }, 
                "attributes" : {
                    "Name" : "Matthias", 
                    "Function" : "Developer", 
                    "Department" : "R&D"
                }, 
                "created_at" : "2021-08-06T19:52:47.854Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d930fed1110411f6409e0", 
                "updated_by" : null, 
                "deleted_by" : null
            }
        ]
    }
}


Features - Import CSV   

Imports features in an existing or in a new template. The request body contains the data, in CSV format, Base64 encoded.The template is specified by it's name. If the template does not exist yet, a new template with that name is generated.In that case, the request body must contain for each field (1) the type, (2) the name and (3) the label. When the CSV contains the coordinates of a point, the CRS of the coordinates must be given and in the array "coordinate_columns" the columns (starting from 1) of the coordinates. For a 2D point, the array will contain 2 elements.

Request

POST    /v1/imports/data
Content-Type: application/json
X-Auth-Token: cfa68331688bb4cf1a1e74dec9b70186ab0b205a79378c5e396ca630ee8a36b2f8e0db7acef1383232bab563d2dfa1fa3c5e54f1a7095c95b765d256efb9449fdad9a819e416524ba461e72e52d107c6f22d84bab6c95c837581c51e5d7752ca4b5d1e9a086959cd620e0d5317317184871641437d88f951033b16ed59d6e

Request Body

{
    "template" : {
        "name" : "Points", 
        "description" : "Form created by import", 
        "project_id" : "610d930fed1110411f6409e7"
    }, 
    "data" : {
        "base64_encoded_content" : "77u/UG9pbnROciwgWCwgWSwgWiwgQ29kZQ0KMTAwMCwgNTEuNzc0NjEyODcsNC42NDcwODUwOSw0OC4wMCxQb2ludDENCjEwMDEsIDUxLjc3NSw0LjY0Niw0OS4wMCxQb2ludCAyDQo=", 
        "encoding" : "UTF8", 
        "type" : "CSV", 
        "data_separator" : ",", 
        "decimal_separator" : ".", 
        "geometry" : "Point", 
        "coordinate_columns" : [
            2, 
            3, 
            4
        ], 
        "crs" : "Geodetic", 
        "fields" : [
            {
                "_class" : "stringfield", 
                "name" : "PointNr", 
                "label" : "Point Number"
            }, 
            {
                "_class" : "stringfield", 
                "name" : "Code", 
                "label" : "Code"
            }
        ]
    }
}

Response

{
    "status" : 201, 
    "uri" : "/v1/imports/data", 
    "features" : [
        "2 features inserted successfully"
    ], 
    "template" : {
        "id" : "610d9310ed1110411f6409f2", 
        "project_id" : "610d930fed1110411f6409e7", 
        "name" : "Points", 
        "description" : "Form created by import", 
        "image_file_url" : "", 
        "feature" : {
            "geometry_type" : "Point", 
            "attributes" : [
                {
                    "_class" : "attribute", 
                    "name" : "PointNr", 
                    "type" : "string", 
                    "default_value" : null, 
                    "restrictions" : [
                    ]
                }, 
                {
                    "_class" : "attribute", 
                    "name" : "Code", 
                    "type" : "string", 
                    "default_value" : null, 
                    "restrictions" : [
                    ]
                }
            ]
        }, 
        "form" : {
            "fields" : [
                {
                    "_class" : "stringfield", 
                    "name" : "PointNr", 
                    "label" : "Point Number", 
                    "description" : null, 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : false, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : ""
                }, 
                {
                    "_class" : "stringfield", 
                    "name" : "Code", 
                    "label" : "Code", 
                    "description" : null, 
                    "enabled" : true, 
                    "visible" : true, 
                    "required" : false, 
                    "use_previous_value" : false, 
                    "constraints" : [
                    ], 
                    "event_actions" : null, 
                    "default_value_expression" : null, 
                    "default_value" : ""
                }
            ]
        }, 
        "map_style" : null, 
        "template" : false, 
        "created_at" : "2021-08-06T19:52:48.198Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d930fed1110411f6409e0", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "visibility" : null, 
        "is_template" : false, 
        "default_style_id" : null
    }
}


--- Public API functions: Report Templates ---


Report Templates - Create a report template   

Creates a new report template. A report template can be either used by all users in the organisation and with any form (visibleTo = all_users), or the report template is linked with one or more forms (visibleTo = some_forms).This is the first step to create a customized report template. Afterwards the html files defining the layout of the report must still be uploaded.

See also:
    Report Templates - Update the report template
    Report Templates - Delete a report template
    Report Templates - Retrieve the list of all report templates
    Report Templates - Retrieve a report template

Request

POST    /v1/reporttemplates?visibleTo=all_users
X-Auth-Token: 2eccdb385fd6a3b486ef32fc771501a29a61eb8b624884ff045e7764bd726ccd9f79c6d0568279fb92eff96a8a912c32bd418281b164bd5a590a5d8386381e2e12b8980362f2335877a1abe2b692db42aeb1c6cfd5c7be8de298e4f96c2b799d7247cbc3db9caa17b55311e29fde6ce68e8ecad59fee2544522572
Content-Type: application/json

Request Body

{
    "name" : "My Report Template", 
    "place_holders" : [
        {
            "User Name" : "Fons"
        }, 
        {
            "Date" : null
        }
    ], 
    "orientation" : "portrait", 
    "default_page_size" : "A4"
}

Response

{
    "status" : 201, 
    "uri" : "/v1/reporttemplates?visibleTo=all_users", 
    "report_template" : {
        "id" : "610d9310ed1110411f6409fd", 
        "name" : "My Report Template", 
        "place_holders" : [
            {
                "User Name" : "Fons"
            }, 
            {
                "Date" : null
            }
        ], 
        "orientation" : "portrait", 
        "default_page_size" : "A4", 
        "template_preview_url" : null, 
        "user_id" : "610d9310ed1110411f6409f6", 
        "visible_to" : "all_users", 
        "created_at" : "2021-08-06T19:52:48.665Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9310ed1110411f6409f6", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "description" : ""
    }
}


Report Templates - Create a report template   

Creates a new report template. A report template can be either used by all users in the organisation and with any form (visibleTo = all_users), or the report template is linked with one or more forms (visibleTo = some_forms).This is the first step to create a customized report template. Afterwards the html files defining the layout of the report must still be uploaded.

See also:
    Report Templates - Update the report template
    Report Templates - Delete a report template
    Report Templates - Retrieve the list of all report templates
    Report Templates - Retrieve a report template

Request

POST    /v1/reporttemplates?visibleTo=some_forms
X-Auth-Token: 2eccdb385fd6a3b486ef32fc771501a29a61eb8b624884ff045e7764bd726ccd9f79c6d0568279fb92eff96a8a912c32bd418281b164bd5a590a5d8386381e2e12b8980362f2335877a1abe2b692db42aeb1c6cfd5c7be8de298e4f96c2b799d7247cbc3db9caa17b55311e29fde6ce68e8ecad59fee2544522572
Content-Type: application/json

Request Body

{
    "name" : "Private Report Template", 
    "place_holders" : [
        {
            "User Name" : "Fons"
        }, 
        {
            "Date" : null
        }
    ], 
    "linked_templates" : [
    ], 
    "orientation" : "portrait", 
    "default_page_size" : "A4"
}

Response

{
    "status" : 201, 
    "uri" : "/v1/reporttemplates?visibleTo=some_forms", 
    "report_template" : {
        "id" : "610d9310ed1110411f6409fe", 
        "name" : "Private Report Template", 
        "place_holders" : [
            {
                "User Name" : "Fons"
            }, 
            {
                "Date" : null
            }
        ], 
        "orientation" : "portrait", 
        "default_page_size" : "A4", 
        "template_preview_url" : null, 
        "user_id" : "610d9310ed1110411f6409f6", 
        "visible_to" : "some_forms", 
        "linked_templates" : [
        ], 
        "created_at" : "2021-08-06T19:52:48.733Z", 
        "updated_at" : null, 
        "deleted_at" : null, 
        "created_by" : "610d9310ed1110411f6409f6", 
        "updated_by" : null, 
        "deleted_by" : null, 
        "description" : null
    }
}


Report Templates - Update the report template   

Update the report template. The Request Body may contain only the properties to be updated. However it's advised to send the complete updated template again.

See also:
    Report Templates - Create a report template
    Report Templates - Retrieve a report template

Request

PUT    /v1/reporttemplates/610d9310ed1110411f6409fd
X-Auth-Token: 2eccdb385fd6a3b486ef32fc771501a29a61eb8b624884ff045e7764bd726ccd9f79c6d0568279fb92eff96a8a912c32bd418281b164bd5a590a5d8386381e2e12b8980362f2335877a1abe2b692db42aeb1c6cfd5c7be8de298e4f96c2b799d7247cbc3db9caa17b55311e29fde6ce68e8ecad59fee2544522572
Content-Type: application/json

Request Body

{
    "name" : "My Updated Report Template", 
    "place_holders" : [
        {
            "User Name" : "Fons"
        }, 
        {
            "Date" : null
        }
    ], 
    "orientation" : "landscape", 
    "default_page_size" : "A3"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/reporttemplates/610d9310ed1110411f6409fd", 
    "report_template" : {
        "id" : "610d9310ed1110411f6409fd", 
        "name" : "My Updated Report Template", 
        "place_holders" : [
            {
                "User Name" : "Fons"
            }, 
            {
                "Date" : null
            }
        ], 
        "orientation" : "landscape", 
        "default_page_size" : "A3", 
        "template_preview_url" : null, 
        "user_id" : "610d9310ed1110411f6409f6", 
        "visible_to" : "all_users", 
        "created_at" : "2021-08-06T19:52:48.665Z", 
        "updated_at" : "2021-08-06T19:52:48.775Z", 
        "deleted_at" : null, 
        "created_by" : "610d9310ed1110411f6409f6", 
        "updated_by" : "610d9310ed1110411f6409f6", 
        "deleted_by" : null, 
        "description" : ""
    }
}


Report Templates - Retrieve the list of all report templates   

Retrieve the list of all report templates owned by the given user.

See also:
    Report Templates - Create a report template

Request

GET    /v1/reporttemplates
X-Auth-Token: 2eccdb385fd6a3b486ef32fc771501a29a61eb8b624884ff045e7764bd726ccd9f79c6d0568279fb92eff96a8a912c32bd418281b164bd5a590a5d8386381e2e12b8980362f2335877a1abe2b692db42aeb1c6cfd5c7be8de298e4f96c2b799d7247cbc3db9caa17b55311e29fde6ce68e8ecad59fee2544522572

Response

{
    "status" : 200, 
    "uri" : "/v1/reporttemplates", 
    "report_templates" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 2, 
            "total_count" : 2, 
            "uris" : {
                "first" : "/v1/reporttemplates?page=1&perPage=500", 
                "self" : "/v1/reporttemplates", 
                "last" : "/v1/reporttemplates?page=1&perPage=500"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/reporttemplates?page=1&perPage=500", 
                "self" : "http://api.mycumulus.com/v1/reporttemplates", 
                "last" : "http://api.mycumulus.com/v1/reporttemplates?page=1&perPage=500"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9310ed1110411f6409fe", 
                "name" : "Private Report Template", 
                "place_holders" : [
                    {
                        "User Name" : "Fons"
                    }, 
                    {
                        "Date" : null
                    }
                ], 
                "orientation" : "portrait", 
                "default_page_size" : "A4", 
                "template_preview_url" : null, 
                "user_id" : "610d9310ed1110411f6409f6", 
                "visible_to" : "some_forms", 
                "linked_templates" : [
                ], 
                "created_at" : "2021-08-06T19:52:48.733Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9310ed1110411f6409f6", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : null
            }, 
            {
                "id" : "610d9310ed1110411f6409fd", 
                "name" : "My Updated Report Template", 
                "place_holders" : [
                    {
                        "User Name" : "Fons"
                    }, 
                    {
                        "Date" : null
                    }
                ], 
                "orientation" : "landscape", 
                "default_page_size" : "A3", 
                "template_preview_url" : null, 
                "user_id" : "610d9310ed1110411f6409f6", 
                "visible_to" : "all_users", 
                "created_at" : "2021-08-06T19:52:48.665Z", 
                "updated_at" : "2021-08-06T19:52:48.775Z", 
                "deleted_at" : null, 
                "created_by" : "610d9310ed1110411f6409f6", 
                "updated_by" : "610d9310ed1110411f6409f6", 
                "deleted_by" : null, 
                "description" : ""
            }
        ]
    }
}


Report Templates - Retrieve the list of all public report templates   

The public report templates are generic and available to all MyCumulus users.

See also:
    Report Templates - Create a public report template. (Type mc_admin and all_mc_users)

Request

GET    /v1/public/reporttemplates?page=1&perPage=10
X-Auth-Token: 2eccdb385fd6a3b486ef32fc771501a29a61eb8b624884ff045e7764bd726ccd9f79c6d0568279fb92eff96a8a912c32bd418281b164bd5a590a5d8386381e2e12b8980362f2335877a1abe2b692db42aeb1c6cfd5c7be8de298e4f96c2b799d7247cbc3db9caa17b55311e29fde6ce68e8ecad59fee2544522572

Response

{
    "status" : 200, 
    "uri" : "/v1/public/reporttemplates?page=1&perPage=10", 
    "report_templates" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 2, 
            "page_count" : 10, 
            "total_count" : 11, 
            "uris" : {
                "first" : "/v1/public/reporttemplates?page=1&perPage=10", 
                "self" : "/v1/public/reporttemplates?perPage=10", 
                "next" : "/v1/public/reporttemplates?page=2&perPage=10", 
                "last" : "/v1/public/reporttemplates?page=2&perPage=10"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/public/reporttemplates?page=1&perPage=10", 
                "self" : "http://api.mycumulus.com/v1/public/reporttemplates?perPage=10", 
                "next" : "http://api.mycumulus.com/v1/public/reporttemplates?page=2&perPage=10", 
                "last" : "http://api.mycumulus.com/v1/public/reporttemplates?page=2&perPage=10"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9310ed1110411f640a01", 
                "name" : "Public Report Template", 
                "place_holders" : [
                    {
                        "User Name" : "Fons"
                    }, 
                    {
                        "Date" : null
                    }
                ], 
                "orientation" : "portrait", 
                "default_page_size" : "A4", 
                "template_preview_url" : null, 
                "user_id" : "610d9310ed1110411f6409ff", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2021-08-06T19:52:48.961Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "610d9310ed1110411f6409ff", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b519812e4b06c1b130c5ef3", 
                "name" : "MyCumulus Demo", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }
                ], 
                "orientation" : "portrait", 
                "default_page_size" : "A4", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T08:06:42.496Z", 
                "updated_at" : "2020-04-28T16:04:52.118Z", 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : "5b50d939e4b06c1b130c5964", 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b5197b2e4b06c1b130c5ef0", 
                "name" : "MyCumulus A3 Landscape", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "landscape", 
                "default_page_size" : "A3", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T08:05:06.492Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b519751e4b06c1b130c5eed", 
                "name" : "MyCumulus A3 Portrait", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "portrait", 
                "default_page_size" : "A3", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T08:03:29.316Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b5196f2e4b06c1b130c5eea", 
                "name" : "MyCumulus A4 Landscape", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "landscape", 
                "default_page_size" : "A4", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T08:01:54.389Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b51968ce4b06c1b130c5ee7", 
                "name" : "MyCumulus A4 Portrait", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "portrait", 
                "default_page_size" : "A4", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T08:00:12.676Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b51962be4b06c1b130c5ee4", 
                "name" : "Standard A3 Landscape", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "landscape", 
                "default_page_size" : "A3", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T07:58:35.601Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b5195a1e4b06c1b130c5edf", 
                "name" : "Standard A3 Portrait", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "portrait", 
                "default_page_size" : "A3", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T07:56:17.091Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b51954ee4b06c1b130c5edd", 
                "name" : "Standard A4 Landscape", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "landscape", 
                "default_page_size" : "A4", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T07:54:54.588Z", 
                "updated_at" : null, 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : null, 
                "deleted_by" : null, 
                "description" : ""
            }, 
            {
                "id" : "5b519403e4b06c1b130c5ed3", 
                "name" : "Standard A4 Portrait", 
                "place_holders" : [
                    {
                        "CompanyName" : null
                    }, 
                    {
                        "Address" : null
                    }, 
                    {
                        "Reporter" : null
                    }, 
                    {
                        "Date" : null
                    }, 
                    {
                        "TableTitle" : null
                    }, 
                    {
                        "PhoneNumber" : null
                    }, 
                    {
                        "Email" : null
                    }, 
                    {
                        "Website" : null
                    }
                ], 
                "orientation" : "portrait", 
                "default_page_size" : "A4", 
                "template_preview_url" : null, 
                "user_id" : "5b50d939e4b06c1b130c5964", 
                "visible_to" : "all_mc_users", 
                "created_at" : "2018-07-20T07:49:23.204Z", 
                "updated_at" : "2018-07-20T07:53:37.146Z", 
                "deleted_at" : null, 
                "created_by" : "5b50d939e4b06c1b130c5964", 
                "updated_by" : "5b50d939e4b06c1b130c5964", 
                "deleted_by" : null, 
                "description" : ""
            }
        ]
    }
}


Report Templates - Retrieve a report template   

Retrieves a report template.

See also:
    Report Templates - Create a report template

Request

GET    /v1/reporttemplates/610d9310ed1110411f6409fd
X-Auth-Token: 2eccdb385fd6a3b486ef32fc771501a29a61eb8b624884ff045e7764bd726ccd9f79c6d0568279fb92eff96a8a912c32bd418281b164bd5a590a5d8386381e2e12b8980362f2335877a1abe2b692db42aeb1c6cfd5c7be8de298e4f96c2b799d7247cbc3db9caa17b55311e29fde6ce68e8ecad59fee2544522572

Response

{
    "status" : 200, 
    "uri" : "/v1/reporttemplates/610d9310ed1110411f6409fd", 
    "report_template" : {
        "id" : "610d9310ed1110411f6409fd", 
        "name" : "My Updated Report Template", 
        "place_holders" : [
            {
                "User Name" : "Fons"
            }, 
            {
                "Date" : null
            }
        ], 
        "orientation" : "landscape", 
        "default_page_size" : "A3", 
        "template_preview_url" : null, 
        "user_id" : "610d9310ed1110411f6409f6", 
        "visible_to" : "all_users", 
        "created_at" : "2021-08-06T19:52:48.665Z", 
        "updated_at" : "2021-08-06T19:52:48.775Z", 
        "deleted_at" : null, 
        "created_by" : "610d9310ed1110411f6409f6", 
        "updated_by" : "610d9310ed1110411f6409f6", 
        "deleted_by" : null, 
        "description" : ""
    }
}


Report Templates - Delete a report template   

Deletes a report template.

See also:
    Report Templates - Create a report template

Request

DELETE    /v1/reporttemplates/610d9310ed1110411f6409fd
X-Auth-Token: 2eccdb385fd6a3b486ef32fc771501a29a61eb8b624884ff045e7764bd726ccd9f79c6d0568279fb92eff96a8a912c32bd418281b164bd5a590a5d8386381e2e12b8980362f2335877a1abe2b692db42aeb1c6cfd5c7be8de298e4f96c2b799d7247cbc3db9caa17b55311e29fde6ce68e8ecad59fee2544522572

Response

{
    "status" : 200, 
    "uri" : "/v1/reporttemplates/610d9310ed1110411f6409fd", 
    "report_template" : {
        "id" : "610d9310ed1110411f6409fd", 
        "name" : "My Updated Report Template", 
        "place_holders" : [
            {
                "User Name" : "Fons"
            }, 
            {
                "Date" : null
            }
        ], 
        "orientation" : "landscape", 
        "default_page_size" : "A3", 
        "template_preview_url" : null, 
        "user_id" : "610d9310ed1110411f6409f6", 
        "visible_to" : "all_users", 
        "created_at" : "2021-08-06T19:52:48.665Z", 
        "updated_at" : "2021-08-06T19:52:48.775Z", 
        "deleted_at" : null, 
        "created_by" : "610d9310ed1110411f6409f6", 
        "updated_by" : "610d9310ed1110411f6409f6", 
        "deleted_by" : null, 
        "description" : ""
    }
}


--- Public API functions: Create Reports ---


Create Report - Create a report   

Request to create a report. The request body must contain the format (either CSV, HTLM, PDF or JSON) of the report, the type, the template (with report template id and the names/values of the place holders), and queries containing the required information to filter and sort the data that must come in the report. Details about the MongoDB aggregation stages are out of the scope of this document. The $project stage is twice in the pipeline. When following this guideline, the fields will be ordered in the given sequence. The names in the headers, in case "type" : "table", will be the names used in the 2nd $project stage, the text after 'attributes.'. The column titles used by the example will be "Column 1", "Column 2", and "Column 3"

The response contains a.o. an id that allows to request the status (pending or generated) of the request: Create Report - Get the status of the report generation

See also:
    Report Templates - Create a report template
    Create Report - Get the status of the report generation
    Create Report - Get the list of generated reports

Request

POST    /v1/reports/generate
X-Auth-Token: b8426be93e8e7bdca137a9c59594ac6013e05dc4b332d8d694e5f4c969d532928a9f3174944cbf8a9c2e214a2b831cb7a9db0a09c5a4d9e69bc12123a67725aed038f698484d1e5e1ca7282a55ccffbaceb9f744bfbc857a7c98fece32d21f57ae53d54d0e34f186b3f4bb5a49d4f5567d8d5dffc5db3f8999a4cd33ad
Content-Type: application/json

Request Body

{
    "format" : [
        "html"
    ], 
    "type" : "table", 
    "templates" : [
        {
            "template_id" : "610d9311ed1110411f640a0a", 
            "place_holders" : [
                {
                    "CompanyName" : "MyCumulus inc."
                }, 
                {
                    "Date" : "25 September 2016"
                }, 
                {
                    "TableTitle" : "Example Report"
                }
            ]
        }
    ], 
    "queries" : [
        {
            "collection" : "features", 
            "stages" : [
                {
                    "$match" : {
                        "template_id" : "610d9311ed1110411f640a0c"
                    }
                }, 
                {
                    "$sort" : {
                        "_id" : 1
                    }
                }, 
                {
                    "$project" : {
                        "_id" : 0, 
                        "T1 Field 1" : "$attributes.T1 Field 1", 
                        "T1 Field 2" : "$attributes.T1 Field 2", 
                        "T1 Field 3" : "$attributes.T1 Field 3"
                    }
                }, 
                {
                    "$project" : {
                        "attributes.Column 1" : "$T1 Field 1", 
                        "attributes.Column 2" : "$T1 Field 2", 
                        "attributes.Column 3" : "$T1 Field 3"
                    }
                }
            ]
        }
    ]
}

Response

{
    "status" : 200, 
    "uri" : "/v1/reports/generate", 
    "file" : {
        "id" : "610d9312ed1110411f640a17", 
        "filename" : null, 
        "download_url" : null, 
        "downloaded" : false, 
        "user_id" : "610d9311ed1110411f640a03", 
        "report_status" : "pending"
    }
}


Create Report - Get the status of the report generation   

Requests the status of the report generation. When report_status = "generated", the field download_url contains the URL to download the file either automatically, see Report Templates - Retrieve the list of folders containing the template files or by using the URL in a browser.

See also:
    Create Report - Create a report

Request

GET    /v1/report_status/610d9312ed1110411f640a17
X-Auth-Token: b8426be93e8e7bdca137a9c59594ac6013e05dc4b332d8d694e5f4c969d532928a9f3174944cbf8a9c2e214a2b831cb7a9db0a09c5a4d9e69bc12123a67725aed038f698484d1e5e1ca7282a55ccffbaceb9f744bfbc857a7c98fece32d21f57ae53d54d0e34f186b3f4bb5a49d4f5567d8d5dffc5db3f8999a4cd33ad
Content-Type: application/json

Response

{
    "status" : 200, 
    "uri" : "/v1/report_status/610d9312ed1110411f640a17", 
    "file" : {
        "id" : "610d9312ed1110411f640a17", 
        "filename" : "2021_Aug_06T19_52_737648.html", 
        "download_url" : "/v1/files/public/610d9312ed1110411f640a17/2021_Aug_06T19_52_737648.html", 
        "downloaded" : false, 
        "user_id" : "610d9311ed1110411f640a03", 
        "report_status" : "generated"
    }
}


Create Report - Get the list of generated reports   

Gets the list of the generated reports that are still available on the server. This list contains all reports that are available for downloading. The response contains a.o. the URL to download the report and an indication if the report has already been downloaded.

See also:
    Create Report - Create a report

Request

GET    /v1/reports/610d9311ed1110411f640a03
X-Auth-Token: b8426be93e8e7bdca137a9c59594ac6013e05dc4b332d8d694e5f4c969d532928a9f3174944cbf8a9c2e214a2b831cb7a9db0a09c5a4d9e69bc12123a67725aed038f698484d1e5e1ca7282a55ccffbaceb9f744bfbc857a7c98fece32d21f57ae53d54d0e34f186b3f4bb5a49d4f5567d8d5dffc5db3f8999a4cd33ad
Content-Type: application/json

Response

{
    "status" : 200, 
    "uri" : "/v1/reports/610d9311ed1110411f640a03", 
    "public_files" : {
        "metadata" : {
            "page" : 1, 
            "pages" : 1, 
            "page_count" : 1, 
            "total_count" : 1, 
            "uris" : {
                "first" : "/v1/reports/610d9311ed1110411f640a03?page=1&perPage=1", 
                "self" : "/v1/reports/610d9311ed1110411f640a03", 
                "last" : "/v1/reports/610d9311ed1110411f640a03?page=1&perPage=1"
            }, 
            "absolute_uris" : {
                "first" : "http://api.mycumulus.com/v1/reports/610d9311ed1110411f640a03?page=1&perPage=1", 
                "self" : "http://api.mycumulus.com/v1/reports/610d9311ed1110411f640a03", 
                "last" : "http://api.mycumulus.com/v1/reports/610d9311ed1110411f640a03?page=1&perPage=1"
            }
        }, 
        "instances" : [
            {
                "id" : "610d9312ed1110411f640a17", 
                "filename" : "2021_Aug_06T19_52_737648.html", 
                "download_url" : "/v1/files/public/610d9312ed1110411f640a17/2021_Aug_06T19_52_737648.html", 
                "downloaded" : false, 
                "user_id" : "610d9311ed1110411f640a03", 
                "report_status" : "generated"
            }
        ]
    }
}


Create Report - Set the indication that the report is downloaded   

Sets in the list of generated reports the indication that the report has been downloaded.

See also:
    Create Report - Create a report
    Create Report - Get the list of generated reports

Request

PUT    /v1/reports/610d9312ed1110411f640a17
X-Auth-Token: b8426be93e8e7bdca137a9c59594ac6013e05dc4b332d8d694e5f4c969d532928a9f3174944cbf8a9c2e214a2b831cb7a9db0a09c5a4d9e69bc12123a67725aed038f698484d1e5e1ca7282a55ccffbaceb9f744bfbc857a7c98fece32d21f57ae53d54d0e34f186b3f4bb5a49d4f5567d8d5dffc5db3f8999a4cd33ad

Response

{
    "status" : 200, 
    "uri" : "/v1/reports/610d9312ed1110411f640a17", 
    "file" : {
        "id" : "610d9312ed1110411f640a17", 
        "filename" : "2021_Aug_06T19_52_737648.html", 
        "download_url" : "/v1/files/public/610d9312ed1110411f640a17/2021_Aug_06T19_52_737648.html", 
        "downloaded" : true, 
        "user_id" : "610d9311ed1110411f640a03", 
        "report_status" : "generated"
    }
}


Create Report - Delete the report   

Deletes the report from the list of generated reports. Once the report is removed from the list, it is not available on the server anymore.

See also:
    Create Report - Create a report
    Create Report - Get the list of generated reports

Request

DELETE    /v1/reports/610d9312ed1110411f640a17
X-Auth-Token: b8426be93e8e7bdca137a9c59594ac6013e05dc4b332d8d694e5f4c969d532928a9f3174944cbf8a9c2e214a2b831cb7a9db0a09c5a4d9e69bc12123a67725aed038f698484d1e5e1ca7282a55ccffbaceb9f744bfbc857a7c98fece32d21f57ae53d54d0e34f186b3f4bb5a49d4f5567d8d5dffc5db3f8999a4cd33ad

Response

{
    "status" : 200, 
    "uri" : "/v1/reports/610d9312ed1110411f640a17", 
    "file" : {
        "id" : "610d9312ed1110411f640a17", 
        "filename" : "2021_Aug_06T19_52_737648.html", 
        "download_url" : "/v1/files/public/610d9312ed1110411f640a17/2021_Aug_06T19_52_737648.html", 
        "downloaded" : true, 
        "user_id" : "610d9311ed1110411f640a03", 
        "report_status" : "generated"
    }
}


--- Public API functions: Files ---


Files - Upload a private file   

Upload a private file. A private file may only be used in combination with a feature.  If no feature with the corresponding feature_sequence_number is uploaded, the private file will be removed automatically after one week. A private file is only accessible with authentication of the owner.
The feature_sequence_number is a UUID and must match with the sequence_number of the feature. See Features - Upload a feature. The combination of file_sequence_number and feature_sequence_number must be unique It's the responsibility of the client to make the name unique.

The download_url in the response, allows any user with the right permissions (e.g. collaborator having access to the feature) to download the file.

The Request Body contains the fields:
    1. filename : the name of the file. Although the combination with file_sequence_number and feature_sequence_number must be unique, it's recommended that the name is unique for the user. After all, the project the file belongs to is not taken into account.
    2. file_sequence_number : Is used to guaranty that the file is not stored twice on the server in case the upload command has to be repeated in case of a communication error.
    3. feature_sequence_number : The value is the sequence_number of a feature the file is linked to. The feature_sequence_number is a UUID and links features with files.

See also:
    Features - Upload a feature
    Files - Download a private file
    Files - Delete a private file

Request

POST    /v1/files
X-Auth-Token: 50d128abeee57f8b719359e53126a1763b57a86f37632c64c11282b1166ef2dd08d3ec0abb8993ab4779d63cf346968d3df31e434307ec57dcded93f73fab12bfb3677fcf7de1788619a4912b228e647bfc36b35f349eb112772ec69ab457ccc4e8a51ca53f6c1ddf1e93a31769d944dacedccd4df5465fc3be8851738
Content-Type: application/json
X-Working-Project-Id: 610d9314ed1110411f640a22

Request Body

{
    "filename" : "Photo1.jpg", 
    "file_sequence_number" : "File_Sequence_Number", 
    "feature_sequence_number" : "DEA090FA-F6EF-11EB-B761-001C423D74FB", 
    "base64_encoded_content" : "Removed base64_encoded_content from report"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/files", 
    "file" : {
        "fileSequenceNumber" : "File_Sequence_Number", 
        "id" : "610d9314ed1110411f640a23", 
        "filename" : "Photo1.jpg", 
        "download_url" : "/v1/files/610d9314ed1110411f640a23/Photo1.jpg", 
        "downloaded" : false, 
        "feature_sequence_number" : "DEA090FA-F6EF-11EB-B761-001C423D74FB", 
        "user_id" : "610d9314ed1110411f640a1b", 
        "report_file" : false, 
        "report_status" : null
    }
}


Files - Check if a private file exists   

Check if a private file exists. This command is introduced to check if a file of a feature already exists in case commnunication errors aborted uploading. 

The Request Body is identical to the request body of the Upload command. It contains the same fields:
    1. filename : the file name.
    2. file_sequence_number
    3. feature_sequence_number.

See also:
    Files - Upload a private file

Request

POST    /v1/files/search
X-Auth-Token: 50d128abeee57f8b719359e53126a1763b57a86f37632c64c11282b1166ef2dd08d3ec0abb8993ab4779d63cf346968d3df31e434307ec57dcded93f73fab12bfb3677fcf7de1788619a4912b228e647bfc36b35f349eb112772ec69ab457ccc4e8a51ca53f6c1ddf1e93a31769d944dacedccd4df5465fc3be8851738
Content-Type: application/json
X-Working-Project-Id: 610d9314ed1110411f640a22

Request Body

{
    "filename" : "Photo1.jpg", 
    "file_sequence_number" : "File_Sequence_Number", 
    "feature_sequence_number" : "DEA090FA-F6EF-11EB-B761-001C423D74FB"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/files/search", 
    "file" : {
        "fileSequenceNumber" : "File_Sequence_Number", 
        "id" : "610d9314ed1110411f640a23", 
        "filename" : "Photo1.jpg", 
        "download_url" : "/v1/files/610d9314ed1110411f640a23/Photo1.jpg", 
        "downloaded" : false, 
        "feature_sequence_number" : "DEA090FA-F6EF-11EB-B761-001C423D74FB", 
        "user_id" : "610d9314ed1110411f640a1b", 
        "report_file" : false, 
        "report_status" : null
    }
}


Files - Download a private file   

Download a private file. The GET request must contain the id and the filename returned in the response of the upload command.

See also:
    Files - Upload a private file

Request

GET    /v1/files/610d9314ed1110411f640a23/Photo1.jpg
X-Auth-Token: 50d128abeee57f8b719359e53126a1763b57a86f37632c64c11282b1166ef2dd08d3ec0abb8993ab4779d63cf346968d3df31e434307ec57dcded93f73fab12bfb3677fcf7de1788619a4912b228e647bfc36b35f349eb112772ec69ab457ccc4e8a51ca53f6c1ddf1e93a31769d944dacedccd4df5465fc3be8851738
X-Working-Project-Id: 610d9314ed1110411f640a22

Response



Files - Delete a private file   

Delete the private file. The DELETE request must contain the id and the filename returned in the response of the upload command.

See also:
    Files - Upload a private file

Request

DELETE    /v1/files/610d9314ed1110411f640a23/Photo1.jpg
X-Auth-Token: 50d128abeee57f8b719359e53126a1763b57a86f37632c64c11282b1166ef2dd08d3ec0abb8993ab4779d63cf346968d3df31e434307ec57dcded93f73fab12bfb3677fcf7de1788619a4912b228e647bfc36b35f349eb112772ec69ab457ccc4e8a51ca53f6c1ddf1e93a31769d944dacedccd4df5465fc3be8851738
X-Working-Project-Id: 610d9314ed1110411f640a22

Response

{
    "status" : 200, 
    "uri" : "/v1/files/610d9314ed1110411f640a23/Photo1.jpg", 
    "file" : {
        "fileSequenceNumber" : null, 
        "id" : null, 
        "filename" : "Photo1.jpg", 
        "download_url" : null, 
        "downloaded" : false, 
        "feature_sequence_number" : "DEA090FA-F6EF-11EB-B761-001C423D74FB", 
        "user_id" : "610d9314ed1110411f640a1b", 
        "report_file" : false, 
        "report_status" : null
    }
}


Files - Upload a public file   

Upload a public file. A public file is accessible without authentication. The URL of the MyCumulus back-end combined with the download_url in the response, allows any user to download the file.

The Request Body contains the fields:
    1. filename : the file name must be unique for the user (identified by its authentication). It's the responsibility of the client to make the name unique.
    2. file_sequence_number : Is used to guaranty that the file is not stored twice on the server in case the upload command has to be repeated in case of a communcation error. The value may be null.

See also:
    Files - Download a public file
    Files - Delete a public file

Request

POST    /v1/files/public
X-Auth-Token: 50d128abeee57f8b719359e53126a1763b57a86f37632c64c11282b1166ef2dd08d3ec0abb8993ab4779d63cf346968d3df31e434307ec57dcded93f73fab12bfb3677fcf7de1788619a4912b228e647bfc36b35f349eb112772ec69ab457ccc4e8a51ca53f6c1ddf1e93a31769d944dacedccd4df5465fc3be8851738
Content-Type: application/json

Request Body

{
    "filename" : "Photo1.jpg", 
    "file_sequence_number" : "File_Sequence_Number", 
    "base64_encoded_content" : "Removed base64_encoded_content from report"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/files/public", 
    "file" : {
        "fileSequenceNumber" : null, 
        "id" : "610d9315ed1110411f640a26", 
        "filename" : "Photo1.jpg", 
        "download_url" : "/v1/files/public/610d9315ed1110411f640a26/Photo1.jpg", 
        "downloaded" : false, 
        "feature_sequence_number" : null, 
        "user_id" : "610d9314ed1110411f640a1b", 
        "report_file" : false, 
        "report_status" : null
    }
}


Files - Download a public file   

Request

GET    /v1/files/public/610d9315ed1110411f640a26/Photo1.jpg

Response



Files - Check if a public file exists   

False

See also:
    Files - Upload a public file

Request

POST    /v1/files/public/search
X-Auth-Token: 50d128abeee57f8b719359e53126a1763b57a86f37632c64c11282b1166ef2dd08d3ec0abb8993ab4779d63cf346968d3df31e434307ec57dcded93f73fab12bfb3677fcf7de1788619a4912b228e647bfc36b35f349eb112772ec69ab457ccc4e8a51ca53f6c1ddf1e93a31769d944dacedccd4df5465fc3be8851738
Content-Type: application/json

Request Body

{
    "filename" : "Photo1.jpg", 
    "file_sequence_number" : "File_Sequence_Number"
}

Response

{
    "status" : 200, 
    "uri" : "/v1/files/public/search", 
    "file" : {
        "fileSequenceNumber" : "File_Sequence_Number", 
        "id" : "610d9315ed1110411f640a26", 
        "filename" : "Photo1.jpg", 
        "download_url" : "/v1/files/public/610d9315ed1110411f640a26/Photo1.jpg", 
        "downloaded" : false, 
        "feature_sequence_number" : null, 
        "user_id" : "610d9314ed1110411f640a1b", 
        "report_file" : false, 
        "report_status" : null
    }
}


Files - Delete a public file   

Delete the public file. The DELETE request must contain the id and the filename returned in the response of the upload command.

See also:
    Files - Upload a public file

Request

DELETE    /v1/files/public/610d9315ed1110411f640a26/Photo1.jpg
X-Auth-Token: 50d128abeee57f8b719359e53126a1763b57a86f37632c64c11282b1166ef2dd08d3ec0abb8993ab4779d63cf346968d3df31e434307ec57dcded93f73fab12bfb3677fcf7de1788619a4912b228e647bfc36b35f349eb112772ec69ab457ccc4e8a51ca53f6c1ddf1e93a31769d944dacedccd4df5465fc3be8851738

Response

{
    "status" : 200, 
    "uri" : "/v1/files/public/610d9315ed1110411f640a26/Photo1.jpg", 
    "file" : {
        "fileSequenceNumber" : "File_Sequence_Number", 
        "id" : "610d9315ed1110411f640a26", 
        "filename" : "Photo1.jpg", 
        "download_url" : null, 
        "downloaded" : false, 
        "feature_sequence_number" : null, 
        "user_id" : "610d9314ed1110411f640a1b", 
        "report_file" : false, 
        "report_status" : null
    }
}