Organisations and contacts who manage their URNs and URLs with the URN-Service.
Returns the contacts of an organisation.
Access: Logged in organisations only.
name | type | description | constraints |
---|---|---|---|
id | path | id of the organisation whose contacts are requested | required |
runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) |
code | condition |
---|---|
200 | if the request was completed successfully |
401 | if the user could not be authenticated (error code 401001) |
403 | if the user is not authorised to retrieve the contacts of the organisation (error code 403001) |
404 | if the organisation with the given id could not be found (error code 404001) |
media type | data type | description |
---|---|---|
application/json | Collection (JSON) | a Collection of Contacts |
GET /organisations/id/{id}/contacts
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"self" : "http://example.org/collection",
"totalItems" : 42,
"items" : [ { }, { } ]
}
Adds a new contact to an organisation.
Access: System administrators only.
name | type | description | constraints |
---|---|---|---|
id | path | of the organisation whose contacts are requested | required |
runas | query | optional login name whose identity is used to execute the request (only available to users with the RunAs privilege) |
media type | data type | description |
---|---|---|
application/json | CreateContactRequest (JSON) | the details for the new contact |
code | condition |
---|---|
201 | if the contact was added successfully |
400 |
|
401 | if the user is not authenticated (error code 401001) |
403 | if the user is not authorized to register
|
404 | if the organisation with the given id could not be found (error code 404001) |
media type | data type | description |
---|---|---|
application/json | Contact (JSON) | the new contact |
name | description |
---|---|
Location | URI pointing to the new contact |
POST /organisations/id/{id}/contacts
Content-Type: application/json
Accept: application/json
{
"surname" : "Gödel",
"forename" : "Kurt",
"email" : "k.goedel@example.org",
"phone" : "+49 69 1525-0",
"function" : "system administrator",
"comment" : "This contact is used for testing purposes only"
}
HTTP/1.1 201 Created
Content-Type: application/json
Location: ...
{
"self" : "http://example.org/organisations/id/1/contacts/id/1",
"created" : "2017-03-02T15:23:16.123Z",
"lastModified" : "2017-03-02T15:23:16.123Z",
"surname" : "Gödel",
"forename" : "Kurt",
"email" : "k.goedel@example.org",
"phone" : "+49 69 1525-0",
"function" : "system administrator",
"organisation" : "http://example.org/organisations/id/1",
"comment" : "This contact is used for testing purposes only"
}