Skip to content

Customer domains

Fetching domains

Fetching a customer domain can be done in two ways. If you know the ID of the domain, you can fetch based on this ID. Or you can search for domains.

Fetching by ID

To fetch a domain by ID, the domain endpoint can be used with a GET request along with the ID. The response body will be JSON formatted, and contain all information on the domain.

1
curl -X GET -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/customerdomains/v1/domain/<id>

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.

To search for customer domains, the search endpoint can be used with a POST request and the search criteria submitted as JSON. The response body will be JSON formatted, and contain all search results.

1
2
3
curl -X POST -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/customernetworks/v1/domain/search -d '{
  "keywords": ["some"]
}'

In addition to supporting JSON, this endpoint also supports returning search results in CSV and Excel. Replace the Content-Type header value with text/csv or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet to use these.

The table below describes the different search criteria and what they do.

Field Name Default Description
limit 25
offset 0
includeDeleted false
subCriteria A set of objects that may contain any of the fields described in this table. Used in combination with exclude/required as described below
exclude false Whether to exclude results matching these criteria. This is only relevant when used in combination with sub criteria
required false Whether to require that these criteria are met. This is only relevant when used in combination with sub criteria
customer Restrict the search to domains belonging to specified customers. Identified by id or shortname
domainName A set of of customer domains matched against domains
includeSuperDomains false Whether to include super domains in the search results
includeSubDomains false Whether to include sub domains in the search results
keywords A set of keywords matched against fields defined by KeywordFieldStrategy
keywordFieldStrategy all Defines which fields will be searched by keywords (either domainName, description or all)
keywordMatchStrategy all Whether all or any of the keywords must match. (either all or any)
user A set of users identified by id or shortname matched against domains
userFieldStrategy all Defines which fields will be searched by user (either createdByUser, lastUpdatedByUser, deletedByUser or all)
userMatchStrategy any Whether all or any of the keywords must match. (either all or any)
startTimestamp The start of the time search period. Used in combination with endTimestamp, timeMatchStrategy, and timeFieldStrategy
endTimestamp The end of the time search period. Used in combination with startTimestamp, timeMatchStrategy, and timeFieldStrategy
timeMatchStrategy any Whether all or any of the keywords must match. (either all or any)
timeFieldStrategy all Which time field to use when searching within a time period. (either created, lastUpdated, deleted or all)
sortBy What field(s) to sort the results by
includeFlags Require certain flags that must be present on the domain
excludeFlags Require that certain flags are not present on the domain

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.

Creating customer domains

To add a single customer domain the domain endpoint must be used with the POST request, and the body submitted as JSON. The response body will be JSON formatted, and contain the added domain.

1
2
3
4
5
curl -X POST -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/customernetworks/v1/domain/ -d '{
  "customer": "mnemonic",
  "description": "properly described",
  "internalDomain": false
}'

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.

Updating a customer domain

To update a domain, the domain endpoint must be used with a PUT request. The response body will be the updated customer domain formatted as JSON.

1
2
3
4
curl -X PUT -H "Argus-API-Key: my/api/key" -H "Content-Type: application/json" https://api.mnemonic.no/customernetworks/v1/domain/<id> -d '{
  "description": "a description of the domain",
  "internalDomain": true
}'

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.

Verifying a customer domain

To verify a domain, the verify-endpoint must be used with a PUT request. The response body will be the updated customer domain formatted as JSON.

1
curl -X PUT -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/customernetworks/v1/domain/<id>/verify

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.

Un-verifying a customer domain

To un-verify a domain, the unverify-endpoint must be used with a PUT request. The response body will be the updated customer domain formatted as JSON.

1
curl -X PUT -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/customernetworks/v1/domain/<id>/unverify

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.

Deleting a customer domain

To delete a domain, the domain endpoint must be used with a DELETE request. The response body will be the updated customer domain formatted as JSON. Note that the domain will not be removed from the database, but rather marked as DELETED with a flag. The domain will be excluded from search results by default. A domain can be restored by creating it again.

1
curl -X DELETE -H "Argus-API-Key: my/api/key" https://api.mnemonic.no/customernetworks/v1/domain/<id>

Tip

For more detailed information on what the response model looks like, you can check out the Swagger API documentation.