{"_id":"583e3d4319f2a90f0094aa43","version":{"_id":"582789aabe5c080f00a5a7fe","__v":10,"project":"568bdc1483d2061900d86cdc","createdAt":"2016-11-12T21:29:14.915Z","releaseDate":"2016-11-12T21:29:14.915Z","categories":["582789abbe5c080f00a5a7ff","582789abbe5c080f00a5a800","582789abbe5c080f00a5a801","582789abbe5c080f00a5a802","582789abbe5c080f00a5a803","582789abbe5c080f00a5a804","582789abbe5c080f00a5a805","582789abbe5c080f00a5a806","582789abbe5c080f00a5a807","582789abbe5c080f00a5a808","5827ea984ca29e0f00137a9e","583df597887db62f00644283","583df5d9c622791900e78da5","5845cd8763c11b250037967d","5845d13063c11b2500379681","5859e859e3306d1900126725","587aeb9a01cf3a0f008359eb","587c422af45e2d0f005e200d","587d84dc82f6f30f004ceee5"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"beta2","version_clean":"0.0.0","version":"0"},"__v":2,"user":"573b7f42fdc9d320001b777d","category":{"_id":"583df5d9c622791900e78da5","project":"568bdc1483d2061900d86cdc","__v":0,"version":"582789aabe5c080f00a5a7fe","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-11-29T21:40:41.653Z","from_sync":false,"order":14,"slug":"users","title":"Users"},"parentDoc":null,"project":"568bdc1483d2061900d86cdc","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-11-30T02:45:23.883Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"PUT https://ioe.droplit.io/api/users/C573b86eeee43dd7ba0244f8a;test?generateToken=true&expiryType=FixedTtl&ttl=3600 HTTP/1.1\nauthorization: AUTH_TOKEN\ncontent-type: application/json\n\n{\n  \"access\": [\n    {\n      \"environmentId\": \"E573bb9ffd717111220812c3a\",\n      \"accessLevel\": \"Full\"\n    }\n  ],\n  \"email\": \"test:::at:::test.com\",\n  \"meta\": {\n    \"$label\": \"Test user\"\n  }\n}","language":"http","name":"HTTP (Generate Token)"},{"language":"http","code":"PUT https://ioe.droplit.io/api/users/C573b86eeee43dd7ba0244f8a;test?expiryType=FixedTtl&ttl=3600 HTTP/1.1\nauthorization: AUTH_TOKEN\ncontent-type: application/json\n\n{\n  \"access\": [\n    {\n      \"environmentId\": \"E573bb9ffd717111220812c3a\",\n      \"accessLevel\": \"Full\"\n    }\n  ],\n  \"email\": \"test@test.com\",\n  \"meta\": {\n    \"$label\": \"Test user\"\n  }\n}","name":"HTTP (Without token)"}]},"method":"put","results":{"codes":[{"status":201,"language":"json","code":"{\n  \"token\": \"24pYFWoosfE4K+9Bg1XcM+s2AqarbAPO/0AG+979IBRbrVqHdM+aFCfc9hR3v0nl3qcExD84mAKudGhpnK6BM9V6ZXgjQ0YSXU6VK+J0YHQTFgkD6pPCidzNjXyLef/U\"\n}"},{"code":"{\n  \"errorType\": \"InvalidParams\",\n  \"errors\": [\n    {\n      \"in\": \"path\",\n      \"message\": \"id did not match ^(?:C[a-z0-9]{24});[a-zA-Z0-9_]{1,50}$\",\n      \"path\": \"id\"\n    },\n    {\n      \"in\": \"path\",\n      \"message\": \"field must be between 26 and 76 characters\",\n      \"path\": \"id\"\n    }\n  ]\n}","language":"json","status":400},{"language":"text","status":401,"code":""},{"code":"","language":"text","status":403},{"status":404,"code":"Ecosystem with id C573b86c47fdf8178dfefc3fb does not exist.","language":"text"}]},"settings":"572c39957c8eff0e00aaa18b","auth":"required","params":[{"_id":"583e3f533a4a941900c54550","ref":"","in":"path","required":true,"desc":"user id","default":"","type":"string","name":"id"},{"_id":"583e3f533a4a941900c5454f","ref":"","in":"query","required":false,"desc":"The manner in which a generated user token should expire.","default":"FixedTtl","type":"string","name":"expiryType"},{"_id":"583e3f533a4a941900c5454e","ref":"","in":"query","required":false,"desc":"Whether a user token whould be generated.","default":"false","type":"boolean","name":"generateToken"},{"_id":"583e3f533a4a941900c5454d","ref":"","in":"query","required":false,"desc":"The time-to-live for generated a user token in seconds.","default":"3600","type":"int","name":"ttl"},{"_id":"583e3f533a4a941900c5454c","ref":"","in":"body","required":false,"desc":"[Environment access](doc:create-update-users#section-access)","default":"","type":"array_object","name":"access"},{"_id":"583e3f533a4a941900c5454b","ref":"","in":"body","required":false,"desc":"User account email","default":"","type":"string","name":"email"},{"_id":"583e3f533a4a941900c5454a","ref":"","in":"body","required":false,"desc":"[meta data](doc:metadata)","default":"","type":"object","name":"meta"},{"_id":"584649bdc42d272300def6f6","ref":"","in":"header","required":false,"desc":"[metadata](doc:metadata) prefix","default":"$","type":"string","name":"x-system-meta-prefix"}],"url":"/users/:id"},"isReference":true,"order":1,"body":"# Access\n\nAccess is provided as a array of objects, each with a property `environmentId` and `accessLevel`.\n\n `accessLevel` can be either `\"Full\"` or `\"None\"`. \n\nSupplying `\"None\"` will delete the array element.","excerpt":"Create or modify a user","slug":"create-update-users","type":"endpoint","title":"Create/Update"}

putCreate/Update

Create or modify a user

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
string
user id

Query Params

expiryType:
stringFixedTtl
The manner in which a generated user token should expire.
generateToken:
booleanfalse
Whether a user token whould be generated.
ttl:
integer3600
The time-to-live for generated a user token in seconds.

Body Params

access:
array of objects
[Environment access](doc:create-update-users#section-access)
email:
string
User account email
meta:
object
[meta data](doc:metadata)

Headers

x-system-meta-prefix:
string$
[metadata](doc:metadata) prefix

Examples


Result Format


Documentation

# Access Access is provided as a array of objects, each with a property `environmentId` and `accessLevel`. `accessLevel` can be either `"Full"` or `"None"`. Supplying `"None"` will delete the array element.

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}