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.
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.
Search#
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.
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 |
---|---|---|
|
25 |
|
|
0 |
|
|
false |
|
|
A set of objects that may contain any of the fields described in this table. Used in combination with exclude/required as described below |
|
|
false |
Whether to exclude results matching these criteria. This is only relevant when used in combination with sub criteria |
|
false |
Whether to require that these criteria are met. This is only relevant when used in combination with sub criteria |
|
Restrict the search to domains belonging to specified customers. Identified by id or shortname |
|
|
A set of of customer domains matched against domains |
|
|
false |
Whether to include super domains in the search results |
|
false |
Whether to include sub domains in the search results |
|
A set of keywords matched against fields defined by KeywordFieldStrategy |
|
|
all |
Defines which fields will be searched by keywords (either domainName, description or all) |
|
all |
Whether all or any of the keywords must match. (either all or any) |
|
A set of users identified by id or shortname matched against domains |
|
|
all |
Defines which fields will be searched by user (either createdByUser, lastUpdatedByUser, deletedByUser or all) |
|
any |
Whether all or any of the keywords must match. (either all or any) |
|
The start of the time search period. Used in combination with endTimestamp, timeMatchStrategy, and timeFieldStrategy |
|
|
The end of the time search period. Used in combination with startTimestamp, timeMatchStrategy, and timeFieldStrategy |
|
|
any |
Whether all or any of the keywords must match. (either all or any) |
|
all |
Which time field to use when searching within a time period. (either created, lastUpdated, deleted or all) |
|
What field(s) to sort the results by |
|
|
Require certain flags that must be present on the domain |
|
|
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.
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.
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.
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.
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.
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.