/organisations/id/{id}/contacts/id/{contactId} Resource

Organisations and contacts who manage their URNs and URLs with the URN-Service.

GET /organisations/id/{id}/contacts/id/{contactId}

Returns the user details of a contact.

Access: Logged in organisations only.

Request Parameters
name type description constraints
contactId path of the contact at the organisation required
id path of the organisation to which the contact belongs required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Response Codes
code condition
200 if the request was completed successfully
401 if the user is not authenticated (error code 401001)
403 if the user is not authorised to view the contact (error code 403001)
404
  • if an organisation with the given id could not be found (error code 404001)
  • if a contact with the given id could not be found (error code 404001)
Response Body
media type data type description
application/json Contact (JSON) the user details of the contact

Example

Request
GET /organisations/id/{id}/contacts/id/{contactId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "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"
}
                
              

PATCH /organisations/id/{id}/contacts/id/{contactId}

Updates the registration information of a URN.

Access: System administrators only.

Request Parameters
name type description constraints
contactId path of the contact at the organisation required
id path of the organisation to which the contact belongs required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Request Body
media type data type description
application/json UpdateContactRequest (JSON) the user details which should be updated
application/merge-patch+json UpdateContactRequest (JSON)
Response Codes
code condition
204 if the contact details were updated successfully
400 if a field is not valid (error code 400007)
401 if the user is not authenticated (error code 401001)
403 if the user is not authorized to
  • modify this contact (error code 403001) or
  • add or change the comment of this contact (error code 403001)
404
  • if an organisation with the given id could not be found (error code 404001)
  • if a contact with the given id could not be found (error code 404001)

Example

Request
PATCH /organisations/id/{id}/contacts/id/{contactId}
Content-Type: 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"
}
                
              
Response
HTTP/1.1 204 No Content

              

DELETE /organisations/id/{id}/contacts/id/{contactId}

Deletes a contact.

Access: System administrators only.

Request Parameters
name type description constraints
contactId path of the contact at the organisation required
id path of the organisation to which the contact belongs required
runas query optional login name whose identity is used to execute the request (only available to users with the RunAs privilege)  
Response Codes
code condition
204 if the contact was deleted successfully
401 if the user is not authenticated (error code 401001)
403 if the user is not authorized to delete this contact (error code 403001)
404
  • if an organisation with the given id could not be found (error code 404001)
  • if a contact with the given id could not be found (error code 404001)

Example

Request
DELETE /organisations/id/{id}/contacts/id/{contactId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content