CreateUserAttribute
/api/v1/users/{user}/userattributesAdd an attribute to a user. Attributes an integration syncs are overwritten on its next sync, so this is for the ones Oblique owns.
Example request
Section titled “Example request”curl -X POST \ -H "Authorization: Bearer ${OBLIQUE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "integration": "string", "key": "string", "value": "string" }' \ "https://us.oblique.security/api/v1/users/{user}/userattributes"Set OBLIQUE_API_KEY to your API key.
curl -X POST \ -H "Authorization: Bearer ${OBLIQUE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "integration": "string", "key": "string", "value": "string" }' \ "https://eu.oblique.security/api/v1/users/{user}/userattributes"Set OBLIQUE_API_KEY to your API key.
Path parameters
Section titled “Path parameters”parentstringrequiredFormat:
users/{user}/userattributes
Query parameters
Section titled “Query parameters”userAttributeIdstringID of the attribute to create. This value should be 4-63 characters. Valid characters are
/[a-z][0-9]-/.If not provided, a random ID will be generated.
Request body
Section titled “Request body”namestringAssigned by Oblique. Name of the attribute of the format
users/{user}/userattributes/{user_attribute}.createTimestring (date-time)read-onlyCreate timestamp of the attributes. This is always the same as the parent user.
updateTimestring (date-time)read-onlyThe last time that attributes were modified.
integrationstringrequiredThe integration that manages the attribute.
Format:
integrations/{integration}keystringrequiredThe key of the attribute, such as “department” or “costCenter”.
valuestringrequiredThe value of the attribute, such as “Engineering” or “12345”.
Response
Section titled “Response”200UserAttributenamestringAssigned by Oblique. Name of the attribute of the format
users/{user}/userattributes/{user_attribute}.createTimestring (date-time)read-onlyCreate timestamp of the attributes. This is always the same as the parent user.
updateTimestring (date-time)read-onlyThe last time that attributes were modified.
integrationstringrequiredThe integration that manages the attribute.
Format:
integrations/{integration}keystringrequiredThe key of the attribute, such as “department” or “costCenter”.
valuestringrequiredThe value of the attribute, such as “Engineering” or “12345”.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
400 | Malformed request |
401 | Missing or invalid API key |
403 | Not allowed for this API key |
404 | Not found |
429 | Too many requests |
500 | Internal server error |