Protocol Documentation

Table of Contents

services.proto

Top

notification

FieldTypeLabelDescription
note Notification

tmrequest

FieldTypeLabelDescription
cmd Command

id int64

name string

tmresponse

FieldTypeLabelDescription
error_code int32

error_msg string

data tmresponse.DataEntry repeated

message Data { map<string, string> pairs = 3; } repeated Data data = 4;

tmresponse.DataEntry

FieldTypeLabelDescription
key string

value string

TMAdmin

The greeting service definition.

Method NameRequest TypeResponse TypeDescription
doRequest tmrequest tmresponse

These are for handling tmrequest for profile data from the database

doNotification notification tmresponse

types_tm.proto

Top

Bannertype

NameNumberDescription
INFO 0

WARNING 1

Command

NameNumberDescription
GET_USER 0

SEND_USER 1

GET_ORG 2

SEND_ORG 3

GET_PROJECT 4

SEND_PROJECT 5

GET_TEAM 6

SEND_TEAM 7

GET_TASK 8

SEND_TASK 9

Editors

NameNumberDescription
ID 0

JOSM 1

POTLATCH_2 2

FIELD_PAPERS 3

CUSTOM 4

RAPID 5

Encouragingemailtype

NameNumberDescription
PROJECT_PROGRESS 0

PROJECT_COMPLETE 1

BEEN_SOME_TIME 2

Mapping_issue

NameNumberDescription
MISSED_FEATURE 0

FEATURE_GEOMETRY 1

Mapping_status

NameNumberDescription
READ 0

UNREAD 1

Mappinglevel

NameNumberDescription
BEGINNER 0

INTERMEDIATE 1

ADVANCED 2

Mappingnotallowed

NameNumberDescription
USER_ALREADY_HAS_TASK_LOCKED 0

USER_NOT_CORRECT_MAPPING_LEVEL 1

USER_NOT_ACCEPTED_LICENSE 2

USER_NOT_ALLOWED 3

PROJECT_NOT_PUBLISHED 4

USER_NOT_TEAM_MEMBER 5

PROJECT_HAS_NO_OSM_TEAM 6

NOT_A_MAPPING_TEAM 7

Mappingtypes

NameNumberDescription
ROADS 0

BUILDINGS 1

WATERWAYS 2

LAND_USE 3

OTHER 4

Message_type

NameNumberDescription
SYSTEM 0

BROADCAST 1

MENTION_NOTIFICATION 2

VALIDATION_NOTIFICATION 3

INVALIDATION_NOTIFICATION 4

REQUEST_TEAM_NOTIFICATION 5

INVITATION_NOTIFICATION 6

TASK_COMMENT_NOTIFICATION 7

PROJECT_CHAT_NOTIFICATION 8

PROJECT_ACTIVITY_NOTIFICATION 9

TEAM_BROADCAST 10

Notification

NameNumberDescription
BAD_DATA 0

BLOCKED_USER 1

PROJECT_FINISHED 2

Organizationtype

NameNumberDescription
FREE 0

DISCOUNTED 1

FULL_FEE 2

Permissions

NameNumberDescription
ANY 0

LEVEL 1

TEAMS 2

TEAMS_LEVEL 3

Projectdifficulty

NameNumberDescription
EASY 0

MODERATE 1

CHALLENGING 2

Projectpriority

NameNumberDescription
URGENT 0

HIGH 1

MEDIUM 2

LOW 3

Projectstatus

NameNumberDescription
ARCHIVED 0

PUBLISHED 1

DRAFT 2

Sort_directions

NameNumberDescription
ASC 0

DESC 1

Taskaction

NameNumberDescription
LOCKED_FOR_MAPPING 0

LOCKED_FOR_VALIDATION 1

STATE_CHANGE 2

COMMENT 3

AUTO_UNLOCKED_FOR_MAPPING 4

AUTO_UNLOCKED_FOR_VALIDATION 5

EXTENDED_FOR_MAPPING 6

EXTENDED_FOR_VALIDATION 7

RELEASED_FOR_MAPPING 8

MARKED_MAPPED 9

VALIDATED 10

MARKED_INVALID 11

MARKED_BAD 12

SPLIT_NEEDED 13

RECREATED 14

Taskcreationmode

NameNumberDescription
GRID 0

CREATE_ROADS 1

UPLOAD 2

Taskstatus

NameNumberDescription
READY 0

TASK_LOCKED_FOR_MAPPING 1

TASK_STATUS_MAPPED 2

TASK_LOCKED_FOR_VALIDATION 3

TASK_VALIDATED 4

TASK_INVALIDATED 5

BAD 6

SPLIT 7

TASK_ARCHIVED 8

BADIMAGERY 9

Teamjoinmethod

NameNumberDescription
ANY_METHOD 0

BY_REQUEST 1

BY_INVITE 2

Teammemberfunctions

NameNumberDescription
MANAGER 0

MEMBER 1

Teamroles

NameNumberDescription
TEAM_READ_ONLY 0

TEAM_MAPPER 1

TEAM_VALIDATOR 2

TEAM_MANAGER 3

Teamvisibility

NameNumberDescription
PUBLIC 0

PRIVATE 1

Usergender

NameNumberDescription
MALE 0

FEMALE 1

SELF_DESCRIBE 2

PREFER_NOT 3

Userrole

NameNumberDescription
USER_READ_ONLY 0

SUPER_ADMIN 1

WEB_ADMIN 2

FIELD_ADMIN 3

ORGANIZATION_ADMIN 4

PROJECT_MANAGER 5

ASSOCIATE_MANAGER 6

VALIDATOR 7

MAPPER 8

Validatingnotallowed

NameNumberDescription
USER_NOT_VALIDATOR 0

USER_LICENSE_NOT_ACCEPTED 1

USER_NOT_ON_ALLOWED_LIST 2

PROJECT_NOT_YET_PUBLISHED 3

USER_IS_BEGINNER 4

NOT_A_VALIDATION_TEAM 5

USER_NOT_IN_TEAM 6

PROJECT_HAS_NO_TEAM 7

USER_ALREADY_LOCKED_TASK 8

campaigns/campaigns.proto

Top

campaigns

messages/messages.proto

Top

messages

FieldTypeLabelDescription
id int32

organizations/organizations.proto

Top

organizations

FieldTypeLabelDescription
id int64

name string

slug string

logo string

description string

url string

type Organizationtype

projects/project_chat.proto

Top

chat

FieldTypeLabelDescription
id int64

projects/projects.proto

Top

projects

FieldTypeLabelDescription
id int64

odkid int64

author_id int64

created google.protobuf.Timestamp

project_name_prefix string

task_type_prefix string

location_str string

geometry bytes

status Projectstatus

private bool

mapping_level Mappinglevel

priority Projectpriority

default_locale string

centroid bytes

hashtags string repeated

name string

allowed_users int64 repeated

priority_areas int64 repeated

interests int32

projects/projects_teams.proto

Top

project_teams

tasks/task_annotations.proto

Top

task_annotations

FieldTypeLabelDescription
id int32

tasks/task_history.proto

Top

task_history

tasks/task_invalidation_history.proto

Top

task_invalidation_history

tasks/task_issues.proto

Top

task_issues

tasks/tasks.proto

Top

tasks

FieldTypeLabelDescription
id int64

project_task_name string

geometry bytes

teams/team_members.proto

Top

team_members

teams/teams.proto

Top

teams

FieldTypeLabelDescription
id int64

name string

logo string

description string

invite_only bool

visibility Teamvisibility

users/users.proto

Top

users

FieldTypeLabelDescription
id int64

username string

name string

city string

country string

tasks_mapped int32

tasks_invalidated int32

projects_mapped int32 repeated

date_registered google.protobuf.Timestamp

last_validation_date google.protobuf.Timestamp

password string

osm_id int64

facebook_id string

irc_id string

skype_id string

slack_id string

linkedin_id string

twitter_id string

picture_url string

gender int32

favorite_projects int32 repeated

interests int32 repeated

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)